diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-05-29 10:46:09 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-05-29 10:46:09 +0000 |
commit | b164e3d3367a73c815c3335ef70955c320549763 (patch) | |
tree | 2da33d41e600e3b570630664222a6fc034282601 | |
parent | e7ad38a8d250eb13f46e4ae768f1fad16c8d3315 (diff) | |
download | FreeBSD-src-b164e3d3367a73c815c3335ef70955c320549763.zip FreeBSD-src-b164e3d3367a73c815c3335ef70955c320549763.tar.gz |
Hook the ISP/SAF1761 driver into MIPS kernel builds.
- Update FDT file for BERI DE4 boards.
- Add needed kernel configuration keywords.
- Rename module to saf1761otg so that the device unit number does not
interfere with the hardware ID in dmesg.
Sponsored by: DARPA, AFRL
-rw-r--r-- | sys/boot/fdt/dts/mips/beripad-de4.dts | 11 | ||||
-rw-r--r-- | sys/conf/files | 2 | ||||
-rw-r--r-- | sys/dev/usb/controller/saf1761_otg_fdt.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/controller/usb_controller.c | 2 | ||||
-rw-r--r-- | sys/mips/conf/BERI_DE4_BASE | 9 | ||||
-rw-r--r-- | sys/modules/usb/Makefile | 6 | ||||
-rw-r--r-- | sys/modules/usb/saf1761otg/Makefile (renamed from sys/modules/usb/saf1761/Makefile) | 2 |
7 files changed, 22 insertions, 16 deletions
diff --git a/sys/boot/fdt/dts/mips/beripad-de4.dts b/sys/boot/fdt/dts/mips/beripad-de4.dts index 4a13622..e98f5e6 100644 --- a/sys/boot/fdt/dts/mips/beripad-de4.dts +++ b/sys/boot/fdt/dts/mips/beripad-de4.dts @@ -222,7 +222,7 @@ }; usb@0x7f100000 { - compatible = "philips,isp1761"; + compatible = "nxp,usb-isp1761"; reg = <0x7f100000 0x40000 0x7f140000 0x4>; // IRQ 4 is DC, IRQ 5 is HC. @@ -253,14 +253,5 @@ sri-cambridge,fileio = "rw"; sri-cambridge,devname = "de4tempfan"; }; - - avgen@0x7f100000 { - compatible = "sri-cambridge,avgen"; - reg = <0x7f100000 0x40000>; - sri-cambridge,width = <4>; - sri-cambridge,fileio = "r"; - sri-cambridge,devname = "usbmem"; - }; - }; }; diff --git a/sys/conf/files b/sys/conf/files index 1c447e1..3dd585a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2314,6 +2314,8 @@ dev/usb/controller/uhci.c optional uhci dev/usb/controller/uhci_pci.c optional uhci pci dev/usb/controller/xhci.c optional xhci dev/usb/controller/xhci_pci.c optional xhci pci +dev/usb/controller/saf1761_otg.c optional saf1761otg +dev/usb/controller/saf1761_otg_fdt.c optional saf1761otg fdt dev/usb/controller/uss820dci.c optional uss820dci dev/usb/controller/uss820dci_atmelarm.c optional uss820dci at91rm9200 dev/usb/controller/usb_controller.c optional usb diff --git a/sys/dev/usb/controller/saf1761_otg_fdt.c b/sys/dev/usb/controller/saf1761_otg_fdt.c index 3e5b5da..1b18aea 100644 --- a/sys/dev/usb/controller/saf1761_otg_fdt.c +++ b/sys/dev/usb/controller/saf1761_otg_fdt.c @@ -93,15 +93,15 @@ static device_method_t saf1761_otg_methods[] = { }; static driver_t saf1761_otg_driver = { - .name = "saf1761", + .name = "saf1761otg", .methods = saf1761_otg_methods, .size = sizeof(struct saf1761_otg_softc), }; static devclass_t saf1761_otg_devclass; -DRIVER_MODULE(saf1761, simplebus, saf1761_otg_driver, saf1761_otg_devclass, 0, 0); -MODULE_DEPEND(saf1761, usb, 1, 1, 1); +DRIVER_MODULE(saf1761otg, simplebus, saf1761_otg_driver, saf1761_otg_devclass, 0, 0); +MODULE_DEPEND(saf1761otg, usb, 1, 1, 1); static int saf1761_otg_fdt_probe(device_t dev) diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index d62acd2..9f0e116 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -138,7 +138,7 @@ DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0); /* Dual Mode Drivers */ DRIVER_MODULE(usbus, dwcotg, usb_driver, usb_devclass, 0, 0); -DRIVER_MODULE(usbus, saf1761, usb_driver, usb_devclass, 0, 0); +DRIVER_MODULE(usbus, saf1761otg, usb_driver, usb_devclass, 0, 0); /*------------------------------------------------------------------------* * usb_probe diff --git a/sys/mips/conf/BERI_DE4_BASE b/sys/mips/conf/BERI_DE4_BASE index 801c8d3..d24a41f 100644 --- a/sys/mips/conf/BERI_DE4_BASE +++ b/sys/mips/conf/BERI_DE4_BASE @@ -40,3 +40,12 @@ device uart device miibus options DEVICE_POLLING +# +# USB support +# +#options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +device usb +device saf1761otg + diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile index 6b3c9d4..8dccf38 100644 --- a/sys/modules/usb/Makefile +++ b/sys/modules/usb/Makefile @@ -44,7 +44,7 @@ MAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" SUBDIR = usb SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} \ - ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} + ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_saf1761otg} SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += ${_urtwn} ${_urtwnfw} SUBDIR += atp uhid ukbd ums udbp ufm uep wsp @@ -96,4 +96,8 @@ _urtw= urtw _avr32dci= avr32dci .endif +.if ${MACHINE_CPUARCH} == "mips" +_saf1761otg= saf1761otg +.endif + .include <bsd.subdir.mk> diff --git a/sys/modules/usb/saf1761/Makefile b/sys/modules/usb/saf1761otg/Makefile index 5610a38..f9d0e6f 100644 --- a/sys/modules/usb/saf1761/Makefile +++ b/sys/modules/usb/saf1761otg/Makefile @@ -33,7 +33,7 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/controller -KMOD= saf1761 +KMOD= saf1761otg SRCS= bus_if.h device_if.h usb_if.h \ opt_bus.h opt_usb.h ofw_bus_if.h \ saf1761_otg.c saf1761_otg_fdt.c \ |