Date: Sat, 9 Sep 2017 11:06:58 +0000 (UTC) From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323357 - in head/sys: conf dev/usb/controller Message-ID: <201709091106.v89B6wli074478@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mw Date: Sat Sep 9 11:06:58 2017 New Revision: 323357 URL: https://svnweb.freebsd.org/changeset/base/323357 Log: Add support for Armada 3700 EHCI This patch reuses ehci_mv driver by adding a support for the new compatible string and adding ehci_mv.c to list of available options for arm64 platforms. Submitted by: Patryk Duda <pdk@semihalf.com> Obtained from: Semihalf Sponsored by: Semihalf Differential Revision: https://reviews.freebsd.org/D12255 Modified: head/sys/conf/files.arm64 head/sys/dev/usb/controller/ehci_mv.c Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Sat Sep 9 11:01:44 2017 (r323356) +++ head/sys/conf/files.arm64 Sat Sep 9 11:06:58 2017 (r323357) @@ -176,6 +176,7 @@ dev/psci/psci_arm64.S optional psci dev/uart/uart_cpu_arm64.c optional uart dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 +dev/usb/controller/ehci_mv.c optional ehci_mv fdt dev/usb/controller/generic_ehci.c optional ehci acpi dev/usb/controller/generic_ohci.c optional ohci fdt dev/usb/controller/generic_usb_if.m optional ohci fdt Modified: head/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- head/sys/dev/usb/controller/ehci_mv.c Sat Sep 9 11:01:44 2017 (r323356) +++ head/sys/dev/usb/controller/ehci_mv.c Sat Sep 9 11:06:58 2017 (r323357) @@ -73,7 +73,9 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/controller/ehci.h> #include <dev/usb/controller/ehcireg.h> +#if !defined(__aarch64__) #include <arm/mv/mvreg.h> +#endif #include <arm/mv/mvvar.h> #define EHCI_VENDORID_MRVL 0x1286 @@ -100,9 +102,10 @@ static void *ih_err; #define MV_USB_DEVICE_UNDERFLOW (1 << 3) static struct ofw_compat_data compat_data[] = { - {"mrvl,usb-ehci", true}, - {"marvell,orion-ehci", true}, - {NULL, false} + {"mrvl,usb-ehci", true}, + {"marvell,orion-ehci", true}, + {"marvell,armada-3700-ehci", true}, + {NULL, false} }; static void @@ -174,7 +177,8 @@ mv_ehci_attach(device_t self) device_get_name(self)); rid = 0; - if (!ofw_bus_is_compatible(self, "marvell,orion-ehci")) { + if (!(ofw_bus_is_compatible(self, "marvell,orion-ehci") || + ofw_bus_is_compatible(self, "marvell,armada-3700-ehci"))) { irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (irq_err == NULL) { @@ -207,7 +211,8 @@ mv_ehci_attach(device_t self) sprintf(sc->sc_vendor, "Marvell"); - if (!ofw_bus_is_compatible(self, "marvell,orion-ehci")) { + if (!(ofw_bus_is_compatible(self, "marvell,orion-ehci") || + ofw_bus_is_compatible(self, "marvell,armada-3700-ehci"))) { err = bus_setup_intr(self, irq_err, INTR_TYPE_BIO, err_intr, NULL, sc, &ih_err); if (err) { @@ -365,5 +370,5 @@ static driver_t ehci_driver = { static devclass_t ehci_devclass; -DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1); +DRIVER_MODULE(ehci_mv, simplebus, ehci_driver, ehci_devclass, 0, 0); +MODULE_DEPEND(ehci_mv, usb, 1, 1, 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709091106.v89B6wli074478>