Skip to contentSkip to conversation

ARM64: juno: disable NOR flash node by default

PATCH New Linus Walleij 4 participants 4 messages Oct 28, 2015 – Oct 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM64: juno: disable NOR flash node by default

After discussing on the mailing list it turns out that accessing the flash memory from the kernel can disrupt CPU sleep states and CPU hotplugging, so let's disable this DT node by default. Setups that want to access the flash can modify this entry to enable the flash again.

Quoting Sudeep Holla: "the firmware assumes the flash is always in read mode while Linux leaves NOR flash in "read id" mode after initialization."

Cc Mark Rutland <[email protected]>
Cc Sudeep Holla <[email protected]>
Cc Liviu Dudau <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Leif Lindholm <[email protected]>
Cc Ryan Harkin <[email protected]>
Fixes 5078f77e1443 "ARM64: juno: add NOR flash to device tree"

---
ARM SoC folks: please apply this as a fix for the upcoming v4.4 merge window, directly to the branch where the original commit resides (appears to be directly on the for-next branch or something).

---
 arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/arm/juno-motherboard.dtsi +7 -0
index c7c99a42e2e9..8c029ee2a5b5 100644
@@ -109,6 +109,13 @@
 				linux,part-probe = "afs";
 				reg = <0 0x00000000 0x04000000>;
 				bank-width = <4>;
+				/*
+				 * Unfortunately, accessing the flash disturbs
+				 * the CPU idle states (suspend) and CPU
+				 * hotplug of the platform. For this reason,
+				 * flash hardware access is disabled by default.
+				 */
+				status = "disabled";
 			};
 
 			ethernet at 2,00000000 {
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 ARM64: juno: disable NOR flash node by default

Quoted 6 lines · Linus Walleij

After discussing on the mailing list it turns out that accessing the flash memory from the kernel can disrupt CPU sleep states and CPU hotplugging, so let's disable this DT node by default. Setups that want to access the flash can modify this entry to enable the flash again.

Quoted 7 lines

Quoting Sudeep Holla: "the firmware assumes the flash is always in read mode while Linux leaves NOR flash in "read id" mode after initialization."

Cc Mark Rutland <[email protected]>
Cc Sudeep Holla <[email protected]>

Thanks for the patch. I too wrote one last night after I found NOR flash was added in arm-soc -next.

Signature · 2 lines
Regards,
Sudeep
#2 lore raw

PATCH 1/1 ARM64: juno: disable NOR flash node by default

In reply to Linus Walleij
Quoted 10 lines · Linus Walleij

After discussing on the mailing list it turns out that accessing the flash memory from the kernel can disrupt CPU sleep states and CPU hotplugging, so let's disable this DT node by default. Setups that want to access the flash can modify this entry to enable the flash again.

Quoting Sudeep Holla: "the firmware assumes the flash is always in read mode while Linux leaves NOR flash in "read id" mode after initialization."

Quoted 10 lines
Cc Mark Rutland <[email protected]>
Cc Sudeep Holla <[email protected]>
Cc Liviu Dudau <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Leif Lindholm <[email protected]>
Cc Ryan Harkin <[email protected]>
Fixes 5078f77e1443 "ARM64: juno: add NOR flash to device tree"

Mark.

Quoted 30 lines

---
ARM SoC folks: please apply this as a fix for the upcoming v4.4 merge window, directly to the branch where the original commit resides (appears to be directly on the for-next branch or something).

---
 arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/arm/juno-motherboard.dtsi +7 -0
index c7c99a42e2e9..8c029ee2a5b5 100644
@@ -109,6 +109,13 @@
 				linux,part-probe = "afs";
 				reg = <0 0x00000000 0x04000000>;
 				bank-width = <4>;
+				/*
+				 * Unfortunately, accessing the flash disturbs
+				 * the CPU idle states (suspend) and CPU
+				 * hotplug of the platform. For this reason,
+				 * flash hardware access is disabled by default.
+				 */
+				status = "disabled";
 			};
 
 			ethernet at 2,00000000 {
Signature · 1 line
2.4.3
#3 lore raw

PATCH 1/1 ARM64: juno: disable NOR flash node by default

In reply to Linus Walleij
Quoted 20 lines · Linus Walleij

After discussing on the mailing list it turns out that accessing the flash memory from the kernel can disrupt CPU sleep states and CPU hotplugging, so let's disable this DT node by default. Setups that want to access the flash can modify this entry to enable the flash again.

Quoting Sudeep Holla: "the firmware assumes the flash is always in read mode while Linux leaves NOR flash in "read id" mode after initialization."

Cc Mark Rutland <[email protected]>
Cc Sudeep Holla <[email protected]>
Cc Liviu Dudau <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Leif Lindholm <[email protected]>
Cc Ryan Harkin <[email protected]>
Fixes 5078f77e1443 "ARM64: juno: add NOR flash to device tree"
Quoted 5 lines

---
ARM SoC folks: please apply this as a fix for the upcoming v4.4 merge window, directly to the branch where the original commit resides (appears to be directly on the for-next branch or something).

Applied, thanks.

-Olof