diff options
-rw-r--r-- | arch/arm/boot/dts/versatile-ab.dts | 12 | ||||
-rw-r--r-- | arch/arm/mach-versatile/core.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-versatile/versatile_dt.c | 1 |
3 files changed, 25 insertions, 14 deletions
diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts index e2fe3195c0d1..dde75ae8b4b1 100644 --- a/arch/arm/boot/dts/versatile-ab.dts +++ b/arch/arm/boot/dts/versatile-ab.dts | |||
@@ -121,6 +121,18 @@ | |||
121 | interrupts = <0>; | 121 | interrupts = <0>; |
122 | }; | 122 | }; |
123 | 123 | ||
124 | timer@101e2000 { | ||
125 | compatible = "arm,sp804", "arm,primecell"; | ||
126 | reg = <0x101e2000 0x1000>; | ||
127 | interrupts = <4>; | ||
128 | }; | ||
129 | |||
130 | timer@101e3000 { | ||
131 | compatible = "arm,sp804", "arm,primecell"; | ||
132 | reg = <0x101e3000 0x1000>; | ||
133 | interrupts = <5>; | ||
134 | }; | ||
135 | |||
124 | gpio0: gpio@101e4000 { | 136 | gpio0: gpio@101e4000 { |
125 | compatible = "arm,pl061", "arm,primecell"; | 137 | compatible = "arm,pl061", "arm,primecell"; |
126 | reg = <0x101e4000 0x1000>; | 138 | reg = <0x101e4000 0x1000>; |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 25160aeaa3b7..54bb80b012ac 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -749,12 +749,25 @@ void versatile_restart(char mode, const char *cmd) | |||
749 | /* Early initializations */ | 749 | /* Early initializations */ |
750 | void __init versatile_init_early(void) | 750 | void __init versatile_init_early(void) |
751 | { | 751 | { |
752 | u32 val; | ||
752 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); | 753 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); |
753 | 754 | ||
754 | osc4_clk.vcoreg = sys + VERSATILE_SYS_OSCCLCD_OFFSET; | 755 | osc4_clk.vcoreg = sys + VERSATILE_SYS_OSCCLCD_OFFSET; |
755 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 756 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
756 | 757 | ||
757 | versatile_sched_clock_init(sys + VERSATILE_SYS_24MHz_OFFSET, 24000000); | 758 | versatile_sched_clock_init(sys + VERSATILE_SYS_24MHz_OFFSET, 24000000); |
759 | |||
760 | /* | ||
761 | * set clock frequency: | ||
762 | * VERSATILE_REFCLK is 32KHz | ||
763 | * VERSATILE_TIMCLK is 1MHz | ||
764 | */ | ||
765 | val = readl(__io_address(VERSATILE_SCTL_BASE)); | ||
766 | writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | | ||
767 | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | | ||
768 | (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | | ||
769 | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val, | ||
770 | __io_address(VERSATILE_SCTL_BASE)); | ||
758 | } | 771 | } |
759 | 772 | ||
760 | void __init versatile_init(void) | 773 | void __init versatile_init(void) |
@@ -785,19 +798,6 @@ void __init versatile_init(void) | |||
785 | */ | 798 | */ |
786 | void __init versatile_timer_init(void) | 799 | void __init versatile_timer_init(void) |
787 | { | 800 | { |
788 | u32 val; | ||
789 | |||
790 | /* | ||
791 | * set clock frequency: | ||
792 | * VERSATILE_REFCLK is 32KHz | ||
793 | * VERSATILE_TIMCLK is 1MHz | ||
794 | */ | ||
795 | val = readl(__io_address(VERSATILE_SCTL_BASE)); | ||
796 | writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | | ||
797 | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | | ||
798 | (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | | ||
799 | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val, | ||
800 | __io_address(VERSATILE_SCTL_BASE)); | ||
801 | 801 | ||
802 | /* | 802 | /* |
803 | * Initialise to a known state (all timers off) | 803 | * Initialise to a known state (all timers off) |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index 2558f2e957c3..3621b000a0f6 100644 --- a/arch/arm/mach-versatile/versatile_dt.c +++ b/arch/arm/mach-versatile/versatile_dt.c | |||
@@ -45,7 +45,6 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") | |||
45 | .map_io = versatile_map_io, | 45 | .map_io = versatile_map_io, |
46 | .init_early = versatile_init_early, | 46 | .init_early = versatile_init_early, |
47 | .init_irq = versatile_init_irq, | 47 | .init_irq = versatile_init_irq, |
48 | .init_time = versatile_timer_init, | ||
49 | .init_machine = versatile_dt_init, | 48 | .init_machine = versatile_dt_init, |
50 | .dt_compat = versatile_dt_match, | 49 | .dt_compat = versatile_dt_match, |
51 | .restart = versatile_restart, | 50 | .restart = versatile_restart, |