From nobody Mon Feb 21 16:29:51 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 08EEB19DDE66; Mon, 21 Feb 2022 16:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2SSc1dzrz4gps; Mon, 21 Feb 2022 16:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645460992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAp4QJd+f5eaLUgEjE4dmMcPfQYJ8ymwHme8ctj3uiU=; b=IegWXWNWdhZShCtiws/MQMUSC2r8FiSvmtu1YeoE3knWoyPeajzB4W14dowvFzhH0FUgS3 pCJWcOno2i94S3668t7iocPgJEh3tiYbw+bX8sNxhVhFaoazs83BlTfBz56l2v3RtfjIBX /7olXPvH3Ue+XULbXdvDoPBH2g1zQUmppfzron5JQe5Khoo20CndSzkqxHDA7Se2Bc9PNy tEZ2RwgC96R6GniqoBKV889vBGJq4/Nb4QZGDHgrCuTL1QTAAai/Th7zV/UrFFOAq1EIBO RUAg4VkG1/fOQxYZfnBDaVGWbK6/QVyVYsiELGXXeU2pV+7sEx1uGMeWz/tC0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D15DC139A0; Mon, 21 Feb 2022 16:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21LGTpAW008460; Mon, 21 Feb 2022 16:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21LGTpar008459; Mon, 21 Feb 2022 16:29:51 GMT (envelope-from git) Date: Mon, 21 Feb 2022 16:29:51 GMT Message-Id: <202202211629.21LGTpar008459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: fb6cebd8bdf4 - main - usb: Make ext_resources non-optional List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb6cebd8bdf457444c02e7a30b4b9d24f45568c6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645460992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAp4QJd+f5eaLUgEjE4dmMcPfQYJ8ymwHme8ctj3uiU=; b=QRq3kwIXYR3TTTifI24OytoXvwu7LiHj2FBwVkctJuZDyotsDf9rNGoII45ljpzR1Pt7CH QcJ+K+T0PrPygCLj8sixV/lFAZG9UlNb4Lz7tpCJFubxJ5PvDFtUPj9b5Ak69Z3Qn05/lU RqIg4gRNXIBnqMIyNmCtwf033SWfY7hP29FiCr1yzzR7w++w6bMAtXC/CHdtCndNNieZMi CcWo8tWJOC//TDlTEuOSsI8QIFLVYk/CEe1EHNf/EQuUi8Xz5R2j5W2MbeZ7oXhNgdp18H p48YRI5A9klk3msJQ6qqaE2gcqSUjt3O/6iQRej/eazZc44G4Ch1U2EqcYLTYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645460992; a=rsa-sha256; cv=none; b=itu79O/+rNEmDuVItm53HPvJsw37rIgYAzMXUhmW6nPxLU3uxJBlgbM7s2CTNlAMl7/mjS X0D/j/1R1mbCG1UQqfb7KFhrJd/sN5NJnIk2wAGaxb9NOXMj35URbYgax+g9tRxZc0egbT s0DC78lf4CSRGtyumPGd2uAoi0eCYYFE9YZgT+OWG8wUlemoUiAx/V13k7EDfvv9Pr3875 SvQQETdE8rr2Vb1Eu4cfJG09faTyXfT3oTv5todeho6E/nhraB0mBlkackb5vlf7RWPTW4 dCKwvs3kXGS6sdN4+PI6e69RVl7zIt3KN34ePkWN1nJarbIGC0REpNIrQ81bXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fb6cebd8bdf457444c02e7a30b4b9d24f45568c6 commit fb6cebd8bdf457444c02e7a30b4b9d24f45568c6 Author: Emmanuel Vadot AuthorDate: 2022-01-11 09:45:42 +0000 Commit: Emmanuel Vadot CommitDate: 2022-02-21 16:28:52 +0000 usb: Make ext_resources non-optional EXT_RESOURCES have been introduced in 12-CURRENT and all supported releases have it enabled in their kernel config. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33827 --- sys/dev/usb/controller/generic_ehci_fdt.c | 12 ------------ sys/dev/usb/controller/generic_ohci.c | 14 -------------- sys/dev/usb/controller/generic_xhci_fdt.c | 8 -------- 3 files changed, 34 deletions(-) diff --git a/sys/dev/usb/controller/generic_ehci_fdt.c b/sys/dev/usb/controller/generic_ehci_fdt.c index a76bec12aab5..a660674cbace 100644 --- a/sys/dev/usb/controller/generic_ehci_fdt.c +++ b/sys/dev/usb/controller/generic_ehci_fdt.c @@ -56,16 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef EXT_RESOURCES #include #include #include #include -#endif #include "generic_ehci.h" -#ifdef EXT_RESOURCES struct clk_list { TAILQ_ENTRY(clk_list) next; clk_t clk; @@ -80,16 +77,13 @@ struct phy_list { TAILQ_ENTRY(phy_list) next; phy_t phy; }; -#endif struct generic_ehci_fdt_softc { ehci_softc_t ehci_sc; -#ifdef EXT_RESOURCES TAILQ_HEAD(, clk_list) clk_list; TAILQ_HEAD(, hwrst_list) rst_list; TAILQ_HEAD(, phy_list) phy_list; -#endif }; static device_probe_t generic_ehci_fdt_probe; @@ -114,7 +108,6 @@ static int generic_ehci_fdt_attach(device_t dev) { int err; -#ifdef EXT_RESOURCES struct generic_ehci_fdt_softc *sc; struct clk_list *clkp; clk_t clk; @@ -170,7 +163,6 @@ generic_ehci_fdt_attach(device_t dev) phyp->phy = phy; TAILQ_INSERT_TAIL(&sc->phy_list, phyp, next); } -#endif err = generic_ehci_attach(dev); if (err != 0) @@ -186,19 +178,16 @@ error: static int generic_ehci_fdt_detach(device_t dev) { -#ifdef EXT_RESOURCES struct generic_ehci_fdt_softc *sc; struct clk_list *clk, *clk_tmp; struct hwrst_list *rst, *rst_tmp; struct phy_list *phy, *phy_tmp; -#endif int err; err = generic_ehci_detach(dev); if (err != 0) return (err); -#ifdef EXT_RESOURCES sc = device_get_softc(dev); /* Disable clock */ @@ -232,7 +221,6 @@ generic_ehci_fdt_detach(device_t dev) TAILQ_REMOVE(&sc->phy_list, phy, next); free(phy, M_DEVBUF); } -#endif return (0); } diff --git a/sys/dev/usb/controller/generic_ohci.c b/sys/dev/usb/controller/generic_ohci.c index 4b6c4dd4fcfa..8dd9bc50abc7 100644 --- a/sys/dev/usb/controller/generic_ohci.c +++ b/sys/dev/usb/controller/generic_ohci.c @@ -56,16 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef EXT_RESOURCES #include #include #include #include -#endif #include "generic_usb_if.h" -#ifdef EXT_RESOURCES struct clk_list { TAILQ_ENTRY(clk_list) next; clk_t clk; @@ -78,16 +75,13 @@ struct hwrst_list { TAILQ_ENTRY(hwrst_list) next; hwreset_t rst; }; -#endif struct generic_ohci_softc { ohci_softc_t ohci_sc; -#ifdef EXT_RESOURCES TAILQ_HEAD(, clk_list) clk_list; TAILQ_HEAD(, phy_list) phy_list; TAILQ_HEAD(, hwrst_list) rst_list; -#endif }; static int generic_ohci_detach(device_t); @@ -112,7 +106,6 @@ generic_ohci_attach(device_t dev) { struct generic_ohci_softc *sc = device_get_softc(dev); int err, rid; -#ifdef EXT_RESOURCES int off; struct clk_list *clkp; struct phy_list *phyp; @@ -120,7 +113,6 @@ generic_ohci_attach(device_t dev) clk_t clk; phy_t phy; hwreset_t rst; -#endif sc->ohci_sc.sc_bus.parent = dev; sc->ohci_sc.sc_bus.devices = sc->ohci_sc.sc_devices; @@ -170,7 +162,6 @@ generic_ohci_attach(device_t dev) goto error; } -#ifdef EXT_RESOURCES TAILQ_INIT(&sc->clk_list); /* Enable clock */ for (off = 0; clk_get_by_ofw_index(dev, 0, off, &clk) == 0; off++) { @@ -215,7 +206,6 @@ generic_ohci_attach(device_t dev) phyp->phy = phy; TAILQ_INSERT_TAIL(&sc->phy_list, phyp, next); } -#endif if (GENERIC_USB_INIT(dev) != 0) { err = ENXIO; @@ -239,11 +229,9 @@ generic_ohci_detach(device_t dev) { struct generic_ohci_softc *sc = device_get_softc(dev); int err; -#ifdef EXT_RESOURCES struct clk_list *clk, *clk_tmp; struct phy_list *phy, *phy_tmp; struct hwrst_list *rst, *rst_tmp; -#endif /* during module unload there are lots of children leftover */ device_delete_children(dev); @@ -282,7 +270,6 @@ generic_ohci_detach(device_t dev) } usb_bus_mem_free_all(&sc->ohci_sc.sc_bus, &ohci_iterate_hw_softc); -#ifdef EXT_RESOURCES /* Disable phy */ TAILQ_FOREACH_SAFE(phy, &sc->phy_list, next, phy_tmp) { err = phy_disable(phy->phy); @@ -314,7 +301,6 @@ generic_ohci_detach(device_t dev) TAILQ_REMOVE(&sc->clk_list, clk, next); free(clk, M_DEVBUF); } -#endif if (GENERIC_USB_DEINIT(dev) != 0) return (ENXIO); diff --git a/sys/dev/usb/controller/generic_xhci_fdt.c b/sys/dev/usb/controller/generic_xhci_fdt.c index 1d0fca2ce92b..ea34c2077e43 100644 --- a/sys/dev/usb/controller/generic_xhci_fdt.c +++ b/sys/dev/usb/controller/generic_xhci_fdt.c @@ -53,9 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef EXT_RESOURCES #include -#endif #include "generic_xhci.h" @@ -85,7 +83,6 @@ generic_xhci_fdt_probe(device_t dev) static int generic_xhci_fdt_attach(device_t dev) { -#ifdef EXT_RESOURCES phandle_t node; phy_t phy; @@ -93,7 +90,6 @@ generic_xhci_fdt_attach(device_t dev) if (phy_get_by_ofw_property(dev, node, "usb-phy", &phy) == 0) if (phy_enable(phy) != 0) device_printf(dev, "Cannot enable phy\n"); -#endif return (generic_xhci_attach(dev)); } @@ -101,21 +97,17 @@ generic_xhci_fdt_attach(device_t dev) static int generic_xhci_fdt_detach(device_t dev) { -#ifdef EXT_RESOURCES phandle_t node; phy_t phy; -#endif int err; err = generic_xhci_detach(dev); if (err != 0) return (err); -#ifdef EXT_RESOURCES node = ofw_bus_get_node(dev); if (phy_get_by_ofw_property(dev, node, "usb-phy", &phy) == 0) phy_release(phy); -#endif return (0); }