diff options
author | Jake Burkholder <jake@FreeBSD.org> | 2003-02-19 08:23:38 +0000 |
---|---|---|
committer | Jake Burkholder <jake@FreeBSD.org> | 2003-02-19 08:23:38 +0000 |
commit | 63ec9d57c9f07d0e4e2983fb86f44d371941ffdd (patch) | |
tree | 98cab5c0408be07e217717c1e27231a830e49d80 /sys/sparc64/fhc/fhc_central.c | |
parent | 9de91598226fb6d6166466d8fc189fff0537e534 (diff) | |
download | src-63ec9d57c9f07d0e4e2983fb86f44d371941ffdd.tar.gz src-63ec9d57c9f07d0e4e2983fb86f44d371941ffdd.zip |
Implement interrupt resource allocation and setup. Set the interrupt
group number properly based on the board id. Perform dummy reads of
registers after writing to flush the hardware write buffers.
This gets the soon to be committed zs attachment working.
Notes
Notes:
svn path=/head/; revision=111123
Diffstat (limited to 'sys/sparc64/fhc/fhc_central.c')
-rw-r--r-- | sys/sparc64/fhc/fhc_central.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sparc64/fhc/fhc_central.c b/sys/sparc64/fhc/fhc_central.c index a1daee9bbe49..3f6a31a3d589 100644 --- a/sys/sparc64/fhc/fhc_central.c +++ b/sys/sparc64/fhc/fhc_central.c @@ -96,6 +96,7 @@ fhc_central_attach(device_t dev) bus_addr_t size; bus_addr_t off; phandle_t node; + int board; int nreg; int rid; int i; @@ -103,6 +104,7 @@ fhc_central_attach(device_t dev) sc = device_get_softc(dev); node = central_get_node(dev); sc->sc_node = node; + sc->sc_flags |= FHC_CENTRAL; nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)®); if (nreg != FHC_NREG) { @@ -121,5 +123,10 @@ fhc_central_attach(device_t dev) sc->sc_bh[i] = rman_get_bushandle(sc->sc_memres[i]); } free(reg, M_OFWPROP); + + board = bus_space_read_4(sc->sc_bt[FHC_INTERNAL], + sc->sc_bh[FHC_INTERNAL], FHC_BSR); + sc->sc_board = ((board >> 16) & 0x1) | ((board >> 12) & 0xe); + return (fhc_attach(dev)); } |