Re: [RFC][PATCH] ARM: OMAP: Always enable the R/W access to all initiators in sram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Kyungmin,

On Mon, 26 Nov 2007, Kyungmin Park wrote:

> With recent runtime constatns patches, we can't boot the board if the sram is locked.
> I'm not sure it's the proper patch enables R/W access to all omap242x.
> But without this patch, it gives the following messages and abort on linefecth

I am puzzled.  

You have definitely found a bug.  It seems that TI, for some unknown 
reason, moved some SCM registers, including CONTROL_STATUS, for 34xx, 
breaking forward compatibility.  And as you point out, the offset for 
CONTROL_STATUS in the recent patch is not right for 242x.  (It's the 
34xx offset.)

I would think this would prevent 242x from booting.  Indeed, you report 
that your setup doesn't boot.  But when I boot current git on N800 here, 
which is 2420-based, it boots fine.  Puzzling evidence.

Anyway, a test patch is below, for the CONTROL_STATUS register issue.  
(Not for git consumption - just for testing.)  Could you try it to see if 
it fixes the problems that you're seeing?  If not, perhaps something else 
is wrong.

Regards, 

- Paul


---
 arch/arm/mach-omap2/board-h4.c      |    2 +-
 arch/arm/mach-omap2/id.c            |   10 +++++++++-
 arch/arm/plat-omap/sram.c           |    2 +-
 include/asm-arm/arch-omap/control.h |    3 ++-
 4 files changed, 13 insertions(+), 4 deletions(-)

Index: linux-omap/arch/arm/mach-omap2/board-h4.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/board-h4.c	2007-11-26 03:13:50.000000000 -0700
+++ linux-omap/arch/arm/mach-omap2/board-h4.c	2007-11-26 03:28:30.000000000 -0700
@@ -272,7 +272,7 @@
 /* 2420 Sysboot setup (2430 is different) */
 static u32 get_sysboot_value(void)
 {
-	return (ctrl_read_reg(CONTROL_STATUS) & 0xFFF);
+	return (ctrl_read_reg(OMAP24XX_CONTROL_STATUS) & 0xFFF);
 }
 
 /* FIXME: This function should be moved to some other file, gpmc.c? */
Index: linux-omap/arch/arm/mach-omap2/id.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/id.c	2007-11-26 03:13:50.000000000 -0700
+++ linux-omap/arch/arm/mach-omap2/id.c	2007-11-26 03:35:27.000000000 -0700
@@ -162,7 +162,15 @@
 	/* Embedding the ES revision info in type field */
 	system_rev = omap_ids[j].type;
 
-	ctrl_status = ctrl_read_reg(CONTROL_STATUS);
+	if (cpu_is_omap24xx()) {
+		i = OMAP24XX_CONTROL_STATUS;
+	} else if (cpu_is_omap343x()) {
+		i = OMAP343X_CONTROL_STATUS;
+	} else {
+		printk(KERN_ERR "id: unknown CPU type\n");
+		BUG();
+	}
+	ctrl_status = ctrl_read_reg(i);
 	system_rev |= (ctrl_status & 0x3f);
 	system_rev |= (ctrl_status & 0x700);
 
Index: linux-omap/include/asm-arm/arch-omap/control.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/control.h	2007-11-26 03:13:50.000000000 -0700
+++ linux-omap/include/asm-arm/arch-omap/control.h	2007-11-26 03:28:30.000000000 -0700
@@ -37,7 +37,8 @@
 
 #define CONTROL_DEVCONF0		(CONTROL_GENERAL + 0x04)
 #define CONTROL_DEVCONF1		(CONTROL_GENERAL + 0x68) /* > 242x */
-#define CONTROL_STATUS			(CONTROL_GENERAL + 0x80)
+#define OMAP343X_CONTROL_STATUS		(CONTROL_GENERAL + 0x80)
+#define OMAP24XX_CONTROL_STATUS		(CONTROL_GENERAL + 0x88)
 
 
 /*
Index: linux-omap/arch/arm/plat-omap/sram.c
===================================================================
--- linux-omap.orig/arch/arm/plat-omap/sram.c	2007-11-26 03:13:50.000000000 -0700
+++ linux-omap/arch/arm/plat-omap/sram.c	2007-11-26 03:28:30.000000000 -0700
@@ -94,7 +94,7 @@
 
 #if defined(CONFIG_ARCH_OMAP242X)
 	if (cpu_is_omap242x())
-		type = ctrl_read_reg(CONTROL_STATUS) & TYPE_MASK;
+		type = ctrl_read_reg(OMAP24XX_CONTROL_STATUS) & TYPE_MASK;
 #endif
 
 	if (type == GP_DEVICE) {
-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux