diff options
-rw-r--r-- | arch/arm/mach-mx3/clock-imx35.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mx3/cpu.c | 27 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx35.h | 18 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx3x.h | 10 |
4 files changed, 43 insertions, 15 deletions
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index f08b407cdb3f..9a1009884164 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -535,6 +535,9 @@ int __init mx35_clocks_init() | |||
535 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | 535 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); |
536 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); | 536 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); |
537 | 537 | ||
538 | clk_enable(&iim_clk); | ||
539 | mx35_read_cpu_rev(); | ||
540 | |||
538 | #ifdef CONFIG_MXC_USE_EPIT | 541 | #ifdef CONFIG_MXC_USE_EPIT |
539 | epit_timer_init(&epit1_clk, | 542 | epit_timer_init(&epit1_clk, |
540 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); | 543 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); |
diff --git a/arch/arm/mach-mx3/cpu.c b/arch/arm/mach-mx3/cpu.c index 47b0573c11f5..d00a75457812 100644 --- a/arch/arm/mach-mx3/cpu.c +++ b/arch/arm/mach-mx3/cpu.c | |||
@@ -55,3 +55,30 @@ void __init mx31_read_cpu_rev(void) | |||
55 | 55 | ||
56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); | 56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); |
57 | } | 57 | } |
58 | |||
59 | unsigned int mx35_cpu_rev; | ||
60 | EXPORT_SYMBOL(mx35_cpu_rev); | ||
61 | |||
62 | void __init mx35_read_cpu_rev(void) | ||
63 | { | ||
64 | u32 rev; | ||
65 | char *srev = "unknown"; | ||
66 | |||
67 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); | ||
68 | switch (rev) { | ||
69 | case 0x00: | ||
70 | mx35_cpu_rev = MX3x_CHIP_REV_1_0; | ||
71 | srev = "1.0"; | ||
72 | break; | ||
73 | case 0x10: | ||
74 | mx35_cpu_rev = MX3x_CHIP_REV_2_0; | ||
75 | srev = "2.0"; | ||
76 | break; | ||
77 | case 0x11: | ||
78 | mx35_cpu_rev = MX3x_CHIP_REV_2_1; | ||
79 | srev = "2.1"; | ||
80 | break; | ||
81 | } | ||
82 | |||
83 | printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); | ||
84 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h index 5a1c621aeba1..cb071b7b17e5 100644 --- a/arch/arm/plat-mxc/include/mach/mx35.h +++ b/arch/arm/plat-mxc/include/mach/mx35.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef __MACH_MX35_H__ | 1 | #ifndef __MACH_MX35_H__ |
2 | #define __MACH_MX35_H__ | 2 | #define __MACH_MX35_H__ |
3 | |||
3 | /* | 4 | /* |
4 | * IRAM | 5 | * IRAM |
5 | */ | 6 | */ |
@@ -66,6 +67,8 @@ | |||
66 | #define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000) | 67 | #define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000) |
67 | #define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000) | 68 | #define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000) |
68 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) | 69 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) |
70 | #define MX35_IIM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xf0000) | ||
71 | |||
69 | #define MX35_OTG_BASE_ADDR 0x53ff4000 | 72 | #define MX35_OTG_BASE_ADDR 0x53ff4000 |
70 | 73 | ||
71 | #define MX35_ROMP_BASE_ADDR 0x60000000 | 74 | #define MX35_ROMP_BASE_ADDR 0x60000000 |
@@ -187,20 +190,7 @@ | |||
187 | 190 | ||
188 | #define MX35_PROD_SIGNATURE 0x1 /* For MX31 */ | 191 | #define MX35_PROD_SIGNATURE 0x1 /* For MX31 */ |
189 | 192 | ||
190 | /* silicon revisions specific to i.MX31 */ | 193 | #define MX35_SYSTEM_REV_MIN MX3x_CHIP_REV_1_0 |
191 | #define MX35_CHIP_REV_1_0 0x10 | ||
192 | #define MX35_CHIP_REV_1_1 0x11 | ||
193 | #define MX35_CHIP_REV_1_2 0x12 | ||
194 | #define MX35_CHIP_REV_1_3 0x13 | ||
195 | #define MX35_CHIP_REV_2_0 0x20 | ||
196 | #define MX35_CHIP_REV_2_1 0x21 | ||
197 | #define MX35_CHIP_REV_2_2 0x22 | ||
198 | #define MX35_CHIP_REV_2_3 0x23 | ||
199 | #define MX35_CHIP_REV_3_0 0x30 | ||
200 | #define MX35_CHIP_REV_3_1 0x31 | ||
201 | #define MX35_CHIP_REV_3_2 0x32 | ||
202 | |||
203 | #define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0 | ||
204 | #define MX35_SYSTEM_REV_NUM 3 | 194 | #define MX35_SYSTEM_REV_NUM 3 |
205 | 195 | ||
206 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | 196 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS |
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h index d41ad68c1315..d1bd26d7b8a6 100644 --- a/arch/arm/plat-mxc/include/mach/mx3x.h +++ b/arch/arm/plat-mxc/include/mach/mx3x.h | |||
@@ -240,7 +240,7 @@ | |||
240 | 240 | ||
241 | #define MX3x_PROD_SIGNATURE 0x1 /* For MX31 */ | 241 | #define MX3x_PROD_SIGNATURE 0x1 /* For MX31 */ |
242 | 242 | ||
243 | /* silicon revisions specific to i.MX31 */ | 243 | /* silicon revisions specific to i.MX31 and i.MX35 */ |
244 | #define MX3x_CHIP_REV_1_0 0x10 | 244 | #define MX3x_CHIP_REV_1_0 0x10 |
245 | #define MX3x_CHIP_REV_1_1 0x11 | 245 | #define MX3x_CHIP_REV_1_1 0x11 |
246 | #define MX3x_CHIP_REV_1_2 0x12 | 246 | #define MX3x_CHIP_REV_1_2 0x12 |
@@ -267,6 +267,14 @@ static inline int mx31_revision(void) | |||
267 | { | 267 | { |
268 | return mx31_cpu_rev; | 268 | return mx31_cpu_rev; |
269 | } | 269 | } |
270 | |||
271 | extern unsigned int mx35_cpu_rev; | ||
272 | extern void mx35_read_cpu_rev(void); | ||
273 | |||
274 | static inline int mx35_revision(void) | ||
275 | { | ||
276 | return mx35_cpu_rev; | ||
277 | } | ||
270 | #endif | 278 | #endif |
271 | 279 | ||
272 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | 280 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS |