diff options
author | Olof Johansson <olof@lixom.net> | 2014-05-27 14:11:17 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-05-27 14:11:17 -0400 |
commit | 9eb23c9218aac6ff4b5c2e660638a47c03f2c978 (patch) | |
tree | f4368560d7b74d94fe64028ead84ba9963cd3182 | |
parent | 9f0f10117228b73ec657aab8f303c9ae88fda070 (diff) | |
parent | 6234ca670d5703ee4d22042e974657c57fe8364b (diff) |
Merge tag 'keystone-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/soc2
Merge "Keystone SOC updates part2 for 3.16" from Santosh Shilimkar:
- Removal of now un-necessary reset machine code
- dts updates for keystone reset driver
* tag 'keystone-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
ARM: configs: keystone: enable reset driver support
ARM: dts: keystone: update reset node to work with reset driver
ARM: keystone: remove redundant reset stuff
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/boot/dts/keystone.dtsi | 14 | ||||
-rw-r--r-- | arch/arm/configs/keystone_defconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-keystone/keystone.c | 34 |
3 files changed, 16 insertions, 35 deletions
diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi index 90823eb90c1b..a8052fd657e5 100644 --- a/arch/arm/boot/dts/keystone.dtsi +++ b/arch/arm/boot/dts/keystone.dtsi | |||
@@ -67,9 +67,21 @@ | |||
67 | interrupt-parent = <&gic>; | 67 | interrupt-parent = <&gic>; |
68 | ranges = <0x0 0x0 0x0 0xc0000000>; | 68 | ranges = <0x0 0x0 0x0 0xc0000000>; |
69 | 69 | ||
70 | pllctrl: pll-controller@02310000 { | ||
71 | compatible = "ti,keystone-pllctrl", "syscon"; | ||
72 | reg = <0x02310000 0x200>; | ||
73 | }; | ||
74 | |||
75 | devctrl: device-state-control@02620000 { | ||
76 | compatible = "ti,keystone-devctrl", "syscon"; | ||
77 | reg = <0x02620000 0x1000>; | ||
78 | }; | ||
79 | |||
70 | rstctrl: reset-controller { | 80 | rstctrl: reset-controller { |
71 | compatible = "ti,keystone-reset"; | 81 | compatible = "ti,keystone-reset"; |
72 | reg = <0x023100e8 4>; /* pll reset control reg */ | 82 | ti,syscon-pll = <&pllctrl 0xe4>; |
83 | ti,syscon-dev = <&devctrl 0x328>; | ||
84 | ti,wdt-list = <0>; | ||
73 | }; | 85 | }; |
74 | 86 | ||
75 | /include/ "keystone-clocks.dtsi" | 87 | /include/ "keystone-clocks.dtsi" |
diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig index 07b43277ccd3..dc0da3f455e5 100644 --- a/arch/arm/configs/keystone_defconfig +++ b/arch/arm/configs/keystone_defconfig | |||
@@ -132,6 +132,9 @@ CONFIG_SPI=y | |||
132 | CONFIG_SPI_DAVINCI=y | 132 | CONFIG_SPI_DAVINCI=y |
133 | CONFIG_SPI_SPIDEV=y | 133 | CONFIG_SPI_SPIDEV=y |
134 | # CONFIG_HWMON is not set | 134 | # CONFIG_HWMON is not set |
135 | CONFIG_POWER_SUPPLY=y | ||
136 | CONFIG_POWER_RESET=y | ||
137 | CONFIG_POWER_RESET_KEYSTONE=y | ||
135 | CONFIG_WATCHDOG=y | 138 | CONFIG_WATCHDOG=y |
136 | CONFIG_WATCHDOG_CORE=y | 139 | CONFIG_WATCHDOG_CORE=y |
137 | CONFIG_DAVINCI_WATCHDOG=y | 140 | CONFIG_DAVINCI_WATCHDOG=y |
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index 59b8383cbdb0..1f9ae89ee06d 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c | |||
@@ -26,11 +26,6 @@ | |||
26 | 26 | ||
27 | #include "keystone.h" | 27 | #include "keystone.h" |
28 | 28 | ||
29 | #define PLL_RESET_WRITE_KEY_MASK 0xffff0000 | ||
30 | #define PLL_RESET_WRITE_KEY 0x5a69 | ||
31 | #define PLL_RESET BIT(16) | ||
32 | |||
33 | static void __iomem *keystone_rstctrl; | ||
34 | static struct notifier_block platform_nb; | 29 | static struct notifier_block platform_nb; |
35 | static unsigned long keystone_dma_pfn_offset __read_mostly; | 30 | static unsigned long keystone_dma_pfn_offset __read_mostly; |
36 | 31 | ||
@@ -55,16 +50,6 @@ static int keystone_platform_notifier(struct notifier_block *nb, | |||
55 | 50 | ||
56 | static void __init keystone_init(void) | 51 | static void __init keystone_init(void) |
57 | { | 52 | { |
58 | struct device_node *node; | ||
59 | |||
60 | node = of_find_compatible_node(NULL, NULL, "ti,keystone-reset"); | ||
61 | if (WARN_ON(!node)) | ||
62 | pr_warn("ti,keystone-reset node undefined\n"); | ||
63 | |||
64 | keystone_rstctrl = of_iomap(node, 0); | ||
65 | if (WARN_ON(!keystone_rstctrl)) | ||
66 | pr_warn("ti,keystone-reset iomap error\n"); | ||
67 | |||
68 | keystone_pm_runtime_init(); | 53 | keystone_pm_runtime_init(); |
69 | if (platform_nb.notifier_call) | 54 | if (platform_nb.notifier_call) |
70 | bus_register_notifier(&platform_bus_type, &platform_nb); | 55 | bus_register_notifier(&platform_bus_type, &platform_nb); |
@@ -123,24 +108,6 @@ static const char *keystone_match[] __initconst = { | |||
123 | NULL, | 108 | NULL, |
124 | }; | 109 | }; |
125 | 110 | ||
126 | void keystone_restart(enum reboot_mode mode, const char *cmd) | ||
127 | { | ||
128 | u32 val; | ||
129 | |||
130 | BUG_ON(!keystone_rstctrl); | ||
131 | |||
132 | /* Enable write access to RSTCTRL */ | ||
133 | val = readl(keystone_rstctrl); | ||
134 | val &= PLL_RESET_WRITE_KEY_MASK; | ||
135 | val |= PLL_RESET_WRITE_KEY; | ||
136 | writel(val, keystone_rstctrl); | ||
137 | |||
138 | /* Reset the SOC */ | ||
139 | val = readl(keystone_rstctrl); | ||
140 | val &= ~PLL_RESET; | ||
141 | writel(val, keystone_rstctrl); | ||
142 | } | ||
143 | |||
144 | DT_MACHINE_START(KEYSTONE, "Keystone") | 111 | DT_MACHINE_START(KEYSTONE, "Keystone") |
145 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) | 112 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) |
146 | .dma_zone_size = SZ_2G, | 113 | .dma_zone_size = SZ_2G, |
@@ -148,6 +115,5 @@ DT_MACHINE_START(KEYSTONE, "Keystone") | |||
148 | .smp = smp_ops(keystone_smp_ops), | 115 | .smp = smp_ops(keystone_smp_ops), |
149 | .init_machine = keystone_init, | 116 | .init_machine = keystone_init, |
150 | .dt_compat = keystone_match, | 117 | .dt_compat = keystone_match, |
151 | .restart = keystone_restart, | ||
152 | .init_meminfo = keystone_init_meminfo, | 118 | .init_meminfo = keystone_init_meminfo, |
153 | MACHINE_END | 119 | MACHINE_END |