diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2010-06-11 07:53:14 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-06-16 18:00:02 -0400 |
commit | 5f9f0a412f16b2b849624f1b760477fb35ceff4a (patch) | |
tree | 947aeebdc3fbb9828da3e99dbebe2f7322092bf4 /arch | |
parent | 8a5c9e39379610bf347241c64132d7ee073c3959 (diff) |
ARM: 6169/1: AT91: add new at91 chips in at91sam9g45 family
This is the basic support for at91sam9g46, at91sam9m10 and at91sam9m11. Those
are just very basic cpu macros and clock definition.
Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/cpu.h | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 85166b7e69a1..753c0d31a3d3 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <mach/at91_pmc.h> | 20 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_rstc.h> | 21 | #include <mach/at91_rstc.h> |
22 | #include <mach/at91_shdwc.h> | 22 | #include <mach/at91_shdwc.h> |
23 | #include <mach/cpu.h> | ||
23 | 24 | ||
24 | #include "generic.h" | 25 | #include "generic.h" |
25 | #include "clock.h" | 26 | #include "clock.h" |
@@ -176,6 +177,13 @@ static struct clk mmc1_clk = { | |||
176 | .type = CLK_TYPE_PERIPHERAL, | 177 | .type = CLK_TYPE_PERIPHERAL, |
177 | }; | 178 | }; |
178 | 179 | ||
180 | /* Video decoder clock - Only for sam9m10/sam9m11 */ | ||
181 | static struct clk vdec_clk = { | ||
182 | .name = "vdec_clk", | ||
183 | .pmc_mask = 1 << AT91SAM9G45_ID_VDEC, | ||
184 | .type = CLK_TYPE_PERIPHERAL, | ||
185 | }; | ||
186 | |||
179 | /* One additional fake clock for ohci */ | 187 | /* One additional fake clock for ohci */ |
180 | static struct clk ohci_clk = { | 188 | static struct clk ohci_clk = { |
181 | .name = "ohci_clk", | 189 | .name = "ohci_clk", |
@@ -239,6 +247,9 @@ static void __init at91sam9g45_register_clocks(void) | |||
239 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 247 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
240 | clk_register(periph_clocks[i]); | 248 | clk_register(periph_clocks[i]); |
241 | 249 | ||
250 | if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11()) | ||
251 | clk_register(&vdec_clk); | ||
252 | |||
242 | clk_register(&pck0); | 253 | clk_register(&pck0); |
243 | clk_register(&pck1); | 254 | clk_register(&pck1); |
244 | } | 255 | } |
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 833659d1200a..3bef931d0b1c 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -52,6 +52,7 @@ static inline unsigned long at91_cpu_fully_identify(void) | |||
52 | 52 | ||
53 | #define ARCH_EXID_AT91SAM9M11 0x00000001 | 53 | #define ARCH_EXID_AT91SAM9M11 0x00000001 |
54 | #define ARCH_EXID_AT91SAM9M10 0x00000002 | 54 | #define ARCH_EXID_AT91SAM9M10 0x00000002 |
55 | #define ARCH_EXID_AT91SAM9G46 0x00000003 | ||
55 | #define ARCH_EXID_AT91SAM9G45 0x00000004 | 56 | #define ARCH_EXID_AT91SAM9G45 0x00000004 |
56 | 57 | ||
57 | static inline unsigned long at91_exid_identify(void) | 58 | static inline unsigned long at91_exid_identify(void) |
@@ -128,9 +129,18 @@ static inline unsigned long at91cap9_rev_identify(void) | |||
128 | #ifdef CONFIG_ARCH_AT91SAM9G45 | 129 | #ifdef CONFIG_ARCH_AT91SAM9G45 |
129 | #define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45) | 130 | #define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45) |
130 | #define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES) | 131 | #define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES) |
132 | #define cpu_is_at91sam9m10() (cpu_is_at91sam9g45() && \ | ||
133 | (at91_exid_identify() == ARCH_EXID_AT91SAM9M10)) | ||
134 | #define cpu_is_at91sam9m46() (cpu_is_at91sam9g45() && \ | ||
135 | (at91_exid_identify() == ARCH_EXID_AT91SAM9G46)) | ||
136 | #define cpu_is_at91sam9m11() (cpu_is_at91sam9g45() && \ | ||
137 | (at91_exid_identify() == ARCH_EXID_AT91SAM9M11)) | ||
131 | #else | 138 | #else |
132 | #define cpu_is_at91sam9g45() (0) | 139 | #define cpu_is_at91sam9g45() (0) |
133 | #define cpu_is_at91sam9g45es() (0) | 140 | #define cpu_is_at91sam9g45es() (0) |
141 | #define cpu_is_at91sam9m10() (0) | ||
142 | #define cpu_is_at91sam9g46() (0) | ||
143 | #define cpu_is_at91sam9m11() (0) | ||
134 | #endif | 144 | #endif |
135 | 145 | ||
136 | #ifdef CONFIG_ARCH_AT91CAP9 | 146 | #ifdef CONFIG_ARCH_AT91CAP9 |