summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260_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/at91sam9260_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/at91sam9260_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 5c1bbbe464..4540f4bf5d 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -165,49 +165,40 @@ static inline void configure_usart5_pins(void)
void 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 AT91SAM9260_ID_US0:
configure_usart0_pins(pins);
- clk_name = "usart0_clk";
start = AT91SAM9260_BASE_US0;
id = 1;
break;
case AT91SAM9260_ID_US1:
configure_usart1_pins(pins);
- clk_name = "usart1_clk";
start = AT91SAM9260_BASE_US1;
id = 2;
break;
case AT91SAM9260_ID_US2:
configure_usart2_pins(pins);
- clk_name = "usart2_clk";
start = AT91SAM9260_BASE_US2;
id = 3;
break;
case AT91SAM9260_ID_US3:
configure_usart3_pins(pins);
- clk_name = "usart3_clk";
start = AT91SAM9260_BASE_US3;
id = 4;
break;
case AT91SAM9260_ID_US4:
configure_usart4_pins();
- clk_name = "usart4_clk";
start = AT91SAM9260_BASE_US4;
id = 5;
break;
case AT91SAM9260_ID_US5:
configure_usart5_pins();
- clk_name = "usart5_clk";
start = AT91SAM9260_BASE_US5;
id = 6;
break;
@@ -215,9 +206,8 @@ void 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");
}
#if defined(CONFIG_MCI_ATMEL)