[PATCH] omap4: clocks: Make Uart driver's clock calls OMAP4 compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Abhijit Pagare <abhijitpagare@xxxxxx>

The uart driver has been adapted for the OMAP4 way of clock calls.

Signed-off-by: Abhijit Pagare <abhijitpagare@xxxxxx>
---
 arch/arm/mach-omap2/serial.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index b79bc89..97859b0 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -257,7 +257,8 @@ static inline void omap_uart_enable_clocks(struct omap_uart_state *uart)
 		return;
 
 	clk_enable(uart->ick);
-	clk_enable(uart->fck);
+	if (!cpu_is_omap44xx())
+		clk_enable(uart->fck);
 	uart->clocked = 1;
 	omap_uart_restore_context(uart);
 }
@@ -272,7 +273,8 @@ static inline void omap_uart_disable_clocks(struct omap_uart_state *uart)
 	omap_uart_save_context(uart);
 	uart->clocked = 0;
 	clk_disable(uart->ick);
-	clk_disable(uart->fck);
+	if (!cpu_is_omap44xx())
+		clk_disable(uart->fck);
 }
 
 static void omap_uart_enable_wakeup(struct omap_uart_state *uart)
@@ -669,18 +671,24 @@ void __init omap_serial_early_init(void)
 			continue;
 		}
 
-		sprintf(name, "uart%d_ick", i+1);
+		if (!cpu_is_omap44xx())
+			sprintf(name, "uart%d_ick", i+1);
+		else
+			sprintf(name, "uart%d_ck", i+1);
 		uart->ick = clk_get(NULL, name);
 		if (IS_ERR(uart->ick)) {
 			printk(KERN_ERR "Could not get uart%d_ick\n", i+1);
 			uart->ick = NULL;
 		}
 
-		sprintf(name, "uart%d_fck", i+1);
-		uart->fck = clk_get(NULL, name);
-		if (IS_ERR(uart->fck)) {
-			printk(KERN_ERR "Could not get uart%d_fck\n", i+1);
-			uart->fck = NULL;
+		if (!cpu_is_omap44xx()) {
+			sprintf(name, "uart%d_fck", i+1);
+			uart->fck = clk_get(NULL, name);
+			if (IS_ERR(uart->fck)) {
+				printk(KERN_ERR "Could not get uart%d_fck\n",
+									 i+1);
+				uart->fck = NULL;
+			}
 		}
 
 		/* FIXME: Remove this once the clkdev is ready */
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux