diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-08-08 23:17:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-10 14:53:06 +0200 |
commit | b9605d8a96ee68eb79020febdf39254d31cbeb87 (patch) | |
tree | aeeba4e3096bb13dc678a43699724fe37b8f7c71 /arch/arm/mach-at91/at91sam9260.c | |
parent | db879ec1a96df9ee35d89500a081177b485c3a8b (diff) | |
download | barebox-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.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 30d1a6aaae..c1f08e7533 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c @@ -169,6 +169,16 @@ static struct clk *periph_clocks[] = { // irq0 .. irq2 }; +static struct clk_lookup usart_clocks_lookups[] = { + CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck), + CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk), + CLKDEV_CON_DEV_ID("usart", "atmel_usart2", &usart1_clk), + CLKDEV_CON_DEV_ID("usart", "atmel_usart3", &usart2_clk), + CLKDEV_CON_DEV_ID("usart", "atmel_usart4", &usart3_clk), + CLKDEV_CON_DEV_ID("usart", "atmel_usart5", &usart4_clk), + CLKDEV_CON_DEV_ID("usart", "atmel_usart6", &usart5_clk), +}; + /* * The two programmable clocks. * You must configure pin multiplexing to bring these signals out. @@ -193,6 +203,9 @@ static void __init at91sam9260_register_clocks(void) for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) clk_register(periph_clocks[i]); + clkdev_add_table(usart_clocks_lookups, + ARRAY_SIZE(usart_clocks_lookups)); + clk_register(&pck0); clk_register(&pck1); } |