update config, add cheats to amusbss, bind to intr in ammusb
[bbb-usb.git] / src / sys / arch / armv7 / omap / ammusb.c
index 474f625f862c4956dcf912fd7122a87e2ac62013..5b6200a6c0e6bffdb5448ce1eaf3277cc2f0ec29 100644 (file)
@@ -123,9 +123,7 @@ ammusb_attach(struct device *parent, struct device *self, void *args)
        struct fdt_attach_args *faa = args;
 
        uint32_t rev, phy_reg[2];
-       int phy_node;
-
-       phy_node = -1;
+       int phy_node = -1, irq;
 
        sc->sc_iot = faa->fa_iot;
 
@@ -147,6 +145,9 @@ ammusb_attach(struct device *parent, struct device *self, void *args)
            &sc->sc_ioh_ctl))
                panic("%s: bus_space_map failed!", __func__);
 
+       irq = faa->fa_intr[0];
+       sc->sc_ih = arm_intr_establish(irq, IPL_BIO, ammusb_intr, sc, DEVNAME(sc));
+
        /* not the right revision number XXX */
        rev = HREAD4(sc, sc->sc_ioh_ctl, 0x0);
        printf(": rev %d.%d\n", rev >> 4 &0xf, rev & 0xf);