git: f13593e913ea - stable/13 - Support decoding mem32 memory in the rk pcie driver

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 22 Aug 2022 09:12:13 UTC
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=f13593e913ead63c2b7667d68b9036bb5e7eb410

commit f13593e913ead63c2b7667d68b9036bb5e7eb410
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-06-30 18:08:32 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
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,