Deleted Added
full compact
32c32
< __FBSDID("$FreeBSD: head/sys/dev/sec/sec.c 194101 2009-06-13 08:57:04Z raj $");
---
> __FBSDID("$FreeBSD: head/sys/dev/sec/sec.c 209908 2010-07-11 21:08:29Z raj $");
48d47
< #include <machine/ocpbus.h>
53a53
> #include <dev/ofw/ofw_bus_subr.h>
156c156
< DRIVER_MODULE(sec, ocpbus, sec_driver, sec_devclass, 0, 0);
---
> DRIVER_MODULE(sec, simplebus, sec_driver, sec_devclass, 0, 0);
204,205d203
< device_t parent;
< uintptr_t devtype;
207d204
< int error;
209,214c206
< parent = device_get_parent(dev);
< error = BUS_READ_IVAR(parent, dev, OCPBUS_IVAR_DEVTYPE, &devtype);
< if (error)
< return (error);
<
< if (devtype != OCPBUS_DEVTYPE_SEC)
---
> if (!ofw_bus_is_compatible(dev, "fsl,sec2.0"))
220,221c212,213
< sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid,
< 0ul, ~0ul, SEC_IO_SIZE, RF_ACTIVE);
---
> sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid,
> RF_ACTIVE);
279,280c271,272
< sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid,
< 0ul, ~0ul, SEC_IO_SIZE, RF_ACTIVE);
---
> sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid,
> RF_ACTIVE);
298,300d289
< sc->sc_sec_irid = 1;
< error = sec_setup_intr(sc, &sc->sc_sec_ires, &sc->sc_sec_ihand,
< &sc->sc_sec_irid, sec_secondary_intr, "secondary");
302,303c291,294
< if (error)
< goto fail3;
---
> if (sc->sc_version == 3) {
> sc->sc_sec_irid = 1;
> error = sec_setup_intr(sc, &sc->sc_sec_ires, &sc->sc_sec_ihand,
> &sc->sc_sec_irid, sec_secondary_intr, "secondary");
304a296,299
> if (error)
> goto fail3;
> }
>