aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/at91_rstc.h2
-rw-r--r--arch/arm/mach-at91/at91_shdwc.h2
-rw-r--r--arch/arm/mach-at91/at91rm9200.c1
-rw-r--r--arch/arm/mach-at91/at91sam9260.c2
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c2
-rw-r--r--arch/arm/mach-at91/at91sam9n12.c2
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c2
-rw-r--r--arch/arm/mach-at91/at91x40_time.c2
-rw-r--r--arch/arm/mach-at91/cpuidle.c18
-rw-r--r--arch/arm/mach-at91/include/mach/at91_dbgu.h3
-rw-r--r--arch/arm/mach-at91/include/mach/at91_matrix.h2
-rw-r--r--arch/arm/mach-at91/include/mach/at91_st.h2
-rw-r--r--arch/arm/mach-at91/setup.c8
13 files changed, 20 insertions, 28 deletions
diff --git a/arch/arm/mach-at91/at91_rstc.h b/arch/arm/mach-at91/at91_rstc.h
index 875fa336800b..a600e6992920 100644
--- a/arch/arm/mach-at91/at91_rstc.h
+++ b/arch/arm/mach-at91/at91_rstc.h
@@ -23,7 +23,7 @@ extern void __iomem *at91_rstc_base;
23 __raw_readl(at91_rstc_base + field) 23 __raw_readl(at91_rstc_base + field)
24 24
25#define at91_rstc_write(field, value) \ 25#define at91_rstc_write(field, value) \
26 __raw_writel(value, at91_rstc_base + field); 26 __raw_writel(value, at91_rstc_base + field)
27#else 27#else
28.extern at91_rstc_base 28.extern at91_rstc_base
29#endif 29#endif
diff --git a/arch/arm/mach-at91/at91_shdwc.h b/arch/arm/mach-at91/at91_shdwc.h
index 60478ea8bd46..9e29f31ec9a6 100644
--- a/arch/arm/mach-at91/at91_shdwc.h
+++ b/arch/arm/mach-at91/at91_shdwc.h
@@ -23,7 +23,7 @@ extern void __iomem *at91_shdwc_base;
23 __raw_readl(at91_shdwc_base + field) 23 __raw_readl(at91_shdwc_base + field)
24 24
25#define at91_shdwc_write(field, value) \ 25#define at91_shdwc_write(field, value) \
26 __raw_writel(value, at91_shdwc_base + field); 26 __raw_writel(value, at91_shdwc_base + field)
27#endif 27#endif
28 28
29#define AT91_SHDW_CR 0x00 /* Shut Down Control Register */ 29#define AT91_SHDW_CR 0x00 /* Shut Down Control Register */
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index ccce7592dbd3..d193a409bc45 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -212,6 +212,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
212 CLKDEV_CON_DEV_ID("t2_clk", "fffa4000.timer", &tc5_clk), 212 CLKDEV_CON_DEV_ID("t2_clk", "fffa4000.timer", &tc5_clk),
213 CLKDEV_CON_DEV_ID("mci_clk", "fffb4000.mmc", &mmc_clk), 213 CLKDEV_CON_DEV_ID("mci_clk", "fffb4000.mmc", &mmc_clk),
214 CLKDEV_CON_DEV_ID("emac_clk", "fffbc000.ethernet", &ether_clk), 214 CLKDEV_CON_DEV_ID("emac_clk", "fffbc000.ethernet", &ether_clk),
215 CLKDEV_CON_DEV_ID(NULL, "fffb8000.i2c", &twi_clk),
215 CLKDEV_CON_DEV_ID("hclk", "300000.ohci", &ohci_clk), 216 CLKDEV_CON_DEV_ID("hclk", "300000.ohci", &ohci_clk),
216 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk), 217 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
217 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk), 218 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 1833b4c365df..a8ce24538da6 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -232,6 +232,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
232 CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk), 232 CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk),
233 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk), 233 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk),
234 CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk), 234 CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk),
235 CLKDEV_CON_DEV_ID("spi_clk", "fffc8000.spi", &spi0_clk),
236 CLKDEV_CON_DEV_ID("spi_clk", "fffcc000.spi", &spi1_clk),
235 /* fake hclk clock */ 237 /* fake hclk clock */
236 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), 238 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
237 CLKDEV_CON_ID("pioA", &pioA_clk), 239 CLKDEV_CON_ID("pioA", &pioA_clk),
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 4fcbe7b5b58d..a6c224fc9542 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -262,6 +262,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
262 CLKDEV_CON_DEV_ID("mci_clk", "fffd0000.mmc", &mmc1_clk), 262 CLKDEV_CON_DEV_ID("mci_clk", "fffd0000.mmc", &mmc1_clk),
263 CLKDEV_CON_DEV_ID(NULL, "fff84000.i2c", &twi0_clk), 263 CLKDEV_CON_DEV_ID(NULL, "fff84000.i2c", &twi0_clk),
264 CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk), 264 CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk),
265 CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
266 CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
265 /* fake hclk clock */ 267 /* fake hclk clock */
266 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk), 268 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk),
267 CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk), 269 CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index 2c7a2f4a7568..13cdbcd48f51 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -172,6 +172,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
172 CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk), 172 CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk),
173 CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), 173 CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
174 CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), 174 CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
175 CLKDEV_CON_DEV_ID("spi_clk", "f0000000.spi", &spi0_clk),
176 CLKDEV_CON_DEV_ID("spi_clk", "f0004000.spi", &spi1_clk),
175 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk), 177 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk),
176 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk), 178 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk),
177 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk), 179 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk),
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index 3a1a7993c125..e631fec040ce 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -237,6 +237,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
237 CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), 237 CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
238 CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), 238 CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
239 CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk), 239 CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk),
240 CLKDEV_CON_DEV_ID("spi_clk", "f0000000.spi", &spi0_clk),
241 CLKDEV_CON_DEV_ID("spi_clk", "f0004000.spi", &spi1_clk),
240 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk), 242 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk),
241 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk), 243 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk),
242 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk), 244 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk),
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
index 0c07a4459cb2..2919eba41ff4 100644
--- a/arch/arm/mach-at91/at91x40_time.c
+++ b/arch/arm/mach-at91/at91x40_time.c
@@ -33,7 +33,7 @@
33 __raw_readl(AT91_IO_P2V(AT91_TC) + field) 33 __raw_readl(AT91_IO_P2V(AT91_TC) + field)
34 34
35#define at91_tc_write(field, value) \ 35#define at91_tc_write(field, value) \
36 __raw_writel(value, AT91_IO_P2V(AT91_TC) + field); 36 __raw_writel(value, AT91_IO_P2V(AT91_TC) + field)
37 37
38/* 38/*
39 * 3 counter/timer units present. 39 * 3 counter/timer units present.
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c
index 0c6381516a5a..48f1228c611c 100644
--- a/arch/arm/mach-at91/cpuidle.c
+++ b/arch/arm/mach-at91/cpuidle.c
@@ -27,8 +27,6 @@
27 27
28#define AT91_MAX_STATES 2 28#define AT91_MAX_STATES 2
29 29
30static DEFINE_PER_CPU(struct cpuidle_device, at91_cpuidle_device);
31
32/* Actual code that puts the SoC in different idle states */ 30/* Actual code that puts the SoC in different idle states */
33static int at91_enter_idle(struct cpuidle_device *dev, 31static int at91_enter_idle(struct cpuidle_device *dev,
34 struct cpuidle_driver *drv, 32 struct cpuidle_driver *drv,
@@ -47,7 +45,6 @@ static int at91_enter_idle(struct cpuidle_device *dev,
47static struct cpuidle_driver at91_idle_driver = { 45static struct cpuidle_driver at91_idle_driver = {
48 .name = "at91_idle", 46 .name = "at91_idle",
49 .owner = THIS_MODULE, 47 .owner = THIS_MODULE,
50 .en_core_tk_irqen = 1,
51 .states[0] = ARM_CPUIDLE_WFI_STATE, 48 .states[0] = ARM_CPUIDLE_WFI_STATE,
52 .states[1] = { 49 .states[1] = {
53 .enter = at91_enter_idle, 50 .enter = at91_enter_idle,
@@ -61,20 +58,9 @@ static struct cpuidle_driver at91_idle_driver = {
61}; 58};
62 59
63/* Initialize CPU idle by registering the idle states */ 60/* Initialize CPU idle by registering the idle states */
64static int at91_init_cpuidle(void) 61static int __init at91_init_cpuidle(void)
65{ 62{
66 struct cpuidle_device *device; 63 return cpuidle_register(&at91_idle_driver, NULL);
67
68 device = &per_cpu(at91_cpuidle_device, smp_processor_id());
69 device->state_count = AT91_MAX_STATES;
70
71 cpuidle_register_driver(&at91_idle_driver);
72
73 if (cpuidle_register_device(device)) {
74 printk(KERN_ERR "at91_init_cpuidle: Failed registering\n");
75 return -EIO;
76 }
77 return 0;
78} 64}
79 65
80device_initcall(at91_init_cpuidle); 66device_initcall(at91_init_cpuidle);
diff --git a/arch/arm/mach-at91/include/mach/at91_dbgu.h b/arch/arm/mach-at91/include/mach/at91_dbgu.h
index 2aa0c5e13495..3b5948566e52 100644
--- a/arch/arm/mach-at91/include/mach/at91_dbgu.h
+++ b/arch/arm/mach-at91/include/mach/at91_dbgu.h
@@ -16,9 +16,6 @@
16#ifndef AT91_DBGU_H 16#ifndef AT91_DBGU_H
17#define AT91_DBGU_H 17#define AT91_DBGU_H
18 18
19#define dbgu_readl(dbgu, field) \
20 __raw_readl(AT91_VA_BASE_SYS + dbgu + AT91_DBGU_ ## field)
21
22#if !defined(CONFIG_ARCH_AT91X40) 19#if !defined(CONFIG_ARCH_AT91X40)
23#define AT91_DBGU_CR (0x00) /* Control Register */ 20#define AT91_DBGU_CR (0x00) /* Control Register */
24#define AT91_DBGU_MR (0x04) /* Mode Register */ 21#define AT91_DBGU_MR (0x04) /* Mode Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_matrix.h b/arch/arm/mach-at91/include/mach/at91_matrix.h
index 02fae9de746b..f8996c954131 100644
--- a/arch/arm/mach-at91/include/mach/at91_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91_matrix.h
@@ -14,7 +14,7 @@ extern void __iomem *at91_matrix_base;
14 __raw_readl(at91_matrix_base + field) 14 __raw_readl(at91_matrix_base + field)
15 15
16#define at91_matrix_write(field, value) \ 16#define at91_matrix_write(field, value) \
17 __raw_writel(value, at91_matrix_base + field); 17 __raw_writel(value, at91_matrix_base + field)
18 18
19#else 19#else
20.extern at91_matrix_base 20.extern at91_matrix_base
diff --git a/arch/arm/mach-at91/include/mach/at91_st.h b/arch/arm/mach-at91/include/mach/at91_st.h
index 969aac27109f..67fdbd13c3ed 100644
--- a/arch/arm/mach-at91/include/mach/at91_st.h
+++ b/arch/arm/mach-at91/include/mach/at91_st.h
@@ -23,7 +23,7 @@ extern void __iomem *at91_st_base;
23 __raw_readl(at91_st_base + field) 23 __raw_readl(at91_st_base + field)
24 24
25#define at91_st_write(field, value) \ 25#define at91_st_write(field, value) \
26 __raw_writel(value, at91_st_base + field); 26 __raw_writel(value, at91_st_base + field)
27#else 27#else
28.extern at91_st_base 28.extern at91_st_base
29#endif 29#endif
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 2ecd1693c804..e8491e77b1f7 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -360,7 +360,7 @@ static void at91_dt_rstc(void)
360 360
361 of_id = of_match_node(rstc_ids, np); 361 of_id = of_match_node(rstc_ids, np);
362 if (!of_id) 362 if (!of_id)
363 panic("AT91: rtsc no restart function availlable\n"); 363 panic("AT91: rtsc no restart function available\n");
364 364
365 arm_pm_restart = of_id->data; 365 arm_pm_restart = of_id->data;
366 366
@@ -380,7 +380,7 @@ static void at91_dt_ramc(void)
380 380
381 np = of_find_matching_node(NULL, ramc_ids); 381 np = of_find_matching_node(NULL, ramc_ids);
382 if (!np) 382 if (!np)
383 panic("unable to find compatible ram conroller node in dtb\n"); 383 panic("unable to find compatible ram controller node in dtb\n");
384 384
385 at91_ramc_base[0] = of_iomap(np, 0); 385 at91_ramc_base[0] = of_iomap(np, 0);
386 if (!at91_ramc_base[0]) 386 if (!at91_ramc_base[0])
@@ -430,7 +430,7 @@ static void at91_dt_shdwc(void)
430 430
431 np = of_find_matching_node(NULL, shdwc_ids); 431 np = of_find_matching_node(NULL, shdwc_ids);
432 if (!np) { 432 if (!np) {
433 pr_debug("AT91: unable to find compatible shutdown (shdwc) conroller node in dtb\n"); 433 pr_debug("AT91: unable to find compatible shutdown (shdwc) controller node in dtb\n");
434 return; 434 return;
435 } 435 }
436 436
@@ -446,7 +446,7 @@ static void at91_dt_shdwc(void)
446 446
447 if (!of_property_read_u32(np, "atmel,wakeup-counter", &reg)) { 447 if (!of_property_read_u32(np, "atmel,wakeup-counter", &reg)) {
448 if (reg > AT91_SHDW_CPTWK0_MAX) { 448 if (reg > AT91_SHDW_CPTWK0_MAX) {
449 pr_warn("AT91: shdwc wakeup conter 0x%x > 0x%x reduce it to 0x%x\n", 449 pr_warn("AT91: shdwc wakeup counter 0x%x > 0x%x reduce it to 0x%x\n",
450 reg, AT91_SHDW_CPTWK0_MAX, AT91_SHDW_CPTWK0_MAX); 450 reg, AT91_SHDW_CPTWK0_MAX, AT91_SHDW_CPTWK0_MAX);
451 reg = AT91_SHDW_CPTWK0_MAX; 451 reg = AT91_SHDW_CPTWK0_MAX;
452 } 452 }