From: kremlin Date: Sun, 23 Apr 2017 05:30:14 +0000 (-0500) Subject: update config, add cheats to amusbss, bind to intr in ammusb X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;p=bbb-usb.git update config, add cheats to amusbss, bind to intr in ammusb --- diff --git a/src/sys/arch/armv7/conf/USB b/src/sys/arch/armv7/conf/USB index 43dcbd6..b088dc3 100644 --- a/src/sys/arch/armv7/conf/USB +++ b/src/sys/arch/armv7/conf/USB @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.70 2017/01/03 19:57:01 kettenis Exp $ +# $OpenBSD: GENERIC,v 1.82 2017/03/24 20:31:58 patrick Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -24,6 +24,9 @@ option WSDISPLAY_DEFAULTSCREENS=1 option CONF_HAVE_GPIO option USBVERBOSE +option DDB_STRUCT +option DDB_SAFE_CONSOLE + config bsd swap generic # The main bus device @@ -63,7 +66,7 @@ omapid* at omap? # OMAP on-chip devices intc* at fdt? # OMAP3 interrupt controller omwugen* at fdt? # Wake-up generator -#edma* at omap? # OMAP3 dma controller +#edma* at fdt? # OMAP3 dma controller prcm* at omap? # power/clock controller ompinmux* at fdt? # pin muxing omdog* at fdt? # watchdog timer @@ -109,30 +112,35 @@ plrtc* at fdt? virtio* at fdt? psci* at fdt? +syscon* at fdt? simplefb* at fdt? wsdisplay* at simplefb? # Exynos -exynos0 at mainbus? -exdisplay* at exynos? -wsdisplay* at exdisplay? console ? -exclock* at exynos? -expower* at exynos? -exsysreg* at exynos? -exmct* at exynos? -exdog* at exynos? -exgpio* at exynos? -exiic* at exynos? +#exdisplay* at exynos? +#wsdisplay* at exdisplay? console ? +exclock* at fdt? early 1 +expower* at fdt? early 1 +exsysreg* at fdt? early 1 +exmct* at fdt? early 1 +exdog* at fdt? +exgpio* at fdt? early 1 +exiic* at fdt? iic* at exiic? -exehci* at exynos? -ehci* at exehci? -exesdhc* at exynos? +exehci* at fdt? +usb* at exehci? +exdwusb* at fdt? +xhci* at fdt? +usb* at xhci? +exesdhc* at fdt? sdmmc* at exesdhc? +exrtc* at fdt? exuart* at fdt? # Raspberry Pi 2/3 bcmintc* at fdt? +bcmdog* at fdt? dwctwo* at fdt? usb* at dwctwo? @@ -141,6 +149,9 @@ mvacc* at fdt? early 1 mvagc* at fdt? mvsysctrl* at fdt? mvmbus* at fdt? +mvxhci* at fdt? +usb* at mvxhci? +mvahci* at fdt? crosec* at iic? wskbd* at crosec? mux 1 diff --git a/src/sys/arch/armv7/omap/ammusb.c b/src/sys/arch/armv7/omap/ammusb.c index 474f625..5b6200a 100644 --- a/src/sys/arch/armv7/omap/ammusb.c +++ b/src/sys/arch/armv7/omap/ammusb.c @@ -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); diff --git a/src/sys/arch/armv7/omap/amusbss.c b/src/sys/arch/armv7/omap/amusbss.c index 67fade6..53b16c2 100644 --- a/src/sys/arch/armv7/omap/amusbss.c +++ b/src/sys/arch/armv7/omap/amusbss.c @@ -86,6 +86,7 @@ int amusbss_debug = 20; struct amusbss_softc { struct device sc_dev; +// struct simplebus_softc sc_sbus; bus_space_tag_t sc_iot; void *sc_ih; bus_dma_tag_t sc_dmat; @@ -99,6 +100,9 @@ struct amusbss_softc { bus_size_t sc_ios_queue; }; +/* XXX figure out what to do instead of this XXX */ +extern void simplebus_attach_node(struct device *, int); + /* core decl */ int amusbss_match(struct device *, void *, void *); void amusbss_attach(struct device *, struct device *, void *); @@ -160,6 +164,9 @@ amusbss_attach(struct device *parent, struct device *self, void *args) rev = HREAD4(sc, USBSS_REVREG); printf(": rev %d.%d\n", rev >> 4 &0xf, rev & 0xf); + //faa->fa_node = node; + //simplebus_attach(parent, &sc->sc_sbus.sc_dev, faa); + /* Walk FDT child nodes to attach ammusb devices, map DMA controllers */ for (node = OF_child(faa->fa_node); node > 0; node = OF_peer(node)) { if (OF_is_compatible(node, "ti,am3359-cppi41")) {