aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c6
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-mityomapl138.c6
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c6
-rw-r--r--arch/arm/mach-davinci/board-omapl138-hawk.c6
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c6
-rw-r--r--arch/arm/mach-davinci/davinci.h5
-rw-r--r--arch/arm/mach-davinci/devices-tnetv107x.c2
-rw-r--r--arch/arm/mach-davinci/dm355.c2
-rw-r--r--arch/arm/mach-davinci/dm365.c2
-rw-r--r--arch/arm/mach-davinci/dm644x.c2
-rw-r--r--arch/arm/mach-davinci/dm646x.c2
-rw-r--r--arch/arm/mach-davinci/include/mach/serial.h9
-rw-r--r--arch/arm/mach-davinci/include/mach/tnetv107x.h1
-rw-r--r--arch/arm/mach-davinci/serial.c11
20 files changed, 28 insertions, 74 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 1332de8c52c9..c4bdc0a1c36e 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -185,10 +185,6 @@ static __init void da830_evm_usb_init(void)
185 __func__, ret); 185 __func__, ret);
186} 186}
187 187
188static struct davinci_uart_config da830_evm_uart_config __initdata = {
189 .enabled_uarts = 0x7,
190};
191
192static const short da830_evm_mcasp1_pins[] = { 188static const short da830_evm_mcasp1_pins[] = {
193 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1, DA830_AHCLKR1, DA830_AFSR1, 189 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1, DA830_AHCLKR1, DA830_AFSR1,
194 DA830_AMUTE1, DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_5, 190 DA830_AMUTE1, DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_5,
@@ -630,7 +626,7 @@ static __init void da830_evm_init(void)
630 pr_warning("da830_evm_init: watchdog registration failed: %d\n", 626 pr_warning("da830_evm_init: watchdog registration failed: %d\n",
631 ret); 627 ret);
632 628
633 davinci_serial_init(&da830_evm_uart_config); 629 davinci_serial_init(da8xx_serial_device);
634 i2c_register_board_info(1, da830_evm_i2c_devices, 630 i2c_register_board_info(1, da830_evm_i2c_devices,
635 ARRAY_SIZE(da830_evm_i2c_devices)); 631 ARRAY_SIZE(da830_evm_i2c_devices));
636 632
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index bea6793a7ede..9afd687f9e30 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -746,10 +746,6 @@ static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
746 .bus_delay = 0, /* usec */ 746 .bus_delay = 0, /* usec */
747}; 747};
748 748
749static struct davinci_uart_config da850_evm_uart_config __initdata = {
750 .enabled_uarts = 0x7,
751};
752
753/* davinci da850 evm audio machine driver */ 749/* davinci da850 evm audio machine driver */
754static u8 da850_iis_serializer_direction[] = { 750static u8 da850_iis_serializer_direction[] = {
755 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, 751 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
@@ -1494,7 +1490,7 @@ static __init void da850_evm_init(void)
1494 __func__, ret); 1490 __func__, ret);
1495 } 1491 }
1496 1492
1497 davinci_serial_init(&da850_evm_uart_config); 1493 davinci_serial_init(da8xx_serial_device);
1498 1494
1499 i2c_register_board_info(1, da850_evm_i2c_devices, 1495 i2c_register_board_info(1, da850_evm_i2c_devices,
1500 ARRAY_SIZE(da850_evm_i2c_devices)); 1496 ARRAY_SIZE(da850_evm_i2c_devices));
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index c2a0a67d09e0..42b23a3194a0 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -314,10 +314,6 @@ static struct platform_device *davinci_evm_devices[] __initdata = {
314 &davinci_nand_device, 314 &davinci_nand_device,
315}; 315};
316 316
317static struct davinci_uart_config uart_config __initdata = {
318 .enabled_uarts = (1 << 0),
319};
320
321static void __init dm355_evm_map_io(void) 317static void __init dm355_evm_map_io(void)
322{ 318{
323 dm355_init(); 319 dm355_init();
@@ -393,7 +389,7 @@ static __init void dm355_evm_init(void)
393 platform_add_devices(davinci_evm_devices, 389 platform_add_devices(davinci_evm_devices,
394 ARRAY_SIZE(davinci_evm_devices)); 390 ARRAY_SIZE(davinci_evm_devices));
395 evm_init_i2c(); 391 evm_init_i2c();
396 davinci_serial_init(&uart_config); 392 davinci_serial_init(dm355_serial_device);
397 393
398 /* NOTE: NAND flash timings set by the UBL are slower than 394 /* NOTE: NAND flash timings set by the UBL are slower than
399 * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204 395 * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index dff4ddc5ef81..d9eb1c9bb56a 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -172,10 +172,6 @@ static struct platform_device *davinci_leopard_devices[] __initdata = {
172 &davinci_nand_device, 172 &davinci_nand_device,
173}; 173};
174 174
175static struct davinci_uart_config uart_config __initdata = {
176 .enabled_uarts = (1 << 0),
177};
178
179static void __init dm355_leopard_map_io(void) 175static void __init dm355_leopard_map_io(void)
180{ 176{
181 dm355_init(); 177 dm355_init();
@@ -251,7 +247,7 @@ static __init void dm355_leopard_init(void)
251 platform_add_devices(davinci_leopard_devices, 247 platform_add_devices(davinci_leopard_devices,
252 ARRAY_SIZE(davinci_leopard_devices)); 248 ARRAY_SIZE(davinci_leopard_devices));
253 leopard_init_i2c(); 249 leopard_init_i2c();
254 davinci_serial_init(&uart_config); 250 davinci_serial_init(dm355_serial_device);
255 251
256 /* NOTE: NAND flash timings set by the UBL are slower than 252 /* NOTE: NAND flash timings set by the UBL are slower than
257 * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204 253 * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index afbc439f11d4..000e2ab8ff3d 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -718,10 +718,6 @@ fail:
718 /* REVISIT export switches: NTSC/PAL (SW5.6), EXTRA1 (SW5.2), etc */ 718 /* REVISIT export switches: NTSC/PAL (SW5.6), EXTRA1 (SW5.2), etc */
719} 719}
720 720
721static struct davinci_uart_config uart_config __initdata = {
722 .enabled_uarts = (1 << 0),
723};
724
725static void __init dm365_evm_map_io(void) 721static void __init dm365_evm_map_io(void)
726{ 722{
727 dm365_init(); 723 dm365_init();
@@ -748,7 +744,7 @@ static struct spi_board_info dm365_evm_spi_info[] __initconst = {
748static __init void dm365_evm_init(void) 744static __init void dm365_evm_init(void)
749{ 745{
750 evm_init_i2c(); 746 evm_init_i2c();
751 davinci_serial_init(&uart_config); 747 davinci_serial_init(dm365_serial_device);
752 748
753 dm365evm_emac_configure(); 749 dm365evm_emac_configure();
754 dm365evm_mmc_configure(); 750 dm365evm_mmc_configure();
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index a33686a6fbb2..462812b37e4d 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -726,10 +726,6 @@ static struct platform_device *davinci_evm_devices[] __initdata = {
726 &rtc_dev, 726 &rtc_dev,
727}; 727};
728 728
729static struct davinci_uart_config uart_config __initdata = {
730 .enabled_uarts = (1 << 0),
731};
732
733static void __init 729static void __init
734davinci_evm_map_io(void) 730davinci_evm_map_io(void)
735{ 731{
@@ -791,7 +787,7 @@ static __init void davinci_evm_init(void)
791 davinci_setup_mmc(0, &dm6446evm_mmc_config); 787 davinci_setup_mmc(0, &dm6446evm_mmc_config);
792 dm644x_init_video(&dm644xevm_capture_cfg, &dm644xevm_display_cfg); 788 dm644x_init_video(&dm644xevm_capture_cfg, &dm644xevm_display_cfg);
793 789
794 davinci_serial_init(&uart_config); 790 davinci_serial_init(dm644x_serial_device);
795 dm644x_init_asp(&dm644x_evm_snd_data); 791 dm644x_init_asp(&dm644x_evm_snd_data);
796 792
797 /* irlml6401 switches over 1A, in under 8 msec */ 793 /* irlml6401 switches over 1A, in under 8 msec */
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index fbb8e5ab1dc1..734cc0272519 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -749,10 +749,6 @@ static void __init davinci_map_io(void)
749 cdce_clk_init(); 749 cdce_clk_init();
750} 750}
751 751
752static struct davinci_uart_config uart_config __initdata = {
753 .enabled_uarts = (1 << 0),
754};
755
756#define DM646X_EVM_PHY_ID "davinci_mdio-0:01" 752#define DM646X_EVM_PHY_ID "davinci_mdio-0:01"
757/* 753/*
758 * The following EDMA channels/slots are not being used by drivers (for 754 * The following EDMA channels/slots are not being used by drivers (for
@@ -792,7 +788,7 @@ static __init void evm_init(void)
792 struct davinci_soc_info *soc_info = &davinci_soc_info; 788 struct davinci_soc_info *soc_info = &davinci_soc_info;
793 789
794 evm_init_i2c(); 790 evm_init_i2c();
795 davinci_serial_init(&uart_config); 791 davinci_serial_init(dm646x_serial_device);
796 dm646x_init_mcasp0(&dm646x_evm_snd_data[0]); 792 dm646x_init_mcasp0(&dm646x_evm_snd_data[0]);
797 dm646x_init_mcasp1(&dm646x_evm_snd_data[1]); 793 dm646x_init_mcasp1(&dm646x_evm_snd_data[1]);
798 794
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 9549d53aa63f..cd0f58730c2b 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -434,10 +434,6 @@ static void __init mityomapl138_setup_nand(void)
434 ARRAY_SIZE(mityomapl138_devices)); 434 ARRAY_SIZE(mityomapl138_devices));
435} 435}
436 436
437static struct davinci_uart_config mityomapl138_uart_config __initdata = {
438 .enabled_uarts = 0x7,
439};
440
441static const short mityomap_mii_pins[] = { 437static const short mityomap_mii_pins[] = {
442 DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3, 438 DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
443 DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER, 439 DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER,
@@ -517,7 +513,7 @@ static void __init mityomapl138_init(void)
517 if (ret) 513 if (ret)
518 pr_warning("watchdog registration failed: %d\n", ret); 514 pr_warning("watchdog registration failed: %d\n", ret);
519 515
520 davinci_serial_init(&mityomapl138_uart_config); 516 davinci_serial_init(da8xx_serial_device);
521 517
522 ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata); 518 ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata);
523 if (ret) 519 if (ret)
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 2bc112adf565..8e156e07c5ad 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -153,10 +153,6 @@ static struct platform_device *davinci_ntosd2_devices[] __initdata = {
153 &ntosd2_leds_dev, 153 &ntosd2_leds_dev,
154}; 154};
155 155
156static struct davinci_uart_config uart_config __initdata = {
157 .enabled_uarts = (1 << 0),
158};
159
160static void __init davinci_ntosd2_map_io(void) 156static void __init davinci_ntosd2_map_io(void)
161{ 157{
162 dm644x_init(); 158 dm644x_init();
@@ -197,7 +193,7 @@ static __init void davinci_ntosd2_init(void)
197 platform_add_devices(davinci_ntosd2_devices, 193 platform_add_devices(davinci_ntosd2_devices,
198 ARRAY_SIZE(davinci_ntosd2_devices)); 194 ARRAY_SIZE(davinci_ntosd2_devices));
199 195
200 davinci_serial_init(&uart_config); 196 davinci_serial_init(dm644x_serial_device);
201 dm644x_init_asp(&dm644x_ntosd2_snd_data); 197 dm644x_init_asp(&dm644x_ntosd2_snd_data);
202 198
203 soc_info->emac_pdata->phy_id = NEUROS_OSD2_PHY_ID; 199 soc_info->emac_pdata->phy_id = NEUROS_OSD2_PHY_ID;
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index b8c20de10ca2..ab98c75cabb4 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -286,15 +286,11 @@ usb11_setup_oc_fail:
286 gpio_free(DA850_USB1_VBUS_PIN); 286 gpio_free(DA850_USB1_VBUS_PIN);
287} 287}
288 288
289static struct davinci_uart_config omapl138_hawk_uart_config __initdata = {
290 .enabled_uarts = 0x7,
291};
292
293static __init void omapl138_hawk_init(void) 289static __init void omapl138_hawk_init(void)
294{ 290{
295 int ret; 291 int ret;
296 292
297 davinci_serial_init(&omapl138_hawk_uart_config); 293 davinci_serial_init(da8xx_serial_device);
298 294
299 omapl138_hawk_config_emac(); 295 omapl138_hawk_config_emac();
300 296
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 513eee14f77d..d84360148100 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -125,10 +125,6 @@ static struct platform_device *davinci_sffsdr_devices[] __initdata = {
125 &davinci_sffsdr_nandflash_device, 125 &davinci_sffsdr_nandflash_device,
126}; 126};
127 127
128static struct davinci_uart_config uart_config __initdata = {
129 .enabled_uarts = (1 << 0),
130};
131
132static void __init davinci_sffsdr_map_io(void) 128static void __init davinci_sffsdr_map_io(void)
133{ 129{
134 dm644x_init(); 130 dm644x_init();
@@ -141,7 +137,7 @@ static __init void davinci_sffsdr_init(void)
141 platform_add_devices(davinci_sffsdr_devices, 137 platform_add_devices(davinci_sffsdr_devices,
142 ARRAY_SIZE(davinci_sffsdr_devices)); 138 ARRAY_SIZE(davinci_sffsdr_devices));
143 sffsdr_init_i2c(); 139 sffsdr_init_i2c();
144 davinci_serial_init(&uart_config); 140 davinci_serial_init(dm644x_serial_device);
145 soc_info->emac_pdata->phy_id = SFFSDR_PHY_ID; 141 soc_info->emac_pdata->phy_id = SFFSDR_PHY_ID;
146 davinci_setup_usb(0, 0); /* We support only peripheral mode. */ 142 davinci_setup_usb(0, 0); /* We support only peripheral mode. */
147 143
diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h
index a883043d0820..2ab5d577186f 100644
--- a/arch/arm/mach-davinci/davinci.h
+++ b/arch/arm/mach-davinci/davinci.h
@@ -106,4 +106,9 @@ int dm646x_init_edma(struct edma_rsv_info *rsv);
106void dm646x_video_init(void); 106void dm646x_video_init(void);
107void dm646x_setup_vpif(struct vpif_display_config *, 107void dm646x_setup_vpif(struct vpif_display_config *,
108 struct vpif_capture_config *); 108 struct vpif_capture_config *);
109
110extern struct platform_device dm365_serial_device[];
111extern struct platform_device dm355_serial_device[];
112extern struct platform_device dm644x_serial_device[];
113extern struct platform_device dm646x_serial_device[];
109#endif /*__DAVINCI_H */ 114#endif /*__DAVINCI_H */
diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c
index fc4a0feb4a47..01d8686e553c 100644
--- a/arch/arm/mach-davinci/devices-tnetv107x.c
+++ b/arch/arm/mach-davinci/devices-tnetv107x.c
@@ -410,7 +410,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info)
410 platform_device_register(&tsc_device); 410 platform_device_register(&tsc_device);
411 411
412 if (info->serial_config) 412 if (info->serial_config)
413 davinci_serial_init(info->serial_config); 413 davinci_serial_init(tnetv107x_serial_device);
414 414
415 for (i = 0; i < 2; i++) 415 for (i = 0; i < 2; i++)
416 if (info->mmc_config[i]) { 416 if (info->mmc_config[i]) {
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 29fdbae16995..85367350e3d9 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -962,7 +962,7 @@ static struct plat_serial8250_port dm355_serial2_platform_data[] = {
962 } 962 }
963}; 963};
964 964
965static struct platform_device dm355_serial_device[] = { 965struct platform_device dm355_serial_device[] = {
966 { 966 {
967 .name = "serial8250", 967 .name = "serial8250",
968 .id = PLAT8250_DEV_PLATFORM, 968 .id = PLAT8250_DEV_PLATFORM,
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index b60118989f0c..fa5c693cf16b 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -1068,7 +1068,7 @@ static struct plat_serial8250_port dm365_serial1_platform_data[] = {
1068 } 1068 }
1069}; 1069};
1070 1070
1071static struct platform_device dm365_serial_device[] = { 1071struct platform_device dm365_serial_device[] = {
1072 { 1072 {
1073 .name = "serial8250", 1073 .name = "serial8250",
1074 .id = PLAT8250_DEV_PLATFORM, 1074 .id = PLAT8250_DEV_PLATFORM,
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 490eb8cd1dd3..3969289416a5 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -853,7 +853,7 @@ static struct plat_serial8250_port dm644x_serial2_platform_data[] = {
853 } 853 }
854}; 854};
855 855
856static struct platform_device dm644x_serial_device[] = { 856struct platform_device dm644x_serial_device[] = {
857 { 857 {
858 .name = "serial8250", 858 .name = "serial8250",
859 .id = PLAT8250_DEV_PLATFORM, 859 .id = PLAT8250_DEV_PLATFORM,
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 23609b1141fe..331a9ec8e7f2 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -830,7 +830,7 @@ static struct plat_serial8250_port dm646x_serial2_platform_data[] = {
830 } 830 }
831}; 831};
832 832
833static struct platform_device dm646x_serial_device[] = { 833struct platform_device dm646x_serial_device[] = {
834 { 834 {
835 .name = "serial8250", 835 .name = "serial8250",
836 .id = PLAT8250_DEV_PLATFORM, 836 .id = PLAT8250_DEV_PLATFORM,
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h
index 62ad300440f5..36bf59155f4b 100644
--- a/arch/arm/mach-davinci/include/mach/serial.h
+++ b/arch/arm/mach-davinci/include/mach/serial.h
@@ -15,6 +15,8 @@
15 15
16#include <mach/hardware.h> 16#include <mach/hardware.h>
17 17
18#include <linux/platform_device.h>
19
18#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) 20#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
19#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) 21#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
20#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800) 22#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800)
@@ -37,12 +39,7 @@
37#define UART_DM646X_SCR_TX_WATERMARK 0x08 39#define UART_DM646X_SCR_TX_WATERMARK 0x08
38 40
39#ifndef __ASSEMBLY__ 41#ifndef __ASSEMBLY__
40struct davinci_uart_config { 42extern int davinci_serial_init(struct platform_device *);
41 /* Bit field of UARTs present; bit 0 --> UART0 */
42 unsigned int enabled_uarts;
43};
44
45extern int davinci_serial_init(struct davinci_uart_config *);
46extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate); 43extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate);
47#endif 44#endif
48 45
diff --git a/arch/arm/mach-davinci/include/mach/tnetv107x.h b/arch/arm/mach-davinci/include/mach/tnetv107x.h
index beb7c0e9114d..494fcf5ccfe1 100644
--- a/arch/arm/mach-davinci/include/mach/tnetv107x.h
+++ b/arch/arm/mach-davinci/include/mach/tnetv107x.h
@@ -42,7 +42,6 @@
42#include <mach/serial.h> 42#include <mach/serial.h>
43 43
44struct tnetv107x_device_info { 44struct tnetv107x_device_info {
45 struct davinci_uart_config *serial_config;
46 struct davinci_mmc_config *mmc_config[2]; /* 2 controllers */ 45 struct davinci_mmc_config *mmc_config[2]; /* 2 controllers */
47 struct davinci_nand_pdata *nand_config[4]; /* 4 chipsels */ 46 struct davinci_nand_pdata *nand_config[4]; /* 4 chipsels */
48 struct matrix_keypad_platform_data *keypad_config; 47 struct matrix_keypad_platform_data *keypad_config;
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c
index 2bc74c2a8d45..45bd41a924db 100644
--- a/arch/arm/mach-davinci/serial.c
+++ b/arch/arm/mach-davinci/serial.c
@@ -92,10 +92,9 @@ int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate)
92 return 0; 92 return 0;
93} 93}
94 94
95int __init davinci_serial_init(struct davinci_uart_config *info) 95int __init davinci_serial_init(struct platform_device *serial_dev)
96{ 96{
97 int i, ret = 0; 97 int i, ret = 0;
98 struct davinci_soc_info *soc_info = &davinci_soc_info;
99 struct device *dev; 98 struct device *dev;
100 struct plat_serial8250_port *p; 99 struct plat_serial8250_port *p;
101 100
@@ -103,13 +102,11 @@ int __init davinci_serial_init(struct davinci_uart_config *info)
103 * Make sure the serial ports are muxed on at this point. 102 * Make sure the serial ports are muxed on at this point.
104 * You have to mux them off in device drivers later on if not needed. 103 * You have to mux them off in device drivers later on if not needed.
105 */ 104 */
106 for (i = 0; soc_info->serial_dev[i].dev.platform_data != NULL; i++) { 105 for (i = 0; serial_dev[i].dev.platform_data != NULL; i++) {
107 dev = &soc_info->serial_dev[i].dev; 106 dev = &serial_dev[i].dev;
108 p = dev->platform_data; 107 p = dev->platform_data;
109 if (!(info->enabled_uarts & (1 << i)))
110 continue;
111 108
112 ret = platform_device_register(&soc_info->serial_dev[i]); 109 ret = platform_device_register(&serial_dev[i]);
113 if (ret) 110 if (ret)
114 continue; 111 continue;
115 112