aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/system.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 14:14:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 14:14:29 -0400
commitb3345d7c57d70e6cb6749af25cdbe80515582e99 (patch)
tree04cce706bc7e944ad1fb257108a8ae735948f97f /arch/arm/mach-imx/system.c
parent44c916d58b9ef1f2c4aec2def57fa8289c716a60 (diff)
parentc2fff85e21818952aa0ee5778926beee6c03e579 (diff)
Merge tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson: "This is the bulk of new SoC enablement and other platform changes for 3.17: - Samsung S5PV210 has been converted to DT and multiplatform - Clock drivers and bindings for some of the lower-end i.MX 1/2 platforms - Kirkwood, one of the popular Marvell platforms, is folded into the mvebu platform code, removing mach-kirkwood - Hwmod data for TI AM43xx and DRA7 platforms - More additions of Renesas shmobile platform support - Removal of plat-samsung contents that can be removed with S5PV210 being multiplatform/DT-enabled and the other two old platforms being removed New platforms (most with only basic support right now): - Hisilicon X5HD2 settop box chipset is introduced - Mediatek MT6589 (mobile chipset) is introduced - Broadcom BCM7xxx settop box chipset is introduced + as usual a lot other pieces all over the platform code" * tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (240 commits) ARM: hisi: remove smp from machine descriptor power: reset: move hisilicon reboot code ARM: dts: Add hix5hd2-dkb dts file. ARM: debug: Rename Hi3716 to HIX5HD2 ARM: hisi: enable hix5hd2 SoC ARM: hisi: add ARCH_HISI MAINTAINERS: add entry for Broadcom ARM STB architecture ARM: brcmstb: select GISB arbiter and interrupt drivers ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs ARM: configs: enable SMP in bcm_defconfig ARM: add SMP support for Broadcom mobile SoCs Documentation: arm: misc updates to Marvell EBU SoC status Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC ARM: mvebu: fix build without platforms selected ARM: mvebu: add cpuidle support for Armada 38x ARM: mvebu: add cpuidle support for Armada 370 cpuidle: mvebu: add Armada 38x support cpuidle: mvebu: add Armada 370 support cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7 ARM: mvebu: export the SCU address ...
Diffstat (limited to 'arch/arm/mach-imx/system.c')
-rw-r--r--arch/arm/mach-imx/system.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 3b0733edb68c..d14c33fd6b03 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -42,7 +42,10 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
42{ 42{
43 unsigned int wcr_enable; 43 unsigned int wcr_enable;
44 44
45 if (wdog_clk) 45 if (!wdog_base)
46 goto reset_fallback;
47
48 if (!IS_ERR(wdog_clk))
46 clk_enable(wdog_clk); 49 clk_enable(wdog_clk);
47 50
48 if (cpu_is_mx1()) 51 if (cpu_is_mx1())
@@ -70,6 +73,7 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
70 /* delay to allow the serial port to show the message */ 73 /* delay to allow the serial port to show the message */
71 mdelay(50); 74 mdelay(50);
72 75
76reset_fallback:
73 /* we'll take a jump through zero as a poor second */ 77 /* we'll take a jump through zero as a poor second */
74 soft_restart(0); 78 soft_restart(0);
75} 79}
@@ -79,13 +83,10 @@ void __init mxc_arch_reset_init(void __iomem *base)
79 wdog_base = base; 83 wdog_base = base;
80 84
81 wdog_clk = clk_get_sys("imx2-wdt.0", NULL); 85 wdog_clk = clk_get_sys("imx2-wdt.0", NULL);
82 if (IS_ERR(wdog_clk)) { 86 if (IS_ERR(wdog_clk))
83 pr_warn("%s: failed to get wdog clock\n", __func__); 87 pr_warn("%s: failed to get wdog clock\n", __func__);
84 wdog_clk = NULL; 88 else
85 return; 89 clk_prepare(wdog_clk);
86 }
87
88 clk_prepare(wdog_clk);
89} 90}
90 91
91void __init mxc_arch_reset_init_dt(void) 92void __init mxc_arch_reset_init_dt(void)
@@ -97,13 +98,10 @@ void __init mxc_arch_reset_init_dt(void)
97 WARN_ON(!wdog_base); 98 WARN_ON(!wdog_base);
98 99
99 wdog_clk = of_clk_get(np, 0); 100 wdog_clk = of_clk_get(np, 0);
100 if (IS_ERR(wdog_clk)) { 101 if (IS_ERR(wdog_clk))
101 pr_warn("%s: failed to get wdog clock\n", __func__); 102 pr_warn("%s: failed to get wdog clock\n", __func__);
102 wdog_clk = NULL; 103 else
103 return; 104 clk_prepare(wdog_clk);
104 }
105
106 clk_prepare(wdog_clk);
107} 105}
108 106
109#ifdef CONFIG_CACHE_L2X0 107#ifdef CONFIG_CACHE_L2X0