diff options
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200_devices.c')
| -rw-r--r-- | arch/arm/mach-at91/at91rm9200_devices.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 7b539228e0ef..a0ba475be04c 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
| @@ -644,15 +644,7 @@ static struct platform_device at91rm9200_tcb1_device = { | |||
| 644 | 644 | ||
| 645 | static void __init at91_add_device_tc(void) | 645 | static void __init at91_add_device_tc(void) |
| 646 | { | 646 | { |
| 647 | /* this chip has a separate clock and irq for each TC channel */ | ||
| 648 | at91_clock_associate("tc0_clk", &at91rm9200_tcb0_device.dev, "t0_clk"); | ||
| 649 | at91_clock_associate("tc1_clk", &at91rm9200_tcb0_device.dev, "t1_clk"); | ||
| 650 | at91_clock_associate("tc2_clk", &at91rm9200_tcb0_device.dev, "t2_clk"); | ||
| 651 | platform_device_register(&at91rm9200_tcb0_device); | 647 | platform_device_register(&at91rm9200_tcb0_device); |
| 652 | |||
| 653 | at91_clock_associate("tc3_clk", &at91rm9200_tcb1_device.dev, "t0_clk"); | ||
| 654 | at91_clock_associate("tc4_clk", &at91rm9200_tcb1_device.dev, "t1_clk"); | ||
| 655 | at91_clock_associate("tc5_clk", &at91rm9200_tcb1_device.dev, "t2_clk"); | ||
| 656 | platform_device_register(&at91rm9200_tcb1_device); | 648 | platform_device_register(&at91rm9200_tcb1_device); |
| 657 | } | 649 | } |
| 658 | #else | 650 | #else |
| @@ -849,17 +841,14 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
| 849 | case AT91RM9200_ID_SSC0: | 841 | case AT91RM9200_ID_SSC0: |
| 850 | pdev = &at91rm9200_ssc0_device; | 842 | pdev = &at91rm9200_ssc0_device; |
| 851 | configure_ssc0_pins(pins); | 843 | configure_ssc0_pins(pins); |
| 852 | at91_clock_associate("ssc0_clk", &pdev->dev, "ssc"); | ||
| 853 | break; | 844 | break; |
| 854 | case AT91RM9200_ID_SSC1: | 845 | case AT91RM9200_ID_SSC1: |
| 855 | pdev = &at91rm9200_ssc1_device; | 846 | pdev = &at91rm9200_ssc1_device; |
| 856 | configure_ssc1_pins(pins); | 847 | configure_ssc1_pins(pins); |
| 857 | at91_clock_associate("ssc1_clk", &pdev->dev, "ssc"); | ||
| 858 | break; | 848 | break; |
| 859 | case AT91RM9200_ID_SSC2: | 849 | case AT91RM9200_ID_SSC2: |
| 860 | pdev = &at91rm9200_ssc2_device; | 850 | pdev = &at91rm9200_ssc2_device; |
| 861 | configure_ssc2_pins(pins); | 851 | configure_ssc2_pins(pins); |
| 862 | at91_clock_associate("ssc2_clk", &pdev->dev, "ssc"); | ||
| 863 | break; | 852 | break; |
| 864 | default: | 853 | default: |
| 865 | return; | 854 | return; |
| @@ -1109,37 +1098,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
| 1109 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1098 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
| 1110 | { | 1099 | { |
| 1111 | struct platform_device *pdev; | 1100 | struct platform_device *pdev; |
| 1101 | struct atmel_uart_data *pdata; | ||
| 1112 | 1102 | ||
| 1113 | switch (id) { | 1103 | switch (id) { |
| 1114 | case 0: /* DBGU */ | 1104 | case 0: /* DBGU */ |
| 1115 | pdev = &at91rm9200_dbgu_device; | 1105 | pdev = &at91rm9200_dbgu_device; |
| 1116 | configure_dbgu_pins(); | 1106 | configure_dbgu_pins(); |
| 1117 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
| 1118 | break; | 1107 | break; |
| 1119 | case AT91RM9200_ID_US0: | 1108 | case AT91RM9200_ID_US0: |
| 1120 | pdev = &at91rm9200_uart0_device; | 1109 | pdev = &at91rm9200_uart0_device; |
| 1121 | configure_usart0_pins(pins); | 1110 | configure_usart0_pins(pins); |
| 1122 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
| 1123 | break; | 1111 | break; |
| 1124 | case AT91RM9200_ID_US1: | 1112 | case AT91RM9200_ID_US1: |
| 1125 | pdev = &at91rm9200_uart1_device; | 1113 | pdev = &at91rm9200_uart1_device; |
| 1126 | configure_usart1_pins(pins); | 1114 | configure_usart1_pins(pins); |
| 1127 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
| 1128 | break; | 1115 | break; |
| 1129 | case AT91RM9200_ID_US2: | 1116 | case AT91RM9200_ID_US2: |
| 1130 | pdev = &at91rm9200_uart2_device; | 1117 | pdev = &at91rm9200_uart2_device; |
| 1131 | configure_usart2_pins(pins); | 1118 | configure_usart2_pins(pins); |
| 1132 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
| 1133 | break; | 1119 | break; |
| 1134 | case AT91RM9200_ID_US3: | 1120 | case AT91RM9200_ID_US3: |
| 1135 | pdev = &at91rm9200_uart3_device; | 1121 | pdev = &at91rm9200_uart3_device; |
| 1136 | configure_usart3_pins(pins); | 1122 | configure_usart3_pins(pins); |
| 1137 | at91_clock_associate("usart3_clk", &pdev->dev, "usart"); | ||
| 1138 | break; | 1123 | break; |
| 1139 | default: | 1124 | default: |
| 1140 | return; | 1125 | return; |
| 1141 | } | 1126 | } |
| 1142 | pdev->id = portnr; /* update to mapped ID */ | 1127 | pdata = pdev->dev.platform_data; |
| 1128 | pdata->num = portnr; /* update to mapped ID */ | ||
| 1143 | 1129 | ||
| 1144 | if (portnr < ATMEL_MAX_UART) | 1130 | if (portnr < ATMEL_MAX_UART) |
| 1145 | at91_uarts[portnr] = pdev; | 1131 | at91_uarts[portnr] = pdev; |
| @@ -1147,8 +1133,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
| 1147 | 1133 | ||
| 1148 | void __init at91_set_serial_console(unsigned portnr) | 1134 | void __init at91_set_serial_console(unsigned portnr) |
| 1149 | { | 1135 | { |
| 1150 | if (portnr < ATMEL_MAX_UART) | 1136 | if (portnr < ATMEL_MAX_UART) { |
| 1151 | atmel_default_console_device = at91_uarts[portnr]; | 1137 | atmel_default_console_device = at91_uarts[portnr]; |
| 1138 | at91rm9200_set_console_clock(portnr); | ||
| 1139 | } | ||
| 1152 | } | 1140 | } |
| 1153 | 1141 | ||
| 1154 | void __init at91_add_device_serial(void) | 1142 | void __init at91_add_device_serial(void) |
