Skip to contentSkip to conversation

riscv: dts: fu740: fix size of pcie 32bit memory

PATCH Applied Ben Dooks 3 participants 7 messages Jan 6, 2023 – Jan 9, 2023

Subsystems (4)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 riscv: dts: fu740: fix size of pcie 32bit memory

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 <[email protected]>
Cc Greentime Hu <[email protected]>

---
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(-)
arch/riscv/boot/dts/sifive/fu740-c000.dtsi +1 -1
index 43bed6c0a84f..5235fd1c9cb6 100644
@@ -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>;
Signature · 7 lines
2.39.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#1 lore raw
Quoted 11 lines · Ben Dooks

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.

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

")

Don't wrap lines.

Quoted 1 line

Drop empty line between tags.

Quoted 4 lines
Cc Paul Walmsley <[email protected]>
Cc Greentime Hu <[email protected]>

---

Best regards,
Krzysztof

author
#2 lore raw
Quoted 12 lines · Krzysztof Kozlowski
Quoted 11 lines · Ben Dooks

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.

Quoted 8 lines
Quoted 2 lines
Fixes ae80d514808557018e44190 ("riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC

")

Don't wrap lines.

Quoted 1 line

Drop empty line between tags.

Thanks, will fix.

Does anyone have a chance to review and/or test this, it works for me but I've not got a large number of devices to test with.

Signature · 10 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author
#3 lore raw
Quoted 20 lines · Ben Dooks
Quoted 19 lines · Krzysztof Kozlowski
Quoted 11 lines · Ben Dooks

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.

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

")

Don't wrap lines.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

Drop empty line between tags.

Thanks, will fix.

Does anyone have a chance to review and/or test this, it works for me but I've not got a large number of devices to test with.

I forgot add that if a couple of other people can check this over then I'll cc stable next time

Signature · 10 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer
#4 lore raw
In reply to Ben Dooks
Quoted 16 lines · Ben Dooks
Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Ben Dooks

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

")

Quoted 8 lines
Quoted 5 lines

Don't wrap lines.

Quoted 1 line

Drop empty line between tags.

Thanks, will fix.

I wouldn't bother resending to fix that stuff, can be done on application.

I don't have a PCI card handy to test with so +CC Ron, perhaps he can give this patch a go.

I can give it a go next week though probably if nothing's come through - although likely not with something like an SM768.

Thanks,
Conor.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer Applied
#5 lore raw
In reply to Ben Dooks

From: Conor Dooley <[email protected]>

Quoted 4 lines · Ben Dooks

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.

Quoted 8 lines

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.

[...]

Applied to riscv-dt-fixes, thanks!

[1/1] riscv: dts: fu740: fix size of pcie 32bit memory

	https://git.kernel.org/conor/c/43d5f5d63699724d47f0d9e0eae516a260d232b4

I checked the numbers and they look correct per the v1p2 doc. I added a T-b from IRC for Ron, added the cc: stable and fixed the fixes tag while I was at it.

Thanks,
Conor.

author
#6 lore raw
Quoted 19 lines · Conor Dooley

From: Conor Dooley <[email protected]>

Quoted 4 lines · Ben Dooks

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.

Quoted 8 lines

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.

[...]

Applied to riscv-dt-fixes, thanks!

[1/1] riscv: dts: fu740: fix size of pcie 32bit memory

Quoted 8 lines
	https://git.kernel.org/conor/c/43d5f5d63699724d47f0d9e0eae516a260d232b4

I checked the numbers and they look correct per the v1p2 doc. I added a T-b from IRC for Ron, added the cc: stable and fixed the fixes tag while I was at it.

Thanks,
Conor.

Ok, great. I'll ping the fu-sdk people as well as this is probably useful for the next release.

Signature · 4 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html