aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAfzal Mohammed <afzal@ti.com>2011-12-13 13:46:43 -0500
committerTony Lindgren <tony@atomide.com>2011-12-13 13:46:43 -0500
commit995411953604e3c973328dda8c7807e45aca0f2b (patch)
tree970f5036a513ce2a087663f38c55c33846bd2bb8 /arch/arm
parentdeee6d5359969a0ce4e2760cfd7b9f379bd5698a (diff)
ARM: OMAP: am33xx: Update common omap platform files
This patch updates the common platform files with AM335X device support (AM33XX family). The approach taken in this patch is, AM33XX device will be considered as OMAP3 variant, and a separate SoC class created for AM33XX family of devices with a subclass type for AM335X device, which is newly added device in the family. This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks will return success on AM335X device. A kernel config option CONFIG_SOC_OMAPAM33XX is added under OMAP3 to include support for AM33XX build. Also, cpu_mask and RATE_IN_XXX flags have crossed 8 bit hence struct clksel_rate.flags, struct prcm_config.flags and cpu_mask are changed to u16 from u8. Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Cc: Hemant Pedanekar <hemantp@ti.com> [tony@atomide.com: left out CK_AM33XX for now] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/Kconfig5
-rw-r--r--arch/arm/mach-omap2/clock.c2
-rw-r--r--arch/arm/mach-omap2/clock.h2
-rw-r--r--arch/arm/mach-omap2/opp2xxx.h2
-rw-r--r--arch/arm/plat-omap/include/plat/clock.h3
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h25
6 files changed, 35 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b6625130831d..ccdd442ca124 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -81,6 +81,11 @@ config SOC_OMAPTI816X
81 depends on ARCH_OMAP3 81 depends on ARCH_OMAP3
82 default y 82 default y
83 83
84config SOC_OMAPAM33XX
85 bool "AM33XX support"
86 depends on ARCH_OMAP3
87 default y
88
84config OMAP_PACKAGE_ZAF 89config OMAP_PACKAGE_ZAF
85 bool 90 bool
86 91
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 1f3481f8d695..f57ed5baeccf 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -35,7 +35,7 @@
35#include "cm-regbits-24xx.h" 35#include "cm-regbits-24xx.h"
36#include "cm-regbits-34xx.h" 36#include "cm-regbits-34xx.h"
37 37
38u8 cpu_mask; 38u16 cpu_mask;
39 39
40/* 40/*
41 * clkdm_control: if true, then when a clock is enabled in the 41 * clkdm_control: if true, then when a clock is enabled in the
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 2311bc217226..b8c2a686481c 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -132,7 +132,7 @@ void omap2_clk_print_new_rates(const char *hfclkin_ck_name,
132 const char *core_ck_name, 132 const char *core_ck_name,
133 const char *mpu_ck_name); 133 const char *mpu_ck_name);
134 134
135extern u8 cpu_mask; 135extern u16 cpu_mask;
136 136
137extern const struct clkops clkops_omap2_dflt_wait; 137extern const struct clkops clkops_omap2_dflt_wait;
138extern const struct clkops clkops_dummy; 138extern const struct clkops clkops_dummy;
diff --git a/arch/arm/mach-omap2/opp2xxx.h b/arch/arm/mach-omap2/opp2xxx.h
index 8affc66a92c2..8fae534eb157 100644
--- a/arch/arm/mach-omap2/opp2xxx.h
+++ b/arch/arm/mach-omap2/opp2xxx.h
@@ -51,7 +51,7 @@ struct prcm_config {
51 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */ 51 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
52 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */ 52 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
53 unsigned long base_sdrc_rfr; /* base refresh timing for a set */ 53 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
54 unsigned char flags; 54 unsigned short flags;
55}; 55};
56 56
57 57
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index eb73ab40e955..bb3e423b731d 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -59,6 +59,7 @@ struct clkops {
59#define RATE_IN_4430 (1 << 5) 59#define RATE_IN_4430 (1 << 5)
60#define RATE_IN_TI816X (1 << 6) 60#define RATE_IN_TI816X (1 << 6)
61#define RATE_IN_4460 (1 << 7) 61#define RATE_IN_4460 (1 << 7)
62#define RATE_IN_AM33XX (1 << 8)
62 63
63#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) 64#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X)
64#define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS) 65#define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS)
@@ -84,7 +85,7 @@ struct clkops {
84struct clksel_rate { 85struct clksel_rate {
85 u32 val; 86 u32 val;
86 u8 div; 87 u8 div;
87 u8 flags; 88 u16 flags;
88}; 89};
89 90
90/** 91/**
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 408a12f79205..aa52d1e61eb1 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -78,6 +78,14 @@ static inline int is_omap ##class (void) \
78 return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ 78 return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
79} 79}
80 80
81#define GET_AM_CLASS ((omap_rev() >> 24) & 0xff)
82
83#define IS_AM_CLASS(class, id) \
84static inline int is_am ##class (void) \
85{ \
86 return (GET_AM_CLASS == (id)) ? 1 : 0; \
87}
88
81#define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) 89#define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff)
82 90
83#define IS_OMAP_SUBCLASS(subclass, id) \ 91#define IS_OMAP_SUBCLASS(subclass, id) \
@@ -92,12 +100,19 @@ static inline int is_ti ##subclass (void) \
92 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ 100 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
93} 101}
94 102
103#define IS_AM_SUBCLASS(subclass, id) \
104static inline int is_am ##subclass (void) \
105{ \
106 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
107}
108
95IS_OMAP_CLASS(7xx, 0x07) 109IS_OMAP_CLASS(7xx, 0x07)
96IS_OMAP_CLASS(15xx, 0x15) 110IS_OMAP_CLASS(15xx, 0x15)
97IS_OMAP_CLASS(16xx, 0x16) 111IS_OMAP_CLASS(16xx, 0x16)
98IS_OMAP_CLASS(24xx, 0x24) 112IS_OMAP_CLASS(24xx, 0x24)
99IS_OMAP_CLASS(34xx, 0x34) 113IS_OMAP_CLASS(34xx, 0x34)
100IS_OMAP_CLASS(44xx, 0x44) 114IS_OMAP_CLASS(44xx, 0x44)
115IS_AM_CLASS(33xx, 0x33)
101 116
102IS_OMAP_SUBCLASS(242x, 0x242) 117IS_OMAP_SUBCLASS(242x, 0x242)
103IS_OMAP_SUBCLASS(243x, 0x243) 118IS_OMAP_SUBCLASS(243x, 0x243)
@@ -107,6 +122,7 @@ IS_OMAP_SUBCLASS(443x, 0x443)
107IS_OMAP_SUBCLASS(446x, 0x446) 122IS_OMAP_SUBCLASS(446x, 0x446)
108 123
109IS_TI_SUBCLASS(816x, 0x816) 124IS_TI_SUBCLASS(816x, 0x816)
125IS_AM_SUBCLASS(335x, 0x335)
110 126
111#define cpu_is_omap7xx() 0 127#define cpu_is_omap7xx() 0
112#define cpu_is_omap15xx() 0 128#define cpu_is_omap15xx() 0
@@ -117,6 +133,8 @@ IS_TI_SUBCLASS(816x, 0x816)
117#define cpu_is_omap34xx() 0 133#define cpu_is_omap34xx() 0
118#define cpu_is_omap343x() 0 134#define cpu_is_omap343x() 0
119#define cpu_is_ti816x() 0 135#define cpu_is_ti816x() 0
136#define cpu_is_am33xx() 0
137#define cpu_is_am335x() 0
120#define cpu_is_omap44xx() 0 138#define cpu_is_omap44xx() 0
121#define cpu_is_omap443x() 0 139#define cpu_is_omap443x() 0
122#define cpu_is_omap446x() 0 140#define cpu_is_omap446x() 0
@@ -323,6 +341,8 @@ IS_OMAP_TYPE(3517, 0x3517)
323# undef cpu_is_omap3505 341# undef cpu_is_omap3505
324# undef cpu_is_omap3517 342# undef cpu_is_omap3517
325# undef cpu_is_ti816x 343# undef cpu_is_ti816x
344# undef cpu_is_am33xx
345# undef cpu_is_am335x
326# define cpu_is_omap3430() is_omap3430() 346# define cpu_is_omap3430() is_omap3430()
327# define cpu_is_omap3503() (cpu_is_omap3430() && \ 347# define cpu_is_omap3503() (cpu_is_omap3430() && \
328 (!omap3_has_iva()) && \ 348 (!omap3_has_iva()) && \
@@ -340,6 +360,8 @@ IS_OMAP_TYPE(3517, 0x3517)
340# undef cpu_is_omap3630 360# undef cpu_is_omap3630
341# define cpu_is_omap3630() is_omap363x() 361# define cpu_is_omap3630() is_omap363x()
342# define cpu_is_ti816x() is_ti816x() 362# define cpu_is_ti816x() is_ti816x()
363# define cpu_is_am33xx() is_am33xx()
364# define cpu_is_am335x() is_am335x()
343#endif 365#endif
344 366
345# if defined(CONFIG_ARCH_OMAP4) 367# if defined(CONFIG_ARCH_OMAP4)
@@ -386,6 +408,9 @@ IS_OMAP_TYPE(3517, 0x3517)
386#define TI8168_REV_ES1_0 TI816X_CLASS 408#define TI8168_REV_ES1_0 TI816X_CLASS
387#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) 409#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
388 410
411#define AM335X_CLASS 0x33500034
412#define AM335X_REV_ES1_0 AM335X_CLASS
413
389#define OMAP443X_CLASS 0x44300044 414#define OMAP443X_CLASS 0x44300044
390#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) 415#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
391#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) 416#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8))