aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-integrator/core.c')
-rw-r--r--arch/arm/mach-integrator/core.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 4b38e13667ac..019f0ab08f66 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -29,6 +29,7 @@
29#include <mach/cm.h> 29#include <mach/cm.h>
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/leds.h> 31#include <asm/leds.h>
32#include <asm/mach-types.h>
32#include <asm/mach/time.h> 33#include <asm/mach/time.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34 35
@@ -44,7 +45,6 @@ static struct amba_device rtc_device = {
44 .flags = IORESOURCE_MEM, 45 .flags = IORESOURCE_MEM,
45 }, 46 },
46 .irq = { IRQ_RTCINT, NO_IRQ }, 47 .irq = { IRQ_RTCINT, NO_IRQ },
47 .periphid = 0x00041030,
48}; 48};
49 49
50static struct amba_device uart0_device = { 50static struct amba_device uart0_device = {
@@ -58,7 +58,6 @@ static struct amba_device uart0_device = {
58 .flags = IORESOURCE_MEM, 58 .flags = IORESOURCE_MEM,
59 }, 59 },
60 .irq = { IRQ_UARTINT0, NO_IRQ }, 60 .irq = { IRQ_UARTINT0, NO_IRQ },
61 .periphid = 0x0041010,
62}; 61};
63 62
64static struct amba_device uart1_device = { 63static struct amba_device uart1_device = {
@@ -72,7 +71,6 @@ static struct amba_device uart1_device = {
72 .flags = IORESOURCE_MEM, 71 .flags = IORESOURCE_MEM,
73 }, 72 },
74 .irq = { IRQ_UARTINT1, NO_IRQ }, 73 .irq = { IRQ_UARTINT1, NO_IRQ },
75 .periphid = 0x0041010,
76}; 74};
77 75
78static struct amba_device kmi0_device = { 76static struct amba_device kmi0_device = {
@@ -85,7 +83,6 @@ static struct amba_device kmi0_device = {
85 .flags = IORESOURCE_MEM, 83 .flags = IORESOURCE_MEM,
86 }, 84 },
87 .irq = { IRQ_KMIINT0, NO_IRQ }, 85 .irq = { IRQ_KMIINT0, NO_IRQ },
88 .periphid = 0x00041050,
89}; 86};
90 87
91static struct amba_device kmi1_device = { 88static struct amba_device kmi1_device = {
@@ -98,7 +95,6 @@ static struct amba_device kmi1_device = {
98 .flags = IORESOURCE_MEM, 95 .flags = IORESOURCE_MEM,
99 }, 96 },
100 .irq = { IRQ_KMIINT1, NO_IRQ }, 97 .irq = { IRQ_KMIINT1, NO_IRQ },
101 .periphid = 0x00041050,
102}; 98};
103 99
104static struct amba_device *amba_devs[] __initdata = { 100static struct amba_device *amba_devs[] __initdata = {
@@ -157,6 +153,19 @@ static int __init integrator_init(void)
157{ 153{
158 int i; 154 int i;
159 155
156 /*
157 * The Integrator/AP lacks necessary AMBA PrimeCell IDs, so we need to
158 * hard-code them. The Integator/CP and forward have proper cell IDs.
159 * Else we leave them undefined to the bus driver can autoprobe them.
160 */
161 if (machine_is_integrator()) {
162 rtc_device.periphid = 0x00041030;
163 uart0_device.periphid = 0x00041010;
164 uart1_device.periphid = 0x00041010;
165 kmi0_device.periphid = 0x00041050;
166 kmi1_device.periphid = 0x00041050;
167 }
168
160 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 169 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
161 struct amba_device *d = amba_devs[i]; 170 struct amba_device *d = amba_devs[i];
162 amba_device_register(d, &iomem_resource); 171 amba_device_register(d, &iomem_resource);
@@ -238,3 +247,11 @@ void __init integrator_reserve(void)
238{ 247{
239 memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET); 248 memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
240} 249}
250
251/*
252 * To reset, we hit the on-board reset register in the system FPGA
253 */
254void integrator_restart(char mode, const char *cmd)
255{
256 cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
257}