]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/ocpi.c
[ARM] 3455/1: ARM: OMAP: 7/8 Misc updates, take 2
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / ocpi.c
index 2ede2ee8cae420ecf4b5a24593e572058c942929..37792d43738b1981d78541f05a56a390ec5f726b 100644 (file)
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/err.h>
+#include <linux/clk.h>
 
 #include <asm/io.h>
-#include <asm/hardware/clock.h>
-#include <asm/arch/hardware.h>
+#include <asm/hardware.h>
 
 #define OCPI_BASE              0xfffec320
 #define OCPI_FAULT             (OCPI_BASE + 0x00)
@@ -62,9 +62,6 @@ int ocpi_enable(void)
        if (!cpu_is_omap16xx())
                return -ENODEV;
 
-       /* Make sure there's clock for OCPI */
-       clk_enable(ocpi_ck);
-
        /* Enable access for OHCI in OCPI */
        val = omap_readl(OCPI_PROT);
        val &= ~0xff;
@@ -88,7 +85,7 @@ static int __init omap_ocpi_init(void)
        if (IS_ERR(ocpi_ck))
                return PTR_ERR(ocpi_ck);
 
-       clk_use(ocpi_ck);
+       clk_enable(ocpi_ck);
        ocpi_enable();
        printk("OMAP OCPI interconnect driver loaded\n");
 
@@ -102,7 +99,7 @@ static void __exit omap_ocpi_exit(void)
        if (!cpu_is_omap16xx())
                return;
 
-       clk_unuse(ocpi_ck);
+       clk_disable(ocpi_ck);
        clk_put(ocpi_ck);
 }