aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9263_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index fb5c23af1017..ffe081b77ed0 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -308,7 +308,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
308 } 308 }
309 309
310 mmc0_data = *data; 310 mmc0_data = *data;
311 at91_clock_associate("mci0_clk", &at91sam9263_mmc0_device.dev, "mci_clk");
312 platform_device_register(&at91sam9263_mmc0_device); 311 platform_device_register(&at91sam9263_mmc0_device);
313 } else { /* MCI1 */ 312 } else { /* MCI1 */
314 /* CLK */ 313 /* CLK */
@@ -339,7 +338,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
339 } 338 }
340 339
341 mmc1_data = *data; 340 mmc1_data = *data;
342 at91_clock_associate("mci1_clk", &at91sam9263_mmc1_device.dev, "mci_clk");
343 platform_device_register(&at91sam9263_mmc1_device); 341 platform_device_register(&at91sam9263_mmc1_device);
344 } 342 }
345} 343}
@@ -686,7 +684,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
686 at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ 684 at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
687 at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ 685 at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */
688 686
689 at91_clock_associate("spi0_clk", &at91sam9263_spi0_device.dev, "spi_clk");
690 platform_device_register(&at91sam9263_spi0_device); 687 platform_device_register(&at91sam9263_spi0_device);
691 } 688 }
692 if (enable_spi1) { 689 if (enable_spi1) {
@@ -694,7 +691,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
694 at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ 691 at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */
695 at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ 692 at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */
696 693
697 at91_clock_associate("spi1_clk", &at91sam9263_spi1_device.dev, "spi_clk");
698 platform_device_register(&at91sam9263_spi1_device); 694 platform_device_register(&at91sam9263_spi1_device);
699 } 695 }
700} 696}
@@ -941,8 +937,6 @@ static struct platform_device at91sam9263_tcb_device = {
941 937
942static void __init at91_add_device_tc(void) 938static void __init at91_add_device_tc(void)
943{ 939{
944 /* this chip has one clock and irq for all three TC channels */
945 at91_clock_associate("tcb_clk", &at91sam9263_tcb_device.dev, "t0_clk");
946 platform_device_register(&at91sam9263_tcb_device); 940 platform_device_register(&at91sam9263_tcb_device);
947} 941}
948#else 942#else
@@ -1171,12 +1165,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
1171 case AT91SAM9263_ID_SSC0: 1165 case AT91SAM9263_ID_SSC0:
1172 pdev = &at91sam9263_ssc0_device; 1166 pdev = &at91sam9263_ssc0_device;
1173 configure_ssc0_pins(pins); 1167 configure_ssc0_pins(pins);
1174 at91_clock_associate("ssc0_clk", &pdev->dev, "pclk");
1175 break; 1168 break;
1176 case AT91SAM9263_ID_SSC1: 1169 case AT91SAM9263_ID_SSC1:
1177 pdev = &at91sam9263_ssc1_device; 1170 pdev = &at91sam9263_ssc1_device;
1178 configure_ssc1_pins(pins); 1171 configure_ssc1_pins(pins);
1179 at91_clock_associate("ssc1_clk", &pdev->dev, "pclk");
1180 break; 1172 break;
1181 default: 1173 default:
1182 return; 1174 return;
@@ -1370,32 +1362,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
1370void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1362void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1371{ 1363{
1372 struct platform_device *pdev; 1364 struct platform_device *pdev;
1365 struct atmel_uart_data *pdata;
1373 1366
1374 switch (id) { 1367 switch (id) {
1375 case 0: /* DBGU */ 1368 case 0: /* DBGU */
1376 pdev = &at91sam9263_dbgu_device; 1369 pdev = &at91sam9263_dbgu_device;
1377 configure_dbgu_pins(); 1370 configure_dbgu_pins();
1378 at91_clock_associate("mck", &pdev->dev, "usart");
1379 break; 1371 break;
1380 case AT91SAM9263_ID_US0: 1372 case AT91SAM9263_ID_US0:
1381 pdev = &at91sam9263_uart0_device; 1373 pdev = &at91sam9263_uart0_device;
1382 configure_usart0_pins(pins); 1374 configure_usart0_pins(pins);
1383 at91_clock_associate("usart0_clk", &pdev->dev, "usart");
1384 break; 1375 break;
1385 case AT91SAM9263_ID_US1: 1376 case AT91SAM9263_ID_US1:
1386 pdev = &at91sam9263_uart1_device; 1377 pdev = &at91sam9263_uart1_device;
1387 configure_usart1_pins(pins); 1378 configure_usart1_pins(pins);
1388 at91_clock_associate("usart1_clk", &pdev->dev, "usart");
1389 break; 1379 break;
1390 case AT91SAM9263_ID_US2: 1380 case AT91SAM9263_ID_US2:
1391 pdev = &at91sam9263_uart2_device; 1381 pdev = &at91sam9263_uart2_device;
1392 configure_usart2_pins(pins); 1382 configure_usart2_pins(pins);
1393 at91_clock_associate("usart2_clk", &pdev->dev, "usart");
1394 break; 1383 break;
1395 default: 1384 default:
1396 return; 1385 return;
1397 } 1386 }
1398 pdev->id = portnr; /* update to mapped ID */ 1387 pdata = pdev->dev.platform_data;
1388 pdata->num = portnr; /* update to mapped ID */
1399 1389
1400 if (portnr < ATMEL_MAX_UART) 1390 if (portnr < ATMEL_MAX_UART)
1401 at91_uarts[portnr] = pdev; 1391 at91_uarts[portnr] = pdev;
@@ -1403,8 +1393,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1403 1393
1404void __init at91_set_serial_console(unsigned portnr) 1394void __init at91_set_serial_console(unsigned portnr)
1405{ 1395{
1406 if (portnr < ATMEL_MAX_UART) 1396 if (portnr < ATMEL_MAX_UART) {
1407 atmel_default_console_device = at91_uarts[portnr]; 1397 atmel_default_console_device = at91_uarts[portnr];
1398 at91sam9263_set_console_clock(portnr);
1399 }
1408} 1400}
1409 1401
1410void __init at91_add_device_serial(void) 1402void __init at91_add_device_serial(void)