atmel_serial: keep the platform_device unchanged
Subsystems (5)
PATCH 1/1 atmel_serial: keep the platform_device unchanged
specify the port num via platform_data this will allow to match the clock with the plaform_dev staticly
--- arch/arm/mach-at91/at572d940hf_devices.c | 4 +++- arch/arm/mach-at91/at91cap9_devices.c | 4 +++- arch/arm/mach-at91/at91rm9200_devices.c | 4 +++- arch/arm/mach-at91/at91sam9260_devices.c | 4 +++- arch/arm/mach-at91/at91sam9261_devices.c | 4 +++- arch/arm/mach-at91/at91sam9263_devices.c | 4 +++- arch/arm/mach-at91/at91sam9g45_devices.c | 4 +++- arch/arm/mach-at91/at91sam9rl_devices.c | 4 +++- arch/arm/mach-at91/include/mach/board.h | 1 + arch/avr32/mach-at32ap/at32ap700x.c | 4 +++- arch/avr32/mach-at32ap/include/mach/board.h | 1 + drivers/tty/serial/atmel_serial.c | 2 +- 12 files changed, 30 insertions(+), 10 deletions(-)
arch/arm/mach-at91/at572d940hf_devices.c +3 -1
@@ -822,6 +822,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -847,7 +848,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91cap9_devices.c +3 -1
@@ -1199,6 +1199,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1224,7 +1225,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91rm9200_devices.c +3 -1
@@ -1109,6 +1109,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1139,7 +1140,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91sam9260_devices.c +3 -1
@@ -1139,6 +1139,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1179,7 +1180,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91sam9261_devices.c +3 -1
@@ -989,6 +989,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1014,7 +1015,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91sam9263_devices.c +3 -1
@@ -1370,6 +1370,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1395,7 +1396,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91sam9g45_devices.c +3 -1
@@ -1527,6 +1527,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1557,7 +1558,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/at91sam9rl_devices.c +3 -1
@@ -1141,6 +1141,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devivoid __init at91_register_uart (unsigned id,unsigned portnr,unsigned pins) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (id) {case 0 :/* DBGU */
@@ -1171,7 +1172,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)default :return ; } - pdev->id = portnr;/* update to mapped ID */ + pdata = pdev->dev.platform_data; + pdata->num = portnr;/* update to mapped ID */ if (portnr <ATMEL_MAX_UART ) at91_uarts[portnr] = pdev;
arch/arm/mach-at91/include/mach/board.h +1 -0
@@ -130,6 +130,7 @@ extern void __init at91_set_serial_console(unsigned portnr);extern struct platform_device *atmel_default_console_device;struct atmel_uart_data { +int num;/* port num */ short use_dma_tx;/* use transmit DMA? */ short use_dma_rx;/* use receive DMA? */ void __iomem *regs;/* virt. base address, if any */
arch/avr32/mach-at32ap/at32ap700x.c +3 -1
@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];void __init at32_map_usart (unsigned int hw_id,unsigned int line,int flags) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (hw_id) {case 0 :
@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) data->regs = (void __iomem *)pdev->resource[0 ].start; } - pdev->id = line; + pdata = pdev->dev.platform_data; + pdata->num = portnr; at32_usarts[line] = pdev; }
arch/avr32/mach-at32ap/include/mach/board.h +1 -0
@@ -34,6 +34,7 @@ extern struct platform_device *atmel_default_console_device;#define ATMEL_USART_CLK 0x04struct atmel_uart_data { +int num;/* port num */ short use_dma_tx;/* use transmit DMA? */ short use_dma_rx;/* use receive DMA? */ void __iomem *regs;/* virtual base address, if any */
drivers/tty/serial/atmel_serial.c +1 -1
@@ -1423,7 +1423,7 @@ static int __devinit atmel_init_port(struct atmel_uart_port *atmel_port, port->flags =UPF_BOOT_AUTOCONF ; port->ops = &atmel_pops; port->fifosize =1 ; - port->line = pdev->id; + port->line = data->num; port->dev = &pdev->dev; port->mapbase = pdev->resource[0 ].start; port->irq = pdev->resource[1 ].start;
Signature · 1 line
1.7.4.1
Quoted 9 lines · On Wed, 13 Apr 2011 21:47:18 +0200 Jean-Christophe PLAGNIOL-VILLARD…
specify the port num via
platform_datathis will allow to match the clock with theplaform_devstaticlySigned-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Cc: Nicolas Ferre <[email protected]>
Cc: Patrice Vilchez <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Ack for the serial side, its really an arch patch though as far as I can see..
Jean-Christophe PLAGNIOL-VILLARD
AppliedQuoted 13 lines · Alan Cox
Quoted 9 lines · On Wed, 13 Apr 2011 21:47:18 +0200 Jean-Christophe PLAGNIOL-VILLARD…
specify the port num via
platform_datathis will allow to match the clock with theplaform_devstaticlySigned-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Cc: Nicolas Ferre <[email protected]>
Cc: Patrice Vilchez <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Quoted 2 lines
Ack for the serial side, its really an arch patch though as far as I can see..
applied in at91-l2
Best Regards,
J.
Quoted 2 lines · Jean-Christophe PLAGNIOL-VILLARD
specify the port num via
platform_datathis will allow to match the clock with theplaform_devstaticly
Sure this works as intended, now the platform device id is off, and at least for my 3.0 testing it is no longer able to open the console, unless I explicit set the id field again.
Example on NGW100 mkII I use USART instance 1 as serial console, if not setting the platform device id to 0 (re-mapping), then I get a warning about unable to open console.
Is you clock optimization an additional patch?
<snipp AT91 changes)
Quoted 13 lines
arch/avr32/mach-at32ap/at32ap700x.c +1
-0@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];void __init at32_map_usart (unsigned int hw_id,unsigned int line,int flags) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (hw_id) {case 0 :
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1045
Quoted 4 lines
arch/avr32/mach-at32ap/at32ap700x.c +0
-1@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) data->regs = (void __iomem *)pdev->resource[0 ].start; } - pdev->id = line;
AVR32 needs this to be present to work independent of which USART peripheral the user chooses to use for console.
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1050
Quoted 5 lines
arch/avr32/mach-at32ap/at32ap700x.c +2
-0+ pdata = pdev->dev.platform_data; + pdata->num = portnr; at32_usarts[line] = pdev; }
<snipp>
Signature · 1 line
Hans-Christian Egtvedt
Quoted 9 lines · Hans-Christian Egtvedt
Quoted 2 lines · Jean-Christophe PLAGNIOL-VILLARD
specify the port num via
platform_datathis will allow to match the clock with theplaform_devstaticlySure this works as intended, now the platform device id is off, and at least for my 3.0 testing it is no longer able to open the console, unless I explicit set the id field again.
Quoted 5 lines
Example on NGW100 mkII I use USART instance 1 as serial console, if not setting the platform device id to 0 (re-mapping), then I get a warning about unable to open console.
Is you clock optimization an additional patch?
no but we can also switch the avr32 to clkdev
Quoted 19 lines
<snipp AT91 changes)
Quoted 16 lines
arch/avr32/mach-at32ap/at32ap700x.c +1
-0@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];void __init at32_map_usart (unsigned int hw_id,unsigned int line,int flags) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (hw_id) {case 0 :@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) data->regs = (void __iomem *)pdev->resource[0 ].start; }
Quoted 7 lines
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1045
Quoted 1 line
arch/avr32/mach-at32ap/at32ap700x.c +0
-1- pdev->id = line;AVR32 needs this to be present to work independent of which USART peripheral the user chooses to use for console.
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1047
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c +2
-0+ pdata = pdev->dev.platform_data; + pdata->num = portnr;
here supposed to be
pdata->num = line;
Best Regards,
J.
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines · Hans-Christian Egtvedt
On Wed, 2011-04-13 at 21:47 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
<snipp>
Quoted 21 lines
Quoted 21 lines
Quoted 13 lines
arch/avr32/mach-at32ap/at32ap700x.c +1
-0@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];void __init at32_map_usart (unsigned int hw_id,unsigned int line,int flags) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (hw_id) {case 0 :arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1045
Quoted 4 lines
arch/avr32/mach-at32ap/at32ap700x.c +0
-1@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) data->regs = (void __iomem *)pdev->resource[0 ].start; } - pdev->id = line;AVR32 needs this to be present to work independent of which USART peripheral the user chooses to use for console.
Quoted 4 lines
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1047
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c +2
-0+ pdata = pdev->dev.platform_data; + pdata->num = portnr;here supposed to be
pdata->num = line;
I know, but that doesn't fix the problem about not able to find a console, the platform data id must also be 0 (if console is on ttyS0) AFAICT.
Signature · 1 line
Hans-Christian Egtvedt
Quoted 29 lines · Hans-Christian Egtvedt
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines · Hans-Christian Egtvedt
On Wed, 2011-04-13 at 21:47 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
<snipp>
Quoted 21 lines
Quoted 21 lines
Quoted 13 lines
arch/avr32/mach-at32ap/at32ap700x.c +1
-0@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];void __init at32_map_usart (unsigned int hw_id,unsigned int line,int flags) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (hw_id) {case 0 :arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1045
Quoted 4 lines
arch/avr32/mach-at32ap/at32ap700x.c +0
-1@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) data->regs = (void __iomem *)pdev->resource[0 ].start; } - pdev->id = line;AVR32 needs this to be present to work independent of which USART peripheral the user chooses to use for console.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1047
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c +2
-0+ pdata = pdev->dev.platform_data; + pdata->num = portnr;here supposed to be
pdata->num = line;I know, but that doesn't fix the problem about not able to find a console, the platform data id must also be 0 (if console is on ttyS0) AFAICT.
will test this weekend on avr32
Best Regards,
J.
Quoted 29 lines · Hans-Christian Egtvedt
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines · Hans-Christian Egtvedt
On Wed, 2011-04-13 at 21:47 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
<snipp>
Quoted 21 lines
Quoted 21 lines
Quoted 13 lines
arch/avr32/mach-at32ap/at32ap700x.c +1
-0@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];void __init at32_map_usart (unsigned int hw_id,unsigned int line,int flags) {struct platform_device *pdev; +struct atmel_uart_data *pdata;switch (hw_id) {case 0 :arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1045
Quoted 4 lines
arch/avr32/mach-at32ap/at32ap700x.c +0
-1@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) data->regs = (void __iomem *)pdev->resource[0 ].start; } - pdev->id = line;AVR32 needs this to be present to work independent of which USART peripheral the user chooses to use for console.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) · line 1047
Quoted 2 lines
arch/avr32/mach-at32ap/at32ap700x.c +2
-0+ pdata = pdev->dev.platform_data; + pdata->num = portnr;here supposed to be
pdata->num = line;I know, but that doesn't fix the problem about not able to find a console, the platform data id must also be 0 (if console is on ttyS0) AFAICT.
I found the issue
on at91 we always use the dbgu as console so I did not see it
please try to repling patch
Best Regards,
J.
PATCH 1/1 atmel_serial: fix internal port num
In reply to Hans-Christian Egtvedtthe atmel_ports is link to the console number and not the device id
this was not detected on at91 as we always register the dbgu on the console as ttyS0
tested on at91sam9263 by setting the dbgu as ttyS1 and use as console
arch/arm/mach-at91/board-sam9263ek.c +0 -0
- a/arch/arm/mach-at91/board-sam9263ek.c
+ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -58,14 +58,14 @@ static void __init ek_init_early(void)
/* Initialize processor: 16.367 MHz crystal */
at91_initialize(16367660);- /* DBGU on ttyS0. (Rx & Tx only) */ - at91_register_uart(0, 0, 0); + /* DBGU on ttyS1. (Rx & Tx only) */ + at91_register_uart(0, 1, 0);
- /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ - at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); + /* USART0 on ttyS0. (Rx, Tx, RTS, CTS) */ + at91_register_uart(AT91SAM9263_ID_US0, 0, ATMEL_UART_CTS | ATMEL_UART_RTS);
- /* set serial console to ttyS0 (ie, DBGU) */ - at91_set_serial_console(0); + /* set serial console to ttyS1 (ie, DBGU) */ + at91_set_serial_console(1);
}
/*
--- drivers/tty/serial/atmel_serial.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/tty/serial/atmel_serial.c +2 -1
@@ -1709,12 +1709,13 @@ static int atmel_serial_resume(struct platform_device *pdev)static int __devinit atmel_serial_probe (struct platform_device *pdev) {struct atmel_uart_port *port; +struct atmel_uart_data *pdata = pdev->dev.platform_data;void *data;int ret;BUILD_BUG_ON (ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE -1 )); - port = &atmel_ports[pdev->id]; + port = &atmel_ports[pdata->num]; port->backup_imr =0 ;atmel_init_port (port, pdev);
Signature · 1 line
1.7.4.1
PATCH 1/1 atmel_serial: fix atmel_default_console_device
reflect new static uart platform ids introduced by patch
http://article.gmane.org/gmane.linux.kernel/1126105
--- drivers/tty/serial/atmel_serial.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
\ renamed from drivers/tty/serial/atmel_serial.c +0 -0
b/drivers/tty/serial/atmel_serial.c
index af9b781..29c7857 100644
drivers/tty/serial/atmel_serial.c +4 -3
@@ -1609,9 +1609,10 @@ static struct console atmel_console = {static int __init atmel_console_init (void ) {if (atmel_default_console_device) { -add_preferred_console (ATMEL_DEVICENAME , - atmel_default_console_device->id,NULL ); -atmel_init_port (&atmel_ports[atmel_default_console_device->id], +struct atmel_uart_data *pdata = + atmel_default_console_device->dev.platform_data; +add_preferred_console (ATMEL_DEVICENAME , pdata->num,NULL ); +atmel_init_port (&atmel_ports[pdata->num], atmel_default_console_device);register_console (&atmel_console); }
Signature · 1 line
1.7.4.1
PATCH 1/1 atmel_serial: fix atmel_default_console_device
Hello.
Quoted 15 lines · Nikolaus Voss
reflect new static uart platform ids introduced by patch
http://article.gmane.org/gmane.linux.kernel/1126105Signed-off-by Nikolaus Voss<[email protected]>--- drivers/tty/serial/atmel_serial.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)\ renamed from drivers/tty/serial/atmel_serial.c +0
-0
b/drivers/tty/serial/atmel_serial.c
index af9b781..29c7857 100644
drivers/tty/serial/atmel_serial.c static struct console atmel_console = { · line 1613
Quoted 8 lines
drivers/tty/serial/atmel_serial.c +2
-3@@ -1609,9 +1609,10 @@ static struct console atmel_console = {static int __init atmel_console_init (void ) {if (atmel_default_console_device) { -add_preferred_console (ATMEL_DEVICENAME , - atmel_default_console_device->id,NULL ); - atmel_init_port(&atmel_ports[atmel_default_console_device->id], +struct atmel_uart_data *pdata = + atmel_default_console_device->dev.platform_data;
Would be good to have empty line after the declaration...
drivers/tty/serial/atmel_serial.c static struct console atmel_console = { · line 1618
Quoted 5 lines
drivers/tty/serial/atmel_serial.c +2
-0+add_preferred_console (ATMEL_DEVICENAME , pdata->num,NULL ); +atmel_init_port (&atmel_ports[pdata->num], atmel_default_console_device);register_console (&atmel_console); }
WBR, Sergei
PATCH 1/1 atmel_serial: fix atmel_default_console_device
reflect new static uart platform ids introduced by patch
http://article.gmane.org/gmane.linux.kernel/1126105
--- drivers/tty/serial/atmel_serial.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
drivers/tty/serial/atmel_serial.c +5 -3
@@ -1609,9 +1609,11 @@ static struct console atmel_console = {static int __init atmel_console_init (void ) {if (atmel_default_console_device) { -add_preferred_console (ATMEL_DEVICENAME , - atmel_default_console_device->id,NULL ); -atmel_init_port (&atmel_ports[atmel_default_console_device->id], +struct atmel_uart_data *pdata = + atmel_default_console_device->dev.platform_data; + +add_preferred_console (ATMEL_DEVICENAME , pdata->num,NULL ); +atmel_init_port (&atmel_ports[pdata->num], atmel_default_console_device);register_console (&atmel_console); }
Signature · 1 line
1.7.4.1
PATCH 1/1 atmel_serial: fix atmel_default_console_device
In reply to Sergei ShtylyovThanks, patch resent.
Niko
Quoted 44 lines
-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov at mvista.com]
Sent: Tuesday, August 09, 2011 1:42 PM
To: Voss, Nikolaus
Cc: linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH]atmel_serial: fixatmel_default_console_deviceHello.
Quoted 15 lines · Nikolaus Voss
reflect new static uart platform ids introduced by patch
http://article.gmane.org/gmane.linux.kernel/1126105Signed-off-by Nikolaus Voss<[email protected]>--- drivers/tty/serial/atmel_serial.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)\ renamed from drivers/tty/serial/atmel_serial.c +0
-0
b/drivers/tty/serial/atmel_serial.c
index af9b781..29c7857 100644drivers/tty/serial/atmel_serial.c static struct console atmel_console = { · line 1613
Quoted 8 lines
drivers/tty/serial/atmel_serial.c +2
-3@@ -1609,9 +1609,10 @@ static struct console atmel_console = {static int __init atmel_console_init (void ) {if (atmel_default_console_device) { -add_preferred_console (ATMEL_DEVICENAME , - atmel_default_console_device->id,NULL ); - atmel_init_port(&atmel_ports[atmel_default_console_device->id], +struct atmel_uart_data *pdata = + atmel_default_console_device->dev.platform_data;Would be good to have empty line after the declaration...
drivers/tty/serial/atmel_serial.c static struct console atmel_console = { · line 1618
Quoted 5 lines
drivers/tty/serial/atmel_serial.c +2
-0+add_preferred_console (ATMEL_DEVICENAME , pdata->num,NULL ); +atmel_init_port (&atmel_ports[pdata->num], atmel_default_console_device);register_console (&atmel_console); }WBR, Sergei
PATCH 1/1 atmel_serial: fix atmel_default_console_device
Hello.
Quoted 1 line · Nikolaus
Thanks, patch resent.
You then should have marked the new version in the subject (like "[PATCH
v2]"), and described the changes from the previous version under the --- tear line...
Quoted 1 line
Niko
WBR, Sergei
PATCH v2 1/1 atmel_serial: fix atmel_default_console_device
reflect new static uart platform ids introduced by patch
http://article.gmane.org/gmane.linux.kernel/1126105
---
Updated with Sergei's comment.
drivers/tty/serial/atmel_serial.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
drivers/tty/serial/atmel_serial.c +5 -3
@@ -1609,9 +1609,11 @@ static struct console atmel_console = {static int __init atmel_console_init (void ) {if (atmel_default_console_device) { -add_preferred_console (ATMEL_DEVICENAME , - atmel_default_console_device->id,NULL ); -atmel_init_port (&atmel_ports[atmel_default_console_device->id], +struct atmel_uart_data *pdata = + atmel_default_console_device->dev.platform_data; + +add_preferred_console (ATMEL_DEVICENAME , pdata->num,NULL ); +atmel_init_port (&atmel_ports[pdata->num], atmel_default_console_device);register_console (&atmel_console); }
Signature · 1 line
1.7.4.1