From nobody Mon Feb 21 16:29:49 2022 X-Original-To: dev-commits-src-main@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 ED83B19DDF2E; Mon, 21 Feb 2022 16:29:50 +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 4K2SSY59Bqz4gvK; Mon, 21 Feb 2022 16:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645460990; 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=gw6owsqgf6KKqyYlA8PLf+YkrOaIGOY5xrZsRJUWB60=; b=W2qqCAWxUcHBlEX8KggkCW6ruQfHD+qRPoEprGTt8U805TF5pPrtbr7dYkrG/JTM7EJuEh 0V6LcAkw0BbKvB3pUS53U/qjVoIG+EwDkwq1mzPXWAW57PahprEYIgZV7P/m/cr7jn95TK fSo9Awlbj4nTQdM1D2YFOnsXnhfHZqPIcanO3HwVKgRFcdLbBjFTDaLgcf7t3p/IEiEj/A 1XOaeEJ4W3CCd8n/clSrX5vTa6e+hE9bNxreG/qeAAck9zDqsESLmUsJ+Bge8ufROCZd6V G4qmXd3oR2QywCfH0zAb40RanxZ3QEgD5ooivQtbUK5Tj/lbNzXY3Zgq0khARg== 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 7B6D31399F; Mon, 21 Feb 2022 16:29:49 +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 21LGTnn4008406; Mon, 21 Feb 2022 16:29:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21LGTnLm008405; Mon, 21 Feb 2022 16:29:49 GMT (envelope-from git) Date: Mon, 21 Feb 2022 16:29:49 GMT Message-Id: <202202211629.21LGTnLm008405@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: d46fd9e855a2 - main - if_cgem: Make ext_resources non-optional List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: d46fd9e855a2212f59ae35e84162d2d1a44f2035 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645460990; 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=gw6owsqgf6KKqyYlA8PLf+YkrOaIGOY5xrZsRJUWB60=; b=x6EKNdzKLT7Xaop63regFvBkjv6tJW5bmm67I9R+E8Z0HqQkJSsKxHvXK59RcLtuHzlAv1 37Z+K0is7+S9PVo5WkLnKM2QKsyktSpZvmU6cCcS0JWgFWwwdCdZVmD9Rj1YWz2rBh17KJ SJgRwiA7JCInkKkuqGIfivOZMbAjkni/2T/PSyWdkqDDnv9/GZU0qQtOkyaXIezJHs8QjI PdTUJwbGi1IdX6u42dU+zYPmrQF2JattGABRj04LbhCIH+oBW9NQWqV3YSxaVNUl5x/yxW IW81L2g5Qh0Gzp4ZZ4fG1+vAoND9K00+m7UJfB7RCo3a6ncLiwMQlwPdvWZnYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645460990; a=rsa-sha256; cv=none; b=Eailh+e0SoYVXhNJxZchlDMbzCszdaPy6pNwrcVsgXisoXcLE7woZVYQmyymgjgEMJeQeY O+le5gOnYXcyaAzb+jwFFSItUkd0Gqfjs2CqQTqAr1IaEzzdPIfWzBCEaQLvD/NbGfc9JO Psv5qzuVjFaXhxDwjnMvmf40o3XDVE19oNGRLBHkm8CnqBLKTRrcIHEB4CRn3CNKrT0dGm 7UwAFR8NJXKjLB5yzTLmX3Gt52o1JP7XixtFL3ucEUnPdxsbIh+paXWJxxdukRh6nqVyxH 2I4anXtWUYhxT1stik2AL1iUMSFRwvdCpHtg41/OCHW4hPF8sQdt3rOUK4Eobg== 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=d46fd9e855a2212f59ae35e84162d2d1a44f2035 commit d46fd9e855a2212f59ae35e84162d2d1a44f2035 Author: Emmanuel Vadot AuthorDate: 2022-01-11 09:42:34 +0000 Commit: Emmanuel Vadot CommitDate: 2022-02-21 16:28:48 +0000 if_cgem: 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/D33825 --- sys/dev/cadence/if_cgem.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 6001c5ba74a5..6b9d5a090aff 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef EXT_RESOURCES #include -#endif #if BUS_SPACE_MAXADDR > BUS_SPACE_MAXADDR_32BIT #define CGEM64 @@ -130,11 +128,7 @@ struct cgem_softc { struct callout tick_ch; uint32_t net_ctl_shadow; uint32_t net_cfg_shadow; -#ifdef EXT_RESOURCES clk_t ref_clk; -#else - int ref_clk_num; -#endif int neednullqs; bus_dma_tag_t desc_dma_tag; @@ -1497,7 +1491,6 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); -#ifdef EXT_RESOURCES if (sc->ref_clk != NULL) { CGEM_UNLOCK(sc); if (clk_set_freq(sc->ref_clk, ref_clk_freq, 0)) @@ -1505,13 +1498,6 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) ref_clk_freq); CGEM_LOCK(sc); } -#else - /* Set the reference clock if necessary. */ - if (cgem_set_ref_clk(sc->ref_clk_num, ref_clk_freq)) - device_printf(sc->dev, - "cgem_mediachange: could not set ref clk%d to %d.\n", - sc->ref_clk_num, ref_clk_freq); -#endif sc->mii_media_active = mii->mii_media_active; } @@ -1741,10 +1727,6 @@ cgem_attach(device_t dev) int rid, err; u_char eaddr[ETHER_ADDR_LEN]; int hwtype; -#ifndef EXT_RESOURCES - phandle_t node; - pcell_t cell; -#endif sc->dev = dev; CGEM_LOCK_INIT(sc); @@ -1756,7 +1738,6 @@ cgem_attach(device_t dev) if (hwtype == HWTYPE_ZYNQ) sc->rxhangwar = 1; -#ifdef EXT_RESOURCES if (hwtype == HWTYPE_ZYNQ || hwtype == HWTYPE_ZYNQMP) { if (clk_get_by_ofw_name(dev, 0, "tx_clk", &sc->ref_clk) != 0) device_printf(dev, @@ -1770,13 +1751,6 @@ cgem_attach(device_t dev) else if (clk_enable(sc->ref_clk) != 0) device_printf(dev, "could not enable clock.\n"); } -#else - /* Get reference clock number and base divider from fdt. */ - node = ofw_bus_get_node(dev); - sc->ref_clk_num = 0; - if (OF_getprop(node, "ref-clock-num", &cell, sizeof(cell)) > 0) - sc->ref_clk_num = fdt32_to_cpu(cell); -#endif /* Get memory resource. */ rid = 0; @@ -1939,12 +1913,10 @@ cgem_detach(device_t dev) sc->mbuf_dma_tag = NULL; } -#ifdef EXT_RESOURCES if (sc->ref_clk != NULL) { clk_release(sc->ref_clk); sc->ref_clk = NULL; } -#endif bus_generic_detach(dev);