diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-10-07 17:07:41 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-07 17:07:41 -0400 |
commit | 8efc59ad6764ade520012cb192cd484e5191cd9c (patch) | |
tree | d2465d91ebb2652e35cd08f715fc202b3f9e042a /arch/arm | |
parent | 6f6184a9d01880a3e21349544f73b3720ce5e152 (diff) | |
parent | 492c4a0df11573e141a2decc6012b3bddd14a11e (diff) |
Merge branch 'sirf/cleanup' into next/cleanup
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/tegra-harmony.dts | 12 | ||||
-rw-r--r-- | arch/arm/boot/dts/tegra-seaboard.dts | 6 | ||||
-rw-r--r-- | arch/arm/mach-dove/common.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mct.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/setup-keypad.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-prima2/prima2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/timer.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 39 | ||||
-rw-r--r-- | arch/arm/plat-samsung/clock.c | 11 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/clock.h | 8 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/watchdog-reset.h | 10 |
16 files changed, 57 insertions, 70 deletions
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts index 4c053340ce33..e5818668d091 100644 --- a/arch/arm/boot/dts/tegra-harmony.dts +++ b/arch/arm/boot/dts/tegra-harmony.dts | |||
@@ -57,14 +57,14 @@ | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | sdhci@c8000200 { | 59 | sdhci@c8000200 { |
60 | gpios = <&gpio 69 0>, /* cd, gpio PI5 */ | 60 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
61 | <&gpio 57 0>, /* wp, gpio PH1 */ | 61 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
62 | <&gpio 155 0>; /* power, gpio PT3 */ | 62 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | sdhci@c8000600 { | 65 | sdhci@c8000600 { |
66 | gpios = <&gpio 58 0>, /* cd, gpio PH2 */ | 66 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ |
67 | <&gpio 59 0>, /* wp, gpio PH3 */ | 67 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ |
68 | <&gpio 70 0>; /* power, gpio PI6 */ | 68 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
69 | }; | 69 | }; |
70 | }; | 70 | }; |
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index 1940cae00748..64cedca6fc79 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts | |||
@@ -21,8 +21,8 @@ | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | sdhci@c8000400 { | 23 | sdhci@c8000400 { |
24 | gpios = <&gpio 69 0>, /* cd, gpio PI5 */ | 24 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
25 | <&gpio 57 0>, /* wp, gpio PH1 */ | 25 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
26 | <&gpio 70 0>; /* power, gpio PI6 */ | 26 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
27 | }; | 27 | }; |
28 | }; | 28 | }; |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 83dce859886d..a9e0dae86a26 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -158,7 +158,7 @@ void __init dove_spi0_init(void) | |||
158 | 158 | ||
159 | void __init dove_spi1_init(void) | 159 | void __init dove_spi1_init(void) |
160 | { | 160 | { |
161 | orion_spi_init(DOVE_SPI1_PHYS_BASE, get_tclk()); | 161 | orion_spi_1_init(DOVE_SPI1_PHYS_BASE, get_tclk()); |
162 | } | 162 | } |
163 | 163 | ||
164 | /***************************************************************************** | 164 | /***************************************************************************** |
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c index 1561b036a9bf..79d6cd0c8e7b 100644 --- a/arch/arm/mach-exynos4/clock.c +++ b/arch/arm/mach-exynos4/clock.c | |||
@@ -1160,7 +1160,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void) | |||
1160 | 1160 | ||
1161 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); | 1161 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); |
1162 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), | 1162 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), |
1163 | __raw_readl(S5P_VPLL_CON1), pll_4650); | 1163 | __raw_readl(S5P_VPLL_CON1), pll_4650c); |
1164 | 1164 | ||
1165 | clk_fout_apll.ops = &exynos4_fout_apll_ops; | 1165 | clk_fout_apll.ops = &exynos4_fout_apll_ops; |
1166 | clk_fout_mpll.rate = mpll; | 1166 | clk_fout_mpll.rate = mpll; |
diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos4/mct.c index 1ae059b7ad7b..ddd86864fb83 100644 --- a/arch/arm/mach-exynos4/mct.c +++ b/arch/arm/mach-exynos4/mct.c | |||
@@ -132,12 +132,18 @@ static cycle_t exynos4_frc_read(struct clocksource *cs) | |||
132 | return ((cycle_t)hi << 32) | lo; | 132 | return ((cycle_t)hi << 32) | lo; |
133 | } | 133 | } |
134 | 134 | ||
135 | static void exynos4_frc_resume(struct clocksource *cs) | ||
136 | { | ||
137 | exynos4_mct_frc_start(0, 0); | ||
138 | } | ||
139 | |||
135 | struct clocksource mct_frc = { | 140 | struct clocksource mct_frc = { |
136 | .name = "mct-frc", | 141 | .name = "mct-frc", |
137 | .rating = 400, | 142 | .rating = 400, |
138 | .read = exynos4_frc_read, | 143 | .read = exynos4_frc_read, |
139 | .mask = CLOCKSOURCE_MASK(64), | 144 | .mask = CLOCKSOURCE_MASK(64), |
140 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 145 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
146 | .resume = exynos4_frc_resume, | ||
141 | }; | 147 | }; |
142 | 148 | ||
143 | static void __init exynos4_clocksource_init(void) | 149 | static void __init exynos4_clocksource_init(void) |
@@ -389,9 +395,11 @@ static void exynos4_mct_tick_init(struct clock_event_device *evt) | |||
389 | } | 395 | } |
390 | 396 | ||
391 | /* Setup the local clock events for a CPU */ | 397 | /* Setup the local clock events for a CPU */ |
392 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 398 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
393 | { | 399 | { |
394 | exynos4_mct_tick_init(evt); | 400 | exynos4_mct_tick_init(evt); |
401 | |||
402 | return 0; | ||
395 | } | 403 | } |
396 | 404 | ||
397 | int local_timer_ack(void) | 405 | int local_timer_ack(void) |
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index 7c2282c6ba81..df6ef1b2f98b 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c | |||
@@ -106,6 +106,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
106 | */ | 106 | */ |
107 | spin_lock(&boot_lock); | 107 | spin_lock(&boot_lock); |
108 | spin_unlock(&boot_lock); | 108 | spin_unlock(&boot_lock); |
109 | |||
110 | set_cpu_online(cpu, true); | ||
109 | } | 111 | } |
110 | 112 | ||
111 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 113 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) |
diff --git a/arch/arm/mach-exynos4/setup-keypad.c b/arch/arm/mach-exynos4/setup-keypad.c index 1ee0ebff111f..7862bfb5933d 100644 --- a/arch/arm/mach-exynos4/setup-keypad.c +++ b/arch/arm/mach-exynos4/setup-keypad.c | |||
@@ -19,15 +19,16 @@ void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) | |||
19 | 19 | ||
20 | if (rows > 8) { | 20 | if (rows > 8) { |
21 | /* Set all the necessary GPX2 pins: KP_ROW[0~7] */ | 21 | /* Set all the necessary GPX2 pins: KP_ROW[0~7] */ |
22 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3)); | 22 | s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3), |
23 | S3C_GPIO_PULL_UP); | ||
23 | 24 | ||
24 | /* Set all the necessary GPX3 pins: KP_ROW[8~] */ | 25 | /* Set all the necessary GPX3 pins: KP_ROW[8~] */ |
25 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX3(0), (rows - 8), | 26 | s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), (rows - 8), |
26 | S3C_GPIO_SFN(3)); | 27 | S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP); |
27 | } else { | 28 | } else { |
28 | /* Set all the necessary GPX2 pins: KP_ROW[x] */ | 29 | /* Set all the necessary GPX2 pins: KP_ROW[x] */ |
29 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX2(0), rows, | 30 | s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), rows, S3C_GPIO_SFN(3), |
30 | S3C_GPIO_SFN(3)); | 31 | S3C_GPIO_PULL_UP); |
31 | } | 32 | } |
32 | 33 | ||
33 | /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */ | 34 | /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */ |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index fcf0ae95651f..8cdc730dcb3a 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <video/vga.h> | ||
35 | 36 | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <mach/platform.h> | 38 | #include <mach/platform.h> |
@@ -154,6 +155,7 @@ static struct map_desc ap_io_desc[] __initdata = { | |||
154 | static void __init ap_map_io(void) | 155 | static void __init ap_map_io(void) |
155 | { | 156 | { |
156 | iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); | 157 | iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); |
158 | vga_base = PCI_MEMORY_VADDR; | ||
157 | } | 159 | } |
158 | 160 | ||
159 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | 161 | #define INTEGRATOR_SC_VALID_INT 0x003fffff |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index dd56bfb351e3..11b86e5b71c2 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <video/vga.h> | ||
31 | 30 | ||
32 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
33 | #include <mach/platform.h> | 32 | #include <mach/platform.h> |
@@ -505,7 +504,6 @@ void __init pci_v3_preinit(void) | |||
505 | 504 | ||
506 | pcibios_min_io = 0x6000; | 505 | pcibios_min_io = 0x6000; |
507 | pcibios_min_mem = 0x00100000; | 506 | pcibios_min_mem = 0x00100000; |
508 | vga_base = PCI_MEMORY_VADDR; | ||
509 | 507 | ||
510 | /* | 508 | /* |
511 | * Hook in our fault handler for PCI errors | 509 | * Hook in our fault handler for PCI errors |
diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c index 615a4e75ceab..aebad7e565cf 100644 --- a/arch/arm/mach-prima2/clock.c +++ b/arch/arm/mach-prima2/clock.c | |||
@@ -350,10 +350,10 @@ static struct clk_lookup onchip_clks[] = { | |||
350 | .clk = &clk_mem, | 350 | .clk = &clk_mem, |
351 | }, { | 351 | }, { |
352 | .dev_id = "sys", | 352 | .dev_id = "sys", |
353 | .clk = &clk_sys, | 353 | .clk = &clk_sys, |
354 | }, { | 354 | }, { |
355 | .dev_id = "io", | 355 | .dev_id = "io", |
356 | .clk = &clk_io, | 356 | .clk = &clk_io, |
357 | }, | 357 | }, |
358 | }; | 358 | }; |
359 | 359 | ||
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c index f57124bdd143..0ddf44698ec5 100644 --- a/arch/arm/mach-prima2/prima2.c +++ b/arch/arm/mach-prima2/prima2.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Defines machines for CSR SiRFprimaII | 2 | * Defines machines for CSR SiRFprimaII |
3 | * | 3 | * |
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | 4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. |
5 | * | 5 | * |
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c index ed7ec48d11da..26ab6fee5619 100644 --- a/arch/arm/mach-prima2/timer.c +++ b/arch/arm/mach-prima2/timer.c | |||
@@ -133,14 +133,14 @@ static struct irqaction sirfsoc_timer_irq = { | |||
133 | /* Overwrite weak default sched_clock with more precise one */ | 133 | /* Overwrite weak default sched_clock with more precise one */ |
134 | unsigned long long notrace sched_clock(void) | 134 | unsigned long long notrace sched_clock(void) |
135 | { | 135 | { |
136 | static int is_mapped = 0; | 136 | static int is_mapped; |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * sched_clock is called earlier than .init of sys_timer | 139 | * sched_clock is called earlier than .init of sys_timer |
140 | * if we map timer memory in .init of sys_timer, system | 140 | * if we map timer memory in .init of sys_timer, system |
141 | * will panic due to illegal memory access | 141 | * will panic due to illegal memory access |
142 | */ | 142 | */ |
143 | if(!is_mapped) { | 143 | if (!is_mapped) { |
144 | sirfsoc_of_timer_map(); | 144 | sirfsoc_of_timer_map(); |
145 | is_mapped = 1; | 145 | is_mapped = 1; |
146 | } | 146 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index c5190a50f0d9..d831c97833ba 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -262,45 +262,6 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { | |||
262 | .cols = 8, | 262 | .cols = 8, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static int smdk6410_backlight_init(struct device *dev) | ||
266 | { | ||
267 | int ret; | ||
268 | |||
269 | ret = gpio_request(S3C64XX_GPF(15), "Backlight"); | ||
270 | if (ret) { | ||
271 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
272 | return ret; | ||
273 | } | ||
274 | |||
275 | /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */ | ||
276 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2)); | ||
277 | |||
278 | return 0; | ||
279 | } | ||
280 | |||
281 | static void smdk6410_backlight_exit(struct device *dev) | ||
282 | { | ||
283 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT); | ||
284 | gpio_free(S3C64XX_GPF(15)); | ||
285 | } | ||
286 | |||
287 | static struct platform_pwm_backlight_data smdk6410_backlight_data = { | ||
288 | .pwm_id = 1, | ||
289 | .max_brightness = 255, | ||
290 | .dft_brightness = 255, | ||
291 | .pwm_period_ns = 78770, | ||
292 | .init = smdk6410_backlight_init, | ||
293 | .exit = smdk6410_backlight_exit, | ||
294 | }; | ||
295 | |||
296 | static struct platform_device smdk6410_backlight_device = { | ||
297 | .name = "pwm-backlight", | ||
298 | .dev = { | ||
299 | .parent = &s3c_device_timer[1].dev, | ||
300 | .platform_data = &smdk6410_backlight_data, | ||
301 | }, | ||
302 | }; | ||
303 | |||
304 | static struct map_desc smdk6410_iodesc[] = {}; | 265 | static struct map_desc smdk6410_iodesc[] = {}; |
305 | 266 | ||
306 | static struct platform_device *smdk6410_devices[] __initdata = { | 267 | static struct platform_device *smdk6410_devices[] __initdata = { |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 302c42670bd1..3b4451979d1b 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -64,6 +64,17 @@ static LIST_HEAD(clocks); | |||
64 | */ | 64 | */ |
65 | DEFINE_SPINLOCK(clocks_lock); | 65 | DEFINE_SPINLOCK(clocks_lock); |
66 | 66 | ||
67 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
68 | struct clk *s3c2410_wdtclk; | ||
69 | static int __init s3c_wdt_reset_init(void) | ||
70 | { | ||
71 | s3c2410_wdtclk = clk_get(NULL, "watchdog"); | ||
72 | if (IS_ERR(s3c2410_wdtclk)) | ||
73 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
74 | return 0; | ||
75 | } | ||
76 | arch_initcall(s3c_wdt_reset_init); | ||
77 | |||
67 | /* enable and disable calls for use with the clk struct */ | 78 | /* enable and disable calls for use with the clk struct */ |
68 | 79 | ||
69 | static int clk_null_enable(struct clk *clk, int enable) | 80 | static int clk_null_enable(struct clk *clk, int enable) |
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 87d5b38a86fb..73c66d4d10fa 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __ASM_PLAT_CLOCK_H | ||
13 | #define __ASM_PLAT_CLOCK_H __FILE__ | ||
14 | |||
12 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
13 | #include <linux/clkdev.h> | 16 | #include <linux/clkdev.h> |
14 | 17 | ||
@@ -121,3 +124,8 @@ extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable); | |||
121 | 124 | ||
122 | extern void s3c_pwmclk_init(void); | 125 | extern void s3c_pwmclk_init(void); |
123 | 126 | ||
127 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
128 | |||
129 | extern struct clk *s3c2410_wdtclk; | ||
130 | |||
131 | #endif /* __ASM_PLAT_CLOCK_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h b/arch/arm/plat-samsung/include/plat/watchdog-reset.h index 54b762acb5a0..40dbb2b0ae22 100644 --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h +++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <plat/clock.h> | ||
13 | #include <plat/regs-watchdog.h> | 14 | #include <plat/regs-watchdog.h> |
14 | #include <mach/map.h> | 15 | #include <mach/map.h> |
15 | 16 | ||
@@ -19,17 +20,12 @@ | |||
19 | 20 | ||
20 | static inline void arch_wdt_reset(void) | 21 | static inline void arch_wdt_reset(void) |
21 | { | 22 | { |
22 | struct clk *wdtclk; | ||
23 | |||
24 | printk("arch_reset: attempting watchdog reset\n"); | 23 | printk("arch_reset: attempting watchdog reset\n"); |
25 | 24 | ||
26 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 25 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
27 | 26 | ||
28 | wdtclk = clk_get(NULL, "watchdog"); | 27 | if (s3c2410_wdtclk) |
29 | if (!IS_ERR(wdtclk)) { | 28 | clk_enable(s3c2410_wdtclk); |
30 | clk_enable(wdtclk); | ||
31 | } else | ||
32 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
33 | 29 | ||
34 | /* put initial values into count and data */ | 30 | /* put initial values into count and data */ |
35 | __raw_writel(0x80, S3C2410_WTCNT); | 31 | __raw_writel(0x80, S3C2410_WTCNT); |