From c04bbaa46c8c8961eff95c4cead5a17fd1ca538b Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 27 May 2013 20:06:01 +0530 Subject: ARM: OMAP2+: AM437x: SoC revision detection Detect 437x SoC revision. Signed-off-by: Afzal Mohammed Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/id.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-omap2/id.c') diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 1272c41d4749..1fbb3c550a3c 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -209,6 +209,8 @@ static void __init omap3_cpuinfo(void) cpu_name = "TI816X"; } else if (soc_is_am335x()) { cpu_name = "AM335X"; + } else if (soc_is_am437x()) { + cpu_name = "AM437x"; } else if (cpu_is_ti814x()) { cpu_name = "TI814X"; } else if (omap3_has_iva() && omap3_has_sgx()) { @@ -430,6 +432,10 @@ void __init omap3xxx_check_revision(void) break; } break; + case 0xb98c: + omap_revision = AM437X_REV_ES1_0; + cpu_rev = "1.0"; + break; case 0xb8f2: switch (rev) { case 0: -- cgit v1.2.3 From 49cc485d815f2a31ba5635d3f2b10c73458ad014 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 27 May 2013 20:06:33 +0530 Subject: ARM: OMAP2+: AM43x: GP or HS ? Detect whether GP or HS, similar to the AM335x way. Signed-off-by: Afzal Mohammed Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/id.c') diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 1fbb3c550a3c..74f71abcd50e 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -55,7 +55,7 @@ int omap_type(void) if (cpu_is_omap24xx()) { val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS); - } else if (soc_is_am33xx()) { + } else if (soc_is_am33xx() || soc_is_am43xx()) { val = omap_ctrl_readl(AM33XX_CONTROL_STATUS); } else if (cpu_is_omap34xx()) { val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); -- cgit v1.2.3 From a5f93d9dad9c203e0715206ef60a505013561df6 Mon Sep 17 00:00:00 2001 From: Aida Mynzhasova Date: Thu, 30 May 2013 14:21:01 +0400 Subject: ARM: OMAP2: TI81XX: id: Add cpu id for TI816x ES2.0 and ES2.1 Currently omap3xxx_check_revision() detects ES1.0 and ES1.1 only, this patch extends it by adding ES2.0 and ES2.1 versions support. Signed-off-by: Aida Mynzhasova Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/id.c | 11 +++++++++-- arch/arm/mach-omap2/soc.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-omap2/id.c') diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 74f71abcd50e..9e5c7cb4a81a 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -407,11 +407,18 @@ void __init omap3xxx_check_revision(void) cpu_rev = "1.0"; break; case 1: - /* FALLTHROUGH */ - default: omap_revision = TI8168_REV_ES1_1; cpu_rev = "1.1"; break; + case 2: + omap_revision = TI8168_REV_ES2_0; + cpu_rev = "2.0"; + break; + case 3: + /* FALLTHROUGH */ + default: + omap_revision = TI8168_REV_ES2_1; + cpu_rev = "2.1"; } break; case 0xb944: diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 3cefc492b758..9cd9414a0afd 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h @@ -403,6 +403,8 @@ IS_OMAP_TYPE(3430, 0x3430) #define TI816X_CLASS 0x81600034 #define TI8168_REV_ES1_0 TI816X_CLASS #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) +#define TI8168_REV_ES2_0 (TI816X_CLASS | (0x2 << 8)) +#define TI8168_REV_ES2_1 (TI816X_CLASS | (0x3 << 8)) #define TI814X_CLASS 0x81400034 #define TI8148_REV_ES1_0 TI814X_CLASS -- cgit v1.2.3 From 7bcad170154f1302aeeced4f236588091a261fbf Mon Sep 17 00:00:00 2001 From: Vaibhav Hiremath Date: Fri, 17 May 2013 15:43:41 +0530 Subject: ARM: OMAP3+: am33xx id: Add new am33xx specific function to check dev_feature Layout of DEV_FEATURE register (offset = 0x604) is different between TI81xx and AM33xx device, so create separate function which will check for features available on specific AM33xx SoC and set the flags accordingly. Signed-off-by: Vaibhav Hiremath Reviewed-by: Kevin Hilman Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/control.h | 4 ++++ arch/arm/mach-omap2/id.c | 13 +++++++++++++ arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/soc.h | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/id.c') diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index 35d17a6ec06b..f7d7c2ef1b40 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h @@ -366,6 +366,10 @@ #define AM33XX_PWMSS1_TBCLKEN_SHIFT 1 #define AM33XX_PWMSS2_TBCLKEN_SHIFT 2 +/* DEV Feature register to identify AM33XX features */ +#define AM33XX_DEV_FEATURE 0x604 +#define AM33XX_SGX_MASK BIT(29) + /* CONTROL OMAP STATUS register to identify OMAP3 features */ #define OMAP3_CONTROL_OMAP_STATUS 0x044c diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 9e5c7cb4a81a..7335eb2bf3fa 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -304,6 +304,19 @@ void __init ti81xx_check_features(void) omap3_cpuinfo(); } +void __init am33xx_check_features(void) +{ + u32 status; + + omap_features = OMAP3_HAS_NEON; + + status = omap_ctrl_readl(AM33XX_DEV_FEATURE); + if (status & AM33XX_SGX_MASK) + omap_features |= OMAP3_HAS_SGX; + + omap3_cpuinfo(); +} + void __init omap3xxx_check_revision(void) { const char *cpu_rev; diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index f96215075b92..4c7367404b89 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -576,7 +576,7 @@ void __init am33xx_init_early(void) omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE)); omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); omap3xxx_check_revision(); - ti81xx_check_features(); + am33xx_check_features(); am33xx_voltagedomains_init(); am33xx_powerdomains_init(); am33xx_clockdomains_init(); diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 9cd9414a0afd..8c616e436bc7 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h @@ -449,6 +449,7 @@ void omap4xxx_check_revision(void); void omap5xxx_check_revision(void); void omap3xxx_check_features(void); void ti81xx_check_features(void); +void am33xx_check_features(void); void omap4xxx_check_features(void); /* -- cgit v1.2.3