diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-16 15:45:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-16 15:45:55 -0500 |
commit | 71f777ed50e9109c235c14604d5e23d2f8e7453c (patch) | |
tree | 89d68da346c1f0e4de4429af2be36a8a39566064 /arch/arm/mach-at91 | |
parent | dd3190ee8142d94c9aa09d278a106544b2e5e7d1 (diff) | |
parent | 6886059f2ef5d62c73e87a905e84fa4f87d56074 (diff) |
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson:
"A first set of batches of fixes for 3.13. The diffstat is large
mostly because we're adding a defconfig for a family that's been
lacking it, and there's some missing clock information added for i.MX
and OMAP.
The at91 new code is around dealing with RTC/RTT reset at boot to fix
possible hangs due to pending wakeup interrupts coming in during early
boot"
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
ARM: OMAP2+: Fix build for dra7xx without omap4 and 5
ARM: OMAP2+: omap_device: maintain sane runtime pm status around suspend/resume
doc: devicetree: Add bindings documentation for omap-des driver
ARM: dts: doc: Document missing compatible property for omap-sham driver
ARM: OMAP3: Beagle: fix return value check in beagle_opp_init()
ARM: at91: fix hanged boot due to early rtt-interrupt
ARM: at91: fix hanged boot due to early rtc-interrupt
video: exynos_mipi_dsim: Remove unused variable
ARM: highbank: only select errata 764369 if SMP
ARM: sti: only select errata 764369 if SMP
ARM: tegra: init fuse before setting reset handler
ARM: vt8500: add defconfig for v6/v7 chips
ARM: integrator_cp: Set LCD{0,1} enable lines when turning on CLCD
ARM: OMAP: devicetree: fix SPI node compatible property syntax items
pinctrl: single: call pcs_soc->rearm() whenever IRQ mask is changed
ARM: OMAP2+: smsc911x: fix return value check in gpmc_smsc911x_init()
MAINTAINERS: drop discontinued mailing list
ARM: dts: i.MX51: Fix OTG PHY clock
ARM: imx: set up pllv3 POWER and BYPASS sequentially
ARM: imx: pllv3 needs relock in .set_rate() call
...
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9n12.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9x5.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/generic.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/at91sam9n12.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/at91sam9x5.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/sama5d3.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/sama5d3.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/sysirq_mask.c | 71 |
14 files changed, 120 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index c1b737097c95..90aab2d5a07f 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := irq.o gpio.o setup.o | 5 | obj-y := irq.o gpio.o setup.o sysirq_mask.o |
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index f8629a3fa245..d6a1fa85371d 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -351,6 +351,8 @@ static void __init at91sam9260_initialize(void) | |||
351 | arm_pm_idle = at91sam9_idle; | 351 | arm_pm_idle = at91sam9_idle; |
352 | arm_pm_restart = at91sam9_alt_restart; | 352 | arm_pm_restart = at91sam9_alt_restart; |
353 | 353 | ||
354 | at91_sysirq_mask_rtt(AT91SAM9260_BASE_RTT); | ||
355 | |||
354 | /* Register GPIO subsystem */ | 356 | /* Register GPIO subsystem */ |
355 | at91_gpio_init(at91sam9260_gpio, 3); | 357 | at91_gpio_init(at91sam9260_gpio, 3); |
356 | } | 358 | } |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 1f3867a17a28..23ba1d8a1531 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -293,6 +293,8 @@ static void __init at91sam9261_initialize(void) | |||
293 | arm_pm_idle = at91sam9_idle; | 293 | arm_pm_idle = at91sam9_idle; |
294 | arm_pm_restart = at91sam9_alt_restart; | 294 | arm_pm_restart = at91sam9_alt_restart; |
295 | 295 | ||
296 | at91_sysirq_mask_rtt(AT91SAM9261_BASE_RTT); | ||
297 | |||
296 | /* Register GPIO subsystem */ | 298 | /* Register GPIO subsystem */ |
297 | at91_gpio_init(at91sam9261_gpio, 3); | 299 | at91_gpio_init(at91sam9261_gpio, 3); |
298 | } | 300 | } |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 90d455d294a1..7eccb0fc57bc 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -330,6 +330,9 @@ static void __init at91sam9263_initialize(void) | |||
330 | arm_pm_idle = at91sam9_idle; | 330 | arm_pm_idle = at91sam9_idle; |
331 | arm_pm_restart = at91sam9_alt_restart; | 331 | arm_pm_restart = at91sam9_alt_restart; |
332 | 332 | ||
333 | at91_sysirq_mask_rtt(AT91SAM9263_BASE_RTT0); | ||
334 | at91_sysirq_mask_rtt(AT91SAM9263_BASE_RTT1); | ||
335 | |||
333 | /* Register GPIO subsystem */ | 336 | /* Register GPIO subsystem */ |
334 | at91_gpio_init(at91sam9263_gpio, 5); | 337 | at91_gpio_init(at91sam9263_gpio, 5); |
335 | } | 338 | } |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index e9bf0b8f40eb..9405aa08b104 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -379,6 +379,9 @@ static void __init at91sam9g45_initialize(void) | |||
379 | arm_pm_idle = at91sam9_idle; | 379 | arm_pm_idle = at91sam9_idle; |
380 | arm_pm_restart = at91sam9g45_restart; | 380 | arm_pm_restart = at91sam9g45_restart; |
381 | 381 | ||
382 | at91_sysirq_mask_rtc(AT91SAM9G45_BASE_RTC); | ||
383 | at91_sysirq_mask_rtt(AT91SAM9G45_BASE_RTT); | ||
384 | |||
382 | /* Register GPIO subsystem */ | 385 | /* Register GPIO subsystem */ |
383 | at91_gpio_init(at91sam9g45_gpio, 5); | 386 | at91_gpio_init(at91sam9g45_gpio, 5); |
384 | } | 387 | } |
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c index 2d895a297739..388ec3aec4b9 100644 --- a/arch/arm/mach-at91/at91sam9n12.c +++ b/arch/arm/mach-at91/at91sam9n12.c | |||
@@ -224,7 +224,13 @@ static void __init at91sam9n12_map_io(void) | |||
224 | at91_init_sram(0, AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE); | 224 | at91_init_sram(0, AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void __init at91sam9n12_initialize(void) | ||
228 | { | ||
229 | at91_sysirq_mask_rtc(AT91SAM9N12_BASE_RTC); | ||
230 | } | ||
231 | |||
227 | AT91_SOC_START(at91sam9n12) | 232 | AT91_SOC_START(at91sam9n12) |
228 | .map_io = at91sam9n12_map_io, | 233 | .map_io = at91sam9n12_map_io, |
229 | .register_clocks = at91sam9n12_register_clocks, | 234 | .register_clocks = at91sam9n12_register_clocks, |
235 | .init = at91sam9n12_initialize, | ||
230 | AT91_SOC_END | 236 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 88995af09c04..0750ffb7e6b1 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -296,6 +296,9 @@ static void __init at91sam9rl_initialize(void) | |||
296 | arm_pm_idle = at91sam9_idle; | 296 | arm_pm_idle = at91sam9_idle; |
297 | arm_pm_restart = at91sam9_alt_restart; | 297 | arm_pm_restart = at91sam9_alt_restart; |
298 | 298 | ||
299 | at91_sysirq_mask_rtc(AT91SAM9RL_BASE_RTC); | ||
300 | at91_sysirq_mask_rtt(AT91SAM9RL_BASE_RTT); | ||
301 | |||
299 | /* Register GPIO subsystem */ | 302 | /* Register GPIO subsystem */ |
300 | at91_gpio_init(at91sam9rl_gpio, 4); | 303 | at91_gpio_init(at91sam9rl_gpio, 4); |
301 | } | 304 | } |
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index 916e5a142917..e8a2e075a1b8 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c | |||
@@ -322,6 +322,11 @@ static void __init at91sam9x5_map_io(void) | |||
322 | at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE); | 322 | at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE); |
323 | } | 323 | } |
324 | 324 | ||
325 | static void __init at91sam9x5_initialize(void) | ||
326 | { | ||
327 | at91_sysirq_mask_rtc(AT91SAM9X5_BASE_RTC); | ||
328 | } | ||
329 | |||
325 | /* -------------------------------------------------------------------- | 330 | /* -------------------------------------------------------------------- |
326 | * Interrupt initialization | 331 | * Interrupt initialization |
327 | * -------------------------------------------------------------------- */ | 332 | * -------------------------------------------------------------------- */ |
@@ -329,4 +334,5 @@ static void __init at91sam9x5_map_io(void) | |||
329 | AT91_SOC_START(at91sam9x5) | 334 | AT91_SOC_START(at91sam9x5) |
330 | .map_io = at91sam9x5_map_io, | 335 | .map_io = at91sam9x5_map_io, |
331 | .register_clocks = at91sam9x5_register_clocks, | 336 | .register_clocks = at91sam9x5_register_clocks, |
337 | .init = at91sam9x5_initialize, | ||
332 | AT91_SOC_END | 338 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index dc6e2f5f804d..26dee3ce9397 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -34,6 +34,8 @@ extern int __init at91_aic_of_init(struct device_node *node, | |||
34 | struct device_node *parent); | 34 | struct device_node *parent); |
35 | extern int __init at91_aic5_of_init(struct device_node *node, | 35 | extern int __init at91_aic5_of_init(struct device_node *node, |
36 | struct device_node *parent); | 36 | struct device_node *parent); |
37 | extern void __init at91_sysirq_mask_rtc(u32 rtc_base); | ||
38 | extern void __init at91_sysirq_mask_rtt(u32 rtt_base); | ||
37 | 39 | ||
38 | 40 | ||
39 | /* Timer */ | 41 | /* Timer */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12.h b/arch/arm/mach-at91/include/mach/at91sam9n12.h index d374b87c0459..0151bcf6163c 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9n12.h +++ b/arch/arm/mach-at91/include/mach/at91sam9n12.h | |||
@@ -49,6 +49,11 @@ | |||
49 | #define AT91SAM9N12_BASE_USART3 0xf8028000 | 49 | #define AT91SAM9N12_BASE_USART3 0xf8028000 |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * System Peripherals | ||
53 | */ | ||
54 | #define AT91SAM9N12_BASE_RTC 0xfffffeb0 | ||
55 | |||
56 | /* | ||
52 | * Internal Memory. | 57 | * Internal Memory. |
53 | */ | 58 | */ |
54 | #define AT91SAM9N12_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | 59 | #define AT91SAM9N12_SRAM_BASE 0x00300000 /* Internal SRAM base address */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h index c75ee19b58d3..2fc76c49e97c 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9x5.h +++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h | |||
@@ -55,6 +55,11 @@ | |||
55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 | 55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * System Peripherals | ||
59 | */ | ||
60 | #define AT91SAM9X5_BASE_RTC 0xfffffeb0 | ||
61 | |||
62 | /* | ||
58 | * Internal Memory. | 63 | * Internal Memory. |
59 | */ | 64 | */ |
60 | #define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | 65 | #define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ |
diff --git a/arch/arm/mach-at91/include/mach/sama5d3.h b/arch/arm/mach-at91/include/mach/sama5d3.h index 31096a8aaf1d..25613d8c6dcd 100644 --- a/arch/arm/mach-at91/include/mach/sama5d3.h +++ b/arch/arm/mach-at91/include/mach/sama5d3.h | |||
@@ -73,6 +73,11 @@ | |||
73 | #define SAMA5D3_BASE_USART3 0xf8024000 | 73 | #define SAMA5D3_BASE_USART3 0xf8024000 |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * System Peripherals | ||
77 | */ | ||
78 | #define SAMA5D3_BASE_RTC 0xfffffeb0 | ||
79 | |||
80 | /* | ||
76 | * Internal Memory | 81 | * Internal Memory |
77 | */ | 82 | */ |
78 | #define SAMA5D3_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | 83 | #define SAMA5D3_SRAM_BASE 0x00300000 /* Internal SRAM base address */ |
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c index 401279715ab1..3ea86428ee09 100644 --- a/arch/arm/mach-at91/sama5d3.c +++ b/arch/arm/mach-at91/sama5d3.c | |||
@@ -371,7 +371,13 @@ static void __init sama5d3_map_io(void) | |||
371 | at91_init_sram(0, SAMA5D3_SRAM_BASE, SAMA5D3_SRAM_SIZE); | 371 | at91_init_sram(0, SAMA5D3_SRAM_BASE, SAMA5D3_SRAM_SIZE); |
372 | } | 372 | } |
373 | 373 | ||
374 | static void __init sama5d3_initialize(void) | ||
375 | { | ||
376 | at91_sysirq_mask_rtc(SAMA5D3_BASE_RTC); | ||
377 | } | ||
378 | |||
374 | AT91_SOC_START(sama5d3) | 379 | AT91_SOC_START(sama5d3) |
375 | .map_io = sama5d3_map_io, | 380 | .map_io = sama5d3_map_io, |
376 | .register_clocks = sama5d3_register_clocks, | 381 | .register_clocks = sama5d3_register_clocks, |
382 | .init = sama5d3_initialize, | ||
377 | AT91_SOC_END | 383 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/sysirq_mask.c b/arch/arm/mach-at91/sysirq_mask.c new file mode 100644 index 000000000000..2ba694f9626b --- /dev/null +++ b/arch/arm/mach-at91/sysirq_mask.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * sysirq_mask.c - System-interrupt masking | ||
3 | * | ||
4 | * Copyright (C) 2013 Johan Hovold <jhovold@gmail.com> | ||
5 | * | ||
6 | * Functions to disable system interrupts from backup-powered peripherals. | ||
7 | * | ||
8 | * The RTC and RTT-peripherals are generally powered by backup power (VDDBU) | ||
9 | * and are not reset on wake-up, user, watchdog or software reset. This means | ||
10 | * that their interrupts may be enabled during early boot (e.g. after a user | ||
11 | * reset). | ||
12 | * | ||
13 | * As the RTC and RTT share the system-interrupt line with the PIT, an | ||
14 | * interrupt occurring before a handler has been installed would lead to the | ||
15 | * system interrupt being disabled and prevent the system from booting. | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License as published by | ||
19 | * the Free Software Foundation; either version 2 of the License, or | ||
20 | * (at your option) any later version. | ||
21 | */ | ||
22 | |||
23 | #include <linux/io.h> | ||
24 | #include <mach/at91_rtt.h> | ||
25 | |||
26 | #include "generic.h" | ||
27 | |||
28 | #define AT91_RTC_IDR 0x24 /* Interrupt Disable Register */ | ||
29 | #define AT91_RTC_IMR 0x28 /* Interrupt Mask Register */ | ||
30 | |||
31 | void __init at91_sysirq_mask_rtc(u32 rtc_base) | ||
32 | { | ||
33 | void __iomem *base; | ||
34 | u32 mask; | ||
35 | |||
36 | base = ioremap(rtc_base, 64); | ||
37 | if (!base) | ||
38 | return; | ||
39 | |||
40 | mask = readl_relaxed(base + AT91_RTC_IMR); | ||
41 | if (mask) { | ||
42 | pr_info("AT91: Disabling rtc irq\n"); | ||
43 | writel_relaxed(mask, base + AT91_RTC_IDR); | ||
44 | (void)readl_relaxed(base + AT91_RTC_IMR); /* flush */ | ||
45 | } | ||
46 | |||
47 | iounmap(base); | ||
48 | } | ||
49 | |||
50 | void __init at91_sysirq_mask_rtt(u32 rtt_base) | ||
51 | { | ||
52 | void __iomem *base; | ||
53 | void __iomem *reg; | ||
54 | u32 mode; | ||
55 | |||
56 | base = ioremap(rtt_base, 16); | ||
57 | if (!base) | ||
58 | return; | ||
59 | |||
60 | reg = base + AT91_RTT_MR; | ||
61 | |||
62 | mode = readl_relaxed(reg); | ||
63 | if (mode & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN)) { | ||
64 | pr_info("AT91: Disabling rtt irq\n"); | ||
65 | mode &= ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); | ||
66 | writel_relaxed(mode, reg); | ||
67 | (void)readl_relaxed(reg); /* flush */ | ||
68 | } | ||
69 | |||
70 | iounmap(base); | ||
71 | } | ||