aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-20 17:24:07 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-03 12:38:02 -0500
commite36e26a8b761d1a601e284e2b5d8aff84de3b756 (patch)
tree45b13e9d5363036576fdefaeca5681db5a08cb1d /arch/arm
parent7658e7f9a8122b0678e4b4280308560aa5444bd5 (diff)
MFD: mcp-sa11x0: move setup of PPC unit out of mcp-sa11x0.c
Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.) by Jochen Friedrich <jochen@scram.de>, and consolidated to use a common function. Move the setup of the PPC unit out of mcp-sa11x0 into the core SA11x0 code, and call it from each platforms initialization file. This centralizes the setup of the PPC unit while not polluting the mcp-sa11x0 driver with these details. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-sa1100/assabet.c2
-rw-r--r--arch/arm/mach-sa1100/cerf.c1
-rw-r--r--arch/arm/mach-sa1100/collie.c2
-rw-r--r--arch/arm/mach-sa1100/generic.c10
-rw-r--r--arch/arm/mach-sa1100/generic.h1
-rw-r--r--arch/arm/mach-sa1100/lart.c1
-rw-r--r--arch/arm/mach-sa1100/shannon.c1
-rw-r--r--arch/arm/mach-sa1100/simpad.c1
8 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 0c4b76ab4d8e..3a1914568374 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -231,6 +231,8 @@ static void __init assabet_init(void)
231 PPDR |= PPC_TXD3 | PPC_TXD1; 231 PPDR |= PPC_TXD3 | PPC_TXD1;
232 PPSR |= PPC_TXD3 | PPC_TXD1; 232 PPSR |= PPC_TXD3 | PPC_TXD1;
233 233
234 sa11x0_ppc_configure_mcp();
235
234 sa1100fb_lcd_power = assabet_lcd_power; 236 sa1100fb_lcd_power = assabet_lcd_power;
235 sa1100fb_backlight_power = assabet_backlight_power; 237 sa1100fb_backlight_power = assabet_backlight_power;
236 238
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 11bb6d0b9be3..bc11879f80c8 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -128,6 +128,7 @@ static struct mcp_plat_data cerf_mcp_data = {
128 128
129static void __init cerf_init(void) 129static void __init cerf_init(void)
130{ 130{
131 sa11x0_ppc_configure_mcp();
131 platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); 132 platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices));
132 sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); 133 sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1);
133 sa11x0_register_mcp(&cerf_mcp_data); 134 sa11x0_register_mcp(&cerf_mcp_data);
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index b9060e236def..efa2bc132cbf 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -341,6 +341,8 @@ static void __init collie_init(void)
341 341
342 GPSR |= _COLLIE_GPIO_UCB1x00_RESET; 342 GPSR |= _COLLIE_GPIO_UCB1x00_RESET;
343 343
344 sa11x0_ppc_configure_mcp();
345
344 346
345 platform_scoop_config = &collie_pcmcia_config; 347 platform_scoop_config = &collie_pcmcia_config;
346 348
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 480d2ea46b00..1416094cc013 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -240,6 +240,16 @@ static struct platform_device sa11x0mcp_device = {
240 .resource = sa11x0mcp_resources, 240 .resource = sa11x0mcp_resources,
241}; 241};
242 242
243void __init sa11x0_ppc_configure_mcp(void)
244{
245 /* Setup the PPC unit for the MCP */
246 PPDR &= ~PPC_RXD4;
247 PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
248 PSDR |= PPC_RXD4;
249 PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
250 PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
251}
252
243void sa11x0_register_mcp(struct mcp_plat_data *data) 253void sa11x0_register_mcp(struct mcp_plat_data *data)
244{ 254{
245 sa11x0_register_device(&sa11x0mcp_device, data); 255 sa11x0_register_device(&sa11x0mcp_device, data);
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 33268cf6be36..9236ff42bd1f 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -39,4 +39,5 @@ struct irda_platform_data;
39void sa11x0_register_irda(struct irda_platform_data *irda); 39void sa11x0_register_irda(struct irda_platform_data *irda);
40 40
41struct mcp_plat_data; 41struct mcp_plat_data;
42void sa11x0_ppc_configure_mcp(void);
42void sa11x0_register_mcp(struct mcp_plat_data *data); 43void sa11x0_register_mcp(struct mcp_plat_data *data);
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index af4e2761f3db..eba64b781500 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -28,6 +28,7 @@ static struct mcp_plat_data lart_mcp_data = {
28 28
29static void __init lart_init(void) 29static void __init lart_init(void)
30{ 30{
31 sa11x0_ppc_configure_mcp();
31 sa11x0_register_mcp(&lart_mcp_data); 32 sa11x0_register_mcp(&lart_mcp_data);
32} 33}
33 34
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 318b2b766a0b..3efb4ac62240 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -59,6 +59,7 @@ static struct mcp_plat_data shannon_mcp_data = {
59 59
60static void __init shannon_init(void) 60static void __init shannon_init(void)
61{ 61{
62 sa11x0_ppc_configure_mcp();
62 sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); 63 sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1);
63 sa11x0_register_mcp(&shannon_mcp_data); 64 sa11x0_register_mcp(&shannon_mcp_data);
64} 65}
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index e17c04d6e324..3aa36ec21039 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -376,6 +376,7 @@ static int __init simpad_init(void)
376 376
377 pm_power_off = simpad_power_off; 377 pm_power_off = simpad_power_off;
378 378
379 sa11x0_ppc_configure_mcp();
379 sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, 380 sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources,
380 ARRAY_SIZE(simpad_flash_resources)); 381 ARRAY_SIZE(simpad_flash_resources));
381 sa11x0_register_mcp(&simpad_mcp_data); 382 sa11x0_register_mcp(&simpad_mcp_data);