diff options
Diffstat (limited to 'arch/arm/mach-davinci/dm646x.c')
-rw-r--r-- | arch/arm/mach-davinci/dm646x.c | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index d1259e80141b..68f8d1f1aca1 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -342,15 +342,16 @@ static struct clk_lookup dm646x_clks[] = { | |||
342 | CLK(NULL, "edma_tc1", &edma_tc1_clk), | 342 | CLK(NULL, "edma_tc1", &edma_tc1_clk), |
343 | CLK(NULL, "edma_tc2", &edma_tc2_clk), | 343 | CLK(NULL, "edma_tc2", &edma_tc2_clk), |
344 | CLK(NULL, "edma_tc3", &edma_tc3_clk), | 344 | CLK(NULL, "edma_tc3", &edma_tc3_clk), |
345 | CLK(NULL, "uart0", &uart0_clk), | 345 | CLK("serial8250.0", NULL, &uart0_clk), |
346 | CLK(NULL, "uart1", &uart1_clk), | 346 | CLK("serial8250.1", NULL, &uart1_clk), |
347 | CLK(NULL, "uart2", &uart2_clk), | 347 | CLK("serial8250.2", NULL, &uart2_clk), |
348 | CLK("i2c_davinci.1", NULL, &i2c_clk), | 348 | CLK("i2c_davinci.1", NULL, &i2c_clk), |
349 | CLK(NULL, "gpio", &gpio_clk), | 349 | CLK(NULL, "gpio", &gpio_clk), |
350 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), | 350 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), |
351 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), | 351 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), |
352 | CLK(NULL, "aemif", &aemif_clk), | 352 | CLK(NULL, "aemif", &aemif_clk), |
353 | CLK("davinci_emac.1", NULL, &emac_clk), | 353 | CLK("davinci_emac.1", NULL, &emac_clk), |
354 | CLK("davinci_mdio.0", "fck", &emac_clk), | ||
354 | CLK(NULL, "pwm0", &pwm0_clk), | 355 | CLK(NULL, "pwm0", &pwm0_clk), |
355 | CLK(NULL, "pwm1", &pwm1_clk), | 356 | CLK(NULL, "pwm1", &pwm1_clk), |
356 | CLK(NULL, "timer0", &timer0_clk), | 357 | CLK(NULL, "timer0", &timer0_clk), |
@@ -790,7 +791,7 @@ static struct davinci_timer_info dm646x_timer_info = { | |||
790 | .clocksource_id = T0_TOP, | 791 | .clocksource_id = T0_TOP, |
791 | }; | 792 | }; |
792 | 793 | ||
793 | static struct plat_serial8250_port dm646x_serial_platform_data[] = { | 794 | static struct plat_serial8250_port dm646x_serial0_platform_data[] = { |
794 | { | 795 | { |
795 | .mapbase = DAVINCI_UART0_BASE, | 796 | .mapbase = DAVINCI_UART0_BASE, |
796 | .irq = IRQ_UARTINT0, | 797 | .irq = IRQ_UARTINT0, |
@@ -800,6 +801,11 @@ static struct plat_serial8250_port dm646x_serial_platform_data[] = { | |||
800 | .regshift = 2, | 801 | .regshift = 2, |
801 | }, | 802 | }, |
802 | { | 803 | { |
804 | .flags = 0, | ||
805 | } | ||
806 | }; | ||
807 | static struct plat_serial8250_port dm646x_serial1_platform_data[] = { | ||
808 | { | ||
803 | .mapbase = DAVINCI_UART1_BASE, | 809 | .mapbase = DAVINCI_UART1_BASE, |
804 | .irq = IRQ_UARTINT1, | 810 | .irq = IRQ_UARTINT1, |
805 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | | 811 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | |
@@ -808,6 +814,11 @@ static struct plat_serial8250_port dm646x_serial_platform_data[] = { | |||
808 | .regshift = 2, | 814 | .regshift = 2, |
809 | }, | 815 | }, |
810 | { | 816 | { |
817 | .flags = 0, | ||
818 | } | ||
819 | }; | ||
820 | static struct plat_serial8250_port dm646x_serial2_platform_data[] = { | ||
821 | { | ||
811 | .mapbase = DAVINCI_UART2_BASE, | 822 | .mapbase = DAVINCI_UART2_BASE, |
812 | .irq = IRQ_DM646X_UARTINT2, | 823 | .irq = IRQ_DM646X_UARTINT2, |
813 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | | 824 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | |
@@ -816,16 +827,34 @@ static struct plat_serial8250_port dm646x_serial_platform_data[] = { | |||
816 | .regshift = 2, | 827 | .regshift = 2, |
817 | }, | 828 | }, |
818 | { | 829 | { |
819 | .flags = 0 | 830 | .flags = 0, |
820 | }, | 831 | } |
821 | }; | 832 | }; |
822 | 833 | ||
823 | static struct platform_device dm646x_serial_device = { | 834 | struct platform_device dm646x_serial_device[] = { |
824 | .name = "serial8250", | 835 | { |
825 | .id = PLAT8250_DEV_PLATFORM, | 836 | .name = "serial8250", |
826 | .dev = { | 837 | .id = PLAT8250_DEV_PLATFORM, |
827 | .platform_data = dm646x_serial_platform_data, | 838 | .dev = { |
839 | .platform_data = dm646x_serial0_platform_data, | ||
840 | } | ||
841 | }, | ||
842 | { | ||
843 | .name = "serial8250", | ||
844 | .id = PLAT8250_DEV_PLATFORM1, | ||
845 | .dev = { | ||
846 | .platform_data = dm646x_serial1_platform_data, | ||
847 | } | ||
828 | }, | 848 | }, |
849 | { | ||
850 | .name = "serial8250", | ||
851 | .id = PLAT8250_DEV_PLATFORM2, | ||
852 | .dev = { | ||
853 | .platform_data = dm646x_serial2_platform_data, | ||
854 | } | ||
855 | }, | ||
856 | { | ||
857 | } | ||
829 | }; | 858 | }; |
830 | 859 | ||
831 | static struct davinci_soc_info davinci_soc_info_dm646x = { | 860 | static struct davinci_soc_info davinci_soc_info_dm646x = { |
@@ -849,7 +878,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = { | |||
849 | .gpio_base = DAVINCI_GPIO_BASE, | 878 | .gpio_base = DAVINCI_GPIO_BASE, |
850 | .gpio_num = 43, /* Only 33 usable */ | 879 | .gpio_num = 43, /* Only 33 usable */ |
851 | .gpio_irq = IRQ_DM646X_GPIOBNK0, | 880 | .gpio_irq = IRQ_DM646X_GPIOBNK0, |
852 | .serial_dev = &dm646x_serial_device, | ||
853 | .emac_pdata = &dm646x_emac_pdata, | 881 | .emac_pdata = &dm646x_emac_pdata, |
854 | .sram_dma = 0x10010000, | 882 | .sram_dma = 0x10010000, |
855 | .sram_len = SZ_32K, | 883 | .sram_len = SZ_32K, |
@@ -913,8 +941,6 @@ static int __init dm646x_init_devices(void) | |||
913 | 941 | ||
914 | platform_device_register(&dm646x_mdio_device); | 942 | platform_device_register(&dm646x_mdio_device); |
915 | platform_device_register(&dm646x_emac_device); | 943 | platform_device_register(&dm646x_emac_device); |
916 | clk_add_alias(NULL, dev_name(&dm646x_mdio_device.dev), | ||
917 | NULL, &dm646x_emac_device.dev); | ||
918 | 944 | ||
919 | return 0; | 945 | return 0; |
920 | } | 946 | } |