From owner-svn-src-all@freebsd.org Sat Sep 9 11:07:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DBB2E0FDAD; Sat, 9 Sep 2017 11:07:00 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE4D3645C1; Sat, 9 Sep 2017 11:06:59 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v89B6xvp074480; Sat, 9 Sep 2017 11:06:59 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v89B6wli074478; Sat, 9 Sep 2017 11:06:58 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201709091106.v89B6wli074478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Sat, 9 Sep 2017 11:06:58 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: in head/sys: conf dev/usb/controller X-SVN-Commit-Revision: 323357 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 11:07:00 -0000 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 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 #include +#if !defined(__aarch64__) #include +#endif #include #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);