diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 21:15:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 21:15:25 -0500 |
commit | 770e1b035dcb6ec3f8ee69dda0815dd1e220a683 (patch) | |
tree | e6d36abfdb053fbc722aea8d7e946d6d1b93c7e1 /arch/arm/mach-ixp4xx/common.c | |
parent | d3d0b024348c040f0d6851e2e59fc961677d5169 (diff) | |
parent | 7b9dd47136c07ffd883aff6926c7b281e4c1eea4 (diff) |
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'for-linus' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (207 commits)
ARM: 7267/1: Remove BUILD_BUG_ON from asm/bug.h
ARM: 7269/1: mach-sa1100: fix sched_clock breakage
ARM: 7198/1: arm/imx6: add restart support for imx6q
ARM: restart: remove the now empty arch_reset()
ARM: restart: remove comments about adding code to arch_reset()
ARM: restart: lpc32xx & u300: remove unnecessary printk
ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook
ARM: restart: w90x900: use new restart hook
ARM: restart: Versatile Express: use new restart hook
ARM: restart: versatile: use new restart hook
ARM: restart: u300: use new restart hook
ARM: restart: tegra: use new restart hook
ARM: restart: spear: use new restart hook
ARM: restart: shark: use new restart hook
ARM: restart: sa1100: use new restart hook
ARM: 7252/1: restart: S5PV210: use new restart hook
ARM: 7251/1: restart: S5PC100: use new restart hook
ARM: 7250/1: restart: S5P64X0: use new restart hook
ARM: 7266/1: restart: S3C64XX: use new restart hook
ARM: 7265/1: restart: S3C24XX: use new restart hook
...
Fix up trivial conflict in arch/arm/mm/init.c due to removal of
memblock_init() clashing with the movement of the sorting of the meminfo
array.
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index b86a0055ab96..3841ab4146ba 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/serial.h> | 19 | #include <linux/serial.h> |
20 | #include <linux/sched.h> | ||
21 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
23 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
@@ -403,18 +402,9 @@ void __init ixp4xx_sys_init(void) | |||
403 | /* | 402 | /* |
404 | * sched_clock() | 403 | * sched_clock() |
405 | */ | 404 | */ |
406 | static DEFINE_CLOCK_DATA(cd); | 405 | static u32 notrace ixp4xx_read_sched_clock(void) |
407 | |||
408 | unsigned long long notrace sched_clock(void) | ||
409 | { | ||
410 | u32 cyc = *IXP4XX_OSTS; | ||
411 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
412 | } | ||
413 | |||
414 | static void notrace ixp4xx_update_sched_clock(void) | ||
415 | { | 406 | { |
416 | u32 cyc = *IXP4XX_OSTS; | 407 | return *IXP4XX_OSTS; |
417 | update_sched_clock(&cd, cyc, (u32)~0); | ||
418 | } | 408 | } |
419 | 409 | ||
420 | /* | 410 | /* |
@@ -430,7 +420,7 @@ unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ; | |||
430 | EXPORT_SYMBOL(ixp4xx_timer_freq); | 420 | EXPORT_SYMBOL(ixp4xx_timer_freq); |
431 | static void __init ixp4xx_clocksource_init(void) | 421 | static void __init ixp4xx_clocksource_init(void) |
432 | { | 422 | { |
433 | init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq); | 423 | setup_sched_clock(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq); |
434 | 424 | ||
435 | clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, | 425 | clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, |
436 | ixp4xx_clocksource_read); | 426 | ixp4xx_clocksource_read); |
@@ -501,3 +491,23 @@ static void __init ixp4xx_clockevent_init(void) | |||
501 | 491 | ||
502 | clockevents_register_device(&clockevent_ixp4xx); | 492 | clockevents_register_device(&clockevent_ixp4xx); |
503 | } | 493 | } |
494 | |||
495 | void ixp4xx_restart(char mode, const char *cmd) | ||
496 | { | ||
497 | if ( 1 && mode == 's') { | ||
498 | /* Jump into ROM at address 0 */ | ||
499 | soft_restart(0); | ||
500 | } else { | ||
501 | /* Use on-chip reset capability */ | ||
502 | |||
503 | /* set the "key" register to enable access to | ||
504 | * "timer" and "enable" registers | ||
505 | */ | ||
506 | *IXP4XX_OSWK = IXP4XX_WDT_KEY; | ||
507 | |||
508 | /* write 0 to the timer register for an immediate reset */ | ||
509 | *IXP4XX_OSWT = 0; | ||
510 | |||
511 | *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE; | ||
512 | } | ||
513 | } | ||