diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 18:27:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 18:27:22 -0500 |
commit | bab588fcfb6335c767d811a8955979f5440328e0 (patch) | |
tree | 2a862ddf47a82be885a8e7945a17cc3ff7a658b9 /arch/arm/mach-bcm2835 | |
parent | 3298a3511f1e73255a8dc023efd909e569eea037 (diff) | |
parent | 9cb0d1babfcb1b4ac248c09425f7d5de1e771133 (diff) |
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC-specific updates from Arnd Bergmann:
"This is a larger set of new functionality for the existing SoC
families, including:
- vt8500 gains support for new CPU cores, notably the Cortex-A9 based
wm8850
- prima2 gains support for the "marco" SoC family, its SMP based
cousin
- tegra gains support for the new Tegra4 (Tegra114) family
- socfpga now supports a newer version of the hardware including SMP
- i.mx31 and bcm2835 are now using DT probing for their clocks
- lots of updates for sh-mobile
- OMAP updates for clocks, power management and USB
- i.mx6q and tegra now support cpuidle
- kirkwood now supports PCIe hot plugging
- tegra clock support is updated
- tegra USB PHY probing gets implemented diffently"
* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (148 commits)
ARM: prima2: remove duplicate v7_invalidate_l1
ARM: shmobile: r8a7779: Correct TMU clock support again
ARM: prima2: fix __init section for cpu hotplug
ARM: OMAP: Consolidate OMAP USB-HS platform data (part 3/3)
ARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3)
arm: socfpga: Add SMP support for actual socfpga harware
arm: Add v7_invalidate_l1 to cache-v7.S
arm: socfpga: Add entries to enable make dtbs socfpga
arm: socfpga: Add new device tree source for actual socfpga HW
ARM: tegra: sort Kconfig selects for Tegra114
ARM: tegra: enable ARCH_REQUIRE_GPIOLIB for Tegra114
ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC
ARM: tegra: Fix build error for gic update
ARM: tegra: remove empty tegra_smp_init_cpus()
ARM: shmobile: Register ARM architected timer
ARM: MARCO: fix the build issue due to gic-vic-to-irqchip move
ARM: shmobile: r8a7779: Correct TMU clock support
ARM: mxs_defconfig: Select CONFIG_DEVTMPFS_MOUNT
ARM: mxs: decrease mxs_clockevent_device.min_delta_ns to 2 clock cycles
ARM: mxs: use apbx bus clock to drive the timers on timrotv2
...
Diffstat (limited to 'arch/arm/mach-bcm2835')
-rw-r--r-- | arch/arm/mach-bcm2835/bcm2835.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index d615a61e902c..6f5785985dd1 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -26,11 +26,13 @@ | |||
26 | #include <mach/bcm2835_soc.h> | 26 | #include <mach/bcm2835_soc.h> |
27 | 27 | ||
28 | #define PM_RSTC 0x1c | 28 | #define PM_RSTC 0x1c |
29 | #define PM_RSTS 0x20 | ||
29 | #define PM_WDOG 0x24 | 30 | #define PM_WDOG 0x24 |
30 | 31 | ||
31 | #define PM_PASSWORD 0x5a000000 | 32 | #define PM_PASSWORD 0x5a000000 |
32 | #define PM_RSTC_WRCFG_MASK 0x00000030 | 33 | #define PM_RSTC_WRCFG_MASK 0x00000030 |
33 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 | 34 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 |
35 | #define PM_RSTS_HADWRH_SET 0x00000040 | ||
34 | 36 | ||
35 | static void __iomem *wdt_regs; | 37 | static void __iomem *wdt_regs; |
36 | 38 | ||
@@ -67,6 +69,29 @@ static void bcm2835_restart(char mode, const char *cmd) | |||
67 | mdelay(1); | 69 | mdelay(1); |
68 | } | 70 | } |
69 | 71 | ||
72 | /* | ||
73 | * We can't really power off, but if we do the normal reset scheme, and | ||
74 | * indicate to bootcode.bin not to reboot, then most of the chip will be | ||
75 | * powered off. | ||
76 | */ | ||
77 | static void bcm2835_power_off(void) | ||
78 | { | ||
79 | u32 val; | ||
80 | |||
81 | /* | ||
82 | * We set the watchdog hard reset bit here to distinguish this reset | ||
83 | * from the normal (full) reset. bootcode.bin will not reboot after a | ||
84 | * hard reset. | ||
85 | */ | ||
86 | val = readl_relaxed(wdt_regs + PM_RSTS); | ||
87 | val &= ~PM_RSTC_WRCFG_MASK; | ||
88 | val |= PM_PASSWORD | PM_RSTS_HADWRH_SET; | ||
89 | writel_relaxed(val, wdt_regs + PM_RSTS); | ||
90 | |||
91 | /* Continue with normal reset mechanism */ | ||
92 | bcm2835_restart(0, ""); | ||
93 | } | ||
94 | |||
70 | static struct map_desc io_map __initdata = { | 95 | static struct map_desc io_map __initdata = { |
71 | .virtual = BCM2835_PERIPH_VIRT, | 96 | .virtual = BCM2835_PERIPH_VIRT, |
72 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), | 97 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), |
@@ -84,6 +109,9 @@ static void __init bcm2835_init(void) | |||
84 | int ret; | 109 | int ret; |
85 | 110 | ||
86 | bcm2835_setup_restart(); | 111 | bcm2835_setup_restart(); |
112 | if (wdt_regs) | ||
113 | pm_power_off = bcm2835_power_off; | ||
114 | |||
87 | bcm2835_init_clocks(); | 115 | bcm2835_init_clocks(); |
88 | 116 | ||
89 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, | 117 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, |