diff options
-rw-r--r-- | arch/arm/mach-davinci/da830.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm646x.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/serial.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/serial.c | 34 |
9 files changed, 10 insertions, 32 deletions
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index a3ffd527dbe5..111613bc62b7 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -1199,7 +1199,6 @@ static struct davinci_soc_info davinci_soc_info_da830 = { | |||
1199 | .gpio_base = DA8XX_GPIO_BASE, | 1199 | .gpio_base = DA8XX_GPIO_BASE, |
1200 | .gpio_num = 128, | 1200 | .gpio_num = 128, |
1201 | .gpio_irq = IRQ_DA8XX_GPIO0, | 1201 | .gpio_irq = IRQ_DA8XX_GPIO0, |
1202 | .serial_dev = da8xx_serial_device, | ||
1203 | .emac_pdata = &da8xx_emac_pdata, | 1202 | .emac_pdata = &da8xx_emac_pdata, |
1204 | }; | 1203 | }; |
1205 | 1204 | ||
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index d4274ab5e742..5ef37f9d5984 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -1301,7 +1301,6 @@ static struct davinci_soc_info davinci_soc_info_da850 = { | |||
1301 | .gpio_base = DA8XX_GPIO_BASE, | 1301 | .gpio_base = DA8XX_GPIO_BASE, |
1302 | .gpio_num = 144, | 1302 | .gpio_num = 144, |
1303 | .gpio_irq = IRQ_DA8XX_GPIO0, | 1303 | .gpio_irq = IRQ_DA8XX_GPIO0, |
1304 | .serial_dev = da8xx_serial_device, | ||
1305 | .emac_pdata = &da8xx_emac_pdata, | 1304 | .emac_pdata = &da8xx_emac_pdata, |
1306 | .sram_dma = DA8XX_SHARED_RAM_BASE, | 1305 | .sram_dma = DA8XX_SHARED_RAM_BASE, |
1307 | .sram_len = SZ_128K, | 1306 | .sram_len = SZ_128K, |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 85367350e3d9..0f3cb486f561 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -1009,7 +1009,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = { | |||
1009 | .gpio_base = DAVINCI_GPIO_BASE, | 1009 | .gpio_base = DAVINCI_GPIO_BASE, |
1010 | .gpio_num = 104, | 1010 | .gpio_num = 104, |
1011 | .gpio_irq = IRQ_DM355_GPIOBNK0, | 1011 | .gpio_irq = IRQ_DM355_GPIOBNK0, |
1012 | .serial_dev = dm355_serial_device, | ||
1013 | .sram_dma = 0x00010000, | 1012 | .sram_dma = 0x00010000, |
1014 | .sram_len = SZ_32K, | 1013 | .sram_len = SZ_32K, |
1015 | }; | 1014 | }; |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index fa5c693cf16b..3a039bcf5337 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -1109,7 +1109,6 @@ static struct davinci_soc_info davinci_soc_info_dm365 = { | |||
1109 | .gpio_num = 104, | 1109 | .gpio_num = 104, |
1110 | .gpio_irq = IRQ_DM365_GPIO0, | 1110 | .gpio_irq = IRQ_DM365_GPIO0, |
1111 | .gpio_unbanked = 8, /* really 16 ... skip muxed GPIOs */ | 1111 | .gpio_unbanked = 8, /* really 16 ... skip muxed GPIOs */ |
1112 | .serial_dev = dm365_serial_device, | ||
1113 | .emac_pdata = &dm365_emac_pdata, | 1112 | .emac_pdata = &dm365_emac_pdata, |
1114 | .sram_dma = 0x00010000, | 1113 | .sram_dma = 0x00010000, |
1115 | .sram_len = SZ_32K, | 1114 | .sram_len = SZ_32K, |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 3969289416a5..23de0dea9884 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -900,7 +900,6 @@ static struct davinci_soc_info davinci_soc_info_dm644x = { | |||
900 | .gpio_base = DAVINCI_GPIO_BASE, | 900 | .gpio_base = DAVINCI_GPIO_BASE, |
901 | .gpio_num = 71, | 901 | .gpio_num = 71, |
902 | .gpio_irq = IRQ_GPIOBNK0, | 902 | .gpio_irq = IRQ_GPIOBNK0, |
903 | .serial_dev = dm644x_serial_device, | ||
904 | .emac_pdata = &dm644x_emac_pdata, | 903 | .emac_pdata = &dm644x_emac_pdata, |
905 | .sram_dma = 0x00008000, | 904 | .sram_dma = 0x00008000, |
906 | .sram_len = SZ_16K, | 905 | .sram_len = SZ_16K, |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 331a9ec8e7f2..4b258042dff9 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -877,7 +877,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = { | |||
877 | .gpio_base = DAVINCI_GPIO_BASE, | 877 | .gpio_base = DAVINCI_GPIO_BASE, |
878 | .gpio_num = 43, /* Only 33 usable */ | 878 | .gpio_num = 43, /* Only 33 usable */ |
879 | .gpio_irq = IRQ_DM646X_GPIOBNK0, | 879 | .gpio_irq = IRQ_DM646X_GPIOBNK0, |
880 | .serial_dev = dm646x_serial_device, | ||
881 | .emac_pdata = &dm646x_emac_pdata, | 880 | .emac_pdata = &dm646x_emac_pdata, |
882 | .sram_dma = 0x10010000, | 881 | .sram_dma = 0x10010000, |
883 | .sram_len = SZ_32K, | 882 | .sram_len = SZ_32K, |
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index cce316b92c06..0b3c169758ed 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -72,7 +72,6 @@ struct davinci_soc_info { | |||
72 | unsigned gpio_unbanked; | 72 | unsigned gpio_unbanked; |
73 | struct davinci_gpio_controller *gpio_ctlrs; | 73 | struct davinci_gpio_controller *gpio_ctlrs; |
74 | int gpio_ctlrs_num; | 74 | int gpio_ctlrs_num; |
75 | struct platform_device *serial_dev; | ||
76 | struct emac_platform_data *emac_pdata; | 75 | struct emac_platform_data *emac_pdata; |
77 | dma_addr_t sram_dma; | 76 | dma_addr_t sram_dma; |
78 | unsigned sram_len; | 77 | unsigned sram_len; |
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 36bf59155f4b..52b8571b2e70 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
42 | extern int davinci_serial_init(struct platform_device *); | 42 | extern int davinci_serial_init(struct platform_device *); |
43 | extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate); | ||
44 | #endif | 43 | #endif |
45 | 44 | ||
46 | #endif /* __ASM_ARCH_SERIAL_H */ | 45 | #endif /* __ASM_ARCH_SERIAL_H */ |
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c index 45bd41a924db..5e93a734c858 100644 --- a/arch/arm/mach-davinci/serial.c +++ b/arch/arm/mach-davinci/serial.c | |||
@@ -70,33 +70,12 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p) | |||
70 | UART_DM646X_SCR_TX_WATERMARK); | 70 | UART_DM646X_SCR_TX_WATERMARK); |
71 | } | 71 | } |
72 | 72 | ||
73 | /* Enable UART clock and obtain its rate */ | ||
74 | int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) | ||
75 | { | ||
76 | struct clk *clk; | ||
77 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
78 | struct device *dev = &soc_info->serial_dev[instance].dev; | ||
79 | |||
80 | clk = clk_get(dev, NULL); | ||
81 | if (IS_ERR(clk)) { | ||
82 | pr_err("%s:%d: failed to get UART%d clock\n", | ||
83 | __func__, __LINE__, instance); | ||
84 | return PTR_ERR(clk); | ||
85 | } | ||
86 | |||
87 | clk_prepare_enable(clk); | ||
88 | |||
89 | if (rate) | ||
90 | *rate = clk_get_rate(clk); | ||
91 | |||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | int __init davinci_serial_init(struct platform_device *serial_dev) | 73 | int __init davinci_serial_init(struct platform_device *serial_dev) |
96 | { | 74 | { |
97 | int i, ret = 0; | 75 | int i, ret = 0; |
98 | struct device *dev; | 76 | struct device *dev; |
99 | struct plat_serial8250_port *p; | 77 | struct plat_serial8250_port *p; |
78 | struct clk *clk; | ||
100 | 79 | ||
101 | /* | 80 | /* |
102 | * Make sure the serial ports are muxed on at this point. | 81 | * Make sure the serial ports are muxed on at this point. |
@@ -110,9 +89,16 @@ int __init davinci_serial_init(struct platform_device *serial_dev) | |||
110 | if (ret) | 89 | if (ret) |
111 | continue; | 90 | continue; |
112 | 91 | ||
113 | ret = davinci_serial_setup_clk(i, &p->uartclk); | 92 | clk = clk_get(dev, NULL); |
114 | if (ret) | 93 | if (IS_ERR(clk)) { |
94 | pr_err("%s:%d: failed to get UART%d clock\n", | ||
95 | __func__, __LINE__, i); | ||
115 | continue; | 96 | continue; |
97 | } | ||
98 | |||
99 | clk_prepare_enable(clk); | ||
100 | |||
101 | p->uartclk = clk_get_rate(clk); | ||
116 | 102 | ||
117 | if (!p->membase && p->mapbase) { | 103 | if (!p->membase && p->mapbase) { |
118 | p->membase = ioremap(p->mapbase, SZ_4K); | 104 | p->membase = ioremap(p->mapbase, SZ_4K); |