Skip to contentSkip to conversation

ARM: dts: socfpga: updates for SOCFPGA

PATCH Superseded dinguyen at opensource.altera.com 2 participants 6 messages Aug 14, 2014 – Aug 15, 2014 Device tree bindings

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover ARM: dts: socfpga: updates for SOCFPGA

From: Dinh Nguyen <[email protected]>

Just a few DTS updates for the SOCFPGA platform.

v2:
patch 1/3 : same as v1
patch 2/3 : same as v1
patch 3/3 : Added a single line comment for /memreserve/

Dinh Nguyen (3):
ARM: dts: socfpga: remove extra alias in the ArriaV devkit
ARM: dts: socfpga: Add SD card detect
ARM: dts: socfpga: memreserve first 4KB for SMP code

 arch/arm/boot/dts/socfpga_arria5.dtsi        | 2 ++
 arch/arm/boot/dts/socfpga_arria5_socdk.dts   | 7 -------
 arch/arm/boot/dts/socfpga_cyclone5.dtsi      | 4 +++-
 arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 4 ++++
 4 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.0.3
#1 lore raw

PATCH v2 1/3 ARM: dts: socfpga: remove extra alias in the ArriaV devkit

From: Dinh Nguyen <[email protected]>

commit [2755e187 dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.] added an extra ethernet alias in the ArriaV devkit board file. This patch removes it.

---
 arch/arm/boot/dts/socfpga_arria5_socdk.dts | 7 -------
 1 file changed, 7 deletions(-)
arch/arm/boot/dts/socfpga_arria5_socdk.dts +0 -7
index d532d17..27d551c 100644
@@ -37,13 +37,6 @@
 		*/
 		ethernet0 = &gmac1;
 	};
-
-	aliases {
-		/* this allow the ethaddr uboot environmnet variable contents
-		 * to be added to the gmac1 device tree blob.
-		 */
-		ethernet0 = &gmac1;
-	};
 };
 
 &gmac1 {
Signature · 1 line
2.0.3
#2 lore raw

PATCH v2 2/3 ARM: dts: socfpga: Add SD card detect

In reply to dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC card detect.

---
 arch/arm/boot/dts/socfpga_cyclone5.dtsi      | 2 +-
 arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm/boot/dts/socfpga_cyclone5.dtsi +1 -1
index 1ee03c4..33cad8b 100644
@@ -28,7 +28,7 @@
 			};
 		};
 
-		dwmmc0 at ff704000 {
+		mmc0: dwmmc0 at ff704000 {
 			num-slots = <1>;
 			broken-cd;
 			bus-width = <4>;
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts +4 -0
index 45de151..d7296a5 100644
@@ -68,6 +68,10 @@
 	};
 };
 
+&mmc0 {
+	cd-gpios = <&gpio1 18 0>;
+};
+
 &usb1 {
 	status = "okay";
 };
Signature · 1 line
2.0.3
#3 lore raw

PATCH v2 3/3 ARM: dts: socfpga: memreserve first 4KB for SMP code

In reply to dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

The SOCFPGA's SMP code uses 0x0 for as the location for the trampoline to bring secondary cores online. This patch adds a /memreserve/ section to reserve the first 4K for the SMP trampoline code.

---
v2: Add a comment in the dts files

---
 arch/arm/boot/dts/socfpga_arria5.dtsi   | 2 ++
 arch/arm/boot/dts/socfpga_cyclone5.dtsi | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/boot/dts/socfpga_arria5.dtsi +2 -0
index 468fc4c..03e8268 100644
@@ -15,6 +15,8 @@
  */
 
 /dts-v1/;
+/* First 4KB has trampoline code for secondary cores. */
+/memreserve/ 0x00000000 0x0001000;
 #include "socfpga.dtsi"
 
 / {
arch/arm/boot/dts/socfpga_cyclone5.dtsi +2 -0
index 33cad8b..28c05e7 100644
@@ -16,6 +16,8 @@
  */
 
 /dts-v1/;
+/* First 4KB has trampoline code for secondary cores. */
+/memreserve/ 0x00000000 0x0001000;
 #include "socfpga.dtsi"
 
 / {
Signature · 1 line
2.0.3
#4 lore raw

PATCH v2 3/3 ARM: dts: socfpga: memreserve first 4KB for SMP code

Hi Dinh,

Quoted 5 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

The SOCFPGA's SMP code uses 0x0 for as the location for the trampoline to bring secondary cores online. This patch adds a /memreserve/ section to reserve the first 4K for the SMP trampoline code.

I'm slightly confused.

Sorry to split hairs here, but I think the comment is subtly wrong.

The trampoline code seems to be placed in this location by Linux, so it's not that we're protecting the trampoline code, but rather we're preserving the location for future use.

I take it that the reset address isn't configurable?

Thanks,
Mark.

Quoted 40 lines

---
v2: Add a comment in the dts files

---
 arch/arm/boot/dts/socfpga_arria5.dtsi   | 2 ++
 arch/arm/boot/dts/socfpga_cyclone5.dtsi | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/boot/dts/socfpga_arria5.dtsi +2 -0
index 468fc4c..03e8268 100644
@@ -15,6 +15,8 @@
  */
 
 /dts-v1/;
+/* First 4KB has trampoline code for secondary cores. */
+/memreserve/ 0x00000000 0x0001000;
 #include "socfpga.dtsi"
 
 / {
arch/arm/boot/dts/socfpga_cyclone5.dtsi +2 -0
index 33cad8b..28c05e7 100644
@@ -16,6 +16,8 @@
  */
 
 /dts-v1/;
+/* First 4KB has trampoline code for secondary cores. */
+/memreserve/ 0x00000000 0x0001000;
 #include "socfpga.dtsi"
 
 / {
Signature · 1 line
2.0.3
#5 lore raw

PATCH v2 3/3 ARM: dts: socfpga: memreserve first 4KB for SMP code

Hi Mark,

Quoted 9 lines · Mark Rutland

Hi Dinh,

Quoted 5 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

The SOCFPGA's SMP code uses 0x0 for as the location for the trampoline to bring secondary cores online. This patch adds a /memreserve/ section to reserve the first 4K for the SMP trampoline code.

Quoted 7 lines

I'm slightly confused.

Sorry to split hairs here, but I think the comment is subtly wrong.

The trampoline code seems to be placed in this location by Linux, so it's not that we're protecting the trampoline code, but rather we're preserving the location for future use.

Yes, you're correct. Preserving this location for possible copying of the trampoline code for SMP usage is more of a correct statement.

Quoted 2 lines

I take it that the reset address isn't configurable?

No, I don't believe it is on this platform.

Thanks for the review. I will spin a V3 with an updated commit message.

Dinh