aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 6f8ec8d16d5a..1fdeb9058a76 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -609,7 +609,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
609 at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ 609 at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
610 at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */ 610 at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */
611 611
612 at91_clock_associate("spi0_clk", &at91sam9260_spi0_device.dev, "spi_clk");
613 platform_device_register(&at91sam9260_spi0_device); 612 platform_device_register(&at91sam9260_spi0_device);
614 } 613 }
615 if (enable_spi1) { 614 if (enable_spi1) {
@@ -617,7 +616,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
617 at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */ 616 at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */
618 at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */ 617 at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */
619 618
620 at91_clock_associate("spi1_clk", &at91sam9260_spi1_device.dev, "spi_clk");
621 platform_device_register(&at91sam9260_spi1_device); 619 platform_device_register(&at91sam9260_spi1_device);
622 } 620 }
623} 621}
@@ -694,15 +692,7 @@ static struct platform_device at91sam9260_tcb1_device = {
694 692
695static void __init at91_add_device_tc(void) 693static void __init at91_add_device_tc(void)
696{ 694{
697 /* this chip has a separate clock and irq for each TC channel */
698 at91_clock_associate("tc0_clk", &at91sam9260_tcb0_device.dev, "t0_clk");
699 at91_clock_associate("tc1_clk", &at91sam9260_tcb0_device.dev, "t1_clk");
700 at91_clock_associate("tc2_clk", &at91sam9260_tcb0_device.dev, "t2_clk");
701 platform_device_register(&at91sam9260_tcb0_device); 695 platform_device_register(&at91sam9260_tcb0_device);
702
703 at91_clock_associate("tc3_clk", &at91sam9260_tcb1_device.dev, "t0_clk");
704 at91_clock_associate("tc4_clk", &at91sam9260_tcb1_device.dev, "t1_clk");
705 at91_clock_associate("tc5_clk", &at91sam9260_tcb1_device.dev, "t2_clk");
706 platform_device_register(&at91sam9260_tcb1_device); 696 platform_device_register(&at91sam9260_tcb1_device);
707} 697}
708#else 698#else
@@ -820,7 +810,6 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
820 case AT91SAM9260_ID_SSC: 810 case AT91SAM9260_ID_SSC:
821 pdev = &at91sam9260_ssc_device; 811 pdev = &at91sam9260_ssc_device;
822 configure_ssc_pins(pins); 812 configure_ssc_pins(pins);
823 at91_clock_associate("ssc_clk", &pdev->dev, "pclk");
824 break; 813 break;
825 default: 814 default:
826 return; 815 return;
@@ -1145,37 +1134,30 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1145 case 0: /* DBGU */ 1134 case 0: /* DBGU */
1146 pdev = &at91sam9260_dbgu_device; 1135 pdev = &at91sam9260_dbgu_device;
1147 configure_dbgu_pins(); 1136 configure_dbgu_pins();
1148 at91_clock_associate("mck", &pdev->dev, "usart");
1149 break; 1137 break;
1150 case AT91SAM9260_ID_US0: 1138 case AT91SAM9260_ID_US0:
1151 pdev = &at91sam9260_uart0_device; 1139 pdev = &at91sam9260_uart0_device;
1152 configure_usart0_pins(pins); 1140 configure_usart0_pins(pins);
1153 at91_clock_associate("usart0_clk", &pdev->dev, "usart");
1154 break; 1141 break;
1155 case AT91SAM9260_ID_US1: 1142 case AT91SAM9260_ID_US1:
1156 pdev = &at91sam9260_uart1_device; 1143 pdev = &at91sam9260_uart1_device;
1157 configure_usart1_pins(pins); 1144 configure_usart1_pins(pins);
1158 at91_clock_associate("usart1_clk", &pdev->dev, "usart");
1159 break; 1145 break;
1160 case AT91SAM9260_ID_US2: 1146 case AT91SAM9260_ID_US2:
1161 pdev = &at91sam9260_uart2_device; 1147 pdev = &at91sam9260_uart2_device;
1162 configure_usart2_pins(pins); 1148 configure_usart2_pins(pins);
1163 at91_clock_associate("usart2_clk", &pdev->dev, "usart");
1164 break; 1149 break;
1165 case AT91SAM9260_ID_US3: 1150 case AT91SAM9260_ID_US3:
1166 pdev = &at91sam9260_uart3_device; 1151 pdev = &at91sam9260_uart3_device;
1167 configure_usart3_pins(pins); 1152 configure_usart3_pins(pins);
1168 at91_clock_associate("usart3_clk", &pdev->dev, "usart");
1169 break; 1153 break;
1170 case AT91SAM9260_ID_US4: 1154 case AT91SAM9260_ID_US4:
1171 pdev = &at91sam9260_uart4_device; 1155 pdev = &at91sam9260_uart4_device;
1172 configure_usart4_pins(); 1156 configure_usart4_pins();
1173 at91_clock_associate("usart4_clk", &pdev->dev, "usart");
1174 break; 1157 break;
1175 case AT91SAM9260_ID_US5: 1158 case AT91SAM9260_ID_US5:
1176 pdev = &at91sam9260_uart5_device; 1159 pdev = &at91sam9260_uart5_device;
1177 configure_usart5_pins(); 1160 configure_usart5_pins();
1178 at91_clock_associate("usart5_clk", &pdev->dev, "usart");
1179 break; 1161 break;
1180 default: 1162 default:
1181 return; 1163 return;
@@ -1189,8 +1171,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1189 1171
1190void __init at91_set_serial_console(unsigned portnr) 1172void __init at91_set_serial_console(unsigned portnr)
1191{ 1173{
1192 if (portnr < ATMEL_MAX_UART) 1174 if (portnr < ATMEL_MAX_UART) {
1193 atmel_default_console_device = at91_uarts[portnr]; 1175 atmel_default_console_device = at91_uarts[portnr];
1176 at91sam9260_set_console_clock(portnr);
1177 }
1194} 1178}
1195 1179
1196void __init at91_add_device_serial(void) 1180void __init at91_add_device_serial(void)