Commit fcf7157b authored by Manjunathappa, Prakash's avatar Manjunathappa, Prakash Committed by Sekhar Nori

ARM: davinci: serial: get rid of davinci_uart_config

"struct davinci_uart_config" was introduced to specify
UART ports brought out or enabled on the board. But
none of the boards use it for that purpose and we are
not going to add anymore board files, so remove the
structure.
Signed-off-by: default avatarManjunathappa, Prakash <prakash.pm@ti.com>
Suggested-by: default avatarSekhar Nori <nsekhar@ti.com>
[nsekhar@ti.com: split patch to remove davinci_serial_setup_clk()
		 changes.]
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent 1ae1c2f9
...@@ -185,10 +185,6 @@ static __init void da830_evm_usb_init(void) ...@@ -185,10 +185,6 @@ static __init void da830_evm_usb_init(void)
__func__, ret); __func__, ret);
} }
static struct davinci_uart_config da830_evm_uart_config __initdata = {
.enabled_uarts = 0x7,
};
static const short da830_evm_mcasp1_pins[] = { static const short da830_evm_mcasp1_pins[] = {
DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1, DA830_AHCLKR1, DA830_AFSR1, DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1, DA830_AHCLKR1, DA830_AFSR1,
DA830_AMUTE1, DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_5, 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,7 +626,7 @@ static __init void da830_evm_init(void)
pr_warning("da830_evm_init: watchdog registration failed: %d\n", pr_warning("da830_evm_init: watchdog registration failed: %d\n",
ret); ret);
davinci_serial_init(&da830_evm_uart_config); davinci_serial_init(da8xx_serial_device);
i2c_register_board_info(1, da830_evm_i2c_devices, i2c_register_board_info(1, da830_evm_i2c_devices,
ARRAY_SIZE(da830_evm_i2c_devices)); ARRAY_SIZE(da830_evm_i2c_devices));
......
...@@ -746,10 +746,6 @@ static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { ...@@ -746,10 +746,6 @@ static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
.bus_delay = 0, /* usec */ .bus_delay = 0, /* usec */
}; };
static struct davinci_uart_config da850_evm_uart_config __initdata = {
.enabled_uarts = 0x7,
};
/* davinci da850 evm audio machine driver */ /* davinci da850 evm audio machine driver */
static u8 da850_iis_serializer_direction[] = { static u8 da850_iis_serializer_direction[] = {
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
...@@ -1494,7 +1490,7 @@ static __init void da850_evm_init(void) ...@@ -1494,7 +1490,7 @@ static __init void da850_evm_init(void)
__func__, ret); __func__, ret);
} }
davinci_serial_init(&da850_evm_uart_config); davinci_serial_init(da8xx_serial_device);
i2c_register_board_info(1, da850_evm_i2c_devices, i2c_register_board_info(1, da850_evm_i2c_devices,
ARRAY_SIZE(da850_evm_i2c_devices)); ARRAY_SIZE(da850_evm_i2c_devices));
......
...@@ -314,10 +314,6 @@ static struct platform_device *davinci_evm_devices[] __initdata = { ...@@ -314,10 +314,6 @@ static struct platform_device *davinci_evm_devices[] __initdata = {
&davinci_nand_device, &davinci_nand_device,
}; };
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static void __init dm355_evm_map_io(void) static void __init dm355_evm_map_io(void)
{ {
dm355_init(); dm355_init();
...@@ -393,7 +389,7 @@ static __init void dm355_evm_init(void) ...@@ -393,7 +389,7 @@ static __init void dm355_evm_init(void)
platform_add_devices(davinci_evm_devices, platform_add_devices(davinci_evm_devices,
ARRAY_SIZE(davinci_evm_devices)); ARRAY_SIZE(davinci_evm_devices));
evm_init_i2c(); evm_init_i2c();
davinci_serial_init(&uart_config); davinci_serial_init(dm355_serial_device);
/* NOTE: NAND flash timings set by the UBL are slower than /* NOTE: NAND flash timings set by the UBL are slower than
* needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204 * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204
......
...@@ -172,10 +172,6 @@ static struct platform_device *davinci_leopard_devices[] __initdata = { ...@@ -172,10 +172,6 @@ static struct platform_device *davinci_leopard_devices[] __initdata = {
&davinci_nand_device, &davinci_nand_device,
}; };
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static void __init dm355_leopard_map_io(void) static void __init dm355_leopard_map_io(void)
{ {
dm355_init(); dm355_init();
...@@ -251,7 +247,7 @@ static __init void dm355_leopard_init(void) ...@@ -251,7 +247,7 @@ static __init void dm355_leopard_init(void)
platform_add_devices(davinci_leopard_devices, platform_add_devices(davinci_leopard_devices,
ARRAY_SIZE(davinci_leopard_devices)); ARRAY_SIZE(davinci_leopard_devices));
leopard_init_i2c(); leopard_init_i2c();
davinci_serial_init(&uart_config); davinci_serial_init(dm355_serial_device);
/* NOTE: NAND flash timings set by the UBL are slower than /* NOTE: NAND flash timings set by the UBL are slower than
* needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204 * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204
......
...@@ -718,10 +718,6 @@ static void __init evm_init_cpld(void) ...@@ -718,10 +718,6 @@ static void __init evm_init_cpld(void)
/* REVISIT export switches: NTSC/PAL (SW5.6), EXTRA1 (SW5.2), etc */ /* REVISIT export switches: NTSC/PAL (SW5.6), EXTRA1 (SW5.2), etc */
} }
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static void __init dm365_evm_map_io(void) static void __init dm365_evm_map_io(void)
{ {
dm365_init(); dm365_init();
...@@ -748,7 +744,7 @@ static struct spi_board_info dm365_evm_spi_info[] __initconst = { ...@@ -748,7 +744,7 @@ static struct spi_board_info dm365_evm_spi_info[] __initconst = {
static __init void dm365_evm_init(void) static __init void dm365_evm_init(void)
{ {
evm_init_i2c(); evm_init_i2c();
davinci_serial_init(&uart_config); davinci_serial_init(dm365_serial_device);
dm365evm_emac_configure(); dm365evm_emac_configure();
dm365evm_mmc_configure(); dm365evm_mmc_configure();
......
...@@ -726,10 +726,6 @@ static struct platform_device *davinci_evm_devices[] __initdata = { ...@@ -726,10 +726,6 @@ static struct platform_device *davinci_evm_devices[] __initdata = {
&rtc_dev, &rtc_dev,
}; };
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static void __init static void __init
davinci_evm_map_io(void) davinci_evm_map_io(void)
{ {
...@@ -791,7 +787,7 @@ static __init void davinci_evm_init(void) ...@@ -791,7 +787,7 @@ static __init void davinci_evm_init(void)
davinci_setup_mmc(0, &dm6446evm_mmc_config); davinci_setup_mmc(0, &dm6446evm_mmc_config);
dm644x_init_video(&dm644xevm_capture_cfg, &dm644xevm_display_cfg); dm644x_init_video(&dm644xevm_capture_cfg, &dm644xevm_display_cfg);
davinci_serial_init(&uart_config); davinci_serial_init(dm644x_serial_device);
dm644x_init_asp(&dm644x_evm_snd_data); dm644x_init_asp(&dm644x_evm_snd_data);
/* irlml6401 switches over 1A, in under 8 msec */ /* irlml6401 switches over 1A, in under 8 msec */
......
...@@ -749,10 +749,6 @@ static void __init davinci_map_io(void) ...@@ -749,10 +749,6 @@ static void __init davinci_map_io(void)
cdce_clk_init(); cdce_clk_init();
} }
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
#define DM646X_EVM_PHY_ID "davinci_mdio-0:01" #define DM646X_EVM_PHY_ID "davinci_mdio-0:01"
/* /*
* The following EDMA channels/slots are not being used by drivers (for * The following EDMA channels/slots are not being used by drivers (for
...@@ -792,7 +788,7 @@ static __init void evm_init(void) ...@@ -792,7 +788,7 @@ static __init void evm_init(void)
struct davinci_soc_info *soc_info = &davinci_soc_info; struct davinci_soc_info *soc_info = &davinci_soc_info;
evm_init_i2c(); evm_init_i2c();
davinci_serial_init(&uart_config); davinci_serial_init(dm646x_serial_device);
dm646x_init_mcasp0(&dm646x_evm_snd_data[0]); dm646x_init_mcasp0(&dm646x_evm_snd_data[0]);
dm646x_init_mcasp1(&dm646x_evm_snd_data[1]); dm646x_init_mcasp1(&dm646x_evm_snd_data[1]);
......
...@@ -434,10 +434,6 @@ static void __init mityomapl138_setup_nand(void) ...@@ -434,10 +434,6 @@ static void __init mityomapl138_setup_nand(void)
ARRAY_SIZE(mityomapl138_devices)); ARRAY_SIZE(mityomapl138_devices));
} }
static struct davinci_uart_config mityomapl138_uart_config __initdata = {
.enabled_uarts = 0x7,
};
static const short mityomap_mii_pins[] = { static const short mityomap_mii_pins[] = {
DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3, DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER, 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,7 +513,7 @@ static void __init mityomapl138_init(void)
if (ret) if (ret)
pr_warning("watchdog registration failed: %d\n", ret); pr_warning("watchdog registration failed: %d\n", ret);
davinci_serial_init(&mityomapl138_uart_config); davinci_serial_init(da8xx_serial_device);
ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata); ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata);
if (ret) if (ret)
......
...@@ -153,10 +153,6 @@ static struct platform_device *davinci_ntosd2_devices[] __initdata = { ...@@ -153,10 +153,6 @@ static struct platform_device *davinci_ntosd2_devices[] __initdata = {
&ntosd2_leds_dev, &ntosd2_leds_dev,
}; };
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static void __init davinci_ntosd2_map_io(void) static void __init davinci_ntosd2_map_io(void)
{ {
dm644x_init(); dm644x_init();
...@@ -197,7 +193,7 @@ static __init void davinci_ntosd2_init(void) ...@@ -197,7 +193,7 @@ static __init void davinci_ntosd2_init(void)
platform_add_devices(davinci_ntosd2_devices, platform_add_devices(davinci_ntosd2_devices,
ARRAY_SIZE(davinci_ntosd2_devices)); ARRAY_SIZE(davinci_ntosd2_devices));
davinci_serial_init(&uart_config); davinci_serial_init(dm644x_serial_device);
dm644x_init_asp(&dm644x_ntosd2_snd_data); dm644x_init_asp(&dm644x_ntosd2_snd_data);
soc_info->emac_pdata->phy_id = NEUROS_OSD2_PHY_ID; soc_info->emac_pdata->phy_id = NEUROS_OSD2_PHY_ID;
......
...@@ -286,15 +286,11 @@ static __init void omapl138_hawk_usb_init(void) ...@@ -286,15 +286,11 @@ static __init void omapl138_hawk_usb_init(void)
gpio_free(DA850_USB1_VBUS_PIN); gpio_free(DA850_USB1_VBUS_PIN);
} }
static struct davinci_uart_config omapl138_hawk_uart_config __initdata = {
.enabled_uarts = 0x7,
};
static __init void omapl138_hawk_init(void) static __init void omapl138_hawk_init(void)
{ {
int ret; int ret;
davinci_serial_init(&omapl138_hawk_uart_config); davinci_serial_init(da8xx_serial_device);
omapl138_hawk_config_emac(); omapl138_hawk_config_emac();
......
...@@ -125,10 +125,6 @@ static struct platform_device *davinci_sffsdr_devices[] __initdata = { ...@@ -125,10 +125,6 @@ static struct platform_device *davinci_sffsdr_devices[] __initdata = {
&davinci_sffsdr_nandflash_device, &davinci_sffsdr_nandflash_device,
}; };
static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static void __init davinci_sffsdr_map_io(void) static void __init davinci_sffsdr_map_io(void)
{ {
dm644x_init(); dm644x_init();
...@@ -141,7 +137,7 @@ static __init void davinci_sffsdr_init(void) ...@@ -141,7 +137,7 @@ static __init void davinci_sffsdr_init(void)
platform_add_devices(davinci_sffsdr_devices, platform_add_devices(davinci_sffsdr_devices,
ARRAY_SIZE(davinci_sffsdr_devices)); ARRAY_SIZE(davinci_sffsdr_devices));
sffsdr_init_i2c(); sffsdr_init_i2c();
davinci_serial_init(&uart_config); davinci_serial_init(dm644x_serial_device);
soc_info->emac_pdata->phy_id = SFFSDR_PHY_ID; soc_info->emac_pdata->phy_id = SFFSDR_PHY_ID;
davinci_setup_usb(0, 0); /* We support only peripheral mode. */ davinci_setup_usb(0, 0); /* We support only peripheral mode. */
......
...@@ -106,4 +106,9 @@ int dm646x_init_edma(struct edma_rsv_info *rsv); ...@@ -106,4 +106,9 @@ int dm646x_init_edma(struct edma_rsv_info *rsv);
void dm646x_video_init(void); void dm646x_video_init(void);
void dm646x_setup_vpif(struct vpif_display_config *, void dm646x_setup_vpif(struct vpif_display_config *,
struct vpif_capture_config *); struct vpif_capture_config *);
extern struct platform_device dm365_serial_device[];
extern struct platform_device dm355_serial_device[];
extern struct platform_device dm644x_serial_device[];
extern struct platform_device dm646x_serial_device[];
#endif /*__DAVINCI_H */ #endif /*__DAVINCI_H */
...@@ -410,7 +410,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) ...@@ -410,7 +410,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info)
platform_device_register(&tsc_device); platform_device_register(&tsc_device);
if (info->serial_config) if (info->serial_config)
davinci_serial_init(info->serial_config); davinci_serial_init(tnetv107x_serial_device);
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
if (info->mmc_config[i]) { if (info->mmc_config[i]) {
......
...@@ -962,7 +962,7 @@ static struct plat_serial8250_port dm355_serial2_platform_data[] = { ...@@ -962,7 +962,7 @@ static struct plat_serial8250_port dm355_serial2_platform_data[] = {
} }
}; };
static struct platform_device dm355_serial_device[] = { struct platform_device dm355_serial_device[] = {
{ {
.name = "serial8250", .name = "serial8250",
.id = PLAT8250_DEV_PLATFORM, .id = PLAT8250_DEV_PLATFORM,
......
...@@ -1068,7 +1068,7 @@ static struct plat_serial8250_port dm365_serial1_platform_data[] = { ...@@ -1068,7 +1068,7 @@ static struct plat_serial8250_port dm365_serial1_platform_data[] = {
} }
}; };
static struct platform_device dm365_serial_device[] = { struct platform_device dm365_serial_device[] = {
{ {
.name = "serial8250", .name = "serial8250",
.id = PLAT8250_DEV_PLATFORM, .id = PLAT8250_DEV_PLATFORM,
......
...@@ -853,7 +853,7 @@ static struct plat_serial8250_port dm644x_serial2_platform_data[] = { ...@@ -853,7 +853,7 @@ static struct plat_serial8250_port dm644x_serial2_platform_data[] = {
} }
}; };
static struct platform_device dm644x_serial_device[] = { struct platform_device dm644x_serial_device[] = {
{ {
.name = "serial8250", .name = "serial8250",
.id = PLAT8250_DEV_PLATFORM, .id = PLAT8250_DEV_PLATFORM,
......
...@@ -830,7 +830,7 @@ static struct plat_serial8250_port dm646x_serial2_platform_data[] = { ...@@ -830,7 +830,7 @@ static struct plat_serial8250_port dm646x_serial2_platform_data[] = {
} }
}; };
static struct platform_device dm646x_serial_device[] = { struct platform_device dm646x_serial_device[] = {
{ {
.name = "serial8250", .name = "serial8250",
.id = PLAT8250_DEV_PLATFORM, .id = PLAT8250_DEV_PLATFORM,
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <linux/platform_device.h>
#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800) #define DAVINCI_UART2_BASE (IO_PHYS + 0x20800)
...@@ -37,12 +39,7 @@ ...@@ -37,12 +39,7 @@
#define UART_DM646X_SCR_TX_WATERMARK 0x08 #define UART_DM646X_SCR_TX_WATERMARK 0x08
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
struct davinci_uart_config { extern int davinci_serial_init(struct platform_device *);
/* Bit field of UARTs present; bit 0 --> UART0 */
unsigned int enabled_uarts;
};
extern int davinci_serial_init(struct davinci_uart_config *);
extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate); extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate);
#endif #endif
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <mach/serial.h> #include <mach/serial.h>
struct tnetv107x_device_info { struct tnetv107x_device_info {
struct davinci_uart_config *serial_config;
struct davinci_mmc_config *mmc_config[2]; /* 2 controllers */ struct davinci_mmc_config *mmc_config[2]; /* 2 controllers */
struct davinci_nand_pdata *nand_config[4]; /* 4 chipsels */ struct davinci_nand_pdata *nand_config[4]; /* 4 chipsels */
struct matrix_keypad_platform_data *keypad_config; struct matrix_keypad_platform_data *keypad_config;
......
...@@ -92,10 +92,9 @@ int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) ...@@ -92,10 +92,9 @@ int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate)
return 0; return 0;
} }
int __init davinci_serial_init(struct davinci_uart_config *info) int __init davinci_serial_init(struct platform_device *serial_dev)
{ {
int i, ret = 0; int i, ret = 0;
struct davinci_soc_info *soc_info = &davinci_soc_info;
struct device *dev; struct device *dev;
struct plat_serial8250_port *p; struct plat_serial8250_port *p;
...@@ -103,13 +102,11 @@ int __init davinci_serial_init(struct davinci_uart_config *info) ...@@ -103,13 +102,11 @@ int __init davinci_serial_init(struct davinci_uart_config *info)
* Make sure the serial ports are muxed on at this point. * Make sure the serial ports are muxed on at this point.
* You have to mux them off in device drivers later on if not needed. * You have to mux them off in device drivers later on if not needed.
*/ */
for (i = 0; soc_info->serial_dev[i].dev.platform_data != NULL; i++) { for (i = 0; serial_dev[i].dev.platform_data != NULL; i++) {
dev = &soc_info->serial_dev[i].dev; dev = &serial_dev[i].dev;
p = dev->platform_data; p = dev->platform_data;
if (!(info->enabled_uarts & (1 << i)))
continue;
ret = platform_device_register(&soc_info->serial_dev[i]); ret = platform_device_register(&serial_dev[i]);
if (ret) if (ret)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment