diff options
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/core.c | 63 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/barriers.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/memory.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/smp.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 3 |
5 files changed, 20 insertions, 71 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 75dbc8791d05..5c23450d2d1d 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/amba/mmci.h> | 31 | #include <linux/amba/mmci.h> |
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | #include <linux/clkdev.h> | 33 | #include <linux/clkdev.h> |
34 | #include <linux/mtd/physmap.h> | ||
34 | 35 | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
@@ -41,7 +42,6 @@ | |||
41 | #include <asm/hardware/icst.h> | 42 | #include <asm/hardware/icst.h> |
42 | 43 | ||
43 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/flash.h> | ||
45 | #include <asm/mach/irq.h> | 45 | #include <asm/mach/irq.h> |
46 | #include <asm/mach/map.h> | 46 | #include <asm/mach/map.h> |
47 | 47 | ||
@@ -56,48 +56,9 @@ | |||
56 | 56 | ||
57 | #include "core.h" | 57 | #include "core.h" |
58 | 58 | ||
59 | #ifdef CONFIG_ZONE_DMA | ||
60 | /* | ||
61 | * Adjust the zones if there are restrictions for DMA access. | ||
62 | */ | ||
63 | void __init realview_adjust_zones(unsigned long *size, unsigned long *hole) | ||
64 | { | ||
65 | unsigned long dma_size = SZ_256M >> PAGE_SHIFT; | ||
66 | |||
67 | if (!machine_is_realview_pbx() || size[0] <= dma_size) | ||
68 | return; | ||
69 | |||
70 | size[ZONE_NORMAL] = size[0] - dma_size; | ||
71 | size[ZONE_DMA] = dma_size; | ||
72 | hole[ZONE_NORMAL] = hole[0]; | ||
73 | hole[ZONE_DMA] = 0; | ||
74 | } | ||
75 | #endif | ||
76 | |||
77 | |||
78 | #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) | 59 | #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) |
79 | 60 | ||
80 | static int realview_flash_init(void) | 61 | static void realview_flash_set_vpp(struct platform_device *pdev, int on) |
81 | { | ||
82 | u32 val; | ||
83 | |||
84 | val = __raw_readl(REALVIEW_FLASHCTRL); | ||
85 | val &= ~REALVIEW_FLASHPROG_FLVPPEN; | ||
86 | __raw_writel(val, REALVIEW_FLASHCTRL); | ||
87 | |||
88 | return 0; | ||
89 | } | ||
90 | |||
91 | static void realview_flash_exit(void) | ||
92 | { | ||
93 | u32 val; | ||
94 | |||
95 | val = __raw_readl(REALVIEW_FLASHCTRL); | ||
96 | val &= ~REALVIEW_FLASHPROG_FLVPPEN; | ||
97 | __raw_writel(val, REALVIEW_FLASHCTRL); | ||
98 | } | ||
99 | |||
100 | static void realview_flash_set_vpp(int on) | ||
101 | { | 62 | { |
102 | u32 val; | 63 | u32 val; |
103 | 64 | ||
@@ -109,16 +70,13 @@ static void realview_flash_set_vpp(int on) | |||
109 | __raw_writel(val, REALVIEW_FLASHCTRL); | 70 | __raw_writel(val, REALVIEW_FLASHCTRL); |
110 | } | 71 | } |
111 | 72 | ||
112 | static struct flash_platform_data realview_flash_data = { | 73 | static struct physmap_flash_data realview_flash_data = { |
113 | .map_name = "cfi_probe", | ||
114 | .width = 4, | 74 | .width = 4, |
115 | .init = realview_flash_init, | ||
116 | .exit = realview_flash_exit, | ||
117 | .set_vpp = realview_flash_set_vpp, | 75 | .set_vpp = realview_flash_set_vpp, |
118 | }; | 76 | }; |
119 | 77 | ||
120 | struct platform_device realview_flash_device = { | 78 | struct platform_device realview_flash_device = { |
121 | .name = "armflash", | 79 | .name = "physmap-flash", |
122 | .id = 0, | 80 | .id = 0, |
123 | .dev = { | 81 | .dev = { |
124 | .platform_data = &realview_flash_data, | 82 | .platform_data = &realview_flash_data, |
@@ -315,6 +273,10 @@ static struct clk ref24_clk = { | |||
315 | .rate = 24000000, | 273 | .rate = 24000000, |
316 | }; | 274 | }; |
317 | 275 | ||
276 | static struct clk sp804_clk = { | ||
277 | .rate = 1000000, | ||
278 | }; | ||
279 | |||
318 | static struct clk dummy_apb_pclk; | 280 | static struct clk dummy_apb_pclk; |
319 | 281 | ||
320 | static struct clk_lookup lookups[] = { | 282 | static struct clk_lookup lookups[] = { |
@@ -357,7 +319,10 @@ static struct clk_lookup lookups[] = { | |||
357 | }, { /* SSP */ | 319 | }, { /* SSP */ |
358 | .dev_id = "dev:ssp0", | 320 | .dev_id = "dev:ssp0", |
359 | .clk = &ref24_clk, | 321 | .clk = &ref24_clk, |
360 | } | 322 | }, { /* SP804 timers */ |
323 | .dev_id = "sp804", | ||
324 | .clk = &sp804_clk, | ||
325 | }, | ||
361 | }; | 326 | }; |
362 | 327 | ||
363 | void __init realview_init_early(void) | 328 | void __init realview_init_early(void) |
@@ -545,8 +510,8 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
545 | writel(0, timer2_va_base + TIMER_CTRL); | 510 | writel(0, timer2_va_base + TIMER_CTRL); |
546 | writel(0, timer3_va_base + TIMER_CTRL); | 511 | writel(0, timer3_va_base + TIMER_CTRL); |
547 | 512 | ||
548 | sp804_clocksource_init(timer3_va_base); | 513 | sp804_clocksource_init(timer3_va_base, "timer3"); |
549 | sp804_clockevents_init(timer0_va_base, timer_irq); | 514 | sp804_clockevents_init(timer0_va_base, timer_irq, "timer0"); |
550 | } | 515 | } |
551 | 516 | ||
552 | /* | 517 | /* |
diff --git a/arch/arm/mach-realview/include/mach/barriers.h b/arch/arm/mach-realview/include/mach/barriers.h index 0c5d749d7b5f..9a732195aa1c 100644 --- a/arch/arm/mach-realview/include/mach/barriers.h +++ b/arch/arm/mach-realview/include/mach/barriers.h | |||
@@ -4,5 +4,5 @@ | |||
4 | * operation to deadlock the system. | 4 | * operation to deadlock the system. |
5 | */ | 5 | */ |
6 | #define mb() dsb() | 6 | #define mb() dsb() |
7 | #define rmb() dmb() | 7 | #define rmb() dsb() |
8 | #define wmb() mb() | 8 | #define wmb() mb() |
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h index e05fc2c4c080..1759fa673eea 100644 --- a/arch/arm/mach-realview/include/mach/memory.h +++ b/arch/arm/mach-realview/include/mach/memory.h | |||
@@ -29,13 +29,8 @@ | |||
29 | #define PLAT_PHYS_OFFSET UL(0x00000000) | 29 | #define PLAT_PHYS_OFFSET UL(0x00000000) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA) | 32 | #ifdef CONFIG_ZONE_DMA |
33 | extern void realview_adjust_zones(unsigned long *size, unsigned long *hole); | 33 | #define ARM_DMA_ZONE_SIZE SZ_256M |
34 | #define arch_adjust_zones(size, hole) \ | ||
35 | realview_adjust_zones(size, hole) | ||
36 | |||
37 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) | ||
38 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M) | ||
39 | #endif | 34 | #endif |
40 | 35 | ||
41 | #ifdef CONFIG_SPARSEMEM | 36 | #ifdef CONFIG_SPARSEMEM |
diff --git a/arch/arm/mach-realview/include/mach/smp.h b/arch/arm/mach-realview/include/mach/smp.h deleted file mode 100644 index c8221b38ee7c..000000000000 --- a/arch/arm/mach-realview/include/mach/smp.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef ASMARM_ARCH_SMP_H | ||
2 | #define ASMARM_ARCH_SMP_H | ||
3 | |||
4 | #include <asm/hardware/gic.h> | ||
5 | |||
6 | /* | ||
7 | * We use IRQ1 as the IPI | ||
8 | */ | ||
9 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) | ||
10 | { | ||
11 | gic_raise_softirq(mask, ipi); | ||
12 | } | ||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 23919229e12d..963bf0d8119a 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <asm/hardware/gic.h> | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
18 | #include <asm/smp_scu.h> | 19 | #include <asm/smp_scu.h> |
19 | #include <asm/unified.h> | 20 | #include <asm/unified.h> |
@@ -61,6 +62,8 @@ void __init smp_init_cpus(void) | |||
61 | 62 | ||
62 | for (i = 0; i < ncores; i++) | 63 | for (i = 0; i < ncores; i++) |
63 | set_cpu_possible(i, true); | 64 | set_cpu_possible(i, true); |
65 | |||
66 | set_smp_cross_call(gic_raise_softirq); | ||
64 | } | 67 | } |
65 | 68 | ||
66 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 69 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |