]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
pci: brcmstb: Fix iBAR size calculation
authorTorsten Duwe <duwe@suse.de>
Mon, 1 Jun 2026 10:39:34 +0000 (12:39 +0200)
committerPeter Robinson <pbrobinson@gmail.com>
Thu, 4 Jun 2026 09:50:04 +0000 (10:50 +0100)
Fix inbound window size calculation, like Linux commit 25a98c7270156.

Signed-off-by: Torsten Duwe <duwe@suse.de>
Tested-by: Pedro Falcato <pfalcato@suse.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
drivers/pci/pcie_brcmstb.c

index 012b501078acb9700bb70ee918182fa974b64bcd..164d8e2b7fef25a1a6cb19ae7bbd4630a65275f4 100644 (file)
@@ -101,8 +101,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 <= 37)
-               /* 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 */