@@ -31,7 +31,7 @@
#include "soc.h"
#include "clockdomain.h"
#include "clock.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm2xxx.h"
#include "cm3xxx.h"
#include "cm-regbits-24xx.h"
@@ -25,7 +25,7 @@
#include "soc.h"
#include "clock.h"
#include "clock2xxx.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm-regbits-24xx.h"
struct clk_hw *dclk_hw;
@@ -18,7 +18,7 @@
#include <linux/io.h>
#include "clockdomain.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm33xx.h"
#include "cm-regbits-33xx.h"
deleted file mode 100644
@@ -1,64 +0,0 @@
-/*
- * OMAP2+ Clock Management prototypes
- *
- * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
- * Copyright (C) 2007-2009 Nokia Corporation
- *
- * Written by Paul Walmsley
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef __ARCH_ASM_MACH_OMAP2_CM_H
-#define __ARCH_ASM_MACH_OMAP2_CM_H
-
-/*
- * MAX_MODULE_READY_TIME: max duration in microseconds to wait for the
- * PRCM to request that a module exit the inactive state in the case of
- * OMAP2 & 3.
- * In the case of OMAP4 this is the max duration in microseconds for the
- * module to reach the functionnal state from an inactive state.
- */
-#define MAX_MODULE_READY_TIME 2000
-
-# ifndef __ASSEMBLER__
-extern void __iomem *cm_base;
-extern void __iomem *cm2_base;
-extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
-# endif
-
-/*
- * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
- * the PRCM to request that a module enter the inactive state in the
- * case of OMAP2 & 3. In the case of OMAP4 this is the max duration
- * in microseconds for the module to reach the inactive state from
- * a functional state.
- * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during
- * kernel init.
- */
-#define MAX_MODULE_DISABLE_TIME 5000
-
-# ifndef __ASSEMBLER__
-
-/**
- * struct cm_ll_data - fn ptrs to per-SoC CM function implementations
- * @split_idlest_reg: ptr to the SoC CM-specific split_idlest_reg impl
- * @wait_module_ready: ptr to the SoC CM-specific wait_module_ready impl
- */
-struct cm_ll_data {
- int (*split_idlest_reg)(void __iomem *idlest_reg, s16 *prcm_inst,
- u8 *idlest_reg_id);
- int (*wait_module_ready)(s16 prcm_mod, u8 idlest_id, u8 idlest_shift);
-};
-
-extern int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst,
- u8 *idlest_reg_id);
-extern int cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift);
-
-extern int cm_register(struct cm_ll_data *cld);
-extern int cm_unregister(struct cm_ll_data *cld);
-
-# endif
-
-#endif
@@ -19,7 +19,7 @@
#include <linux/io.h>
#include "prm2xxx.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm2xxx_3xxx_private.h"
#include <linux/power/omap/cm2xxx.h>
#include "clockdomain.h"
@@ -16,7 +16,7 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CM2XXX_3XXX_PRIVATE_H
#define __ARCH_ARM_MACH_OMAP2_CM2XXX_3XXX_PRIVATE_H
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include <linux/power/omap/cm2xxx_3xxx.h>
#ifndef __ASSEMBLER__
@@ -23,7 +23,7 @@
#include <linux/io.h>
#include "clockdomain.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include <linux/power/omap/cm33xx.h>
#include "prm33xx.h"
@@ -17,7 +17,7 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
#define __ARCH_ARM_MACH_OMAP2_CM_33XX_H
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include <linux/power/omap/cm33xx.h>
/* CM base address */
@@ -19,7 +19,7 @@
#include <linux/io.h>
#include "prm2xxx_3xxx.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm2xxx_3xxx_private.h"
#include <linux/power/omap/cm3xxx.h>
#include "clockdomain.h"
@@ -18,7 +18,7 @@
#include <linux/err.h>
#include <linux/io.h>
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm1_44xx.h"
#include "cm2_44xx.h"
@@ -18,7 +18,7 @@
#include <linux/power/omap/cm2xxx.h>
#include <linux/power/omap/cm3xxx.h>
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "prcm-common.h"
/*
@@ -22,7 +22,7 @@
#include <linux/io.h>
#include "clockdomain.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "cm1_44xx.h"
#include "cm2_44xx.h"
#include <linux/power/omap/cm44xx.h>
@@ -46,7 +46,7 @@
#include "cm2xxx.h"
#include "cm3xxx.h"
#include "prm.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "prcm_mpu44xx.h"
#include "prminst44xx.h"
#include <linux/power/omap/cm44xx.h>
@@ -15,7 +15,7 @@
#include <linux/kernel.h>
#include <linux/bug.h>
#include "pm.h"
-#include "cm.h"
+#include <linux/power/omap/cm.h>
#include "prm-regbits-34xx.h"
#include "prm-regbits-44xx.h"
new file mode 100644
@@ -0,0 +1,64 @@
+/*
+ * OMAP2+ Clock Management prototypes
+ *
+ * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
+ * Copyright (C) 2007-2009 Nokia Corporation
+ *
+ * Written by Paul Walmsley
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __LINUX_POWER_OMAP_CM_H
+#define __LINUX_POWER_OMAP_CM_H
+
+/*
+ * MAX_MODULE_READY_TIME: max duration in microseconds to wait for the
+ * PRCM to request that a module exit the inactive state in the case of
+ * OMAP2 & 3.
+ * In the case of OMAP4 this is the max duration in microseconds for the
+ * module to reach the functionnal state from an inactive state.
+ */
+#define MAX_MODULE_READY_TIME 2000
+
+# ifndef __ASSEMBLER__
+extern void __iomem *cm_base;
+extern void __iomem *cm2_base;
+void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
+# endif
+
+/*
+ * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
+ * the PRCM to request that a module enter the inactive state in the
+ * case of OMAP2 & 3. In the case of OMAP4 this is the max duration
+ * in microseconds for the module to reach the inactive state from
+ * a functional state.
+ * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during
+ * kernel init.
+ */
+#define MAX_MODULE_DISABLE_TIME 5000
+
+# ifndef __ASSEMBLER__
+
+/**
+ * struct cm_ll_data - fn ptrs to per-SoC CM function implementations
+ * @split_idlest_reg: ptr to the SoC CM-specific split_idlest_reg impl
+ * @wait_module_ready: ptr to the SoC CM-specific wait_module_ready impl
+ */
+struct cm_ll_data {
+ int (*split_idlest_reg)(void __iomem *idlest_reg, s16 *prcm_inst,
+ u8 *idlest_reg_id);
+ int (*wait_module_ready)(s16 prcm_mod, u8 idlest_id, u8 idlest_shift);
+};
+
+int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst,
+ u8 *idlest_reg_id);
+int cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift);
+
+int cm_register(struct cm_ll_data *cld);
+int cm_unregister(struct cm_ll_data *cld);
+
+# endif
+
+#endif
This file needs to be accessible from the PRCM core and mach-omap2 board support code. Signed-off-by: Tero Kristo <t-kristo@ti.com> --- arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/clock2xxx.c | 2 +- arch/arm/mach-omap2/clockdomains33xx_data.c | 2 +- arch/arm/mach-omap2/cm.h | 64 --------------------------- arch/arm/mach-omap2/cm2xxx.c | 2 +- arch/arm/mach-omap2/cm2xxx_3xxx_private.h | 2 +- arch/arm/mach-omap2/cm33xx.c | 2 +- arch/arm/mach-omap2/cm33xx.h | 2 +- arch/arm/mach-omap2/cm3xxx.c | 2 +- arch/arm/mach-omap2/cm44xx.c | 2 +- arch/arm/mach-omap2/cm_common.c | 2 +- arch/arm/mach-omap2/cminst44xx.c | 2 +- arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/powerdomain-common.c | 2 +- include/linux/power/omap/cm.h | 64 +++++++++++++++++++++++++++ 15 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 arch/arm/mach-omap2/cm.h create mode 100644 include/linux/power/omap/cm.h