diff options
Diffstat (limited to 'arch/arm/plat-iop')
-rw-r--r-- | arch/arm/plat-iop/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/plat-iop/io.c | 59 | ||||
-rw-r--r-- | arch/arm/plat-iop/restart.c | 19 | ||||
-rw-r--r-- | arch/arm/plat-iop/time.c | 16 |
4 files changed, 24 insertions, 74 deletions
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile index 69b09c1cec8b..a99dc15a70f7 100644 --- a/arch/arm/plat-iop/Makefile +++ b/arch/arm/plat-iop/Makefile | |||
@@ -10,10 +10,10 @@ obj-$(CONFIG_ARCH_IOP32X) += i2c.o | |||
10 | obj-$(CONFIG_ARCH_IOP32X) += pci.o | 10 | obj-$(CONFIG_ARCH_IOP32X) += pci.o |
11 | obj-$(CONFIG_ARCH_IOP32X) += setup.o | 11 | obj-$(CONFIG_ARCH_IOP32X) += setup.o |
12 | obj-$(CONFIG_ARCH_IOP32X) += time.o | 12 | obj-$(CONFIG_ARCH_IOP32X) += time.o |
13 | obj-$(CONFIG_ARCH_IOP32X) += io.o | ||
14 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o | 13 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o |
15 | obj-$(CONFIG_ARCH_IOP32X) += adma.o | 14 | obj-$(CONFIG_ARCH_IOP32X) += adma.o |
16 | obj-$(CONFIG_ARCH_IOP32X) += pmu.o | 15 | obj-$(CONFIG_ARCH_IOP32X) += pmu.o |
16 | obj-$(CONFIG_ARCH_IOP32X) += restart.o | ||
17 | 17 | ||
18 | # IOP33X | 18 | # IOP33X |
19 | obj-$(CONFIG_ARCH_IOP33X) += gpio.o | 19 | obj-$(CONFIG_ARCH_IOP33X) += gpio.o |
@@ -21,10 +21,10 @@ obj-$(CONFIG_ARCH_IOP33X) += i2c.o | |||
21 | obj-$(CONFIG_ARCH_IOP33X) += pci.o | 21 | obj-$(CONFIG_ARCH_IOP33X) += pci.o |
22 | obj-$(CONFIG_ARCH_IOP33X) += setup.o | 22 | obj-$(CONFIG_ARCH_IOP33X) += setup.o |
23 | obj-$(CONFIG_ARCH_IOP33X) += time.o | 23 | obj-$(CONFIG_ARCH_IOP33X) += time.o |
24 | obj-$(CONFIG_ARCH_IOP33X) += io.o | ||
25 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o | 24 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o |
26 | obj-$(CONFIG_ARCH_IOP33X) += adma.o | 25 | obj-$(CONFIG_ARCH_IOP33X) += adma.o |
27 | obj-$(CONFIG_ARCH_IOP33X) += pmu.o | 26 | obj-$(CONFIG_ARCH_IOP33X) += pmu.o |
27 | obj-$(CONFIG_ARCH_IOP33X) += restart.o | ||
28 | 28 | ||
29 | # IOP13XX | 29 | # IOP13XX |
30 | obj-$(CONFIG_ARCH_IOP13XX) += cp6.o | 30 | obj-$(CONFIG_ARCH_IOP13XX) += cp6.o |
diff --git a/arch/arm/plat-iop/io.c b/arch/arm/plat-iop/io.c deleted file mode 100644 index e15bc17db90b..000000000000 --- a/arch/arm/plat-iop/io.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * iop3xx custom ioremap implementation | ||
3 | * Copyright (c) 2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <mach/hardware.h> | ||
23 | |||
24 | void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size, | ||
25 | unsigned int mtype) | ||
26 | { | ||
27 | void __iomem * retval; | ||
28 | |||
29 | switch (cookie) { | ||
30 | case IOP3XX_PCI_LOWER_IO_PA ... IOP3XX_PCI_UPPER_IO_PA: | ||
31 | retval = (void *) IOP3XX_PCI_IO_PHYS_TO_VIRT(cookie); | ||
32 | break; | ||
33 | case IOP3XX_PERIPHERAL_PHYS_BASE ... IOP3XX_PERIPHERAL_UPPER_PA: | ||
34 | retval = (void *) IOP3XX_PMMR_PHYS_TO_VIRT(cookie); | ||
35 | break; | ||
36 | default: | ||
37 | retval = __arm_ioremap_caller(cookie, size, mtype, | ||
38 | __builtin_return_address(0)); | ||
39 | } | ||
40 | |||
41 | return retval; | ||
42 | } | ||
43 | EXPORT_SYMBOL(__iop3xx_ioremap); | ||
44 | |||
45 | void __iop3xx_iounmap(void __iomem *addr) | ||
46 | { | ||
47 | extern void __iounmap(volatile void __iomem *addr); | ||
48 | |||
49 | switch ((u32) addr) { | ||
50 | case IOP3XX_PCI_LOWER_IO_VA ... IOP3XX_PCI_UPPER_IO_VA: | ||
51 | case IOP3XX_PERIPHERAL_VIRT_BASE ... IOP3XX_PERIPHERAL_UPPER_VA: | ||
52 | goto skip; | ||
53 | } | ||
54 | __iounmap(addr); | ||
55 | |||
56 | skip: | ||
57 | return; | ||
58 | } | ||
59 | EXPORT_SYMBOL(__iop3xx_iounmap); | ||
diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/plat-iop/restart.c new file mode 100644 index 000000000000..6a85a0c502e6 --- /dev/null +++ b/arch/arm/plat-iop/restart.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * restart.c | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <asm/hardware/iop3xx.h> | ||
11 | #include <mach/hardware.h> | ||
12 | |||
13 | void iop3xx_restart(char mode, const char *cmd) | ||
14 | { | ||
15 | *IOP3XX_PCSR = 0x30; | ||
16 | |||
17 | /* Jump into ROM at address 0 */ | ||
18 | soft_restart(0); | ||
19 | } | ||
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 568dd0223d17..cbfbbe461788 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/time.h> | 18 | #include <linux/time.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/timex.h> | 20 | #include <linux/timex.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
23 | #include <linux/clocksource.h> | 22 | #include <linux/clocksource.h> |
24 | #include <linux/clockchips.h> | 23 | #include <linux/clockchips.h> |
@@ -52,21 +51,12 @@ static struct clocksource iop_clocksource = { | |||
52 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 51 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
53 | }; | 52 | }; |
54 | 53 | ||
55 | static DEFINE_CLOCK_DATA(cd); | ||
56 | |||
57 | /* | 54 | /* |
58 | * IOP sched_clock() implementation via its clocksource. | 55 | * IOP sched_clock() implementation via its clocksource. |
59 | */ | 56 | */ |
60 | unsigned long long notrace sched_clock(void) | 57 | static u32 notrace iop_read_sched_clock(void) |
61 | { | 58 | { |
62 | u32 cyc = 0xffffffffu - read_tcr1(); | 59 | return 0xffffffffu - read_tcr1(); |
63 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
64 | } | ||
65 | |||
66 | static void notrace iop_update_sched_clock(void) | ||
67 | { | ||
68 | u32 cyc = 0xffffffffu - read_tcr1(); | ||
69 | update_sched_clock(&cd, cyc, (u32)~0); | ||
70 | } | 60 | } |
71 | 61 | ||
72 | /* | 62 | /* |
@@ -152,7 +142,7 @@ void __init iop_init_time(unsigned long tick_rate) | |||
152 | { | 142 | { |
153 | u32 timer_ctl; | 143 | u32 timer_ctl; |
154 | 144 | ||
155 | init_sched_clock(&cd, iop_update_sched_clock, 32, tick_rate); | 145 | setup_sched_clock(iop_read_sched_clock, 32, tick_rate); |
156 | 146 | ||
157 | ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); | 147 | ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); |
158 | iop_tick_rate = tick_rate; | 148 | iop_tick_rate = tick_rate; |