OMAP2420 has a different offset for CONTROL_STATUS register. Signed-off-by: David Cohen <david.cohen@xxxxxxxxxxx> --- arch/arm/mach-omap2/board-h4.c | 2 +- arch/arm/mach-omap2/id.c | 5 ++++- arch/arm/plat-omap/sram.c | 2 +- include/asm-arm/arch-omap/control.h | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 70c948c..4d5db60 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -272,7 +272,7 @@ static struct platform_device *h4_devices[] __initdata = { /* 2420 Sysboot setup (2430 is different) */ static u32 get_sysboot_value(void) { - return (ctrl_read_reg(CONTROL_STATUS) & 0xFFF); + return (ctrl_read_reg(OMAP242X_CONTROL_STATUS) & 0xFFF); } /* FIXME: This function should be moved to some other file, gpmc.c? */ diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 393b593..d84bf0e 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -162,7 +162,10 @@ void __init omap2_check_revision(void) /* Embedding the ES revision info in type field */ system_rev = omap_ids[j].type; - ctrl_status = ctrl_read_reg(CONTROL_STATUS); + if (cpu_is_omap242x()) + ctrl_status = ctrl_read_reg(OMAP242X_CONTROL_STATUS); + else; + ctrl_status = ctrl_read_reg(CONTROL_STATUS); system_rev |= (ctrl_status & 0x3f); system_rev |= (ctrl_status & 0x700); diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index dd8dc04..851d4ee 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -94,7 +94,7 @@ static int is_sram_locked(void) #if defined(CONFIG_ARCH_OMAP242X) if (cpu_is_omap242x()) - type = ctrl_read_reg(CONTROL_STATUS) & TYPE_MASK; + type = ctrl_read_reg(OMAP242X_CONTROL_STATUS) & TYPE_MASK; #endif if (type == GP_DEVICE) { diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h index 5f42725..6609bb3 100644 --- a/include/asm-arm/arch-omap/control.h +++ b/include/asm-arm/arch-omap/control.h @@ -38,6 +38,9 @@ #define CONTROL_DEVCONF0 (CONTROL_GENERAL + 0x04) #define CONTROL_DEVCONF1 (CONTROL_GENERAL + 0x68) /* > 242x */ #define CONTROL_STATUS (CONTROL_GENERAL + 0x80) +#define OMAP242X_CONTROL_STATUS (CONTROL_STATUS + 0x08) +#define OMAP243X_CONTROL_STATUS (CONTROL_STATUS) +#define OMAP34XX_CONTROL_STATUS (CONTROL_STATUS) /* -- 1.5.3.5 - 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