Commit 30ff720b authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: 4/4 Fix clock framework to use clk_enable/disable misc

This patch fixes OMAP clock framework to use clk_enable/disable
instead of clk_use/unuse as specified in include/linux/clk.h.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent fde0fd49
...@@ -146,7 +146,7 @@ void __init omap_serial_init(void) ...@@ -146,7 +146,7 @@ void __init omap_serial_init(void)
if (IS_ERR(uart1_ck)) if (IS_ERR(uart1_ck))
printk("Could not get uart1_ck\n"); printk("Could not get uart1_ck\n");
else { else {
clk_use(uart1_ck); clk_enable(uart1_ck);
if (cpu_is_omap1510()) if (cpu_is_omap1510())
clk_set_rate(uart1_ck, 12000000); clk_set_rate(uart1_ck, 12000000);
} }
...@@ -166,7 +166,7 @@ void __init omap_serial_init(void) ...@@ -166,7 +166,7 @@ void __init omap_serial_init(void)
if (IS_ERR(uart2_ck)) if (IS_ERR(uart2_ck))
printk("Could not get uart2_ck\n"); printk("Could not get uart2_ck\n");
else { else {
clk_use(uart2_ck); clk_enable(uart2_ck);
if (cpu_is_omap1510()) if (cpu_is_omap1510())
clk_set_rate(uart2_ck, 12000000); clk_set_rate(uart2_ck, 12000000);
else else
...@@ -188,7 +188,7 @@ void __init omap_serial_init(void) ...@@ -188,7 +188,7 @@ void __init omap_serial_init(void)
if (IS_ERR(uart3_ck)) if (IS_ERR(uart3_ck))
printk("Could not get uart3_ck\n"); printk("Could not get uart3_ck\n");
else { else {
clk_use(uart3_ck); clk_enable(uart3_ck);
if (cpu_is_omap1510()) if (cpu_is_omap1510())
clk_set_rate(uart3_ck, 12000000); clk_set_rate(uart3_ck, 12000000);
} }
......
...@@ -119,14 +119,14 @@ void __init omap_serial_init() ...@@ -119,14 +119,14 @@ void __init omap_serial_init()
if (IS_ERR(uart1_ick)) if (IS_ERR(uart1_ick))
printk("Could not get uart1_ick\n"); printk("Could not get uart1_ick\n");
else { else {
clk_use(uart1_ick); clk_enable(uart1_ick);
} }
uart1_fck = clk_get(NULL, "uart1_fck"); uart1_fck = clk_get(NULL, "uart1_fck");
if (IS_ERR(uart1_fck)) if (IS_ERR(uart1_fck))
printk("Could not get uart1_fck\n"); printk("Could not get uart1_fck\n");
else { else {
clk_use(uart1_fck); clk_enable(uart1_fck);
} }
break; break;
case 1: case 1:
...@@ -134,14 +134,14 @@ void __init omap_serial_init() ...@@ -134,14 +134,14 @@ void __init omap_serial_init()
if (IS_ERR(uart2_ick)) if (IS_ERR(uart2_ick))
printk("Could not get uart2_ick\n"); printk("Could not get uart2_ick\n");
else { else {
clk_use(uart2_ick); clk_enable(uart2_ick);
} }
uart2_fck = clk_get(NULL, "uart2_fck"); uart2_fck = clk_get(NULL, "uart2_fck");
if (IS_ERR(uart2_fck)) if (IS_ERR(uart2_fck))
printk("Could not get uart2_fck\n"); printk("Could not get uart2_fck\n");
else { else {
clk_use(uart2_fck); clk_enable(uart2_fck);
} }
break; break;
case 2: case 2:
...@@ -149,14 +149,14 @@ void __init omap_serial_init() ...@@ -149,14 +149,14 @@ void __init omap_serial_init()
if (IS_ERR(uart3_ick)) if (IS_ERR(uart3_ick))
printk("Could not get uart3_ick\n"); printk("Could not get uart3_ick\n");
else { else {
clk_use(uart3_ick); clk_enable(uart3_ick);
} }
uart3_fck = clk_get(NULL, "uart3_fck"); uart3_fck = clk_get(NULL, "uart3_fck");
if (IS_ERR(uart3_fck)) if (IS_ERR(uart3_fck))
printk("Could not get uart3_fck\n"); printk("Could not get uart3_fck\n");
else { else {
clk_use(uart3_fck); clk_enable(uart3_fck);
} }
break; break;
} }
......
...@@ -104,7 +104,7 @@ static void __init omap2_gp_timer_init(void) ...@@ -104,7 +104,7 @@ static void __init omap2_gp_timer_init(void)
if (IS_ERR(sys_ck)) if (IS_ERR(sys_ck))
printk(KERN_ERR "Could not get sys_ck\n"); printk(KERN_ERR "Could not get sys_ck\n");
else { else {
clk_use(sys_ck); clk_enable(sys_ck);
tick_period = clk_get_rate(sys_ck) / 100; tick_period = clk_get_rate(sys_ck) / 100;
clk_put(sys_ck); clk_put(sys_ck);
} }
......
...@@ -853,19 +853,19 @@ static int __init _omap_gpio_init(void) ...@@ -853,19 +853,19 @@ static int __init _omap_gpio_init(void)
if (IS_ERR(gpio_ick)) if (IS_ERR(gpio_ick))
printk("Could not get arm_gpio_ck\n"); printk("Could not get arm_gpio_ck\n");
else else
clk_use(gpio_ick); clk_enable(gpio_ick);
} }
if (cpu_is_omap24xx()) { if (cpu_is_omap24xx()) {
gpio_ick = clk_get(NULL, "gpios_ick"); gpio_ick = clk_get(NULL, "gpios_ick");
if (IS_ERR(gpio_ick)) if (IS_ERR(gpio_ick))
printk("Could not get gpios_ick\n"); printk("Could not get gpios_ick\n");
else else
clk_use(gpio_ick); clk_enable(gpio_ick);
gpio_fck = clk_get(NULL, "gpios_fck"); gpio_fck = clk_get(NULL, "gpios_fck");
if (IS_ERR(gpio_ick)) if (IS_ERR(gpio_ick))
printk("Could not get gpios_fck\n"); printk("Could not get gpios_fck\n");
else else
clk_use(gpio_fck); clk_enable(gpio_fck);
} }
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
......
...@@ -190,11 +190,11 @@ static int omap_mcbsp_check(unsigned int id) ...@@ -190,11 +190,11 @@ static int omap_mcbsp_check(unsigned int id)
static void omap_mcbsp_dsp_request(void) static void omap_mcbsp_dsp_request(void)
{ {
if (cpu_is_omap1510() || cpu_is_omap16xx()) { if (cpu_is_omap1510() || cpu_is_omap16xx()) {
clk_use(mcbsp_dsp_ck); clk_enable(mcbsp_dsp_ck);
clk_use(mcbsp_api_ck); clk_enable(mcbsp_api_ck);
/* enable 12MHz clock to mcbsp 1 & 3 */ /* enable 12MHz clock to mcbsp 1 & 3 */
clk_use(mcbsp_dspxor_ck); clk_enable(mcbsp_dspxor_ck);
/* /*
* DSP external peripheral reset * DSP external peripheral reset
...@@ -208,9 +208,9 @@ static void omap_mcbsp_dsp_request(void) ...@@ -208,9 +208,9 @@ static void omap_mcbsp_dsp_request(void)
static void omap_mcbsp_dsp_free(void) static void omap_mcbsp_dsp_free(void)
{ {
if (cpu_is_omap1510() || cpu_is_omap16xx()) { if (cpu_is_omap1510() || cpu_is_omap16xx()) {
clk_unuse(mcbsp_dspxor_ck); clk_disable(mcbsp_dspxor_ck);
clk_unuse(mcbsp_dsp_ck); clk_disable(mcbsp_dsp_ck);
clk_unuse(mcbsp_api_ck); clk_disable(mcbsp_api_ck);
} }
} }
......
...@@ -88,7 +88,7 @@ static int __init omap_ocpi_init(void) ...@@ -88,7 +88,7 @@ static int __init omap_ocpi_init(void)
if (IS_ERR(ocpi_ck)) if (IS_ERR(ocpi_ck))
return PTR_ERR(ocpi_ck); return PTR_ERR(ocpi_ck);
clk_use(ocpi_ck); clk_enable(ocpi_ck);
ocpi_enable(); ocpi_enable();
printk("OMAP OCPI interconnect driver loaded\n"); printk("OMAP OCPI interconnect driver loaded\n");
...@@ -102,7 +102,7 @@ static void __exit omap_ocpi_exit(void) ...@@ -102,7 +102,7 @@ static void __exit omap_ocpi_exit(void)
if (!cpu_is_omap16xx()) if (!cpu_is_omap16xx())
return; return;
clk_unuse(ocpi_ck); clk_disable(ocpi_ck);
clk_put(ocpi_ck); clk_put(ocpi_ck);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment