aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-04-10 02:10:05 -0400
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-05-25 11:04:33 -0400
commit2b348e2f82f532e3aff8e0ce9293033b3294c1e0 (patch)
tree771e08a36011c6010962de74bc54b7299466a588 /arch/avr32
parentdd41d3216b05200cf01381927804a35315352a35 (diff)
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 staticaly Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Alan Cox <alan@linux.intel.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c4
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index bfc9d071db9b..aa677e2a3823 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];
1014void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) 1014void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
1015{ 1015{
1016 struct platform_device *pdev; 1016 struct platform_device *pdev;
1017 struct atmel_uart_data *pdata;
1017 1018
1018 switch (hw_id) { 1019 switch (hw_id) {
1019 case 0: 1020 case 0:
@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
1042 data->regs = (void __iomem *)pdev->resource[0].start; 1043 data->regs = (void __iomem *)pdev->resource[0].start;
1043 } 1044 }
1044 1045
1045 pdev->id = line; 1046 pdata = pdev->dev.platform_data;
1047 pdata->num = portnr;
1046 at32_usarts[line] = pdev; 1048 at32_usarts[line] = pdev;
1047} 1049}
1048 1050
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index 61740201b311..679458d9a622 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -33,6 +33,7 @@ extern struct platform_device *atmel_default_console_device;
33#define ATMEL_USART_CLK 0x04 33#define ATMEL_USART_CLK 0x04
34 34
35struct atmel_uart_data { 35struct atmel_uart_data {
36 int num; /* port num */
36 short use_dma_tx; /* use transmit DMA? */ 37 short use_dma_tx; /* use transmit DMA? */
37 short use_dma_rx; /* use receive DMA? */ 38 short use_dma_rx; /* use receive DMA? */
38 void __iomem *regs; /* virtual base address, if any */ 39 void __iomem *regs; /* virtual base address, if any */