public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: omap: Fix 'get_device_type()' for OMAP34XX
@ 2017-07-30 23:51 Derald D. Woods
  2017-07-31 12:41 ` [U-Boot] [PATCH v2] " Derald D. Woods
  0 siblings, 1 reply; 10+ messages in thread
From: Derald D. Woods @ 2017-07-30 23:51 UTC (permalink / raw)
  To: u-boot

Fixes 00bbe96ebabb (arm: omap: Unify get_device_type() function) where
the control status register value is embedded in a structure somewhere
in SRAM. This patch allows OMAP3 EVM (TMDSEVM3530) to boot again using
a known global constant and offset for 'readl'.
---
 arch/arm/mach-omap2/sysinfo-common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/sysinfo-common.c b/arch/arm/mach-omap2/sysinfo-common.c
index 1dc7051ab3..3955e803ad 100644
--- a/arch/arm/mach-omap2/sysinfo-common.c
+++ b/arch/arm/mach-omap2/sysinfo-common.c
@@ -16,6 +16,10 @@
  */
 u32 get_device_type(void)
 {
+#if defined(CONFIG_OMAP34XX)
+	return (readl(OMAP34XX_CTRL_BASE + 0x2f0) & DEVICE_TYPE_MASK) >>
+		DEVICE_TYPE_SHIFT;
+#endif
 	return (readl((*ctrl)->control_status) & DEVICE_TYPE_MASK) >>
 		DEVICE_TYPE_SHIFT;
 }
-- 
2.13.3

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

end of thread, other threads:[~2017-08-12 22:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-30 23:51 [U-Boot] [PATCH] arm: omap: Fix 'get_device_type()' for OMAP34XX Derald D. Woods
2017-07-31 12:41 ` [U-Boot] [PATCH v2] " Derald D. Woods
2017-08-07 12:35   ` Derald Woods
2017-08-07 12:41     ` Tom Rini
2017-08-07 22:19       ` Derald Woods
2017-08-10 12:25         ` Derald Woods
2017-08-10 12:50           ` Derald Woods
2017-08-12 14:14             ` Derald Woods
2017-08-12 22:21           ` Tom Rini
2017-08-12 22:57   ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox