]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: brcmstb: Expand inbound window size up to 64GB
authorStanimir Varbanov <svarbanov@suse.de>
Mon, 24 Feb 2025 08:35:58 +0000 (10:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:37:02 +0000 (14:37 +0200)
[ Upstream commit 25a98c727015638baffcfa236e3f37b70cedcf87 ]

The BCM2712 memory map can support up to 64GB of system memory, thus
expand the inbound window size in calculation helper function.

The change is safe for the currently supported SoCs that have smaller
inbound window sizes.

Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jim Quinlan <james.quinlan@broadcom.com>
Tested-by: Ivan T. Ivanov <iivanov@suse.de>
Link: https://lore.kernel.org/r/20250224083559.47645-7-svarbanov@suse.de
[kwilczynski: commit log]
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pcie-brcmstb.c

index bbc9786bc36cf1f9de1b260ae19b912e369f866f..2fc4fe23e6bbfcac5ec12a8e7cb2024439d0f58d 100644 (file)
@@ -300,8 +300,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
        if (log2_in >= 12 && log2_in <= 15)
                /* Covers 4KB to 32KB (inclusive) */
                return (log2_in - 12) + 0x1c;
-       else if (log2_in >= 16 && log2_in <= 35)
-               /* Covers 64KB to 32GB, (inclusive) */
+       else if (log2_in >= 16 && log2_in <= 36)
+               /* Covers 64KB to 64GB, (inclusive) */
                return log2_in - 15;
        /* Something is awry so disable */
        return 0;