From nobody Mon Aug 22 09:12:13 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 4MB67d2L3Xz4Z5Nc; Mon, 22 Aug 2022 09:12:13 +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 4MB67d1vxzz3f1k; Mon, 22 Aug 2022 09:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661159533; 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=WlAkqnuVH8Z3+G5aFOfUf7otHTug2MBQvS1IBpOEYJw=; b=NuvH5e9+HkKbfz87v4rqPQAVbS874T9AMa1LpRwILGKw3MbOhUisHv8KovgXXay9rmYjA6 LrZjMelbCWwkmcn0Wvm9ugQ8s/YyC15QtPc0SIZsFP9jwi7cbT/T3YAY6w+U0LIdw1D1Rb xbHqQvn4/5drmsdGUVyezI5d0F+kUgpjN8LUdpwDkXi/CTSv+HHhABF/F/Qm7U4MbUZCy2 Z/ar7XIqQs2uGLQ8Xng62IUIsfV4tMebQdrs++GTZ3tfI/6v8/7DNZ0V2d7Hh/5j40FEyL jmWkxxWMRkWC9eTRQwXH9XAzdRjTM6Dl572Qku/UsZv5Xy8EdEnVH2o3lek+dw== 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 4MB67d0ySYzl2L; Mon, 22 Aug 2022 09:12:13 +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 27M9CD36046854; Mon, 22 Aug 2022 09:12:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27M9CD6q046852; Mon, 22 Aug 2022 09:12:13 GMT (envelope-from git) Date: Mon, 22 Aug 2022 09:12:13 GMT Message-Id: <202208220912.27M9CD6q046852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: f13593e913ea - stable/13 - Support decoding mem32 memory in the rk pcie driver 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f13593e913ead63c2b7667d68b9036bb5e7eb410 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661159533; 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=WlAkqnuVH8Z3+G5aFOfUf7otHTug2MBQvS1IBpOEYJw=; b=FYHGweZODzZgCM/4ihGyldojIG14b+kvoapJsUg3vYJE9ZLR3kqFSQOrEi1SEt3HskBgUH HU45h844bP9CKPyzaeamIRbw/umr+c3aYH9LTxC7Ilay4WX3zoJwNYa7iQ6YmaQSn9q/Pk 7XH5rk2jPr9/SALDRCf/QVOyiD0h+xZ7mV6OI2sEVddvpozucfDDpcx9wTRLYbWUNXF5jT PFhyyApbd0dPau3wTYoQUlZKmgXBHqgbAJ4xs7KQDJBmxDaoG7TsU9oHGSu1MzVXElkTFo zXz8uFPVUHO3fN1aL+ByaL+kzlw+nyShNVhIQGIb0EqEBAEB2UV7AlsANEXsgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661159533; a=rsa-sha256; cv=none; b=tOsJwXO/Ml26JnfNNUhxBu4t95gVoqLepGouwu24iKK8FjtOxhHUSJ0qa8gPqw8WQCks1P 2KNmFKRms560XOslpP428t1oZD4aSYnTO9zY+jxtqj+H1x/Ao0XkhESTZtVx4W8G58JzbF EodjXeGdxKmPPSAg5hvMsJh+w0nyboOyqZ5CVxf8H/b8bKclzAez2cy3+wlyVNwG4e3qA2 Rjfk6g+RHmOtJmi9UIYcxuwVmBpfmwKAShUPsy0F2fVrUJUkpEC1Etj5flq+wVQyAnIaH1 1Qybq4KYg+tSXqyvBg9BincaGAO2BEVRUhgQkUUXpLZFwH012ChO3iHiIf+pmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f13593e913ead63c2b7667d68b9036bb5e7eb410 commit f13593e913ead63c2b7667d68b9036bb5e7eb410 Author: Andrew Turner AuthorDate: 2022-06-30 18:08:32 +0000 Commit: Andrew Turner CommitDate: 2022-08-22 08:41:41 +0000 Support decoding mem32 memory in the rk pcie driver This is needed with some dtb files. While here use a switch statement as the two options are mutually exclusive in any iteration of the loop. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35680 (cherry picked from commit 1c799a6f29cadc7616362941c279dd0693c24645) --- sys/arm64/rockchip/rk_pcie.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index ea4ce5b568e6..42ea0e066bf5 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -405,17 +405,17 @@ rk_pcie_decode_ranges(struct rk_pcie_softc *sc, struct ofw_pci_range *ranges, int i; for (i = 0; i < nranges; i++) { - if ((ranges[i].pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) == - OFW_PCI_PHYS_HI_SPACE_IO) { + switch(ranges[i].pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) { + case OFW_PCI_PHYS_HI_SPACE_IO: if (sc->io_range.size != 0) { device_printf(sc->dev, "Duplicated IO range found in DT\n"); return (ENXIO); } sc->io_range = ranges[i]; - } - if (((ranges[i].pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) == - OFW_PCI_PHYS_HI_SPACE_MEM64)) { + break; + case OFW_PCI_PHYS_HI_SPACE_MEM32: + case OFW_PCI_PHYS_HI_SPACE_MEM64: if (ranges[i].pci_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) { if (sc->pref_mem_range.size != 0) { device_printf(sc->dev,