devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: fu740: fix size of pcie 32bit memory
@ 2023-01-06 13:44 Ben Dooks
  2023-01-06 14:07 ` Krzysztof Kozlowski
  2023-01-07 19:37 ` Conor Dooley
  0 siblings, 2 replies; 7+ messages in thread
From: Ben Dooks @ 2023-01-06 13:44 UTC (permalink / raw)
  To: devicetree, linux-riscv
  Cc: robh+dt, palmer, krzysztof.kozlowski+dt, zong.li, linux-kernel,
	sudip.mukherjee, Ben Dooks, Paul Walmsley, Greentime Hu

The 32-bit memory resource is needed for non-prefetchable memory
allocations on the PCIe bus, however with some cards (such as the
SM768) the system fails to allocate memory from this.

Checking the allocation against the datasheet, it looks like there
has been a mis-calcualation of the resource for the first memory
region (0x0060090000..0x0070ffffff) which in the data-sheet for
the fu740 (v1p2) is from 0x0060000000..0x007fffffff. Changing
this to allocate from 0x0060090000..0x007fffffff fixes the probing
issues.

Fixes: ae80d514808557018e44190 ("riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC
")

Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Note, this is probably a stable candiate as it looks like it has
been this way since it was commited.
---
 arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
index 43bed6c0a84f..5235fd1c9cb6 100644
--- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
+++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
@@ -328,7 +328,7 @@ pcie@e00000000 {
 			bus-range = <0x0 0xff>;
 			ranges = <0x81000000  0x0 0x60080000  0x0 0x60080000 0x0 0x10000>,      /* I/O */
 				 <0x82000000  0x0 0x60090000  0x0 0x60090000 0x0 0xff70000>,    /* mem */
-				 <0x82000000  0x0 0x70000000  0x0 0x70000000 0x0 0x1000000>,    /* mem */
+				 <0x82000000  0x0 0x70000000  0x0 0x70000000 0x0 0x10000000>,    /* mem */
 				 <0xc3000000 0x20 0x00000000 0x20 0x00000000 0x20 0x00000000>;  /* mem prefetchable */
 			num-lanes = <0x8>;
 			interrupts = <56>, <57>, <58>, <59>, <60>, <61>, <62>, <63>, <64>;
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-09  8:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-06 13:44 [PATCH] riscv: dts: fu740: fix size of pcie 32bit memory Ben Dooks
2023-01-06 14:07 ` Krzysztof Kozlowski
2023-01-06 14:51   ` Ben Dooks
2023-01-06 14:52     ` [Linux-kernel] " Ben Dooks
2023-01-06 14:55     ` Conor Dooley
2023-01-07 19:37 ` Conor Dooley
2023-01-09  8:02   ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).