diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
| -rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 59fc48311fb0..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; |
| @@ -989,32 +980,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
| 989 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 980 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
| 990 | { | 981 | { |
| 991 | struct platform_device *pdev; | 982 | struct platform_device *pdev; |
| 983 | struct atmel_uart_data *pdata; | ||
| 992 | 984 | ||
| 993 | switch (id) { | 985 | switch (id) { |
| 994 | case 0: /* DBGU */ | 986 | case 0: /* DBGU */ |
| 995 | pdev = &at91sam9261_dbgu_device; | 987 | pdev = &at91sam9261_dbgu_device; |
| 996 | configure_dbgu_pins(); | 988 | configure_dbgu_pins(); |
| 997 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
| 998 | break; | 989 | break; |
| 999 | case AT91SAM9261_ID_US0: | 990 | case AT91SAM9261_ID_US0: |
| 1000 | pdev = &at91sam9261_uart0_device; | 991 | pdev = &at91sam9261_uart0_device; |
| 1001 | configure_usart0_pins(pins); | 992 | configure_usart0_pins(pins); |
| 1002 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
| 1003 | break; | 993 | break; |
| 1004 | case AT91SAM9261_ID_US1: | 994 | case AT91SAM9261_ID_US1: |
| 1005 | pdev = &at91sam9261_uart1_device; | 995 | pdev = &at91sam9261_uart1_device; |
| 1006 | configure_usart1_pins(pins); | 996 | configure_usart1_pins(pins); |
| 1007 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
| 1008 | break; | 997 | break; |
| 1009 | case AT91SAM9261_ID_US2: | 998 | case AT91SAM9261_ID_US2: |
| 1010 | pdev = &at91sam9261_uart2_device; | 999 | pdev = &at91sam9261_uart2_device; |
| 1011 | configure_usart2_pins(pins); | 1000 | configure_usart2_pins(pins); |
| 1012 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
| 1013 | break; | 1001 | break; |
| 1014 | default: | 1002 | default: |
| 1015 | return; | 1003 | return; |
| 1016 | } | 1004 | } |
| 1017 | pdev->id = portnr; /* update to mapped ID */ | 1005 | pdata = pdev->dev.platform_data; |
| 1006 | pdata->num = portnr; /* update to mapped ID */ | ||
| 1018 | 1007 | ||
| 1019 | if (portnr < ATMEL_MAX_UART) | 1008 | if (portnr < ATMEL_MAX_UART) |
| 1020 | at91_uarts[portnr] = pdev; | 1009 | at91_uarts[portnr] = pdev; |
| @@ -1022,8 +1011,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
| 1022 | 1011 | ||
| 1023 | void __init at91_set_serial_console(unsigned portnr) | 1012 | void __init at91_set_serial_console(unsigned portnr) |
| 1024 | { | 1013 | { |
| 1025 | if (portnr < ATMEL_MAX_UART) | 1014 | if (portnr < ATMEL_MAX_UART) { |
| 1026 | atmel_default_console_device = at91_uarts[portnr]; | 1015 | atmel_default_console_device = at91_uarts[portnr]; |
| 1016 | at91sam9261_set_console_clock(portnr); | ||
| 1017 | } | ||
| 1027 | } | 1018 | } |
| 1028 | 1019 | ||
| 1029 | void __init at91_add_device_serial(void) | 1020 | void __init at91_add_device_serial(void) |
