summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91rm9200_devices.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-08-08 23:17:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-10 14:53:06 +0200
commitb9605d8a96ee68eb79020febdf39254d31cbeb87 (patch)
treeaeeba4e3096bb13dc678a43699724fe37b8f7c71 /arch/arm/mach-at91/at91rm9200_devices.c
parentdb879ec1a96df9ee35d89500a081177b485c3a8b (diff)
downloadbarebox-b9605d8a96ee68eb79020febdf39254d31cbeb87.tar.gz
barebox-b9605d8a96ee68eb79020febdf39254d31cbeb87.tar.xz
at91: swtich to clkdev
this will also fix the clock support as we now switch to allocated generic device as we can need to associate the clock and the device but the driver is probe before the association we also change the atmel serial name to "atmel_usart" to simplify sharing with linux Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200_devices.c')
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 84605e4651..453c10a5de 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -182,37 +182,30 @@ static inline void configure_usart3_pins(unsigned pins)
void __init at91_register_uart(unsigned id, unsigned pins)
{
resource_size_t start;
- struct device_d *dev;
- char* clk_name;
switch (id) {
case 0: /* DBGU */
configure_dbgu_pins();
start = AT91_BASE_SYS + AT91_DBGU;
- clk_name = "mck";
id = 0;
break;
case AT91RM9200_ID_US0:
configure_usart0_pins(pins);
- clk_name = "usart0_clk";
start = AT91RM9200_BASE_US0;
id = 1;
break;
case AT91RM9200_ID_US1:
configure_usart1_pins(pins);
- clk_name = "usart1_clk";
start = AT91RM9200_BASE_US1;
id = 2;
break;
case AT91RM9200_ID_US2:
configure_usart2_pins(pins);
- clk_name = "usart2_clk";
start = AT91RM9200_BASE_US2;
id = 3;
break;
case AT91RM9200_ID_US3:
configure_usart3_pins(pins);
- clk_name = "usart3_clk";
start = AT91RM9200_BASE_US3;
id = 4;
break;
@@ -220,7 +213,6 @@ void __init at91_register_uart(unsigned id, unsigned pins)
return;
}
- dev = add_generic_device("atmel_serial", id, NULL, start, 4096,
+ add_generic_device("atmel_usart", id, NULL, start, 4096,
IORESOURCE_MEM, NULL);
- at91_clock_associate(clk_name, dev, "usart");
}