[PATCH v2 -next 04/11] PCI: brcmstb: Expand inbound size calculation helper

Stanimir Varbanov posted 11 patches 2 months, 2 weeks ago
There is a newer version of this series
[PATCH v2 -next 04/11] PCI: brcmstb: Expand inbound size calculation helper
Posted by Stanimir Varbanov 2 months, 2 weeks ago
Expand the inbound size calculation in helper function
up to 64GB.

Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
---
 drivers/pci/controller/pcie-brcmstb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 29ad04f8d3f3..7bd85566c242 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -309,8 +309,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;
-- 
2.35.3
Re: [PATCH v2 -next 04/11] PCI: brcmstb: Expand inbound size calculation helper
Posted by Florian Fainelli 2 months, 2 weeks ago
On 9/10/24 08:18, Stanimir Varbanov wrote:
> Expand the inbound size calculation in helper function
> up to 64GB.

Nit, we could explain why, which is that BCM2712's memory map supports 
up to 64GB of DRAM. With that:

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian
Re: [PATCH v2 -next 04/11] PCI: brcmstb: Expand inbound size calculation helper
Posted by Stanimir Varbanov 2 months, 1 week ago

On 9/10/24 19:59, Florian Fainelli wrote:
> On 9/10/24 08:18, Stanimir Varbanov wrote:
>> Expand the inbound size calculation in helper function
>> up to 64GB.
> 
> Nit, we could explain why, which is that BCM2712's memory map supports
> up to 64GB of DRAM. With that:

Sure.

> 
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>

Thank you!

regards,
~Stan