diff options
Diffstat (limited to 'arch/arm/mach-u300')
-rw-r--r-- | arch/arm/mach-u300/core.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/entry-macro.S | 24 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/platform.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/system.h | 28 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/vmalloc.h | 12 | ||||
-rw-r--r-- | arch/arm/mach-u300/timer.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-u300/u300.c | 3 |
7 files changed, 27 insertions, 76 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index ac0791e924bc..697930761b3e 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -1888,3 +1888,23 @@ static int core_module_init(void) | |||
1888 | return mmc_init(&mmcsd_device); | 1888 | return mmc_init(&mmcsd_device); |
1889 | } | 1889 | } |
1890 | module_init(core_module_init); | 1890 | module_init(core_module_init); |
1891 | |||
1892 | /* Forward declare this function from the watchdog */ | ||
1893 | void coh901327_watchdog_reset(void); | ||
1894 | |||
1895 | void u300_restart(char mode, const char *cmd) | ||
1896 | { | ||
1897 | switch (mode) { | ||
1898 | case 's': | ||
1899 | case 'h': | ||
1900 | #ifdef CONFIG_COH901327_WATCHDOG | ||
1901 | coh901327_watchdog_reset(); | ||
1902 | #endif | ||
1903 | break; | ||
1904 | default: | ||
1905 | /* Do nothing */ | ||
1906 | break; | ||
1907 | } | ||
1908 | /* Wait for system do die/reset. */ | ||
1909 | while (1); | ||
1910 | } | ||
diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S index 20731ae39d38..7181d6ac6651 100644 --- a/arch/arm/mach-u300/include/mach/entry-macro.S +++ b/arch/arm/mach-u300/include/mach/entry-macro.S | |||
@@ -8,33 +8,9 @@ | |||
8 | * Low-level IRQ helper macros for ST-Ericsson U300 | 8 | * Low-level IRQ helper macros for ST-Ericsson U300 |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | ||
12 | #include <asm/hardware/vic.h> | ||
13 | 11 | ||
14 | .macro disable_fiq | 12 | .macro disable_fiq |
15 | .endm | 13 | .endm |
16 | 14 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 16 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE | ||
25 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
26 | mov \irqnr, #0 | ||
27 | teq \irqstat, #0 | ||
28 | bne 1002f | ||
29 | 1001: ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON1_BASE | ||
30 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
31 | mov \irqnr, #32 | ||
32 | teq \irqstat, #0 | ||
33 | beq 1003f | ||
34 | 1002: tst \irqstat, #1 | ||
35 | bne 1003f | ||
36 | add \irqnr, \irqnr, #1 | ||
37 | movs \irqstat, \irqstat, lsr #1 | ||
38 | bne 1002b | ||
39 | 1003: /* EQ will be set if no irqs pending */ | ||
40 | .endm | ||
diff --git a/arch/arm/mach-u300/include/mach/platform.h b/arch/arm/mach-u300/include/mach/platform.h index 77d9210a82e2..096333f32fc3 100644 --- a/arch/arm/mach-u300/include/mach/platform.h +++ b/arch/arm/mach-u300/include/mach/platform.h | |||
@@ -14,6 +14,7 @@ | |||
14 | void u300_map_io(void); | 14 | void u300_map_io(void); |
15 | void u300_init_irq(void); | 15 | void u300_init_irq(void); |
16 | void u300_init_devices(void); | 16 | void u300_init_devices(void); |
17 | void u300_restart(char, const char *); | ||
17 | extern struct sys_timer u300_timer; | 18 | extern struct sys_timer u300_timer; |
18 | 19 | ||
19 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h index 8daf13634ce0..574d46e38290 100644 --- a/arch/arm/mach-u300/include/mach/system.h +++ b/arch/arm/mach-u300/include/mach/system.h | |||
@@ -8,35 +8,7 @@ | |||
8 | * System shutdown and reset functions. | 8 | * System shutdown and reset functions. |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | ||
12 | #include <asm/io.h> | ||
13 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/irq.h> | ||
15 | |||
16 | /* Forward declare this function from the watchdog */ | ||
17 | void coh901327_watchdog_reset(void); | ||
18 | |||
19 | static inline void arch_idle(void) | 11 | static inline void arch_idle(void) |
20 | { | 12 | { |
21 | cpu_do_idle(); | 13 | cpu_do_idle(); |
22 | } | 14 | } |
23 | |||
24 | static void arch_reset(char mode, const char *cmd) | ||
25 | { | ||
26 | switch (mode) { | ||
27 | case 's': | ||
28 | case 'h': | ||
29 | printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); | ||
30 | /* Disable interrupts */ | ||
31 | local_irq_disable(); | ||
32 | #ifdef CONFIG_COH901327_WATCHDOG | ||
33 | coh901327_watchdog_reset(); | ||
34 | #endif | ||
35 | break; | ||
36 | default: | ||
37 | /* Do nothing */ | ||
38 | break; | ||
39 | } | ||
40 | /* Wait for system do die/reset. */ | ||
41 | while (1); | ||
42 | } | ||
diff --git a/arch/arm/mach-u300/include/mach/vmalloc.h b/arch/arm/mach-u300/include/mach/vmalloc.h deleted file mode 100644 index ec423b92b81d..000000000000 --- a/arch/arm/mach-u300/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/include/mach/vmalloc.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2006-2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Virtual memory allocations | ||
9 | * End must be above the I/O registers and on an even 2MiB boundary. | ||
10 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
11 | */ | ||
12 | #define VMALLOC_END 0xfe800000UL | ||
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 5f51bdeef0ef..bc1c7897e82d 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
10 | */ | 10 | */ |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/sched.h> | ||
13 | #include <linux/time.h> | 12 | #include <linux/time.h> |
14 | #include <linux/timex.h> | 13 | #include <linux/timex.h> |
15 | #include <linux/clockchips.h> | 14 | #include <linux/clockchips.h> |
@@ -337,18 +336,10 @@ static struct irqaction u300_timer_irq = { | |||
337 | * this wraps around for now, since it is just a relative time | 336 | * this wraps around for now, since it is just a relative time |
338 | * stamp. (Inspired by OMAP implementation.) | 337 | * stamp. (Inspired by OMAP implementation.) |
339 | */ | 338 | */ |
340 | static DEFINE_CLOCK_DATA(cd); | ||
341 | 339 | ||
342 | unsigned long long notrace sched_clock(void) | 340 | static u32 notrace u300_read_sched_clock(void) |
343 | { | 341 | { |
344 | u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); | 342 | return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); |
345 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
346 | } | ||
347 | |||
348 | static void notrace u300_update_sched_clock(void) | ||
349 | { | ||
350 | u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); | ||
351 | update_sched_clock(&cd, cyc, (u32)~0); | ||
352 | } | 343 | } |
353 | 344 | ||
354 | 345 | ||
@@ -366,7 +357,7 @@ static void __init u300_timer_init(void) | |||
366 | clk_enable(clk); | 357 | clk_enable(clk); |
367 | rate = clk_get_rate(clk); | 358 | rate = clk_get_rate(clk); |
368 | 359 | ||
369 | init_sched_clock(&cd, u300_update_sched_clock, 32, rate); | 360 | setup_sched_clock(u300_read_sched_clock, 32, rate); |
370 | 361 | ||
371 | /* | 362 | /* |
372 | * Disable the "OS" and "DD" timers - these are designed for Symbian! | 363 | * Disable the "OS" and "DD" timers - these are designed for Symbian! |
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c index 89422ee7f3a8..def45bda2932 100644 --- a/arch/arm/mach-u300/u300.c +++ b/arch/arm/mach-u300/u300.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <mach/platform.h> | 21 | #include <mach/platform.h> |
22 | #include <asm/hardware/vic.h> | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/memory.h> | 25 | #include <asm/memory.h> |
@@ -49,6 +50,8 @@ MACHINE_START(U300, MACH_U300_STRING) | |||
49 | .atag_offset = BOOT_PARAMS_OFFSET, | 50 | .atag_offset = BOOT_PARAMS_OFFSET, |
50 | .map_io = u300_map_io, | 51 | .map_io = u300_map_io, |
51 | .init_irq = u300_init_irq, | 52 | .init_irq = u300_init_irq, |
53 | .handle_irq = vic_handle_irq, | ||
52 | .timer = &u300_timer, | 54 | .timer = &u300_timer, |
53 | .init_machine = u300_init_machine, | 55 | .init_machine = u300_init_machine, |
56 | .restart = u300_restart, | ||
54 | MACHINE_END | 57 | MACHINE_END |