From 2b348e2f82f532e3aff8e0ce9293033b3294c1e0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 10 Apr 2011 14:10:05 +0800 Subject: 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 Acked-by: Alan Cox Cc: Nicolas Ferre Cc: Patrice Vilchez Cc: Hans-Christian Egtvedt Cc: Greg Kroah-Hartman --- arch/avr32/mach-at32ap/at32ap700x.c | 4 +++- arch/avr32/mach-at32ap/include/mach/board.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/avr32') diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index bfc9d071db9..aa677e2a382 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]; 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; } diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index 61740201b31..679458d9a62 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; #define ATMEL_USART_CLK 0x04 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; /* virtual base address, if any */ -- cgit v1.2.3