diff options
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.c | 42 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/board-pb1176.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/board-pb11mp.h | 12 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/memory.h | 49 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/platform.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/system.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb11mp.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 21 |
14 files changed, 187 insertions, 26 deletions
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index dfc9b0bc6eb2..c48e1f2c3349 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -70,6 +70,8 @@ config MACH_REALVIEW_PBX | |||
70 | bool "Support RealView/PBX platform" | 70 | bool "Support RealView/PBX platform" |
71 | select ARM_GIC | 71 | select ARM_GIC |
72 | select HAVE_PATA_PLATFORM | 72 | select HAVE_PATA_PLATFORM |
73 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !HIGH_PHYS_OFFSET | ||
74 | select ZONE_DMA if SPARSEMEM | ||
73 | help | 75 | help |
74 | Include support for the ARM(R) RealView PBX platform. | 76 | Include support for the ARM(R) RealView PBX platform. |
75 | 77 | ||
@@ -82,6 +84,7 @@ config REALVIEW_HIGH_PHYS_OFFSET | |||
82 | 0x70000000, 256MB of which being mirrored at 0x00000000. If | 84 | 0x70000000, 256MB of which being mirrored at 0x00000000. If |
83 | the board supports 512MB of RAM, this option allows the | 85 | the board supports 512MB of RAM, this option allows the |
84 | memory to be accessed contiguously at the high physical | 86 | memory to be accessed contiguously at the high physical |
85 | offset. | 87 | offset. On the PBX board, disabling this option allows 1GB of |
88 | RAM to be used with SPARSEMEM. | ||
86 | 89 | ||
87 | endmenu | 90 | endmenu |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index a2083b60e3fb..9f293438e020 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -59,6 +59,25 @@ | |||
59 | /* used by entry-macro.S and platsmp.c */ | 59 | /* used by entry-macro.S and platsmp.c */ |
60 | void __iomem *gic_cpu_base_addr; | 60 | void __iomem *gic_cpu_base_addr; |
61 | 61 | ||
62 | #ifdef CONFIG_ZONE_DMA | ||
63 | /* | ||
64 | * Adjust the zones if there are restrictions for DMA access. | ||
65 | */ | ||
66 | void __init realview_adjust_zones(int node, unsigned long *size, | ||
67 | unsigned long *hole) | ||
68 | { | ||
69 | unsigned long dma_size = SZ_256M >> PAGE_SHIFT; | ||
70 | |||
71 | if (!machine_is_realview_pbx() || node || (size[0] <= dma_size)) | ||
72 | return; | ||
73 | |||
74 | size[ZONE_NORMAL] = size[0] - dma_size; | ||
75 | size[ZONE_DMA] = dma_size; | ||
76 | hole[ZONE_NORMAL] = hole[0]; | ||
77 | hole[ZONE_DMA] = 0; | ||
78 | } | ||
79 | #endif | ||
80 | |||
62 | /* | 81 | /* |
63 | * This is the RealView sched_clock implementation. This has | 82 | * This is the RealView sched_clock implementation. This has |
64 | * a resolution of 41.7ns, and a maximum value of about 179s. | 83 | * a resolution of 41.7ns, and a maximum value of about 179s. |
@@ -543,7 +562,7 @@ static int realview_clcd_setup(struct clcd_fb *fb) | |||
543 | fb->panel = realview_clcd_panel(); | 562 | fb->panel = realview_clcd_panel(); |
544 | 563 | ||
545 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, | 564 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, |
546 | &dma, GFP_KERNEL); | 565 | &dma, GFP_KERNEL | GFP_DMA); |
547 | if (!fb->fb.screen_base) { | 566 | if (!fb->fb.screen_base) { |
548 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | 567 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); |
549 | return -ENOMEM; | 568 | return -ENOMEM; |
@@ -788,3 +807,24 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
788 | realview_clocksource_init(); | 807 | realview_clocksource_init(); |
789 | realview_clockevents_init(timer_irq); | 808 | realview_clockevents_init(timer_irq); |
790 | } | 809 | } |
810 | |||
811 | /* | ||
812 | * Setup the memory banks. | ||
813 | */ | ||
814 | void realview_fixup(struct machine_desc *mdesc, struct tag *tags, char **from, | ||
815 | struct meminfo *meminfo) | ||
816 | { | ||
817 | /* | ||
818 | * Most RealView platforms have 512MB contiguous RAM at 0x70000000. | ||
819 | * Half of this is mirrored at 0. | ||
820 | */ | ||
821 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET | ||
822 | meminfo->bank[0].start = 0x70000000; | ||
823 | meminfo->bank[0].size = SZ_512M; | ||
824 | meminfo->nr_banks = 1; | ||
825 | #else | ||
826 | meminfo->bank[0].start = 0; | ||
827 | meminfo->bank[0].size = SZ_256M; | ||
828 | meminfo->nr_banks = 1; | ||
829 | #endif | ||
830 | } | ||
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 46cd6acb4d40..781bca68a9fa 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | 27 | ||
28 | #include <asm/setup.h> | ||
28 | #include <asm/leds.h> | 29 | #include <asm/leds.h> |
29 | 30 | ||
30 | #define AMBA_DEVICE(name,busid,base,plat) \ | 31 | #define AMBA_DEVICE(name,busid,base,plat) \ |
@@ -44,6 +45,8 @@ static struct amba_device name##_device = { \ | |||
44 | /* .dma = base##_DMA,*/ \ | 45 | /* .dma = base##_DMA,*/ \ |
45 | } | 46 | } |
46 | 47 | ||
48 | struct machine_desc; | ||
49 | |||
47 | extern struct platform_device realview_flash_device; | 50 | extern struct platform_device realview_flash_device; |
48 | extern struct platform_device realview_cf_device; | 51 | extern struct platform_device realview_cf_device; |
49 | extern struct platform_device realview_i2c_device; | 52 | extern struct platform_device realview_i2c_device; |
@@ -61,5 +64,8 @@ extern void realview_timer_init(unsigned int timer_irq); | |||
61 | extern int realview_flash_register(struct resource *res, u32 num); | 64 | extern int realview_flash_register(struct resource *res, u32 num); |
62 | extern int realview_eth_register(const char *name, struct resource *res); | 65 | extern int realview_eth_register(const char *name, struct resource *res); |
63 | extern int realview_usb_register(struct resource *res); | 66 | extern int realview_usb_register(struct resource *res); |
67 | extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags, | ||
68 | char **from, struct meminfo *meminfo); | ||
69 | extern void (*realview_reset)(char); | ||
64 | 70 | ||
65 | #endif | 71 | #endif |
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 98f8e7eeacc2..34b80b7d40b8 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -73,4 +73,9 @@ | |||
73 | #define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */ | 73 | #define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */ |
74 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ | 74 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ |
75 | 75 | ||
76 | /* | ||
77 | * Control register SYS_RESETCTL is set to 1 to force a soft reset | ||
78 | */ | ||
79 | #define REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL 0x0100 | ||
80 | |||
76 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ | 81 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ |
diff --git a/arch/arm/mach-realview/include/mach/board-pb11mp.h b/arch/arm/mach-realview/include/mach/board-pb11mp.h index f0d68e0fea01..7abf918b77e9 100644 --- a/arch/arm/mach-realview/include/mach/board-pb11mp.h +++ b/arch/arm/mach-realview/include/mach/board-pb11mp.h | |||
@@ -81,4 +81,16 @@ | |||
81 | #define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */ | 81 | #define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */ |
82 | #define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */ | 82 | #define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */ |
83 | 83 | ||
84 | /* | ||
85 | * Values for REALVIEW_SYS_RESET_CTRL | ||
86 | */ | ||
87 | #define REALVIEW_PB11MP_SYS_CTRL_RESET_CONFIGCLR 0x01 | ||
88 | #define REALVIEW_PB11MP_SYS_CTRL_RESET_CONFIGINIT 0x02 | ||
89 | #define REALVIEW_PB11MP_SYS_CTRL_RESET_DLLRESET 0x03 | ||
90 | #define REALVIEW_PB11MP_SYS_CTRL_RESET_PLLRESET 0x04 | ||
91 | #define REALVIEW_PB11MP_SYS_CTRL_RESET_POR 0x05 | ||
92 | #define REALVIEW_PB11MP_SYS_CTRL_RESET_DoC 0x06 | ||
93 | |||
94 | #define REALVIEW_PB11MP_SYS_CTRL_LED (1 << 0) | ||
95 | |||
84 | #endif /* __ASM_ARCH_BOARD_PB11MP_H */ | 96 | #endif /* __ASM_ARCH_BOARD_PB11MP_H */ |
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h index 293c30025e7e..2417bbcf97fd 100644 --- a/arch/arm/mach-realview/include/mach/memory.h +++ b/arch/arm/mach-realview/include/mach/memory.h | |||
@@ -29,4 +29,53 @@ | |||
29 | #define PHYS_OFFSET UL(0x00000000) | 29 | #define PHYS_OFFSET UL(0x00000000) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA) | ||
33 | extern void realview_adjust_zones(int node, unsigned long *size, | ||
34 | unsigned long *hole); | ||
35 | #define arch_adjust_zones(node, size, hole) \ | ||
36 | realview_adjust_zones(node, size, hole) | ||
37 | |||
38 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) | ||
39 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M) | ||
40 | #endif | ||
41 | |||
42 | #ifdef CONFIG_SPARSEMEM | ||
43 | |||
44 | /* | ||
45 | * Sparsemem definitions for RealView PBX. | ||
46 | * | ||
47 | * The RealView PBX board has another block of 512MB of RAM at 0x20000000, | ||
48 | * however only the block at 0x70000000 (or the 256MB mirror at 0x00000000) | ||
49 | * may be used for DMA. | ||
50 | * | ||
51 | * The macros below define a section size of 256MB and a non-linear virtual to | ||
52 | * physical mapping: | ||
53 | * | ||
54 | * 256MB @ 0x00000000 -> PAGE_OFFSET | ||
55 | * 512MB @ 0x20000000 -> PAGE_OFFSET + 0x10000000 | ||
56 | * 256MB @ 0x80000000 -> PAGE_OFFSET + 0x30000000 | ||
57 | */ | ||
58 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET | ||
59 | #error "SPARSEMEM not available with REALVIEW_HIGH_PHYS_OFFSET" | ||
60 | #endif | ||
61 | |||
62 | #define MAX_PHYSMEM_BITS 32 | ||
63 | #define SECTION_SIZE_BITS 28 | ||
64 | |||
65 | /* bank page offsets */ | ||
66 | #define PAGE_OFFSET1 (PAGE_OFFSET + 0x10000000) | ||
67 | #define PAGE_OFFSET2 (PAGE_OFFSET + 0x30000000) | ||
68 | |||
69 | #define __phys_to_virt(phys) \ | ||
70 | ((phys) >= 0x80000000 ? (phys) - 0x80000000 + PAGE_OFFSET2 : \ | ||
71 | (phys) >= 0x20000000 ? (phys) - 0x20000000 + PAGE_OFFSET1 : \ | ||
72 | (phys) + PAGE_OFFSET) | ||
73 | |||
74 | #define __virt_to_phys(virt) \ | ||
75 | ((virt) >= PAGE_OFFSET2 ? (virt) - PAGE_OFFSET2 + 0x80000000 : \ | ||
76 | (virt) >= PAGE_OFFSET1 ? (virt) - PAGE_OFFSET1 + 0x20000000 : \ | ||
77 | (virt) - PAGE_OFFSET) | ||
78 | |||
79 | #endif /* CONFIG_SPARSEMEM */ | ||
80 | |||
32 | #endif | 81 | #endif |
diff --git a/arch/arm/mach-realview/include/mach/platform.h b/arch/arm/mach-realview/include/mach/platform.h index c8f50835fed2..4f46bf71e752 100644 --- a/arch/arm/mach-realview/include/mach/platform.h +++ b/arch/arm/mach-realview/include/mach/platform.h | |||
@@ -119,19 +119,6 @@ | |||
119 | #define REALVIEW_SYS_TEST_OSC3 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC3_OFFSET) | 119 | #define REALVIEW_SYS_TEST_OSC3 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC3_OFFSET) |
120 | #define REALVIEW_SYS_TEST_OSC4 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC4_OFFSET) | 120 | #define REALVIEW_SYS_TEST_OSC4 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC4_OFFSET) |
121 | 121 | ||
122 | /* | ||
123 | * Values for REALVIEW_SYS_RESET_CTRL | ||
124 | */ | ||
125 | #define REALVIEW_SYS_CTRL_RESET_CONFIGCLR 0x01 | ||
126 | #define REALVIEW_SYS_CTRL_RESET_CONFIGINIT 0x02 | ||
127 | #define REALVIEW_SYS_CTRL_RESET_DLLRESET 0x03 | ||
128 | #define REALVIEW_SYS_CTRL_RESET_PLLRESET 0x04 | ||
129 | #define REALVIEW_SYS_CTRL_RESET_POR 0x05 | ||
130 | #define REALVIEW_SYS_CTRL_RESET_DoC 0x06 | ||
131 | |||
132 | #define REALVIEW_SYS_CTRL_LED (1 << 0) | ||
133 | |||
134 | |||
135 | /* ------------------------------------------------------------------------ | 122 | /* ------------------------------------------------------------------------ |
136 | * RealView control registers | 123 | * RealView control registers |
137 | * ------------------------------------------------------------------------ | 124 | * ------------------------------------------------------------------------ |
@@ -153,7 +140,7 @@ | |||
153 | * SYS_CLD, SYS_BOOTCS | 140 | * SYS_CLD, SYS_BOOTCS |
154 | */ | 141 | */ |
155 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) | 142 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) |
156 | #define REALVIEW_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */ | 143 | #define REALVIEW_SYS_LOCKVAL_MASK 0xA05F /* Enable write access */ |
157 | 144 | ||
158 | /* | 145 | /* |
159 | * REALVIEW_SYS_FLASH | 146 | * REALVIEW_SYS_FLASH |
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h index 1a15a441e027..a30f2e3ec178 100644 --- a/arch/arm/mach-realview/include/mach/system.h +++ b/arch/arm/mach-realview/include/mach/system.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/platform.h> | 26 | #include <mach/platform.h> |
27 | 27 | ||
28 | void (*realview_reset)(char mode); | ||
29 | |||
28 | static inline void arch_idle(void) | 30 | static inline void arch_idle(void) |
29 | { | 31 | { |
30 | /* | 32 | /* |
@@ -36,16 +38,12 @@ static inline void arch_idle(void) | |||
36 | 38 | ||
37 | static inline void arch_reset(char mode, const char *cmd) | 39 | static inline void arch_reset(char mode, const char *cmd) |
38 | { | 40 | { |
39 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET; | ||
40 | unsigned int val; | ||
41 | |||
42 | /* | 41 | /* |
43 | * To reset, we hit the on-board reset register | 42 | * To reset, we hit the on-board reset register |
44 | * in the system FPGA | 43 | * in the system FPGA |
45 | */ | 44 | */ |
46 | val = __raw_readl(hdr_ctrl); | 45 | if (realview_reset) |
47 | val |= REALVIEW_SYS_CTRL_RESET_CONFIGCLR; | 46 | realview_reset(mode); |
48 | __raw_writel(val, hdr_ctrl); | ||
49 | } | 47 | } |
50 | 48 | ||
51 | #endif | 49 | #endif |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index a88458b4799d..009265818d55 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -146,11 +146,8 @@ static void __init poke_milo(void) | |||
146 | * register. The BootMonitor waits for this register to become | 146 | * register. The BootMonitor waits for this register to become |
147 | * non-zero. | 147 | * non-zero. |
148 | */ | 148 | */ |
149 | #define REALVIEW_SYS_FLAGSS_OFFSET 0x30 | ||
150 | #define REALVIEW_SYS_FLAGSC_OFFSET 0x34 | ||
151 | __raw_writel(BSYM(virt_to_phys(realview_secondary_startup)), | 149 | __raw_writel(BSYM(virt_to_phys(realview_secondary_startup)), |
152 | __io_address(REALVIEW_SYS_BASE) + | 150 | __io_address(REALVIEW_SYS_FLAGSSET)); |
153 | REALVIEW_SYS_FLAGSS_OFFSET); | ||
154 | 151 | ||
155 | mb(); | 152 | mb(); |
156 | } | 153 | } |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 1d65e64ae571..917f8ca3abff 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -415,6 +415,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | |||
415 | .phys_io = REALVIEW_EB_UART0_BASE, | 415 | .phys_io = REALVIEW_EB_UART0_BASE, |
416 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, | 416 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, |
417 | .boot_params = PHYS_OFFSET + 0x00000100, | 417 | .boot_params = PHYS_OFFSET + 0x00000100, |
418 | .fixup = realview_fixup, | ||
418 | .map_io = realview_eb_map_io, | 419 | .map_io = realview_eb_map_io, |
419 | .init_irq = gic_init_irq, | 420 | .init_irq = gic_init_irq, |
420 | .timer = &realview_eb_timer, | 421 | .timer = &realview_eb_timer, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 2817fe099319..7fb726d5f8b9 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -290,6 +290,28 @@ static struct sys_timer realview_pb1176_timer = { | |||
290 | .init = realview_pb1176_timer_init, | 290 | .init = realview_pb1176_timer_init, |
291 | }; | 291 | }; |
292 | 292 | ||
293 | static void realview_pb1176_reset(char mode) | ||
294 | { | ||
295 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | ||
296 | REALVIEW_SYS_RESETCTL_OFFSET; | ||
297 | void __iomem *rst_hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | ||
298 | REALVIEW_SYS_LOCK_OFFSET; | ||
299 | __raw_writel(REALVIEW_SYS_LOCKVAL_MASK, rst_hdr_ctrl); | ||
300 | __raw_writel(REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL, hdr_ctrl); | ||
301 | } | ||
302 | |||
303 | static void realview_pb1176_fixup(struct machine_desc *mdesc, | ||
304 | struct tag *tags, char **from, | ||
305 | struct meminfo *meminfo) | ||
306 | { | ||
307 | /* | ||
308 | * RealView PB1176 only has 128MB of RAM mapped at 0. | ||
309 | */ | ||
310 | meminfo->bank[0].start = 0; | ||
311 | meminfo->bank[0].size = SZ_128M; | ||
312 | meminfo->nr_banks = 1; | ||
313 | } | ||
314 | |||
293 | static void __init realview_pb1176_init(void) | 315 | static void __init realview_pb1176_init(void) |
294 | { | 316 | { |
295 | int i; | 317 | int i; |
@@ -313,6 +335,7 @@ static void __init realview_pb1176_init(void) | |||
313 | #ifdef CONFIG_LEDS | 335 | #ifdef CONFIG_LEDS |
314 | leds_event = realview_leds_event; | 336 | leds_event = realview_leds_event; |
315 | #endif | 337 | #endif |
338 | realview_reset = realview_pb1176_reset; | ||
316 | } | 339 | } |
317 | 340 | ||
318 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | 341 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") |
@@ -320,6 +343,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | |||
320 | .phys_io = REALVIEW_PB1176_UART0_BASE, | 343 | .phys_io = REALVIEW_PB1176_UART0_BASE, |
321 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, | 344 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, |
322 | .boot_params = PHYS_OFFSET + 0x00000100, | 345 | .boot_params = PHYS_OFFSET + 0x00000100, |
346 | .fixup = realview_pb1176_fixup, | ||
323 | .map_io = realview_pb1176_map_io, | 347 | .map_io = realview_pb1176_map_io, |
324 | .init_irq = gic_init_irq, | 348 | .init_irq = gic_init_irq, |
325 | .timer = &realview_pb1176_timer, | 349 | .timer = &realview_pb1176_timer, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 94680fcf726d..9bbbfc05f225 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -299,6 +299,21 @@ static struct sys_timer realview_pb11mp_timer = { | |||
299 | .init = realview_pb11mp_timer_init, | 299 | .init = realview_pb11mp_timer_init, |
300 | }; | 300 | }; |
301 | 301 | ||
302 | static void realview_pb11mp_reset(char mode) | ||
303 | { | ||
304 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | ||
305 | REALVIEW_SYS_RESETCTL_OFFSET; | ||
306 | unsigned int val; | ||
307 | |||
308 | /* | ||
309 | * To reset, we hit the on-board reset register | ||
310 | * in the system FPGA | ||
311 | */ | ||
312 | val = __raw_readl(hdr_ctrl); | ||
313 | val |= REALVIEW_PB11MP_SYS_CTRL_RESET_CONFIGCLR; | ||
314 | __raw_writel(val, hdr_ctrl); | ||
315 | } | ||
316 | |||
302 | static void __init realview_pb11mp_init(void) | 317 | static void __init realview_pb11mp_init(void) |
303 | { | 318 | { |
304 | int i; | 319 | int i; |
@@ -324,6 +339,7 @@ static void __init realview_pb11mp_init(void) | |||
324 | #ifdef CONFIG_LEDS | 339 | #ifdef CONFIG_LEDS |
325 | leds_event = realview_leds_event; | 340 | leds_event = realview_leds_event; |
326 | #endif | 341 | #endif |
342 | realview_reset = realview_pb11mp_reset; | ||
327 | } | 343 | } |
328 | 344 | ||
329 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | 345 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") |
@@ -331,6 +347,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | |||
331 | .phys_io = REALVIEW_PB11MP_UART0_BASE, | 347 | .phys_io = REALVIEW_PB11MP_UART0_BASE, |
332 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, | 348 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, |
333 | .boot_params = PHYS_OFFSET + 0x00000100, | 349 | .boot_params = PHYS_OFFSET + 0x00000100, |
350 | .fixup = realview_fixup, | ||
334 | .map_io = realview_pb11mp_map_io, | 351 | .map_io = realview_pb11mp_map_io, |
335 | .init_irq = gic_init_irq, | 352 | .init_irq = gic_init_irq, |
336 | .timer = &realview_pb11mp_timer, | 353 | .timer = &realview_pb11mp_timer, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index 941beb2b9709..fe861e96c566 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -298,6 +298,7 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | |||
298 | .phys_io = REALVIEW_PBA8_UART0_BASE, | 298 | .phys_io = REALVIEW_PBA8_UART0_BASE, |
299 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, | 299 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, |
300 | .boot_params = PHYS_OFFSET + 0x00000100, | 300 | .boot_params = PHYS_OFFSET + 0x00000100, |
301 | .fixup = realview_fixup, | ||
301 | .map_io = realview_pba8_map_io, | 302 | .map_io = realview_pba8_map_io, |
302 | .init_irq = gic_init_irq, | 303 | .init_irq = gic_init_irq, |
303 | .timer = &realview_pba8_timer, | 304 | .timer = &realview_pba8_timer, |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 7e4bc6cdca52..ec39488e2b42 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -304,6 +304,26 @@ static struct sys_timer realview_pbx_timer = { | |||
304 | .init = realview_pbx_timer_init, | 304 | .init = realview_pbx_timer_init, |
305 | }; | 305 | }; |
306 | 306 | ||
307 | static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, | ||
308 | char **from, struct meminfo *meminfo) | ||
309 | { | ||
310 | #ifdef CONFIG_SPARSEMEM | ||
311 | /* | ||
312 | * Memory configuration with SPARSEMEM enabled on RealView PBX (see | ||
313 | * asm/mach/memory.h for more information). | ||
314 | */ | ||
315 | meminfo->bank[0].start = 0; | ||
316 | meminfo->bank[0].size = SZ_256M; | ||
317 | meminfo->bank[1].start = 0x20000000; | ||
318 | meminfo->bank[1].size = SZ_512M; | ||
319 | meminfo->bank[2].start = 0x80000000; | ||
320 | meminfo->bank[2].size = SZ_256M; | ||
321 | meminfo->nr_banks = 3; | ||
322 | #else | ||
323 | realview_fixup(mdesc, tags, from, meminfo); | ||
324 | #endif | ||
325 | } | ||
326 | |||
307 | static void __init realview_pbx_init(void) | 327 | static void __init realview_pbx_init(void) |
308 | { | 328 | { |
309 | int i; | 329 | int i; |
@@ -345,6 +365,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | |||
345 | .phys_io = REALVIEW_PBX_UART0_BASE, | 365 | .phys_io = REALVIEW_PBX_UART0_BASE, |
346 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, | 366 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, |
347 | .boot_params = PHYS_OFFSET + 0x00000100, | 367 | .boot_params = PHYS_OFFSET + 0x00000100, |
368 | .fixup = realview_pbx_fixup, | ||
348 | .map_io = realview_pbx_map_io, | 369 | .map_io = realview_pbx_map_io, |
349 | .init_irq = gic_init_irq, | 370 | .init_irq = gic_init_irq, |
350 | .timer = &realview_pbx_timer, | 371 | .timer = &realview_pbx_timer, |