diff options
author | Jochen Friedrich <jochen@scram.de> | 2011-11-27 16:00:55 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-08 18:37:34 -0500 |
commit | af9081ae64b941d32239b947882cd59ba855c5db (patch) | |
tree | 1a9db6734a8ded75c20da0b99fa5c85449f70f3e /arch/arm/mach-sa1100 | |
parent | 5dd7bf59e0e8563265b3e5b33276099ef628fcc7 (diff) |
ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.
Make use of memory resources rather than hardcoded IO adresses.
This is a first step towards DT support.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r-- | arch/arm/mach-sa1100/assabet.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/cerf.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/collie.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/lart.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/shannon.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/simpad.c | 10 |
7 files changed, 66 insertions, 1 deletions
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index 14b31f116ef9..96a162c2e41d 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -253,6 +253,17 @@ static void __init assabet_init(void) | |||
253 | sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources, | 253 | sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources, |
254 | ARRAY_SIZE(assabet_flash_resources)); | 254 | ARRAY_SIZE(assabet_flash_resources)); |
255 | sa11x0_register_irda(&assabet_irda_data); | 255 | sa11x0_register_irda(&assabet_irda_data); |
256 | |||
257 | /* | ||
258 | * Setup the PPC unit correctly. | ||
259 | */ | ||
260 | PPDR &= ~PPC_RXD4; | ||
261 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
262 | PSDR |= PPC_RXD4; | ||
263 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
264 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
265 | |||
266 | ASSABET_BCR_set(ASSABET_BCR_CODEC_RST); | ||
256 | sa11x0_register_mcp(&assabet_mcp_data); | 267 | sa11x0_register_mcp(&assabet_mcp_data); |
257 | } | 268 | } |
258 | 269 | ||
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index b7db7cd08305..6f7e19d4e657 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c | |||
@@ -131,6 +131,16 @@ static void __init cerf_init(void) | |||
131 | { | 131 | { |
132 | platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); | 132 | platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); |
133 | sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); | 133 | sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); |
134 | |||
135 | /* | ||
136 | * Setup the PPC unit correctly. | ||
137 | */ | ||
138 | PPDR &= ~PPC_RXD4; | ||
139 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
140 | PSDR |= PPC_RXD4; | ||
141 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
142 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
143 | |||
134 | sa11x0_register_mcp(&cerf_mcp_data); | 144 | sa11x0_register_mcp(&cerf_mcp_data); |
135 | } | 145 | } |
136 | 146 | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index b0b5efee683b..b5d28d1491d8 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -357,6 +357,16 @@ static void __init collie_init(void) | |||
357 | 357 | ||
358 | sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, | 358 | sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, |
359 | ARRAY_SIZE(collie_flash_resources)); | 359 | ARRAY_SIZE(collie_flash_resources)); |
360 | |||
361 | /* | ||
362 | * Setup the PPC unit correctly. | ||
363 | */ | ||
364 | PPDR &= ~PPC_RXD4; | ||
365 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
366 | PSDR |= PPC_RXD4; | ||
367 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
368 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
369 | |||
360 | sa11x0_register_mcp(&collie_mcp_data); | 370 | sa11x0_register_mcp(&collie_mcp_data); |
361 | 371 | ||
362 | sharpsl_save_param(); | 372 | sharpsl_save_param(); |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 5fa5ae1f39e1..4dc0bf90a993 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -206,10 +206,15 @@ static struct platform_device sa11x0uart3_device = { | |||
206 | static struct resource sa11x0mcp_resources[] = { | 206 | static struct resource sa11x0mcp_resources[] = { |
207 | [0] = { | 207 | [0] = { |
208 | .start = __PREG(Ser4MCCR0), | 208 | .start = __PREG(Ser4MCCR0), |
209 | .end = __PREG(Ser4MCCR0) + 0xffff, | 209 | .end = __PREG(Ser4MCCR0) + 0x1C - 1, |
210 | .flags = IORESOURCE_MEM, | 210 | .flags = IORESOURCE_MEM, |
211 | }, | 211 | }, |
212 | [1] = { | 212 | [1] = { |
213 | .start = __PREG(Ser4MCCR1), | ||
214 | .end = __PREG(Ser4MCCR1) + 0x4 - 1, | ||
215 | .flags = IORESOURCE_MEM, | ||
216 | }, | ||
217 | [2] = { | ||
213 | .start = IRQ_Ser4MCP, | 218 | .start = IRQ_Ser4MCP, |
214 | .end = IRQ_Ser4MCP, | 219 | .end = IRQ_Ser4MCP, |
215 | .flags = IORESOURCE_IRQ, | 220 | .flags = IORESOURCE_IRQ, |
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index 34bbdd986e43..b9d5bcb8870e 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
@@ -29,6 +29,15 @@ static struct mcp_plat_data lart_mcp_data = { | |||
29 | 29 | ||
30 | static void __init lart_init(void) | 30 | static void __init lart_init(void) |
31 | { | 31 | { |
32 | /* | ||
33 | * Setup the PPC unit correctly. | ||
34 | */ | ||
35 | PPDR &= ~PPC_RXD4; | ||
36 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
37 | PSDR |= PPC_RXD4; | ||
38 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
39 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
40 | |||
32 | sa11x0_register_mcp(&lart_mcp_data); | 41 | sa11x0_register_mcp(&lart_mcp_data); |
33 | } | 42 | } |
34 | 43 | ||
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index 252faa5e2395..5aaac5b6763e 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c | |||
@@ -61,6 +61,16 @@ static struct mcp_plat_data shannon_mcp_data = { | |||
61 | static void __init shannon_init(void) | 61 | static void __init shannon_init(void) |
62 | { | 62 | { |
63 | sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); | 63 | sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); |
64 | |||
65 | /* | ||
66 | * Setup the PPC unit correctly. | ||
67 | */ | ||
68 | PPDR &= ~PPC_RXD4; | ||
69 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
70 | PSDR |= PPC_RXD4; | ||
71 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
72 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
73 | |||
64 | sa11x0_register_mcp(&shannon_mcp_data); | 74 | sa11x0_register_mcp(&shannon_mcp_data); |
65 | } | 75 | } |
66 | 76 | ||
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index 7eac8ebab94e..d50288c3cf64 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
@@ -384,6 +384,16 @@ static int __init simpad_init(void) | |||
384 | 384 | ||
385 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, | 385 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, |
386 | ARRAY_SIZE(simpad_flash_resources)); | 386 | ARRAY_SIZE(simpad_flash_resources)); |
387 | |||
388 | /* | ||
389 | * Setup the PPC unit correctly. | ||
390 | */ | ||
391 | PPDR &= ~PPC_RXD4; | ||
392 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
393 | PSDR |= PPC_RXD4; | ||
394 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
395 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
396 | |||
387 | sa11x0_register_mcp(&simpad_mcp_data); | 397 | sa11x0_register_mcp(&simpad_mcp_data); |
388 | 398 | ||
389 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 399 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |