diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-25 18:56:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-25 18:57:10 -0400 |
commit | 7256ecc2b7b91b4212ccc5511cb12254bdf806d0 (patch) | |
tree | 1a39b3de03cfc92c5b5dedfb01174d17b49df18a /arch/arm/mach-sa1100 | |
parent | 18bbff9f679cd470db66402fdb9c577b34324183 (diff) | |
parent | 6ed3e2acc7995625625592abe8cd3383c34a471b (diff) |
Merge branch 'sa11x0-mcp' into sa11x0
Conflicts:
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/shannon.c
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r-- | arch/arm/mach-sa1100/assabet.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/cerf.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/collie.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/mcp.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/lart.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/shannon.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/simpad.c | 8 |
9 files changed, 49 insertions, 4 deletions
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index c3f5064df4bf..e708a93a7ddb 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/mfd/ucb1x00.h> | ||
18 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
@@ -71,6 +72,12 @@ void ASSABET_BCR_frob(unsigned int mask, unsigned int val) | |||
71 | 72 | ||
72 | EXPORT_SYMBOL(ASSABET_BCR_frob); | 73 | EXPORT_SYMBOL(ASSABET_BCR_frob); |
73 | 74 | ||
75 | static void assabet_ucb1x00_reset(enum ucb1x00_reset state) | ||
76 | { | ||
77 | if (state == UCB_RST_PROBE) | ||
78 | ASSABET_BCR_set(ASSABET_BCR_CODEC_RST); | ||
79 | } | ||
80 | |||
74 | 81 | ||
75 | /* | 82 | /* |
76 | * Assabet flash support code. | 83 | * Assabet flash support code. |
@@ -167,9 +174,15 @@ static struct irda_platform_data assabet_irda_data = { | |||
167 | .set_speed = assabet_irda_set_speed, | 174 | .set_speed = assabet_irda_set_speed, |
168 | }; | 175 | }; |
169 | 176 | ||
177 | static struct ucb1x00_plat_data assabet_ucb1x00_data = { | ||
178 | .reset = assabet_ucb1x00_reset, | ||
179 | .gpio_base = -1, | ||
180 | }; | ||
181 | |||
170 | static struct mcp_plat_data assabet_mcp_data = { | 182 | static struct mcp_plat_data assabet_mcp_data = { |
171 | .mccr0 = MCCR0_ADM, | 183 | .mccr0 = MCCR0_ADM, |
172 | .sclk_rate = 11981000, | 184 | .sclk_rate = 11981000, |
185 | .codec_pdata = &assabet_ucb1x00_data, | ||
173 | }; | 186 | }; |
174 | 187 | ||
175 | static void assabet_lcd_set_visual(u32 visual) | 188 | static void assabet_lcd_set_visual(u32 visual) |
@@ -309,6 +322,8 @@ static void __init assabet_init(void) | |||
309 | PPDR |= PPC_TXD3 | PPC_TXD1; | 322 | PPDR |= PPC_TXD3 | PPC_TXD1; |
310 | PPSR |= PPC_TXD3 | PPC_TXD1; | 323 | PPSR |= PPC_TXD3 | PPC_TXD1; |
311 | 324 | ||
325 | sa11x0_ppc_configure_mcp(); | ||
326 | |||
312 | if (machine_has_neponset()) { | 327 | if (machine_has_neponset()) { |
313 | /* | 328 | /* |
314 | * Angel sets this, but other bootloaders may not. | 329 | * Angel sets this, but other bootloaders may not. |
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index c2f9ba3a9578..8015604cfc22 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c | |||
@@ -121,6 +121,7 @@ static struct mcp_plat_data cerf_mcp_data = { | |||
121 | 121 | ||
122 | static void __init cerf_init(void) | 122 | static void __init cerf_init(void) |
123 | { | 123 | { |
124 | sa11x0_ppc_configure_mcp(); | ||
124 | platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); | 125 | platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); |
125 | sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); | 126 | sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); |
126 | sa11x0_register_mcp(&cerf_mcp_data); | 127 | sa11x0_register_mcp(&cerf_mcp_data); |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 841041e11815..d4339d639475 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/tty.h> | 22 | #include <linux/tty.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/mfd/ucb1x00.h> | ||
25 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
26 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
27 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
@@ -83,10 +84,14 @@ static struct scoop_pcmcia_config collie_pcmcia_config = { | |||
83 | .num_devs = 1, | 84 | .num_devs = 1, |
84 | }; | 85 | }; |
85 | 86 | ||
87 | static struct ucb1x00_plat_data collie_ucb1x00_data = { | ||
88 | .gpio_base = COLLIE_TC35143_GPIO_BASE, | ||
89 | }; | ||
90 | |||
86 | static struct mcp_plat_data collie_mcp_data = { | 91 | static struct mcp_plat_data collie_mcp_data = { |
87 | .mccr0 = MCCR0_ADM | MCCR0_ExtClk, | 92 | .mccr0 = MCCR0_ADM | MCCR0_ExtClk, |
88 | .sclk_rate = 9216000, | 93 | .sclk_rate = 9216000, |
89 | .gpio_base = COLLIE_TC35143_GPIO_BASE, | 94 | .codec_pdata = &collie_ucb1x00_data, |
90 | }; | 95 | }; |
91 | 96 | ||
92 | /* | 97 | /* |
@@ -341,6 +346,10 @@ static void __init collie_init(void) | |||
341 | 346 | ||
342 | collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN); | 347 | collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN); |
343 | collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN); | 348 | collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN); |
349 | |||
350 | sa11x0_ppc_configure_mcp(); | ||
351 | |||
352 | |||
344 | platform_scoop_config = &collie_pcmcia_config; | 353 | platform_scoop_config = &collie_pcmcia_config; |
345 | 354 | ||
346 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 355 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 0296d69622ac..97e9bdf7f297 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -195,7 +195,8 @@ static struct platform_device sa11x0uart3_device = { | |||
195 | 195 | ||
196 | static struct resource sa11x0mcp_resources[] = { | 196 | static struct resource sa11x0mcp_resources[] = { |
197 | [0] = DEFINE_RES_MEM(__PREG(Ser4MCCR0), SZ_64K), | 197 | [0] = DEFINE_RES_MEM(__PREG(Ser4MCCR0), SZ_64K), |
198 | [1] = DEFINE_RES_IRQ(IRQ_Ser4MCP), | 198 | [1] = DEFINE_RES_MEM(__PREG(Ser4MCCR1), 4), |
199 | [2] = DEFINE_RES_IRQ(IRQ_Ser4MCP), | ||
199 | }; | 200 | }; |
200 | 201 | ||
201 | static u64 sa11x0mcp_dma_mask = 0xffffffffUL; | 202 | static u64 sa11x0mcp_dma_mask = 0xffffffffUL; |
@@ -211,6 +212,16 @@ static struct platform_device sa11x0mcp_device = { | |||
211 | .resource = sa11x0mcp_resources, | 212 | .resource = sa11x0mcp_resources, |
212 | }; | 213 | }; |
213 | 214 | ||
215 | void __init sa11x0_ppc_configure_mcp(void) | ||
216 | { | ||
217 | /* Setup the PPC unit for the MCP */ | ||
218 | PPDR &= ~PPC_RXD4; | ||
219 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
220 | PSDR |= PPC_RXD4; | ||
221 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
222 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
223 | } | ||
224 | |||
214 | void sa11x0_register_mcp(struct mcp_plat_data *data) | 225 | void sa11x0_register_mcp(struct mcp_plat_data *data) |
215 | { | 226 | { |
216 | sa11x0_register_device(&sa11x0mcp_device, data); | 227 | sa11x0_register_device(&sa11x0mcp_device, data); |
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h index 5c68be858e0c..9eb3b3cd5a63 100644 --- a/arch/arm/mach-sa1100/generic.h +++ b/arch/arm/mach-sa1100/generic.h | |||
@@ -36,6 +36,7 @@ struct irda_platform_data; | |||
36 | void sa11x0_register_irda(struct irda_platform_data *irda); | 36 | void sa11x0_register_irda(struct irda_platform_data *irda); |
37 | 37 | ||
38 | struct mcp_plat_data; | 38 | struct mcp_plat_data; |
39 | void sa11x0_ppc_configure_mcp(void); | ||
39 | void sa11x0_register_mcp(struct mcp_plat_data *data); | 40 | void sa11x0_register_mcp(struct mcp_plat_data *data); |
40 | 41 | ||
41 | struct sa1100fb_mach_info; | 42 | struct sa1100fb_mach_info; |
diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h index ed1a331508a7..4b2860ae3828 100644 --- a/arch/arm/mach-sa1100/include/mach/mcp.h +++ b/arch/arm/mach-sa1100/include/mach/mcp.h | |||
@@ -16,7 +16,7 @@ struct mcp_plat_data { | |||
16 | u32 mccr0; | 16 | u32 mccr0; |
17 | u32 mccr1; | 17 | u32 mccr1; |
18 | unsigned int sclk_rate; | 18 | unsigned int sclk_rate; |
19 | int gpio_base; | 19 | void *codec_pdata; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #endif | 22 | #endif |
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index 463a322a425b..570f75fb73a2 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
@@ -107,6 +107,7 @@ static void __init lart_init(void) | |||
107 | if (inf) | 107 | if (inf) |
108 | sa11x0_register_lcd(inf); | 108 | sa11x0_register_lcd(inf); |
109 | 109 | ||
110 | sa11x0_ppc_configure_mcp(); | ||
110 | sa11x0_register_mcp(&lart_mcp_data); | 111 | sa11x0_register_mcp(&lart_mcp_data); |
111 | } | 112 | } |
112 | 113 | ||
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index 77b2b9b522ac..08bb1228961f 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c | |||
@@ -72,6 +72,7 @@ static struct sa1100fb_mach_info shannon_lcd_info = { | |||
72 | 72 | ||
73 | static void __init shannon_init(void) | 73 | static void __init shannon_init(void) |
74 | { | 74 | { |
75 | sa11x0_ppc_configure_mcp(); | ||
75 | sa11x0_register_lcd(&shannon_lcd_info); | 76 | sa11x0_register_lcd(&shannon_lcd_info); |
76 | sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); | 77 | sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); |
77 | sa11x0_register_mcp(&shannon_mcp_data); | 78 | sa11x0_register_mcp(&shannon_mcp_data); |
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index cdb9d197c092..3da4c1f11cf5 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/mfd/ucb1x00.h> | ||
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
@@ -180,10 +181,14 @@ static struct resource simpad_flash_resources [] = { | |||
180 | DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_16M), | 181 | DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_16M), |
181 | }; | 182 | }; |
182 | 183 | ||
184 | static struct ucb1x00_plat_data simpad_ucb1x00_data = { | ||
185 | .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, | ||
186 | }; | ||
187 | |||
183 | static struct mcp_plat_data simpad_mcp_data = { | 188 | static struct mcp_plat_data simpad_mcp_data = { |
184 | .mccr0 = MCCR0_ADM, | 189 | .mccr0 = MCCR0_ADM, |
185 | .sclk_rate = 11981000, | 190 | .sclk_rate = 11981000, |
186 | .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, | 191 | .codec_pdata = &simpad_ucb1x00_data, |
187 | }; | 192 | }; |
188 | 193 | ||
189 | 194 | ||
@@ -369,6 +374,7 @@ static int __init simpad_init(void) | |||
369 | 374 | ||
370 | pm_power_off = simpad_power_off; | 375 | pm_power_off = simpad_power_off; |
371 | 376 | ||
377 | sa11x0_ppc_configure_mcp(); | ||
372 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, | 378 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, |
373 | ARRAY_SIZE(simpad_flash_resources)); | 379 | ARRAY_SIZE(simpad_flash_resources)); |
374 | sa11x0_register_mcp(&simpad_mcp_data); | 380 | sa11x0_register_mcp(&simpad_mcp_data); |