Remove omap serial tags
Subsystems (4)
cover Remove omap serial tags
Here are patches which remove OMAP_TAG_SERIAL_CONSOLE and OMAP_TAG_UART. The patches are based on linus' tree commit 90bc1a658. If I need to rebase it some other tree, please let me know.
Please review.
---
Kalle Valo (2):
OMAP: remove OMAP_TAG_UART
OMAP: remove OMAP_TAG_SERIAL_CONSOLE
arch/arm/mach-omap1/board-ams-delta.c | 5 +-- arch/arm/mach-omap1/board-fsample.c | 5 +-- arch/arm/mach-omap1/board-generic.c | 5 +-- arch/arm/mach-omap1/board-h2.c | 5 +-- arch/arm/mach-omap1/board-h3.c | 5 +-- arch/arm/mach-omap1/board-innovator.c | 5 +-- arch/arm/mach-omap1/board-nokia770.c | 5 +++ arch/arm/mach-omap1/board-osk.c | 5 +-- arch/arm/mach-omap1/board-palmte.c | 5 +-- arch/arm/mach-omap1/board-palmtt.c | 5 +-- arch/arm/mach-omap1/board-palmz71.c | 5 +-- arch/arm/mach-omap1/board-perseus2.c | 5 +-- arch/arm/mach-omap1/board-sx1.c | 5 +-- arch/arm/mach-omap1/board-voiceblue.c | 5 +-- arch/arm/mach-omap1/serial.c | 8 ++--- arch/arm/mach-omap2/board-2430sdp.c | 5 +-- arch/arm/mach-omap2/board-3430sdp.c | 5 +-- arch/arm/mach-omap2/board-4430sdp.c | 5 +-- arch/arm/mach-omap2/board-apollon.c | 5 +-- arch/arm/mach-omap2/board-generic.c | 5 +-- arch/arm/mach-omap2/board-h4.c | 5 +-- arch/arm/mach-omap2/board-ldp.c | 5 +-- arch/arm/mach-omap2/board-omap3beagle.c | 5 +-- arch/arm/mach-omap2/board-omap3evm.c | 5 +-- arch/arm/mach-omap2/board-omap3pandora.c | 5 +-- arch/arm/mach-omap2/board-overo.c | 5 +-- arch/arm/mach-omap2/board-rx51.c | 5 +-- arch/arm/mach-omap2/board-zoom2.c | 5 +-- arch/arm/mach-omap2/serial.c | 9 ++---- arch/arm/plat-omap/common.c | 44 ------------------------------ arch/arm/plat-omap/include/mach/board.h | 4 +-- arch/arm/plat-omap/include/mach/serial.h | 4 ++- 32 files changed, 66 insertions(+), 138 deletions(-)
PATCH 1/2 OMAP: remove OMAP_TAG_SERIAL_CONSOLE
Omap tags are deprecated and remove OMAP_TAG_SERIAL_CONSOLE. Console must be enabled with the console boot parameter instead.
---
arch/arm/plat-omap/common.c | 44 ------------------------------- arch/arm/plat-omap/include/mach/board.h | 1 - 2 files changed, 0 insertions(+), 45 deletions(-)
arch/arm/plat-omap/common.c +0 -44
@@ -127,50 +127,6 @@ const void *omap_get_var_config(u16 tag, size_t *len) }EXPORT_SYMBOL (omap_get_var_config); -static int __init omap_add_serial_console (void ) -{ -const struct omap_serial_console_config *con_info; -const struct omap_uart_config *uart_info; -static char speed[11 ], *opt =NULL ; -int line, i, uart_idx; - - uart_info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config); - con_info =omap_get_config (OMAP_TAG_SERIAL_CONSOLE , - struct omap_serial_console_config); -if (uart_info ==NULL || con_info ==NULL ) -return 0 ; - -if (con_info->console_uart ==0 ) -return 0 ; - -if (con_info->console_speed) { -snprintf (speed,sizeof (speed),"%u" , con_info->console_speed); - opt = speed; - } - - uart_idx = con_info->console_uart -1 ; -if (uart_idx >=OMAP_MAX_NR_PORTS ) { -printk (KERN_INFO "Console: external UART#%d. " -"Not adding it as console this time.\n" , - uart_idx +1 ); -return 0 ; - } -if (!(uart_info->enabled_uarts & (1 << uart_idx))) { -printk (KERN_ERR "Console: Selected UART#%d is " -"not enabled for this platform\n" , - uart_idx +1 ); -return -1 ; - } - line =0 ; -for (i =0 ; i < uart_idx; i++) { -if (uart_info->enabled_uarts & (1 << i)) - line++; - } -return add_preferred_console ("ttyS" , line, opt); -} -console_initcall (omap_add_serial_console); - -/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with
arch/arm/plat-omap/include/mach/board.h +0 -1
@@ -16,7 +16,6 @@/* Different peripheral ids */ #define OMAP_TAG_CLOCK 0x4f01 -#define OMAP_TAG_SERIAL_CONSOLE 0x4f03#define OMAP_TAG_LCD 0x4f05#define OMAP_TAG_GPIO_SWITCH 0x4f06#define OMAP_TAG_UART 0x4f07
Tony Lindgren
maintainerPATCH 1/2 OMAP: remove OMAP_TAG_SERIAL_CONSOLE
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Branch in linux-omap: omap-upstream
Initial commit ID (Likely to change): 7e1e03cb6dd027405cd07f20f3f6998b721d5ff3
PatchWorks
http://patchwork.kernel.org/patch/39778/
Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=7e1e03cb6dd027405cd07f20f3f6998b721d5ff3
PATCH 2/2 OMAP: remove OMAP_TAG_UART
In reply to Kalle ValoOmap tags are deprecrated and convert all OMAP_TAG_UART cases to use omap_uart_platform_data instead.
Tested on rx51 and n8x0. Compile tested on omap_osk_5912.
---
arch/arm/mach-omap1/board-ams-delta.c | 5 ++--- arch/arm/mach-omap1/board-fsample.c | 5 ++--- arch/arm/mach-omap1/board-generic.c | 5 ++--- arch/arm/mach-omap1/board-h2.c | 5 ++--- arch/arm/mach-omap1/board-h3.c | 5 ++--- arch/arm/mach-omap1/board-innovator.c | 5 ++--- arch/arm/mach-omap1/board-nokia770.c | 5 ++++- arch/arm/mach-omap1/board-osk.c | 5 ++--- arch/arm/mach-omap1/board-palmte.c | 5 ++--- arch/arm/mach-omap1/board-palmtt.c | 5 ++--- arch/arm/mach-omap1/board-palmz71.c | 5 ++--- arch/arm/mach-omap1/board-perseus2.c | 5 ++--- arch/arm/mach-omap1/board-sx1.c | 5 ++--- arch/arm/mach-omap1/board-voiceblue.c | 5 ++--- arch/arm/mach-omap1/serial.c | 8 +++----- arch/arm/mach-omap2/board-2430sdp.c | 5 ++--- arch/arm/mach-omap2/board-3430sdp.c | 5 ++--- arch/arm/mach-omap2/board-4430sdp.c | 5 ++--- arch/arm/mach-omap2/board-apollon.c | 5 ++--- arch/arm/mach-omap2/board-generic.c | 5 ++--- arch/arm/mach-omap2/board-h4.c | 5 ++--- arch/arm/mach-omap2/board-ldp.c | 5 ++--- arch/arm/mach-omap2/board-omap3beagle.c | 5 ++--- arch/arm/mach-omap2/board-omap3evm.c | 5 ++--- arch/arm/mach-omap2/board-omap3pandora.c | 5 ++--- arch/arm/mach-omap2/board-overo.c | 5 ++--- arch/arm/mach-omap2/board-rx51.c | 5 ++--- arch/arm/mach-omap2/board-zoom2.c | 5 ++--- arch/arm/mach-omap2/serial.c | 9 +++------ arch/arm/plat-omap/include/mach/board.h | 3 +-- arch/arm/plat-omap/include/mach/serial.h | 4 +++- 31 files changed, 66 insertions(+), 93 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +2 -3
@@ -162,7 +162,7 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_uart_config ams_delta_uart_config__initdata = { +static struct omap_uart_platform_data ams_delta_uart_config__initdata = { .enabled_uarts =1 , };
@@ -174,7 +174,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {static struct omap_board_config_kernel ams_delta_config[] = { {OMAP_TAG_LCD , &ams_delta_lcd_config }, - {OMAP_TAG_UART , &ams_delta_uart_config }, };static struct resource ams_delta_kp_resources[] = {
@@ -225,7 +224,7 @@ static void __init ams_delta_init(void) omap_board_config = ams_delta_config; omap_board_config_size =ARRAY_SIZE (ams_delta_config); -omap_serial_init (); +omap_serial_init (&ams_delta_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 );/* Clear latch2 (NAND, LCD, modem enable) */
arch/arm/mach-omap1/board-fsample.c +2 -3
@@ -240,7 +240,7 @@ static int nand_dev_ready(struct omap_nand_platform_data *data)return gpio_get_value (P2_NAND_RB_GPIO_PIN ); } -static struct omap_uart_config fsample_uart_config__initdata = { +static struct omap_uart_platform_data fsample_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 )), };
@@ -249,7 +249,6 @@ static struct omap_lcd_config fsample_lcd_config __initdata = { };static struct omap_board_config_kernel fsample_config[] = { - {OMAP_TAG_UART , &fsample_uart_config }, {OMAP_TAG_LCD , &fsample_lcd_config }, };
@@ -266,7 +265,7 @@ static void __init omap_fsample_init(void) omap_board_config = fsample_config; omap_board_config_size =ARRAY_SIZE (fsample_config); -omap_serial_init (); +omap_serial_init (&fsample_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 ); }
arch/arm/mach-omap1/board-generic.c +2 -3
@@ -57,12 +57,11 @@ static struct omap_usb_config generic1610_usb_config __initdata = { };#endif -static struct omap_uart_config generic_uart_config__initdata = { +static struct omap_uart_platform_data generic_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel generic_config[]__initdata = { - {OMAP_TAG_UART , &generic_uart_config }, };static void __init omap_generic_init (void )
@@ -80,7 +79,7 @@ static void __init omap_generic_init(void) omap_board_config = generic_config; omap_board_config_size =ARRAY_SIZE (generic_config); -omap_serial_init (); +omap_serial_init (&generic_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 ); }
arch/arm/mach-omap1/board-h2.c +2 -3
@@ -360,7 +360,7 @@ static struct omap_usb_config h2_usb_config __initdata = { .pins[1] = 3, }; -static struct omap_uart_config h2_uart_config__initdata = { +static struct omap_uart_platform_data h2_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -369,7 +369,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = { };static struct omap_board_config_kernel h2_config[]__initdata = { - {OMAP_TAG_UART , &h2_uart_config }, {OMAP_TAG_LCD , &h2_lcd_config }, };
@@ -414,7 +413,7 @@ static void __init h2_init(void)platform_add_devices (h2_devices,ARRAY_SIZE (h2_devices)); omap_board_config = h2_config; omap_board_config_size =ARRAY_SIZE (h2_config); -omap_serial_init (); +omap_serial_init (&h2_uart_config);omap_register_i2c_bus (1 ,100 , h2_i2c_board_info,ARRAY_SIZE (h2_i2c_board_info));omap_usb_init (&h2_usb_config);
arch/arm/mach-omap1/board-h3.c +2 -3
@@ -313,7 +313,7 @@ static struct omap_usb_config h3_usb_config __initdata = { .pins[1] = 3, }; -static struct omap_uart_config h3_uart_config__initdata = { +static struct omap_uart_platform_data h3_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -322,7 +322,6 @@ static struct omap_lcd_config h3_lcd_config __initdata = { };static struct omap_board_config_kernel h3_config[]__initdata = { - {OMAP_TAG_UART , &h3_uart_config }, {OMAP_TAG_LCD , &h3_lcd_config }, };
@@ -372,7 +371,7 @@ static void __init h3_init(void) ARRAY_SIZE(h3_spi_board_info)); omap_board_config = h3_config; omap_board_config_size =ARRAY_SIZE (h3_config); -omap_serial_init (); +omap_serial_init (&h3_uart_config);omap_register_i2c_bus (1 ,100 , h3_i2c_board_info,ARRAY_SIZE (h3_i2c_board_info));omap_usb_init (&h3_usb_config);
arch/arm/mach-omap1/board-innovator.c +2 -3
@@ -368,13 +368,12 @@ static inline void innovator_mmc_init(void) }#endif -static struct omap_uart_config innovator_uart_config__initdata = { +static struct omap_uart_platform_data innovator_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel innovator_config[] = { {OMAP_TAG_LCD ,NULL }, - {OMAP_TAG_UART , &innovator_uart_config }, };static void __init innovator_init (void )
@@ -406,7 +405,7 @@ static void __init innovator_init(void)#endif omap_board_config = innovator_config; omap_board_config_size =ARRAY_SIZE (innovator_config); -omap_serial_init (); +omap_serial_init (&innovator_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 );innovator_mmc_init (); }
arch/arm/mach-omap1/board-nokia770.c +4 -1
@@ -380,7 +380,10 @@ static void __init omap_nokia770_init(void)spi_register_board_info (nokia770_spi_board_info,ARRAY_SIZE (nokia770_spi_board_info));omap_gpio_init (); -omap_serial_init (); + +/* FIXME: configure serial ports */ +omap_serial_init (NULL ); +omap_register_i2c_bus (1 ,100 ,NULL ,0 );omap_dsp_init ();hwa742_dev_init ();
arch/arm/mach-omap1/board-osk.c +2 -3
@@ -293,7 +293,7 @@ static struct omap_usb_config osk_usb_config __initdata = { .pins[0] = 2, }; -static struct omap_uart_config osk_uart_config__initdata = { +static struct omap_uart_platform_data osk_uart_config__initdata = { .enabled_uarts = (1 <<0 ), };
@@ -304,7 +304,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = {#endif static struct omap_board_config_kernel osk_config[]__initdata = { - {OMAP_TAG_UART , &osk_uart_config }, #ifdef CONFIG_OMAP_OSK_MISTRAL {OMAP_TAG_LCD , &osk_lcd_config }, #endif
@@ -561,7 +560,7 @@ static void __init osk_init(void)if (gpio_request (OMAP_MPUIO (1 ),"tps65010" ) ==0 )gpio_direction_input (OMAP_MPUIO (1 )); -omap_serial_init (); +omap_serial_init (&osk_uart_config);omap_register_i2c_bus (1 ,400 , osk_i2c_board_info,ARRAY_SIZE (osk_i2c_board_info));osk_mistral_init ();
arch/arm/mach-omap1/board-palmte.c +2 -3
@@ -212,7 +212,7 @@ static struct omap_lcd_config palmte_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_uart_config palmte_uart_config__initdata = { +static struct omap_uart_platform_data palmte_uart_config__initdata = { .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (0 <<2 ), };
@@ -302,7 +302,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)static struct omap_board_config_kernel palmte_config[]__initdata = { {OMAP_TAG_LCD , &palmte_lcd_config }, - {OMAP_TAG_UART , &palmte_uart_config }, };static struct spi_board_info palmte_spi_info[]__initdata = {
@@ -354,7 +353,7 @@ static void __init omap_palmte_init(void)spi_register_board_info (palmte_spi_info,ARRAY_SIZE (palmte_spi_info));palmte_misc_gpio_setup (); -omap_serial_init (); +omap_serial_init (&palmte_uart_config);omap_usb_init (&palmte_usb_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 ); }
arch/arm/mach-omap1/board-palmtt.c +2 -3
@@ -274,13 +274,12 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_uart_config palmtt_uart_config__initdata = { +static struct omap_uart_platform_data palmtt_uart_config__initdata = { .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (0 <<2 ), };static struct omap_board_config_kernel palmtt_config[]__initdata = { {OMAP_TAG_LCD , &palmtt_lcd_config }, - {OMAP_TAG_UART , &palmtt_uart_config }, };static void __init omap_mpu_wdt_mode (int mode) {
@@ -302,7 +301,7 @@ static void __init omap_palmtt_init(void)platform_add_devices (palmtt_devices,ARRAY_SIZE (palmtt_devices));spi_register_board_info (palmtt_boardinfo,ARRAY_SIZE (palmtt_boardinfo)); -omap_serial_init (); +omap_serial_init (&palmtt_uart_config);omap_usb_init (&palmtt_usb_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 ); }
arch/arm/mach-omap1/board-palmz71.c +2 -3
@@ -244,13 +244,12 @@ static struct omap_lcd_config palmz71_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_uart_config palmz71_uart_config__initdata = { +static struct omap_uart_platform_data palmz71_uart_config__initdata = { .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (0 <<2 ), };static struct omap_board_config_kernel palmz71_config[]__initdata = { {OMAP_TAG_LCD , &palmz71_lcd_config}, - {OMAP_TAG_UART , &palmz71_uart_config}, }; static irqreturn_t
@@ -323,7 +322,7 @@ omap_palmz71_init(void)spi_register_board_info (palmz71_boardinfo,ARRAY_SIZE (palmz71_boardinfo));omap_usb_init (&palmz71_usb_config); -omap_serial_init (); +omap_serial_init (&palmz71_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 );palmz71_gpio_setup (0 ); }
arch/arm/mach-omap1/board-perseus2.c +2 -3
@@ -208,7 +208,7 @@ static int nand_dev_ready(struct omap_nand_platform_data *data)return gpio_get_value (P2_NAND_RB_GPIO_PIN ); } -static struct omap_uart_config perseus2_uart_config__initdata = { +static struct omap_uart_platform_data perseus2_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 )), };
@@ -217,7 +217,6 @@ static struct omap_lcd_config perseus2_lcd_config __initdata = { };static struct omap_board_config_kernel perseus2_config[]__initdata = { - {OMAP_TAG_UART , &perseus2_uart_config }, {OMAP_TAG_LCD , &perseus2_lcd_config }, };
@@ -234,7 +233,7 @@ static void __init omap_perseus2_init(void) omap_board_config = perseus2_config; omap_board_config_size =ARRAY_SIZE (perseus2_config); -omap_serial_init (); +omap_serial_init (&perseus2_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 ); }
arch/arm/mach-omap1/board-sx1.c +2 -3
@@ -369,13 +369,12 @@ static struct platform_device *sx1_devices[] __initdata = { };/*-----------------------------------------*/ -static struct omap_uart_config sx1_uart_config__initdata = { +static struct omap_uart_platform_data sx1_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel sx1_config[]__initdata = { {OMAP_TAG_LCD , &sx1_lcd_config }, - {OMAP_TAG_UART , &sx1_uart_config }, };/*-----------------------------------------*/
@@ -386,7 +385,7 @@ static void __init omap_sx1_init(void) omap_board_config = sx1_config; omap_board_config_size =ARRAY_SIZE (sx1_config); -omap_serial_init (); +omap_serial_init (&sx1_uart_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 );omap_usb_init (&sx1_usb_config);sx1_mmc_init ();
arch/arm/mach-omap1/board-voiceblue.c +2 -3
@@ -140,12 +140,11 @@ static struct omap_usb_config voiceblue_usb_config __initdata = { .pins[2] = 6, }; -static struct omap_uart_config voiceblue_uart_config__initdata = { +static struct omap_uart_platform_data voiceblue_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel voiceblue_config[] = { - {OMAP_TAG_UART , &voiceblue_uart_config }, };static void __init voiceblue_init_irq (void )
@@ -183,7 +182,7 @@ static void __init voiceblue_init(void)platform_add_devices (voiceblue_devices,ARRAY_SIZE (voiceblue_devices)); omap_board_config = voiceblue_config; omap_board_config_size =ARRAY_SIZE (voiceblue_config); -omap_serial_init (); +omap_serial_init (&voiceblue_uart_config);omap_usb_init (&voiceblue_usb_config);omap_register_i2c_bus (1 ,100 ,NULL ,0 );
arch/arm/mach-omap1/serial.c +3 -5
@@ -106,10 +106,9 @@ static struct platform_device serial_device = {* By default UART2 does not work on Innovator-1510 if you have * USB OHCI enabled. To use UART2, you must disable USB2 first. */ -void __init omap_serial_init (void ) +void __init omap_serial_init (const struct omap_uart_platform_data *pdata) {int i; -const struct omap_uart_config *info;if (cpu_is_omap730 ()) { serial_platform_data[0 ].regshift =0 ;
@@ -131,14 +130,13 @@ void __init omap_serial_init(void) serial_platform_data[2 ].uartclk =OMAP1510_BASE_BAUD *16 ; } - info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config); -if (info ==NULL ) +if (pdata ==NULL )return ;for (i =0 ; i <OMAP_MAX_NR_PORTS ; i++) {unsigned char reg; -if (!((1 << i) & info->enabled_uarts)) { +if (!((1 << i) & pdata->enabled_uarts)) { serial_platform_data[i].membase =NULL ; serial_platform_data[i].mapbase =0 ;continue ;
arch/arm/mach-omap2/board-2430sdp.c +2 -3
@@ -146,12 +146,11 @@ static void __init omap_2430sdp_init_irq(void)omap_gpio_init (); } -static struct omap_uart_config sdp2430_uart_config__initdata = { +static struct omap_uart_platform_data sdp2430_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel sdp2430_config[] = { - {OMAP_TAG_UART , &sdp2430_uart_config}, {OMAP_TAG_LCD , &sdp2430_lcd_config}, };
@@ -207,7 +206,7 @@ static void __init omap_2430sdp_init(void)platform_add_devices (sdp2430_devices,ARRAY_SIZE (sdp2430_devices)); omap_board_config = sdp2430_config; omap_board_config_size =ARRAY_SIZE (sdp2430_config); -omap_serial_init (); +omap_serial_init (&sdp2430_uart_config);twl4030_mmc_init (mmc);usb_musb_init ();board_smc91x_init ();
arch/arm/mach-omap2/board-3430sdp.c +2 -3
@@ -174,7 +174,7 @@ static void __init omap_3430sdp_init_irq(void)omap_gpio_init (); } -static struct omap_uart_config sdp3430_uart_config__initdata = { +static struct omap_uart_platform_data sdp3430_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -183,7 +183,6 @@ static struct omap_lcd_config sdp3430_lcd_config __initdata = { };static struct omap_board_config_kernel sdp3430_config[]__initdata = { - {OMAP_TAG_UART , &sdp3430_uart_config }, {OMAP_TAG_LCD , &sdp3430_lcd_config }, };
@@ -492,7 +491,7 @@ static void __init omap_3430sdp_init(void)spi_register_board_info (sdp3430_spi_board_info,ARRAY_SIZE (sdp3430_spi_board_info));ads7846_dev_init (); -omap_serial_init (); +omap_serial_init (&sdp3430_uart_config);usb_musb_init ();board_smc91x_init (); }
arch/arm/mach-omap2/board-4430sdp.c +2 -3
@@ -38,7 +38,7 @@ static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_lcd_device, }; -static struct omap_uart_config sdp4430_uart_config__initdata = { +static struct omap_uart_platform_data sdp4430_uart_config__initdata = { .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (1 <<2 ), };
@@ -47,7 +47,6 @@ static struct omap_lcd_config sdp4430_lcd_config __initdata = { };static struct omap_board_config_kernel sdp4430_config[]__initdata = { - {OMAP_TAG_UART , &sdp4430_uart_config }, {OMAP_TAG_LCD , &sdp4430_lcd_config }, };
@@ -73,7 +72,7 @@ static void __init omap_4430sdp_init(void)platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices)); omap_board_config = sdp4430_config; omap_board_config_size =ARRAY_SIZE (sdp4430_config); -omap_serial_init (); +omap_serial_init (&sdp4430_uart_config); }static void __init omap_4430sdp_map_io (void )
arch/arm/mach-omap2/board-apollon.c +2 -3
@@ -256,7 +256,7 @@ static void __init omap_apollon_init_irq(void)apollon_init_smc91x (); } -static struct omap_uart_config apollon_uart_config__initdata = { +static struct omap_uart_platform_data apollon_uart_config__initdata = { .enabled_uarts = (1 <<0 ) | (0 <<1 ) | (0 <<2 ), };
@@ -272,7 +272,6 @@ static struct omap_lcd_config apollon_lcd_config __initdata = { };static struct omap_board_config_kernel apollon_config[] = { - {OMAP_TAG_UART , &apollon_uart_config }, {OMAP_TAG_LCD , &apollon_lcd_config }, };
@@ -326,7 +325,7 @@ static void __init omap_apollon_init(void)platform_add_devices (apollon_devices,ARRAY_SIZE (apollon_devices)); omap_board_config = apollon_config; omap_board_config_size =ARRAY_SIZE (apollon_config); -omap_serial_init (); +omap_serial_init (&apollon_uart_config); }static void __init omap_apollon_map_io (void )
arch/arm/mach-omap2/board-generic.c +2 -3
@@ -37,19 +37,18 @@ static void __init omap_generic_init_irq(void)omap_init_irq (); } -static struct omap_uart_config generic_uart_config__initdata = { +static struct omap_uart_platform_data generic_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel generic_config[] = { - {OMAP_TAG_UART , &generic_uart_config }, };static void __init omap_generic_init (void ) { omap_board_config = generic_config; omap_board_config_size =ARRAY_SIZE (generic_config); -omap_serial_init (); +omap_serial_init (&generic_uart_config); }static void __init omap_generic_map_io (void )
arch/arm/mach-omap2/board-h4.c +2 -3
@@ -276,7 +276,7 @@ static void __init omap_h4_init_irq(void)h4_init_flash (); } -static struct omap_uart_config h4_uart_config__initdata = { +static struct omap_uart_platform_data h4_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -318,7 +318,6 @@ static struct omap_usb_config h4_usb_config __initdata = { };static struct omap_board_config_kernel h4_config[] = { - {OMAP_TAG_UART , &h4_uart_config }, {OMAP_TAG_LCD , &h4_lcd_config }, };
@@ -369,7 +368,7 @@ static void __init omap_h4_init(void) omap_board_config = h4_config; omap_board_config_size =ARRAY_SIZE (h4_config);omap_usb_init (&h4_usb_config); -omap_serial_init (); +omap_serial_init (&h4_uart_config); }static void __init omap_h4_map_io (void )
arch/arm/mach-omap2/board-ldp.c +2 -3
@@ -276,7 +276,7 @@ static void __init omap_ldp_init_irq(void)ldp_init_smsc911x (); } -static struct omap_uart_config ldp_uart_config__initdata = { +static struct omap_uart_platform_data ldp_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -290,7 +290,6 @@ static struct omap_lcd_config ldp_lcd_config __initdata = { };static struct omap_board_config_kernel ldp_config[]__initdata = { - {OMAP_TAG_UART , &ldp_uart_config }, {OMAP_TAG_LCD , &ldp_lcd_config }, };
@@ -384,7 +383,7 @@ static void __init omap_ldp_init(void)spi_register_board_info (ldp_spi_board_info,ARRAY_SIZE (ldp_spi_board_info));ads7846_dev_init (); -omap_serial_init (); +omap_serial_init (&ldp_uart_config);usb_musb_init ();twl4030_mmc_init (mmc);
arch/arm/mach-omap2/board-omap3beagle.c +2 -3
@@ -108,7 +108,7 @@ static struct platform_device omap3beagle_nand_device = {#include "sdram-micron-mt46h32m32lf-6.h" -static struct omap_uart_config omap3_beagle_uart_config__initdata = { +static struct omap_uart_platform_data omap3_beagle_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -344,7 +344,6 @@ static struct platform_device keys_gpio = { };static struct omap_board_config_kernel omap3_beagle_config[]__initdata = { - {OMAP_TAG_UART , &omap3_beagle_uart_config }, {OMAP_TAG_LCD , &omap3_beagle_lcd_config }, };
@@ -399,7 +398,7 @@ static void __init omap3_beagle_init(void) ARRAY_SIZE(omap3_beagle_devices)); omap_board_config = omap3_beagle_config; omap_board_config_size =ARRAY_SIZE (omap3_beagle_config); -omap_serial_init (); +omap_serial_init (&omap3_beagle_uart_config);omap_cfg_reg (J25_34XX_GPIO170 );gpio_request (170 ,"DVI_nPD" );
arch/arm/mach-omap2/board-omap3evm.c +2 -3
@@ -91,7 +91,7 @@ static inline void __init omap3evm_init_smc911x(void)gpio_direction_input (OMAP3EVM_ETHR_GPIO_IRQ ); } -static struct omap_uart_config omap3_evm_uart_config__initdata = { +static struct omap_uart_platform_data omap3_evm_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -286,7 +286,6 @@ static void __init omap3_evm_init_irq(void) }static struct omap_board_config_kernel omap3_evm_config[]__initdata = { - {OMAP_TAG_UART , &omap3_evm_uart_config }, {OMAP_TAG_LCD , &omap3_evm_lcd_config }, };
@@ -306,7 +305,7 @@ static void __init omap3_evm_init(void)spi_register_board_info (omap3evm_spi_board_info,ARRAY_SIZE (omap3evm_spi_board_info)); -omap_serial_init (); +omap_serial_init (&omap3_evm_uart_config);usb_musb_init ();ads7846_dev_init (); }
arch/arm/mach-omap2/board-omap3pandora.c +2 -3
@@ -212,7 +212,7 @@ static struct twl4030_hsmmc_info omap3pandora_mmc[] = { {}/* Terminator */ }; -static struct omap_uart_config omap3pandora_uart_config__initdata = { +static struct omap_uart_platform_data omap3pandora_uart_config__initdata = { .enabled_uarts = (1 <<2 ),/* UART3 */ };
@@ -374,7 +374,6 @@ static struct omap_lcd_config omap3pandora_lcd_config __initdata = { };static struct omap_board_config_kernel omap3pandora_config[]__initdata = { - {OMAP_TAG_UART , &omap3pandora_uart_config }, {OMAP_TAG_LCD , &omap3pandora_lcd_config }, };
@@ -391,7 +390,7 @@ static void __init omap3pandora_init(void) ARRAY_SIZE(omap3pandora_devices)); omap_board_config = omap3pandora_config; omap_board_config_size =ARRAY_SIZE (omap3pandora_config); -omap_serial_init (); +omap_serial_init (&omap3pandora_uart_config);spi_register_board_info (omap3pandora_spi_board_info,ARRAY_SIZE (omap3pandora_spi_board_info));omap3pandora_ads7846_init ();
arch/arm/mach-omap2/board-overo.c +2 -3
@@ -269,7 +269,7 @@ static void __init overo_flash_init(void)printk (KERN_ERR "Unable to register NAND device\n" ); } } -static struct omap_uart_config overo_uart_config__initdata = { +static struct omap_uart_platform_data overo_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -375,7 +375,6 @@ static struct omap_lcd_config overo_lcd_config __initdata = { };static struct omap_board_config_kernel overo_config[]__initdata = { - {OMAP_TAG_UART , &overo_uart_config }, {OMAP_TAG_LCD , &overo_lcd_config }, };
@@ -389,7 +388,7 @@ static void __init overo_init(void)platform_add_devices (overo_devices,ARRAY_SIZE (overo_devices)); omap_board_config = overo_config; omap_board_config_size =ARRAY_SIZE (overo_config); -omap_serial_init (); +omap_serial_init (&overo_uart_config);overo_flash_init ();usb_musb_init ();overo_ads7846_init ();
arch/arm/mach-omap2/board-rx51.c +2 -3
@@ -31,7 +31,7 @@#include <mach/gpmc.h> #include <mach/usb.h> -static struct omap_uart_config rx51_uart_config = { +static struct omap_uart_platform_data rx51_uart_config = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };
@@ -52,7 +52,6 @@ static struct omap_fbmem_config rx51_fbmem2_config = { };static struct omap_board_config_kernel rx51_config[] = { - {OMAP_TAG_UART , &rx51_uart_config }, {OMAP_TAG_FBMEM , &rx51_fbmem0_config }, {OMAP_TAG_FBMEM , &rx51_fbmem1_config }, {OMAP_TAG_FBMEM , &rx51_fbmem2_config },
@@ -72,7 +71,7 @@ static void __init rx51_init(void) { omap_board_config = rx51_config; omap_board_config_size =ARRAY_SIZE (rx51_config); -omap_serial_init (); +omap_serial_init (&rx51_uart_config);usb_musb_init ();rx51_peripherals_init (); }
arch/arm/mach-omap2/board-zoom2.c +2 -3
@@ -30,12 +30,11 @@ static void __init omap_zoom2_init_irq(void)omap_gpio_init (); } -static struct omap_uart_config zoom2_uart_config__initdata = { +static struct omap_uart_platform_data zoom2_uart_config__initdata = { .enabled_uarts = ((1 <<0 ) | (1 <<1 ) | (1 <<2 )), };static struct omap_board_config_kernel zoom2_config[]__initdata = { - {OMAP_TAG_UART , &zoom2_uart_config }, };static struct twl4030_gpio_platform_data zoom2_gpio_data = {
@@ -87,7 +86,7 @@ static void __init omap_zoom2_init(void)omap_i2c_init (); omap_board_config = zoom2_config; omap_board_config_size =ARRAY_SIZE (zoom2_config); -omap_serial_init (); +omap_serial_init (&zoom2_uart_config);omap_zoom2_debugboard_init ();twl4030_mmc_init (mmc);usb_musb_init ();
arch/arm/mach-omap2/serial.c +3 -6
@@ -480,10 +480,9 @@ static struct platform_device serial_device = { }, }; -void __init omap_serial_init (void ) +void __init omap_serial_init (const struct omap_uart_platform_data *pdata) {int i, err; -const struct omap_uart_config *info;char name[16 ];/*
@@ -492,9 +491,7 @@ void __init omap_serial_init(void)* if not needed. */ - info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config); - -if (info ==NULL ) +if (pdata ==NULL )return ;if (cpu_is_omap44xx ()) {for (i =0 ; i <OMAP_MAX_NR_PORTS ; i++)
@@ -505,7 +502,7 @@ void __init omap_serial_init(void)struct plat_serial8250_port *p = serial_platform_data + i;struct omap_uart_state *uart = &omap_uart[i]; -if (!(info->enabled_uarts & (1 << i))) { +if (!(pdata->enabled_uarts & (1 << i))) { p->membase =NULL ; p->mapbase =0 ;continue ;
arch/arm/plat-omap/include/mach/board.h +1 -2
@@ -18,7 +18,6 @@#define OMAP_TAG_CLOCK 0x4f01#define OMAP_TAG_LCD 0x4f05#define OMAP_TAG_GPIO_SWITCH 0x4f06 -#define OMAP_TAG_UART 0x4f07#define OMAP_TAG_FBMEM 0x4f08#define OMAP_TAG_STI_CONSOLE 0x4f09#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
@@ -112,7 +111,7 @@ struct omap_gpio_switch_config { int key_code:24; /* Linux key code */ }; -struct omap_uart_config { +struct omap_uart_platform_data {/* Bit field of UARTs present; bit 0 --> UART1 */ unsigned int enabled_uarts; };
arch/arm/plat-omap/include/mach/serial.h +3 -1
@@ -53,7 +53,9 @@ })#ifndef __ASSEMBLER__ -extern void omap_serial_init (void ); +struct omap_uart_platform_data ; + +extern void omap_serial_init (const struct omap_uart_platform_data *pdata);extern int omap_uart_can_sleep (void );extern void omap_uart_check_wakeup (void );extern void omap_uart_prepare_suspend (void );
RE: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kalle Valo
Sent: Friday, August 07, 2009 12:17 AM
To: [email protected]
Subject: [PATCH 2/2] OMAP: removeOMAP_TAG_UART
Quoted 6 lines
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.Signed-off-by Kalle Valo <[email protected]>
Any plans to remove OMAP_TAG_LCD
Quoted 2 lines
---
Re: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 8 lines · Vikram
Quoted 6 lines
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.Signed-off-by Kalle Valo <[email protected]>Any plans to remove
OMAP_TAG_LCD
I don't have any plans, but I don't know about others.
Signature · 1 line
Kalle Valo
Re: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 5 lines · Kalle Valo
Quoted 3 lines · Vikram
Quoted 3 lines
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.Signed-off-by Kalle Valo <[email protected]>Any plans to remove
OMAP_TAG_LCDI don't have any plans, but I don't know about others.
Already started by Tomi:
http://marc.info/?l=linux-omap&m=124948326314839&w=2
Re: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
In reply to Kalle ValoQuoted 5 lines · ext Kalle Valo
Quoted 3 lines · Vikram
Quoted 3 lines
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.Signed-off-by Kalle Valo <[email protected]>Any plans to remove
OMAP_TAG_LCDI don't have any plans, but I don't know about others.
I'm working on getting rid off OMAP_TAG_LCD. Will post a patch soon.
-roger
RE: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 9 lines
From: Roger Quadros [mailto:[email protected]]
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Kalle Valo <[email protected]>Any plans to remove
OMAP_TAG_LCDI don't have any plans, but I don't know about others.
I'm working on getting rid off
OMAP_TAG_LCD. Will post a patch soon.
Sounds great. Looking forward.
Quoted 2 lines
-roger
Tony Lindgren
maintainerPATCH 2/2 OMAP: remove OMAP_TAG_UART
In reply to Kalle ValoThis patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Branch in linux-omap: omap-upstream
Initial commit ID (Likely to change): 5ea0fbdf56dd4e127ce620d49bbbb606e2bf68e7
PatchWorks
http://patchwork.kernel.org/patch/39779/
Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=5ea0fbdf56dd4e127ce620d49bbbb606e2bf68e7
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 7 lines · Kevin Hilman
Quoted 5 lines · Kalle Valo
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.
Quoted 7 lines
Quoted 1 line
Signed-off-by Kalle Valo <[email protected]>Rather than converting all the
omap_uart_configsintoplatform_data. Any objections to just dropping theplatform_dataall together?This is only used for selecting which UARTs to enable at boot time, and all the board files simply enable all the UARTs.
Pandora wasn't enabling all UARTs, as did some other off-tree board (someone was posting UART questions on this list). This meant that UART3 was appearing as ttyS0 here, and after this patch it will appear as ttyS2, which means we will have to update our boot scripts. Not a huge deal but I'd prefer retaining platform_data.
Quoted 11 lines
Also, selective
enable is no longer needed since UART core has an inactivity timer which will disable clocks after inactivity anyways.I just posted a patch which does this:
http://patchwork.kernel.org/patch/43516/
If others are OK with this, it can be folded into original patch before going upstream via Tony's for-next.
Quoted 9 lines
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 14 lines · Grazvydas Ignotas
Quoted 12 lines · Kevin Hilman
Quoted 6 lines · Kalle Valo
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.Signed-off-by Kalle Valo <[email protected]>Rather than converting all the
omap_uart_configsintoplatform_data. Any objections to just dropping theplatform_dataall together?
Quoted 8 lines
Quoted 2 lines
This is only used for selecting which UARTs to enable at boot time, and all the board files simply enable all the UARTs.
Pandora wasn't enabling all UARTs, as did some other off-tree board (someone was posting UART questions on this list). This meant that UART3 was appearing as ttyS0 here, and after this patch it will appear as ttyS2, which means we will have to update our boot scripts. Not a huge deal but I'd prefer retaining
platform_data.
I think your boot scripts should be fixed.
Your problem actually points out another justification for my patch. Having all the UARTs enabled means that the ttyS* names will be consistent across multiple boards and result in much more portable userspace init.
Kevin
Tony Lindgren
maintainerRe: [PATCH 2/2] OMAP: remove OMAP_TAG_UART
Quoted 25 lines · Kevin Hilman
Quoted 14 lines · Grazvydas Ignotas
Quoted 12 lines · Kevin Hilman
Quoted 6 lines · Kalle Valo
Omap tags are deprecrated and convert all
OMAP_TAG_UARTcases to useomap_uart_platform_datainstead.Tested on rx51 and n8x0. Compile tested on
omap_osk_5912.Signed-off-by Kalle Valo <[email protected]>Rather than converting all the
omap_uart_configsintoplatform_data. Any objections to just dropping theplatform_dataall together?Quoted 8 lines
Quoted 2 lines
This is only used for selecting which UARTs to enable at boot time, and all the board files simply enable all the UARTs.
Pandora wasn't enabling all UARTs, as did some other off-tree board (someone was posting UART questions on this list). This meant that UART3 was appearing as ttyS0 here, and after this patch it will appear as ttyS2, which means we will have to update our boot scripts. Not a huge deal but I'd prefer retaining
platform_data.
Quoted 6 lines
I think your boot scripts should be fixed.
Your problem actually points out another justification for my patch. Having all the UARTs enabled means that the ttyS* names will be consistent across multiple boards and result in much more portable userspace init.
Great, finally! The shifting of the UART numbering has been driving me crazy for years now. Will buy Kevin a pint.
Tony