aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm644x.c
diff options
context:
space:
mode:
authorManjunathappa, Prakash <prakash.pm@ti.com>2013-06-19 05:15:38 -0400
committerSekhar Nori <nsekhar@ti.com>2013-07-22 06:04:55 -0400
commit19955c3d7453757271d05859958ca1804a5d2d67 (patch)
tree978e156a66db7dae2435c23046a75757958f8e5f /arch/arm/mach-davinci/dm644x.c
parent3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b (diff)
ARM: davinci: uart: move to devid based clk_get
For modules having single clock, clk_get should be done with dev_id. But current davinci implementation handles multiple instances of the UART devices with single platform_device_register. Hence clk_get is based on con_id rather than dev_id, this is not correct. Do platform_device_register for each instance and clk_get on dev_id. Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com> [nsekhar@ti.com: actually stop using con_id in clk_get(), squash the patch adding OF aux data into this one] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c52
1 files changed, 40 insertions, 12 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index a49d18246fe9..490eb8cd1dd3 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -303,9 +303,9 @@ static struct clk_lookup dm644x_clks[] = {
303 CLK("vpss", "master", &vpss_master_clk), 303 CLK("vpss", "master", &vpss_master_clk),
304 CLK("vpss", "slave", &vpss_slave_clk), 304 CLK("vpss", "slave", &vpss_slave_clk),
305 CLK(NULL, "arm", &arm_clk), 305 CLK(NULL, "arm", &arm_clk),
306 CLK(NULL, "uart0", &uart0_clk), 306 CLK("serial8250.0", NULL, &uart0_clk),
307 CLK(NULL, "uart1", &uart1_clk), 307 CLK("serial8250.1", NULL, &uart1_clk),
308 CLK(NULL, "uart2", &uart2_clk), 308 CLK("serial8250.2", NULL, &uart2_clk),
309 CLK("davinci_emac.1", NULL, &emac_clk), 309 CLK("davinci_emac.1", NULL, &emac_clk),
310 CLK("i2c_davinci.1", NULL, &i2c_clk), 310 CLK("i2c_davinci.1", NULL, &i2c_clk),
311 CLK("palm_bk3710", NULL, &ide_clk), 311 CLK("palm_bk3710", NULL, &ide_clk),
@@ -813,7 +813,7 @@ static struct davinci_timer_info dm644x_timer_info = {
813 .clocksource_id = T0_TOP, 813 .clocksource_id = T0_TOP,
814}; 814};
815 815
816static struct plat_serial8250_port dm644x_serial_platform_data[] = { 816static struct plat_serial8250_port dm644x_serial0_platform_data[] = {
817 { 817 {
818 .mapbase = DAVINCI_UART0_BASE, 818 .mapbase = DAVINCI_UART0_BASE,
819 .irq = IRQ_UARTINT0, 819 .irq = IRQ_UARTINT0,
@@ -823,6 +823,11 @@ static struct plat_serial8250_port dm644x_serial_platform_data[] = {
823 .regshift = 2, 823 .regshift = 2,
824 }, 824 },
825 { 825 {
826 .flags = 0,
827 }
828};
829static struct plat_serial8250_port dm644x_serial1_platform_data[] = {
830 {
826 .mapbase = DAVINCI_UART1_BASE, 831 .mapbase = DAVINCI_UART1_BASE,
827 .irq = IRQ_UARTINT1, 832 .irq = IRQ_UARTINT1,
828 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | 833 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
@@ -831,6 +836,11 @@ static struct plat_serial8250_port dm644x_serial_platform_data[] = {
831 .regshift = 2, 836 .regshift = 2,
832 }, 837 },
833 { 838 {
839 .flags = 0,
840 }
841};
842static struct plat_serial8250_port dm644x_serial2_platform_data[] = {
843 {
834 .mapbase = DAVINCI_UART2_BASE, 844 .mapbase = DAVINCI_UART2_BASE,
835 .irq = IRQ_UARTINT2, 845 .irq = IRQ_UARTINT2,
836 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | 846 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
@@ -839,16 +849,34 @@ static struct plat_serial8250_port dm644x_serial_platform_data[] = {
839 .regshift = 2, 849 .regshift = 2,
840 }, 850 },
841 { 851 {
842 .flags = 0 852 .flags = 0,
843 }, 853 }
844}; 854};
845 855
846static struct platform_device dm644x_serial_device = { 856static struct platform_device dm644x_serial_device[] = {
847 .name = "serial8250", 857 {
848 .id = PLAT8250_DEV_PLATFORM, 858 .name = "serial8250",
849 .dev = { 859 .id = PLAT8250_DEV_PLATFORM,
850 .platform_data = dm644x_serial_platform_data, 860 .dev = {
861 .platform_data = dm644x_serial0_platform_data,
862 }
851 }, 863 },
864 {
865 .name = "serial8250",
866 .id = PLAT8250_DEV_PLATFORM1,
867 .dev = {
868 .platform_data = dm644x_serial1_platform_data,
869 }
870 },
871 {
872 .name = "serial8250",
873 .id = PLAT8250_DEV_PLATFORM2,
874 .dev = {
875 .platform_data = dm644x_serial2_platform_data,
876 }
877 },
878 {
879 }
852}; 880};
853 881
854static struct davinci_soc_info davinci_soc_info_dm644x = { 882static struct davinci_soc_info davinci_soc_info_dm644x = {
@@ -872,7 +900,7 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
872 .gpio_base = DAVINCI_GPIO_BASE, 900 .gpio_base = DAVINCI_GPIO_BASE,
873 .gpio_num = 71, 901 .gpio_num = 71,
874 .gpio_irq = IRQ_GPIOBNK0, 902 .gpio_irq = IRQ_GPIOBNK0,
875 .serial_dev = &dm644x_serial_device, 903 .serial_dev = dm644x_serial_device,
876 .emac_pdata = &dm644x_emac_pdata, 904 .emac_pdata = &dm644x_emac_pdata,
877 .sram_dma = 0x00008000, 905 .sram_dma = 0x00008000,
878 .sram_len = SZ_16K, 906 .sram_len = SZ_16K,