From nobody Mon May 16 12:09:42 2022 X-Original-To: dev-commits-src-branches@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 180391ADDD96; Mon, 16 May 2022 12:09:45 +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 4L1yjg1XCkz4cHs; Mon, 16 May 2022 12:09:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652702984; 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=TNehdSmMq9dAhj43lrOq9aU+7/oBF8pYI0D5aCS6esM=; b=L0BFVrWh+oqaY71ZL+4IBZJiDEIDiL31oLcvykklHj/aoWnCQWRGm8EWunha0HJnKOcLol EF3K7crQdtQ1K9JGcXJPDCZkNprbTkp3IgFY2xMhGBDxFsYEq8yuzPYVONjQEFl+7k2v2J /QLvVBY0ln/01b0jJA57B2+ae2+e0qLFatRlpKddRAioPl0WMi79q4ErZHC/ZCaqstGWK6 wGrllqpzVyYzi2ySiOAK2ksSYuOn4ANpQ+WMhssb+rvWG5NQofD3eM2QsPqtC4aOxQD9RD mMwCh4lR4xyHqDrYjj4PdhvArviJDFmooVrTxhgVlPE9fCi7e3yNLuK3i+8feQ== 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 C04191F8D3; Mon, 16 May 2022 12:09:42 +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 24GC9gZJ035223; Mon, 16 May 2022 12:09:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24GC9gp1035222; Mon, 16 May 2022 12:09:42 GMT (envelope-from git) Date: Mon, 16 May 2022 12:09:42 GMT Message-Id: <202205161209.24GC9gp1035222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 65ae10de64f0 - stable/13 - if_cgem: Make ext_resources non-optional List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 65ae10de64f020be43d1f4c7b2ca7a8def47f8f5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652702984; 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=TNehdSmMq9dAhj43lrOq9aU+7/oBF8pYI0D5aCS6esM=; b=Hgu0KMKZq3sif3y+ZJRl7040+WJ5VLQxSEzbiKVsnn/LBqecKJqsFxdDYpqRNfCY6UzrSn TJO8PCAt+QUkkQPXSE/1dhjRex1CMul9DRjKnJ52SC+ITgCvQMBwMjhNUONS1AEHkoZQ/b Oz6r34V154ITq3g//2J+J7S++eTy4nPF4z/9BQY7y42gHVwC9mrlj0Uscvuc6gYiTIUm1+ odkEAGadTWXKL1ufyYNN76g0UpyxBSTS2l64crjDPixcUyzElXxzgWcxegrTpBmUSWGarv ws7GLe3Wz7vQe7Q+g8fXAxiXmg++z5XXyDnluvDZ8TQUdjH2lWQtGzHdzNEvtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652702984; a=rsa-sha256; cv=none; b=uUVv3ETt6T+8vmU1W2p4IeiDQBD8jw+oCdiWEfSoXb1XSEe5om8HBTqYSloTnVjLprRLLJ mvSmFcL6QnqFPXQKCYoTW9tNvWXhYxOL/WCkx6f2R0FX2xdk+E9H5ITr7SyfAW/ZyBjQTV Y8CL0sLY0OTMvI+5318FeZcnxnbp3w/6Dv/3IgG2CJUn8s3II0GLMUy9gsGzXBWBaraCLQ Rxqli7wSoPxB/P+b2r7L1pUmX1EckTd41QlGgnnT/c8lHfDM5P+YnyeVELO72PMvB2QHaV XTiqD9ehvNMUgpDyHaUTintT/zJLbsamPjl8oKJuMlN6KBzKIfAd4LJjKusctg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=65ae10de64f020be43d1f4c7b2ca7a8def47f8f5 commit 65ae10de64f020be43d1f4c7b2ca7a8def47f8f5 Author: Emmanuel Vadot AuthorDate: 2022-01-11 09:42:34 +0000 Commit: Emmanuel Vadot CommitDate: 2022-05-16 11:45:36 +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 (cherry picked from commit d46fd9e855a2212f59ae35e84162d2d1a44f2035) --- 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);