diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-02-02 01:27:07 -0500 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-05-25 11:04:34 -0400 |
commit | bd60299594fb1d28ae66563c9e76a0b89b0412cf (patch) | |
tree | be57b42058328220a29a03ab68970a3b2a12949d /arch/arm/mach-at91/at91sam9261_devices.c | |
parent | 1b021a3b23a40be89c4f3fbe6f4696aa15141f26 (diff) |
at91: switch to CLKDEV_LOOKUP
we do not change the clock naming convention so does not need to switch
the AVR32 yet
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 8792f9bfb6b0..3eb4538fceeb 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -426,7 +426,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
426 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | 426 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ |
427 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | 427 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ |
428 | 428 | ||
429 | at91_clock_associate("spi0_clk", &at91sam9261_spi0_device.dev, "spi_clk"); | ||
430 | platform_device_register(&at91sam9261_spi0_device); | 429 | platform_device_register(&at91sam9261_spi0_device); |
431 | } | 430 | } |
432 | if (enable_spi1) { | 431 | if (enable_spi1) { |
@@ -434,7 +433,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
434 | at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */ | 433 | at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */ |
435 | at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */ | 434 | at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */ |
436 | 435 | ||
437 | at91_clock_associate("spi1_clk", &at91sam9261_spi1_device.dev, "spi_clk"); | ||
438 | platform_device_register(&at91sam9261_spi1_device); | 436 | platform_device_register(&at91sam9261_spi1_device); |
439 | } | 437 | } |
440 | } | 438 | } |
@@ -581,10 +579,6 @@ static struct platform_device at91sam9261_tcb_device = { | |||
581 | 579 | ||
582 | static void __init at91_add_device_tc(void) | 580 | static void __init at91_add_device_tc(void) |
583 | { | 581 | { |
584 | /* this chip has a separate clock and irq for each TC channel */ | ||
585 | at91_clock_associate("tc0_clk", &at91sam9261_tcb_device.dev, "t0_clk"); | ||
586 | at91_clock_associate("tc1_clk", &at91sam9261_tcb_device.dev, "t1_clk"); | ||
587 | at91_clock_associate("tc2_clk", &at91sam9261_tcb_device.dev, "t2_clk"); | ||
588 | platform_device_register(&at91sam9261_tcb_device); | 582 | platform_device_register(&at91sam9261_tcb_device); |
589 | } | 583 | } |
590 | #else | 584 | #else |
@@ -786,17 +780,14 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
786 | case AT91SAM9261_ID_SSC0: | 780 | case AT91SAM9261_ID_SSC0: |
787 | pdev = &at91sam9261_ssc0_device; | 781 | pdev = &at91sam9261_ssc0_device; |
788 | configure_ssc0_pins(pins); | 782 | configure_ssc0_pins(pins); |
789 | at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); | ||
790 | break; | 783 | break; |
791 | case AT91SAM9261_ID_SSC1: | 784 | case AT91SAM9261_ID_SSC1: |
792 | pdev = &at91sam9261_ssc1_device; | 785 | pdev = &at91sam9261_ssc1_device; |
793 | configure_ssc1_pins(pins); | 786 | configure_ssc1_pins(pins); |
794 | at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); | ||
795 | break; | 787 | break; |
796 | case AT91SAM9261_ID_SSC2: | 788 | case AT91SAM9261_ID_SSC2: |
797 | pdev = &at91sam9261_ssc2_device; | 789 | pdev = &at91sam9261_ssc2_device; |
798 | configure_ssc2_pins(pins); | 790 | configure_ssc2_pins(pins); |
799 | at91_clock_associate("ssc2_clk", &pdev->dev, "pclk"); | ||
800 | break; | 791 | break; |
801 | default: | 792 | default: |
802 | return; | 793 | return; |
@@ -995,22 +986,18 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
995 | case 0: /* DBGU */ | 986 | case 0: /* DBGU */ |
996 | pdev = &at91sam9261_dbgu_device; | 987 | pdev = &at91sam9261_dbgu_device; |
997 | configure_dbgu_pins(); | 988 | configure_dbgu_pins(); |
998 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
999 | break; | 989 | break; |
1000 | case AT91SAM9261_ID_US0: | 990 | case AT91SAM9261_ID_US0: |
1001 | pdev = &at91sam9261_uart0_device; | 991 | pdev = &at91sam9261_uart0_device; |
1002 | configure_usart0_pins(pins); | 992 | configure_usart0_pins(pins); |
1003 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1004 | break; | 993 | break; |
1005 | case AT91SAM9261_ID_US1: | 994 | case AT91SAM9261_ID_US1: |
1006 | pdev = &at91sam9261_uart1_device; | 995 | pdev = &at91sam9261_uart1_device; |
1007 | configure_usart1_pins(pins); | 996 | configure_usart1_pins(pins); |
1008 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1009 | break; | 997 | break; |
1010 | case AT91SAM9261_ID_US2: | 998 | case AT91SAM9261_ID_US2: |
1011 | pdev = &at91sam9261_uart2_device; | 999 | pdev = &at91sam9261_uart2_device; |
1012 | configure_usart2_pins(pins); | 1000 | configure_usart2_pins(pins); |
1013 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1014 | break; | 1001 | break; |
1015 | default: | 1002 | default: |
1016 | return; | 1003 | return; |
@@ -1024,8 +1011,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1024 | 1011 | ||
1025 | void __init at91_set_serial_console(unsigned portnr) | 1012 | void __init at91_set_serial_console(unsigned portnr) |
1026 | { | 1013 | { |
1027 | if (portnr < ATMEL_MAX_UART) | 1014 | if (portnr < ATMEL_MAX_UART) { |
1028 | atmel_default_console_device = at91_uarts[portnr]; | 1015 | atmel_default_console_device = at91_uarts[portnr]; |
1016 | at91sam9261_set_console_clock(portnr); | ||
1017 | } | ||
1029 | } | 1018 | } |
1030 | 1019 | ||
1031 | void __init at91_add_device_serial(void) | 1020 | void __init at91_add_device_serial(void) |