diff options
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r-- | arch/arm/mach-versatile/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-versatile/clock.c | 65 | ||||
-rw-r--r-- | arch/arm/mach-versatile/clock.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-versatile/core.c | 194 | ||||
-rw-r--r-- | arch/arm/mach-versatile/include/mach/clkdev.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-versatile/include/mach/entry-macro.S | 1 | ||||
-rw-r--r-- | arch/arm/mach-versatile/include/mach/hardware.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-versatile/include/mach/platform.h | 26 |
8 files changed, 41 insertions, 279 deletions
diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile index ba81e70ed813..97cf4d831b0c 100644 --- a/arch/arm/mach-versatile/Makefile +++ b/arch/arm/mach-versatile/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := core.o clock.o | 5 | obj-y := core.o |
6 | obj-$(CONFIG_ARCH_VERSATILE_PB) += versatile_pb.o | 6 | obj-$(CONFIG_ARCH_VERSATILE_PB) += versatile_pb.o |
7 | obj-$(CONFIG_MACH_VERSATILE_AB) += versatile_ab.o | 7 | obj-$(CONFIG_MACH_VERSATILE_AB) += versatile_ab.o |
8 | obj-$(CONFIG_PCI) += pci.o | 8 | obj-$(CONFIG_PCI) += pci.o |
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c deleted file mode 100644 index c50a44ea7ee6..000000000000 --- a/arch/arm/mach-versatile/clock.c +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-versatile/clock.c | ||
3 | * | ||
4 | * Copyright (C) 2004 ARM Limited. | ||
5 | * Written by Deep Blue Solutions Limited. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/device.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/mutex.h> | ||
20 | |||
21 | #include <asm/clkdev.h> | ||
22 | #include <asm/hardware/icst307.h> | ||
23 | |||
24 | #include "clock.h" | ||
25 | |||
26 | int clk_enable(struct clk *clk) | ||
27 | { | ||
28 | return 0; | ||
29 | } | ||
30 | EXPORT_SYMBOL(clk_enable); | ||
31 | |||
32 | void clk_disable(struct clk *clk) | ||
33 | { | ||
34 | } | ||
35 | EXPORT_SYMBOL(clk_disable); | ||
36 | |||
37 | unsigned long clk_get_rate(struct clk *clk) | ||
38 | { | ||
39 | return clk->rate; | ||
40 | } | ||
41 | EXPORT_SYMBOL(clk_get_rate); | ||
42 | |||
43 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
44 | { | ||
45 | struct icst307_vco vco; | ||
46 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | ||
47 | return icst307_khz(clk->params, vco) * 1000; | ||
48 | } | ||
49 | EXPORT_SYMBOL(clk_round_rate); | ||
50 | |||
51 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
52 | { | ||
53 | int ret = -EIO; | ||
54 | |||
55 | if (clk->setvco) { | ||
56 | struct icst307_vco vco; | ||
57 | |||
58 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | ||
59 | clk->rate = icst307_khz(clk->params, vco) * 1000; | ||
60 | clk->setvco(clk, vco); | ||
61 | ret = 0; | ||
62 | } | ||
63 | return ret; | ||
64 | } | ||
65 | EXPORT_SYMBOL(clk_set_rate); | ||
diff --git a/arch/arm/mach-versatile/clock.h b/arch/arm/mach-versatile/clock.h deleted file mode 100644 index 03468fdc3e58..000000000000 --- a/arch/arm/mach-versatile/clock.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-versatile/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2004 ARM Limited. | ||
5 | * Written by Deep Blue Solutions Limited. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | struct module; | ||
12 | struct icst307_params; | ||
13 | |||
14 | struct clk { | ||
15 | unsigned long rate; | ||
16 | const struct icst307_params *params; | ||
17 | u32 oscoff; | ||
18 | void *data; | ||
19 | void (*setvco)(struct clk *, struct icst307_vco vco); | ||
20 | }; | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 9ddb49b1cb71..60baba65635e 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -28,18 +28,14 @@ | |||
28 | #include <linux/amba/clcd.h> | 28 | #include <linux/amba/clcd.h> |
29 | #include <linux/amba/pl061.h> | 29 | #include <linux/amba/pl061.h> |
30 | #include <linux/amba/mmci.h> | 30 | #include <linux/amba/mmci.h> |
31 | #include <linux/clocksource.h> | ||
32 | #include <linux/clockchips.h> | ||
33 | #include <linux/cnt32_to_63.h> | ||
34 | #include <linux/io.h> | 31 | #include <linux/io.h> |
35 | 32 | ||
36 | #include <asm/clkdev.h> | 33 | #include <asm/clkdev.h> |
37 | #include <asm/system.h> | 34 | #include <asm/system.h> |
38 | #include <mach/hardware.h> | ||
39 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
40 | #include <asm/leds.h> | 36 | #include <asm/leds.h> |
41 | #include <asm/hardware/arm_timer.h> | 37 | #include <asm/hardware/arm_timer.h> |
42 | #include <asm/hardware/icst307.h> | 38 | #include <asm/hardware/icst.h> |
43 | #include <asm/hardware/vic.h> | 39 | #include <asm/hardware/vic.h> |
44 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
45 | 41 | ||
@@ -48,9 +44,12 @@ | |||
48 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
49 | #include <asm/mach/time.h> | 45 | #include <asm/mach/time.h> |
50 | #include <asm/mach/map.h> | 46 | #include <asm/mach/map.h> |
47 | #include <mach/clkdev.h> | ||
48 | #include <mach/hardware.h> | ||
49 | #include <mach/platform.h> | ||
50 | #include <plat/timer-sp.h> | ||
51 | 51 | ||
52 | #include "core.h" | 52 | #include "core.h" |
53 | #include "clock.h" | ||
54 | 53 | ||
55 | /* | 54 | /* |
56 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx | 55 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx |
@@ -58,7 +57,6 @@ | |||
58 | * | 57 | * |
59 | * Setup a VA for the Versatile Vectored Interrupt Controller. | 58 | * Setup a VA for the Versatile Vectored Interrupt Controller. |
60 | */ | 59 | */ |
61 | #define __io_address(n) __io(IO_ADDRESS(n)) | ||
62 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) | 60 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) |
63 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) | 61 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) |
64 | 62 | ||
@@ -228,27 +226,6 @@ void __init versatile_map_io(void) | |||
228 | iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); | 226 | iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); |
229 | } | 227 | } |
230 | 228 | ||
231 | #define VERSATILE_REFCOUNTER (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET) | ||
232 | |||
233 | /* | ||
234 | * This is the Versatile sched_clock implementation. This has | ||
235 | * a resolution of 41.7ns, and a maximum value of about 35583 days. | ||
236 | * | ||
237 | * The return value is guaranteed to be monotonic in that range as | ||
238 | * long as there is always less than 89 seconds between successive | ||
239 | * calls to this function. | ||
240 | */ | ||
241 | unsigned long long sched_clock(void) | ||
242 | { | ||
243 | unsigned long long v = cnt32_to_63(readl(VERSATILE_REFCOUNTER)); | ||
244 | |||
245 | /* the <<1 gets rid of the cnt_32_to_63 top bit saving on a bic insn */ | ||
246 | v *= 125<<1; | ||
247 | do_div(v, 3<<1); | ||
248 | |||
249 | return v; | ||
250 | } | ||
251 | |||
252 | 229 | ||
253 | #define VERSATILE_FLASHCTRL (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET) | 230 | #define VERSATILE_FLASHCTRL (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET) |
254 | 231 | ||
@@ -379,33 +356,40 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
379 | /* | 356 | /* |
380 | * Clock handling | 357 | * Clock handling |
381 | */ | 358 | */ |
382 | static const struct icst307_params versatile_oscvco_params = { | 359 | static const struct icst_params versatile_oscvco_params = { |
383 | .ref = 24000, | 360 | .ref = 24000000, |
384 | .vco_max = 200000, | 361 | .vco_max = ICST307_VCO_MAX, |
362 | .vco_min = ICST307_VCO_MIN, | ||
385 | .vd_min = 4 + 8, | 363 | .vd_min = 4 + 8, |
386 | .vd_max = 511 + 8, | 364 | .vd_max = 511 + 8, |
387 | .rd_min = 1 + 2, | 365 | .rd_min = 1 + 2, |
388 | .rd_max = 127 + 2, | 366 | .rd_max = 127 + 2, |
367 | .s2div = icst307_s2div, | ||
368 | .idx2s = icst307_idx2s, | ||
389 | }; | 369 | }; |
390 | 370 | ||
391 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) | 371 | static void versatile_oscvco_set(struct clk *clk, struct icst_vco vco) |
392 | { | 372 | { |
393 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); | 373 | void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; |
394 | void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; | ||
395 | u32 val; | 374 | u32 val; |
396 | 375 | ||
397 | val = readl(sys + clk->oscoff) & ~0x7ffff; | 376 | val = readl(clk->vcoreg) & ~0x7ffff; |
398 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | 377 | val |= vco.v | (vco.r << 9) | (vco.s << 16); |
399 | 378 | ||
400 | writel(0xa05f, sys_lock); | 379 | writel(0xa05f, sys_lock); |
401 | writel(val, sys + clk->oscoff); | 380 | writel(val, clk->vcoreg); |
402 | writel(0, sys_lock); | 381 | writel(0, sys_lock); |
403 | } | 382 | } |
404 | 383 | ||
384 | static const struct clk_ops osc4_clk_ops = { | ||
385 | .round = icst_clk_round, | ||
386 | .set = icst_clk_set, | ||
387 | .setvco = versatile_oscvco_set, | ||
388 | }; | ||
389 | |||
405 | static struct clk osc4_clk = { | 390 | static struct clk osc4_clk = { |
391 | .ops = &osc4_clk_ops, | ||
406 | .params = &versatile_oscvco_params, | 392 | .params = &versatile_oscvco_params, |
407 | .oscoff = VERSATILE_SYS_OSCCLCD_OFFSET, | ||
408 | .setvco = versatile_oscvco_set, | ||
409 | }; | 393 | }; |
410 | 394 | ||
411 | /* | 395 | /* |
@@ -851,6 +835,8 @@ void __init versatile_init(void) | |||
851 | { | 835 | { |
852 | int i; | 836 | int i; |
853 | 837 | ||
838 | osc4_clk.vcoreg = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET; | ||
839 | |||
854 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 840 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
855 | 841 | ||
856 | platform_device_register(&versatile_flash_device); | 842 | platform_device_register(&versatile_flash_device); |
@@ -874,120 +860,6 @@ void __init versatile_init(void) | |||
874 | #define TIMER1_VA_BASE (__io_address(VERSATILE_TIMER0_1_BASE) + 0x20) | 860 | #define TIMER1_VA_BASE (__io_address(VERSATILE_TIMER0_1_BASE) + 0x20) |
875 | #define TIMER2_VA_BASE __io_address(VERSATILE_TIMER2_3_BASE) | 861 | #define TIMER2_VA_BASE __io_address(VERSATILE_TIMER2_3_BASE) |
876 | #define TIMER3_VA_BASE (__io_address(VERSATILE_TIMER2_3_BASE) + 0x20) | 862 | #define TIMER3_VA_BASE (__io_address(VERSATILE_TIMER2_3_BASE) + 0x20) |
877 | #define VA_IC_BASE __io_address(VERSATILE_VIC_BASE) | ||
878 | |||
879 | /* | ||
880 | * How long is the timer interval? | ||
881 | */ | ||
882 | #define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10) | ||
883 | #if TIMER_INTERVAL >= 0x100000 | ||
884 | #define TIMER_RELOAD (TIMER_INTERVAL >> 8) | ||
885 | #define TIMER_DIVISOR (TIMER_CTRL_DIV256) | ||
886 | #define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC) | ||
887 | #elif TIMER_INTERVAL >= 0x10000 | ||
888 | #define TIMER_RELOAD (TIMER_INTERVAL >> 4) /* Divide by 16 */ | ||
889 | #define TIMER_DIVISOR (TIMER_CTRL_DIV16) | ||
890 | #define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC) | ||
891 | #else | ||
892 | #define TIMER_RELOAD (TIMER_INTERVAL) | ||
893 | #define TIMER_DIVISOR (TIMER_CTRL_DIV1) | ||
894 | #define TICKS2USECS(x) ((x) / TICKS_PER_uSEC) | ||
895 | #endif | ||
896 | |||
897 | static void timer_set_mode(enum clock_event_mode mode, | ||
898 | struct clock_event_device *clk) | ||
899 | { | ||
900 | unsigned long ctrl; | ||
901 | |||
902 | switch(mode) { | ||
903 | case CLOCK_EVT_MODE_PERIODIC: | ||
904 | writel(TIMER_RELOAD, TIMER0_VA_BASE + TIMER_LOAD); | ||
905 | |||
906 | ctrl = TIMER_CTRL_PERIODIC; | ||
907 | ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_ENABLE; | ||
908 | break; | ||
909 | case CLOCK_EVT_MODE_ONESHOT: | ||
910 | /* period set, and timer enabled in 'next_event' hook */ | ||
911 | ctrl = TIMER_CTRL_ONESHOT; | ||
912 | ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_IE; | ||
913 | break; | ||
914 | case CLOCK_EVT_MODE_UNUSED: | ||
915 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
916 | default: | ||
917 | ctrl = 0; | ||
918 | } | ||
919 | |||
920 | writel(ctrl, TIMER0_VA_BASE + TIMER_CTRL); | ||
921 | } | ||
922 | |||
923 | static int timer_set_next_event(unsigned long evt, | ||
924 | struct clock_event_device *unused) | ||
925 | { | ||
926 | unsigned long ctrl = readl(TIMER0_VA_BASE + TIMER_CTRL); | ||
927 | |||
928 | writel(evt, TIMER0_VA_BASE + TIMER_LOAD); | ||
929 | writel(ctrl | TIMER_CTRL_ENABLE, TIMER0_VA_BASE + TIMER_CTRL); | ||
930 | |||
931 | return 0; | ||
932 | } | ||
933 | |||
934 | static struct clock_event_device timer0_clockevent = { | ||
935 | .name = "timer0", | ||
936 | .shift = 32, | ||
937 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
938 | .set_mode = timer_set_mode, | ||
939 | .set_next_event = timer_set_next_event, | ||
940 | }; | ||
941 | |||
942 | /* | ||
943 | * IRQ handler for the timer | ||
944 | */ | ||
945 | static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id) | ||
946 | { | ||
947 | struct clock_event_device *evt = &timer0_clockevent; | ||
948 | |||
949 | writel(1, TIMER0_VA_BASE + TIMER_INTCLR); | ||
950 | |||
951 | evt->event_handler(evt); | ||
952 | |||
953 | return IRQ_HANDLED; | ||
954 | } | ||
955 | |||
956 | static struct irqaction versatile_timer_irq = { | ||
957 | .name = "Versatile Timer Tick", | ||
958 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
959 | .handler = versatile_timer_interrupt, | ||
960 | }; | ||
961 | |||
962 | static cycle_t versatile_get_cycles(struct clocksource *cs) | ||
963 | { | ||
964 | return ~readl(TIMER3_VA_BASE + TIMER_VALUE); | ||
965 | } | ||
966 | |||
967 | static struct clocksource clocksource_versatile = { | ||
968 | .name = "timer3", | ||
969 | .rating = 200, | ||
970 | .read = versatile_get_cycles, | ||
971 | .mask = CLOCKSOURCE_MASK(32), | ||
972 | .shift = 20, | ||
973 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
974 | }; | ||
975 | |||
976 | static int __init versatile_clocksource_init(void) | ||
977 | { | ||
978 | /* setup timer3 as free-running clocksource */ | ||
979 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); | ||
980 | writel(0xffffffff, TIMER3_VA_BASE + TIMER_LOAD); | ||
981 | writel(0xffffffff, TIMER3_VA_BASE + TIMER_VALUE); | ||
982 | writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC, | ||
983 | TIMER3_VA_BASE + TIMER_CTRL); | ||
984 | |||
985 | clocksource_versatile.mult = | ||
986 | clocksource_khz2mult(1000, clocksource_versatile.shift); | ||
987 | clocksource_register(&clocksource_versatile); | ||
988 | |||
989 | return 0; | ||
990 | } | ||
991 | 863 | ||
992 | /* | 864 | /* |
993 | * Set up timer interrupt, and return the current time in seconds. | 865 | * Set up timer interrupt, and return the current time in seconds. |
@@ -1016,22 +888,8 @@ static void __init versatile_timer_init(void) | |||
1016 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); | 888 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); |
1017 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); | 889 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); |
1018 | 890 | ||
1019 | /* | 891 | sp804_clocksource_init(TIMER3_VA_BASE); |
1020 | * Make irqs happen for the system timer | 892 | sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1); |
1021 | */ | ||
1022 | setup_irq(IRQ_TIMERINT0_1, &versatile_timer_irq); | ||
1023 | |||
1024 | versatile_clocksource_init(); | ||
1025 | |||
1026 | timer0_clockevent.mult = | ||
1027 | div_sc(1000000, NSEC_PER_SEC, timer0_clockevent.shift); | ||
1028 | timer0_clockevent.max_delta_ns = | ||
1029 | clockevent_delta2ns(0xffffffff, &timer0_clockevent); | ||
1030 | timer0_clockevent.min_delta_ns = | ||
1031 | clockevent_delta2ns(0xf, &timer0_clockevent); | ||
1032 | |||
1033 | timer0_clockevent.cpumask = cpumask_of(0); | ||
1034 | clockevents_register_device(&timer0_clockevent); | ||
1035 | } | 893 | } |
1036 | 894 | ||
1037 | struct sys_timer versatile_timer = { | 895 | struct sys_timer versatile_timer = { |
diff --git a/arch/arm/mach-versatile/include/mach/clkdev.h b/arch/arm/mach-versatile/include/mach/clkdev.h index 04b37a89801c..e58d0771b64e 100644 --- a/arch/arm/mach-versatile/include/mach/clkdev.h +++ b/arch/arm/mach-versatile/include/mach/clkdev.h | |||
@@ -1,6 +1,15 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | 1 | #ifndef __ASM_MACH_CLKDEV_H |
2 | #define __ASM_MACH_CLKDEV_H | 2 | #define __ASM_MACH_CLKDEV_H |
3 | 3 | ||
4 | #include <plat/clock.h> | ||
5 | |||
6 | struct clk { | ||
7 | unsigned long rate; | ||
8 | const struct clk_ops *ops; | ||
9 | const struct icst_params *params; | ||
10 | void __iomem *vcoreg; | ||
11 | }; | ||
12 | |||
4 | #define __clk_get(clk) ({ 1; }) | 13 | #define __clk_get(clk) ({ 1; }) |
5 | #define __clk_put(clk) do { } while (0) | 14 | #define __clk_put(clk) do { } while (0) |
6 | 15 | ||
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S index 8c8020980585..e6f7c1663160 100644 --- a/arch/arm/mach-versatile/include/mach/entry-macro.S +++ b/arch/arm/mach-versatile/include/mach/entry-macro.S | |||
@@ -8,6 +8,7 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <mach/platform.h> | ||
11 | #include <asm/hardware/vic.h> | 12 | #include <asm/hardware/vic.h> |
12 | 13 | ||
13 | .macro disable_fiq | 14 | .macro disable_fiq |
diff --git a/arch/arm/mach-versatile/include/mach/hardware.h b/arch/arm/mach-versatile/include/mach/hardware.h index 7aa906c93154..4f8f99aac938 100644 --- a/arch/arm/mach-versatile/include/mach/hardware.h +++ b/arch/arm/mach-versatile/include/mach/hardware.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #define __ASM_ARCH_HARDWARE_H | 23 | #define __ASM_ARCH_HARDWARE_H |
24 | 24 | ||
25 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
26 | #include <mach/platform.h> | ||
27 | 26 | ||
28 | /* | 27 | /* |
29 | * PCI space virtual addresses | 28 | * PCI space virtual addresses |
@@ -49,4 +48,6 @@ | |||
49 | /* macro to get at IO space when running virtually */ | 48 | /* macro to get at IO space when running virtually */ |
50 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) | 49 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) |
51 | 50 | ||
51 | #define __io_address(n) __io(IO_ADDRESS(n)) | ||
52 | |||
52 | #endif | 53 | #endif |
diff --git a/arch/arm/mach-versatile/include/mach/platform.h b/arch/arm/mach-versatile/include/mach/platform.h index 83207395191a..ec087407b163 100644 --- a/arch/arm/mach-versatile/include/mach/platform.h +++ b/arch/arm/mach-versatile/include/mach/platform.h | |||
@@ -205,7 +205,7 @@ | |||
205 | #define VERSATILE_CLCD_BASE 0x10120000 /* CLCD */ | 205 | #define VERSATILE_CLCD_BASE 0x10120000 /* CLCD */ |
206 | #define VERSATILE_DMAC_BASE 0x10130000 /* DMA controller */ | 206 | #define VERSATILE_DMAC_BASE 0x10130000 /* DMA controller */ |
207 | #define VERSATILE_VIC_BASE 0x10140000 /* Vectored interrupt controller */ | 207 | #define VERSATILE_VIC_BASE 0x10140000 /* Vectored interrupt controller */ |
208 | #define VERSATILE_PERIPH_BASE 0x10150000 /* off-chip peripherals alias from */ | 208 | #define VERSATILE_PERIPH_BASE 0x10150000 /* off-chip peripherals alias from */ |
209 | /* 0x10000000 - 0x100FFFFF */ | 209 | /* 0x10000000 - 0x100FFFFF */ |
210 | #define VERSATILE_AHBM_BASE 0x101D0000 /* AHB monitor */ | 210 | #define VERSATILE_AHBM_BASE 0x101D0000 /* AHB monitor */ |
211 | #define VERSATILE_SCTL_BASE 0x101E0000 /* System controller */ | 211 | #define VERSATILE_SCTL_BASE 0x101E0000 /* System controller */ |
@@ -213,7 +213,7 @@ | |||
213 | #define VERSATILE_TIMER0_1_BASE 0x101E2000 /* Timer 0 and 1 */ | 213 | #define VERSATILE_TIMER0_1_BASE 0x101E2000 /* Timer 0 and 1 */ |
214 | #define VERSATILE_TIMER2_3_BASE 0x101E3000 /* Timer 2 and 3 */ | 214 | #define VERSATILE_TIMER2_3_BASE 0x101E3000 /* Timer 2 and 3 */ |
215 | #define VERSATILE_GPIO0_BASE 0x101E4000 /* GPIO port 0 */ | 215 | #define VERSATILE_GPIO0_BASE 0x101E4000 /* GPIO port 0 */ |
216 | #define VERSATILE_GPIO1_BASE 0x101E5000 /* GPIO port 1 */ | 216 | #define VERSATILE_GPIO1_BASE 0x101E5000 /* GPIO port 1 */ |
217 | #define VERSATILE_GPIO2_BASE 0x101E6000 /* GPIO port 2 */ | 217 | #define VERSATILE_GPIO2_BASE 0x101E6000 /* GPIO port 2 */ |
218 | #define VERSATILE_GPIO3_BASE 0x101E7000 /* GPIO port 3 */ | 218 | #define VERSATILE_GPIO3_BASE 0x101E7000 /* GPIO port 3 */ |
219 | #define VERSATILE_RTC_BASE 0x101E8000 /* Real Time Clock */ | 219 | #define VERSATILE_RTC_BASE 0x101E8000 /* Real Time Clock */ |
@@ -379,12 +379,6 @@ | |||
379 | #define SIC_INT_PCI3 30 | 379 | #define SIC_INT_PCI3 30 |
380 | 380 | ||
381 | 381 | ||
382 | /* | ||
383 | * Clean base - dummy | ||
384 | * | ||
385 | */ | ||
386 | #define CLEAN_BASE VERSATILE_BOOT_ROM_HI | ||
387 | |||
388 | /* | 382 | /* |
389 | * System controller bit assignment | 383 | * System controller bit assignment |
390 | */ | 384 | */ |
@@ -397,20 +391,6 @@ | |||
397 | #define VERSATILE_TIMER4_EnSel 21 | 391 | #define VERSATILE_TIMER4_EnSel 21 |
398 | 392 | ||
399 | 393 | ||
400 | #define MAX_TIMER 2 | ||
401 | #define MAX_PERIOD 699050 | ||
402 | #define TICKS_PER_uSEC 1 | ||
403 | |||
404 | /* | ||
405 | * These are useconds NOT ticks. | ||
406 | * | ||
407 | */ | ||
408 | #define mSEC_1 1000 | ||
409 | #define mSEC_5 (mSEC_1 * 5) | ||
410 | #define mSEC_10 (mSEC_1 * 10) | ||
411 | #define mSEC_25 (mSEC_1 * 25) | ||
412 | #define SEC_1 (mSEC_1 * 1000) | ||
413 | |||
414 | #define VERSATILE_CSR_BASE 0x10000000 | 394 | #define VERSATILE_CSR_BASE 0x10000000 |
415 | #define VERSATILE_CSR_SIZE 0x10000000 | 395 | #define VERSATILE_CSR_SIZE 0x10000000 |
416 | 396 | ||
@@ -432,5 +412,3 @@ | |||
432 | #endif | 412 | #endif |
433 | 413 | ||
434 | #endif | 414 | #endif |
435 | |||
436 | /* END */ | ||