1/*- 2 * Copyright (c) 2006 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 43 unchanged lines hidden (view full) --- 52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 53 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 54 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 57 * SUCH DAMAGE. 58*/ 59#include <sys/cdefs.h> |
60__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_qmgr.c 186352 2008-12-20 03:26:09Z sam $"); |
61 62/* 63 * Intel XScale Queue Manager support. 64 * 65 * Each IXP4XXX device has a hardware block that implements a priority 66 * queue manager that is shared between the XScale cpu and the backend 67 * devices (such as the NPE). Queues are accessed by reading/writing 68 * special memory locations. The queue contents are mapped into a shared --- 87 unchanged lines hidden (view full) --- 156 uint32_t uppPriorityTableFirstHalfMask; 157 int rebuildTable; /* rebuild priorityTable */ 158 159 uint32_t aqmFreeSramAddress; /* SRAM free space */ 160}; 161 162static int qmgr_debug = 0; 163SYSCTL_INT(_debug, OID_AUTO, qmgr, CTLFLAG_RW, &qmgr_debug, |
164 0, "IXP4XX Q-Manager debug msgs"); |
165TUNABLE_INT("debug.qmgr", &qmgr_debug); 166#define DPRINTF(dev, fmt, ...) do { \ 167 if (qmgr_debug) printf(fmt, __VA_ARGS__); \ 168} while (0) 169#define DPRINTFn(n, dev, fmt, ...) do { \ 170 if (qmgr_debug >= n) printf(fmt, __VA_ARGS__); \ 171} while (0) 172 --- 26 unchanged lines hidden (view full) --- 199{ 200 DPRINTFn(9, sc->sc_dev, "%s(0x%x, 0x%x)\n", __func__, (int)off, val); 201 bus_space_write_4(sc->sc_iot, sc->sc_ioh, off, val); 202} 203 204static int 205ixpqmgr_probe(device_t dev) 206{ |
207 device_set_desc(dev, "IXP4XX Q-Manager"); |
208 return 0; 209} 210 211static int 212ixpqmgr_attach(device_t dev) 213{ 214 struct ixpqmgr_softc *sc = device_get_softc(dev); 215 struct ixp425_softc *sa = device_get_softc(device_get_parent(dev)); --- 890 unchanged lines hidden --- |