diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 5e9f8a4c38df..05674865bc21 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -180,7 +180,6 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) | |||
180 | } | 180 | } |
181 | 181 | ||
182 | usbh_ehci_data = *data; | 182 | usbh_ehci_data = *data; |
183 | at91_clock_associate("uhphs_clk", &at91_usbh_ehci_device.dev, "ehci_clk"); | ||
184 | platform_device_register(&at91_usbh_ehci_device); | 183 | platform_device_register(&at91_usbh_ehci_device); |
185 | } | 184 | } |
186 | #else | 185 | #else |
@@ -266,10 +265,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data) | |||
266 | 265 | ||
267 | /* Pullup pin is handled internally by USB device peripheral */ | 266 | /* Pullup pin is handled internally by USB device peripheral */ |
268 | 267 | ||
269 | /* Clocks */ | ||
270 | at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk"); | ||
271 | at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk"); | ||
272 | |||
273 | platform_device_register(&at91_usba_udc_device); | 268 | platform_device_register(&at91_usba_udc_device); |
274 | } | 269 | } |
275 | #else | 270 | #else |
@@ -478,7 +473,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) | |||
478 | } | 473 | } |
479 | 474 | ||
480 | mmc0_data = *data; | 475 | mmc0_data = *data; |
481 | at91_clock_associate("mci0_clk", &at91sam9g45_mmc0_device.dev, "mci_clk"); | ||
482 | platform_device_register(&at91sam9g45_mmc0_device); | 476 | platform_device_register(&at91sam9g45_mmc0_device); |
483 | 477 | ||
484 | } else { /* MCI1 */ | 478 | } else { /* MCI1 */ |
@@ -504,7 +498,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) | |||
504 | } | 498 | } |
505 | 499 | ||
506 | mmc1_data = *data; | 500 | mmc1_data = *data; |
507 | at91_clock_associate("mci1_clk", &at91sam9g45_mmc1_device.dev, "mci_clk"); | ||
508 | platform_device_register(&at91sam9g45_mmc1_device); | 501 | platform_device_register(&at91sam9g45_mmc1_device); |
509 | 502 | ||
510 | } | 503 | } |
@@ -801,7 +794,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
801 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI0_MOSI */ | 794 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI0_MOSI */ |
802 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI0_SPCK */ | 795 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI0_SPCK */ |
803 | 796 | ||
804 | at91_clock_associate("spi0_clk", &at91sam9g45_spi0_device.dev, "spi_clk"); | ||
805 | platform_device_register(&at91sam9g45_spi0_device); | 797 | platform_device_register(&at91sam9g45_spi0_device); |
806 | } | 798 | } |
807 | if (enable_spi1) { | 799 | if (enable_spi1) { |
@@ -809,7 +801,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
809 | at91_set_A_periph(AT91_PIN_PB15, 0); /* SPI1_MOSI */ | 801 | at91_set_A_periph(AT91_PIN_PB15, 0); /* SPI1_MOSI */ |
810 | at91_set_A_periph(AT91_PIN_PB16, 0); /* SPI1_SPCK */ | 802 | at91_set_A_periph(AT91_PIN_PB16, 0); /* SPI1_SPCK */ |
811 | 803 | ||
812 | at91_clock_associate("spi1_clk", &at91sam9g45_spi1_device.dev, "spi_clk"); | ||
813 | platform_device_register(&at91sam9g45_spi1_device); | 804 | platform_device_register(&at91sam9g45_spi1_device); |
814 | } | 805 | } |
815 | } | 806 | } |
@@ -999,10 +990,7 @@ static struct platform_device at91sam9g45_tcb1_device = { | |||
999 | 990 | ||
1000 | static void __init at91_add_device_tc(void) | 991 | static void __init at91_add_device_tc(void) |
1001 | { | 992 | { |
1002 | /* this chip has one clock and irq for all six TC channels */ | ||
1003 | at91_clock_associate("tcb0_clk", &at91sam9g45_tcb0_device.dev, "t0_clk"); | ||
1004 | platform_device_register(&at91sam9g45_tcb0_device); | 993 | platform_device_register(&at91sam9g45_tcb0_device); |
1005 | at91_clock_associate("tcb1_clk", &at91sam9g45_tcb1_device.dev, "t0_clk"); | ||
1006 | platform_device_register(&at91sam9g45_tcb1_device); | 994 | platform_device_register(&at91sam9g45_tcb1_device); |
1007 | } | 995 | } |
1008 | #else | 996 | #else |
@@ -1286,12 +1274,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
1286 | case AT91SAM9G45_ID_SSC0: | 1274 | case AT91SAM9G45_ID_SSC0: |
1287 | pdev = &at91sam9g45_ssc0_device; | 1275 | pdev = &at91sam9g45_ssc0_device; |
1288 | configure_ssc0_pins(pins); | 1276 | configure_ssc0_pins(pins); |
1289 | at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); | ||
1290 | break; | 1277 | break; |
1291 | case AT91SAM9G45_ID_SSC1: | 1278 | case AT91SAM9G45_ID_SSC1: |
1292 | pdev = &at91sam9g45_ssc1_device; | 1279 | pdev = &at91sam9g45_ssc1_device; |
1293 | configure_ssc1_pins(pins); | 1280 | configure_ssc1_pins(pins); |
1294 | at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); | ||
1295 | break; | 1281 | break; |
1296 | default: | 1282 | default: |
1297 | return; | 1283 | return; |
@@ -1527,37 +1513,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1527 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1513 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1528 | { | 1514 | { |
1529 | struct platform_device *pdev; | 1515 | struct platform_device *pdev; |
1516 | struct atmel_uart_data *pdata; | ||
1530 | 1517 | ||
1531 | switch (id) { | 1518 | switch (id) { |
1532 | case 0: /* DBGU */ | 1519 | case 0: /* DBGU */ |
1533 | pdev = &at91sam9g45_dbgu_device; | 1520 | pdev = &at91sam9g45_dbgu_device; |
1534 | configure_dbgu_pins(); | 1521 | configure_dbgu_pins(); |
1535 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1536 | break; | 1522 | break; |
1537 | case AT91SAM9G45_ID_US0: | 1523 | case AT91SAM9G45_ID_US0: |
1538 | pdev = &at91sam9g45_uart0_device; | 1524 | pdev = &at91sam9g45_uart0_device; |
1539 | configure_usart0_pins(pins); | 1525 | configure_usart0_pins(pins); |
1540 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1541 | break; | 1526 | break; |
1542 | case AT91SAM9G45_ID_US1: | 1527 | case AT91SAM9G45_ID_US1: |
1543 | pdev = &at91sam9g45_uart1_device; | 1528 | pdev = &at91sam9g45_uart1_device; |
1544 | configure_usart1_pins(pins); | 1529 | configure_usart1_pins(pins); |
1545 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1546 | break; | 1530 | break; |
1547 | case AT91SAM9G45_ID_US2: | 1531 | case AT91SAM9G45_ID_US2: |
1548 | pdev = &at91sam9g45_uart2_device; | 1532 | pdev = &at91sam9g45_uart2_device; |
1549 | configure_usart2_pins(pins); | 1533 | configure_usart2_pins(pins); |
1550 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1551 | break; | 1534 | break; |
1552 | case AT91SAM9G45_ID_US3: | 1535 | case AT91SAM9G45_ID_US3: |
1553 | pdev = &at91sam9g45_uart3_device; | 1536 | pdev = &at91sam9g45_uart3_device; |
1554 | configure_usart3_pins(pins); | 1537 | configure_usart3_pins(pins); |
1555 | at91_clock_associate("usart3_clk", &pdev->dev, "usart"); | ||
1556 | break; | 1538 | break; |
1557 | default: | 1539 | default: |
1558 | return; | 1540 | return; |
1559 | } | 1541 | } |
1560 | pdev->id = portnr; /* update to mapped ID */ | 1542 | pdata = pdev->dev.platform_data; |
1543 | pdata->num = portnr; /* update to mapped ID */ | ||
1561 | 1544 | ||
1562 | if (portnr < ATMEL_MAX_UART) | 1545 | if (portnr < ATMEL_MAX_UART) |
1563 | at91_uarts[portnr] = pdev; | 1546 | at91_uarts[portnr] = pdev; |
@@ -1565,8 +1548,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1565 | 1548 | ||
1566 | void __init at91_set_serial_console(unsigned portnr) | 1549 | void __init at91_set_serial_console(unsigned portnr) |
1567 | { | 1550 | { |
1568 | if (portnr < ATMEL_MAX_UART) | 1551 | if (portnr < ATMEL_MAX_UART) { |
1569 | atmel_default_console_device = at91_uarts[portnr]; | 1552 | atmel_default_console_device = at91_uarts[portnr]; |
1553 | at91sam9g45_set_console_clock(portnr); | ||
1554 | } | ||
1570 | } | 1555 | } |
1571 | 1556 | ||
1572 | void __init at91_add_device_serial(void) | 1557 | void __init at91_add_device_serial(void) |