@@ -21,7 +21,7 @@
#include <linux/err.h>
#include <linux/io.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include "clockdomain.h"
#include <linux/power/omap/cm.h>
#include "cm1_44xx.h"
@@ -20,7 +20,7 @@
#include "common.h"
#include "pm.h"
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include "clockdomain.h"
/* Machine specific information */
@@ -23,6 +23,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/delay.h>
+#include <linux/power/omap/prm.h>
#include <video/omapdss.h>
#include "omap_hwmod.h"
@@ -34,7 +35,6 @@
#include "iomap.h"
#include "control.h"
#include "display.h"
-#include "prm.h"
#define DISPC_CONTROL 0x0040
#define DISPC_CONTROL2 0x0238
@@ -26,13 +26,13 @@
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
+#include <linux/power/omap/prm.h>
#include "soc.h"
#include "omap_hwmod.h"
#include "omap_device.h"
#include "hdq1w.h"
-#include "prm.h"
#include "common.h"
/**
@@ -19,12 +19,13 @@
*
*/
+#include <linux/power/omap/prm.h>
+
#include "soc.h"
#include "omap_hwmod.h"
#include "omap_device.h"
#include "omap-pm.h"
-#include "prm.h"
#include "common.h"
#include "mux.h"
#include "i2c.h"
@@ -45,7 +45,7 @@
#include "sram.h"
#include "cm2xxx.h"
#include "cm3xxx.h"
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/cm.h>
#include "prcm_mpu44xx.h"
#include <linux/power/omap/cm44xx.h>
@@ -24,8 +24,8 @@
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/platform_data/gpio-omap.h>
+#include <linux/power/omap/prm.h>
-#include "prm.h"
#include "common.h"
#include "control.h"
#include "omap_hwmod.h"
@@ -34,14 +34,13 @@
#include <linux/uaccess.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
-
+#include <linux/power/omap/prm.h>
#include "omap_hwmod.h"
#include "soc.h"
#include "control.h"
#include "mux.h"
-#include "prm.h"
#include "common.h"
#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
@@ -155,7 +155,7 @@
#include "cm3xxx.h"
#include <linux/power/omap/cm44xx.h>
#include "cm33xx.h"
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include "prm3xxx.h"
#include "prm44xx.h"
#include "prm33xx.h"
@@ -29,7 +29,7 @@
#include <asm/cpu.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include "powerdomain.h"
#include "clockdomain.h"
#include "voltage.h"
@@ -34,7 +34,7 @@
#include "powerdomain.h"
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
/* OMAP2/3-common powerdomains */
@@ -16,7 +16,7 @@
#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_33XX_H
#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_33XX_H
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#define AM33XX_GFX_MEM_ONSTATE_MASK (0x3 << 17)
#define AM33XX_GFX_MEM_RETSTATE_MASK (1 << 6)
deleted file mode 100644
@@ -1,164 +0,0 @@
-/*
- * OMAP2/3/4 Power/Reset Management (PRM) bitfield definitions
- *
- * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
- * Copyright (C) 2010 Nokia Corporation
- *
- * 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_ARM_MACH_OMAP2_PRM_H
-#define __ARCH_ARM_MACH_OMAP2_PRM_H
-
-#include <linux/power/omap/prcm-common.h>
-
-# ifndef __ASSEMBLER__
-extern void __iomem *prm_base;
-extern u16 prm_dev_inst;
-extern u16 prm_features;
-extern void omap2_set_globals_prm(void __iomem *prm);
-int of_prcm_init(void);
-# endif
-
-/*
- * prm_features flag values
- *
- * PRM_HAS_IO_WAKEUP: has IO wakeup capability
- * PRM_HAS_VOLTAGE: has voltage domains
- */
-#define PRM_HAS_IO_WAKEUP (1 << 0)
-#define PRM_HAS_VOLTAGE (1 << 1)
-
-#ifndef __ASSEMBLER__
-enum {
- PRM_OMAP3430 = 0,
- PRM_OMAP3630,
- PRM_OMAP3_OTHER,
- PRM_OMAP4,
- PRM_OMAP5,
- PRM_DRA7,
-};
-#endif
-
-/*
- * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP
- * module to softreset
- */
-#define MAX_MODULE_SOFTRESET_WAIT 10000
-
-/*
- * MAX_MODULE_HARDRESET_WAIT: Maximum microseconds to wait for an OMAP
- * submodule to exit hardreset
- */
-#define MAX_MODULE_HARDRESET_WAIT 10000
-
-/*
- * Register bitfields
- */
-
-/*
- * 24XX: PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP
- *
- * 2430: PM_PWSTST_MDM
- *
- * 3430: PM_PWSTST_IVA2, PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_GFX,
- * PM_PWSTST_DSS, PM_PWSTST_CAM, PM_PWSTST_PER, PM_PWSTST_EMU,
- * PM_PWSTST_NEON
- */
-#define OMAP_INTRANSITION_MASK (1 << 20)
-
-
-/*
- * 24XX: PM_PWSTST_GFX, PM_PWSTST_DSP
- *
- * 2430: PM_PWSTST_MDM
- *
- * 3430: PM_PWSTST_IVA2, PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_GFX,
- * PM_PWSTST_DSS, PM_PWSTST_CAM, PM_PWSTST_PER, PM_PWSTST_EMU,
- * PM_PWSTST_NEON
- */
-#define OMAP_POWERSTATEST_SHIFT 0
-#define OMAP_POWERSTATEST_MASK (0x3 << 0)
-
-/*
- * 24XX: PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE, PM_PWSTCTRL_GFX,
- * PM_PWSTCTRL_DSP, PM_PWSTST_MPU
- *
- * 2430: PM_PWSTCTRL_MDM shared bits
- *
- * 3430: PM_PWSTCTRL_IVA2, PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE,
- * PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM, PM_PWSTCTRL_PER,
- * PM_PWSTCTRL_NEON shared bits
- */
-#define OMAP_POWERSTATE_SHIFT 0
-#define OMAP_POWERSTATE_MASK (0x3 << 0)
-
-/*
- * Standardized OMAP reset source bits
- *
- * To the extent these happen to match the hardware register bit
- * shifts, it's purely coincidental. Used by omap-wdt.c.
- * OMAP_UNKNOWN_RST_SRC_ID_SHIFT is a special value, used whenever
- * there are any bits remaining in the global PRM_RSTST register that
- * haven't been identified, or when the PRM code for the current SoC
- * doesn't know how to interpret the register.
- */
-#define OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT 0
-#define OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT 1
-#define OMAP_SECU_VIOL_RST_SRC_ID_SHIFT 2
-#define OMAP_MPU_WD_RST_SRC_ID_SHIFT 3
-#define OMAP_SECU_WD_RST_SRC_ID_SHIFT 4
-#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5
-#define OMAP_VDD_MPU_VM_RST_SRC_ID_SHIFT 6
-#define OMAP_VDD_IVA_VM_RST_SRC_ID_SHIFT 7
-#define OMAP_VDD_CORE_VM_RST_SRC_ID_SHIFT 8
-#define OMAP_ICEPICK_RST_SRC_ID_SHIFT 9
-#define OMAP_ICECRUSHER_RST_SRC_ID_SHIFT 10
-#define OMAP_C2C_RST_SRC_ID_SHIFT 11
-#define OMAP_UNKNOWN_RST_SRC_ID_SHIFT 12
-
-#ifndef __ASSEMBLER__
-
-/**
- * struct prm_reset_src_map - map register bitshifts to standard bitshifts
- * @reg_shift: bitshift in the PRM reset source register
- * @std_shift: bitshift equivalent in the standard reset source list
- *
- * The fields are signed because -1 is used as a terminator.
- */
-struct prm_reset_src_map {
- s8 reg_shift;
- s8 std_shift;
-};
-
-/**
- * struct prm_ll_data - fn ptrs to per-SoC PRM function implementations
- * @read_reset_sources: ptr to the SoC PRM-specific get_reset_source impl
- * @was_any_context_lost_old: ptr to the SoC PRM context loss test fn
- * @clear_context_loss_flags_old: ptr to the SoC PRM context loss flag clear fn
- * @late_init: ptr to the late init function
- *
- * XXX @was_any_context_lost_old and @clear_context_loss_flags_old are
- * deprecated.
- */
-struct prm_ll_data {
- u32 (*read_reset_sources)(void);
- bool (*was_any_context_lost_old)(u8 part, s16 inst, u16 idx);
- void (*clear_context_loss_flags_old)(u8 part, s16 inst, u16 idx);
- int (*late_init)(void);
-};
-
-extern int prm_register(struct prm_ll_data *pld);
-extern int prm_unregister(struct prm_ll_data *pld);
-
-extern u32 prm_read_reset_sources(void);
-extern bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx);
-extern void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx);
-
-#endif
-
-
-#endif
@@ -17,7 +17,7 @@
#define __ARCH_ARM_MACH_OMAP2_PRM2XXX_H
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm2xxx.h>
#include <linux/power/omap/prm2xxx_3xxx.h>
@@ -17,7 +17,7 @@
#define __ARCH_ARM_MACH_OMAP2_PRM2XXX_3XXX_PRIVATE_H
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm2xxx_3xxx.h>
#ifndef __ASSEMBLER__
@@ -21,7 +21,7 @@
#include <linux/power/omap/prm33xx.h>
#include "powerdomain.h"
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#define AM33XX_LASTPOWERSTATEENTERED_SHIFT 24
#define AM33XX_LASTPOWERSTATEENTERED_MASK (0x3 << 24)
@@ -17,7 +17,7 @@
#define __ARCH_ARM_MACH_OMAP2_PRM33XX_H
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm33xx.h>
#define AM33XX_PRM_BASE 0x44E00000
@@ -17,7 +17,7 @@
#define __ARCH_ARM_MACH_OMAP2_PRM3XXX_H
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm2xxx_3xxx.h>
#include <linux/power/omap/prm3xxx.h>
@@ -25,7 +25,7 @@
#include "prcm44xx.h"
#include "prminst44xx_private.h"
#include "powerdomain.h"
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prcm-common.h>
#include <linux/power/omap/prm44xx_54xx.h>
@@ -27,7 +27,7 @@
#include <linux/power/omap/prm44xx_54xx.h>
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm44xx.h>
#define OMAP4430_PRM_BASE 0x4a306000
@@ -23,7 +23,7 @@
#include <linux/power/omap/prm44xx_54xx.h>
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm54xx.h>
#define OMAP54XX_PRM_BASE 0x4ae06000
@@ -24,7 +24,7 @@
#include <linux/power/omap/prm44xx_54xx.h>
#include <linux/power/omap/prcm-common.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prm7xx.h>
#define DRA7XX_PRM_BASE 0x4ae06000
@@ -33,7 +33,7 @@
#include <linux/power/omap/prm3xxx.h>
#include <linux/power/omap/prm44xx.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prcm-common.h>
/*
@@ -16,7 +16,7 @@
#include <linux/err.h>
#include <linux/io.h>
-#include "prm.h"
+#include <linux/power/omap/prm.h>
#include <linux/power/omap/prcm-common.h>
#include <linux/power/omap/prm44xx.h>
#include <linux/power/omap/prm54xx.h>
@@ -14,12 +14,12 @@
#include <linux/err.h>
#include <linux/platform_data/omap-wd-timer.h>
+#include <linux/power/omap/prm.h>
#include "omap_hwmod.h"
#include "omap_device.h"
#include "wd_timer.h"
#include "common.h"
-#include "prm.h"
#include "soc.h"
/*
new file mode 100644
@@ -0,0 +1,164 @@
+/*
+ * OMAP2/3/4 Power/Reset Management (PRM) bitfield definitions
+ *
+ * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
+ * Copyright (C) 2010 Nokia Corporation
+ *
+ * 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_PRM_H
+#define __LINUX_POWER_OMAP_PRM_H
+
+#include <linux/power/omap/prcm-common.h>
+
+# ifndef __ASSEMBLER__
+extern void __iomem *prm_base;
+extern u16 prm_dev_inst;
+extern u16 prm_features;
+void omap2_set_globals_prm(void __iomem *prm);
+int of_prcm_init(void);
+# endif
+
+/*
+ * prm_features flag values
+ *
+ * PRM_HAS_IO_WAKEUP: has IO wakeup capability
+ * PRM_HAS_VOLTAGE: has voltage domains
+ */
+#define PRM_HAS_IO_WAKEUP (1 << 0)
+#define PRM_HAS_VOLTAGE (1 << 1)
+
+#ifndef __ASSEMBLER__
+enum {
+ PRM_OMAP3430 = 0,
+ PRM_OMAP3630,
+ PRM_OMAP3_OTHER,
+ PRM_OMAP4,
+ PRM_OMAP5,
+ PRM_DRA7,
+};
+#endif
+
+/*
+ * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP
+ * module to softreset
+ */
+#define MAX_MODULE_SOFTRESET_WAIT 10000
+
+/*
+ * MAX_MODULE_HARDRESET_WAIT: Maximum microseconds to wait for an OMAP
+ * submodule to exit hardreset
+ */
+#define MAX_MODULE_HARDRESET_WAIT 10000
+
+/*
+ * Register bitfields
+ */
+
+/*
+ * 24XX: PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP
+ *
+ * 2430: PM_PWSTST_MDM
+ *
+ * 3430: PM_PWSTST_IVA2, PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_GFX,
+ * PM_PWSTST_DSS, PM_PWSTST_CAM, PM_PWSTST_PER, PM_PWSTST_EMU,
+ * PM_PWSTST_NEON
+ */
+#define OMAP_INTRANSITION_MASK (1 << 20)
+
+
+/*
+ * 24XX: PM_PWSTST_GFX, PM_PWSTST_DSP
+ *
+ * 2430: PM_PWSTST_MDM
+ *
+ * 3430: PM_PWSTST_IVA2, PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_GFX,
+ * PM_PWSTST_DSS, PM_PWSTST_CAM, PM_PWSTST_PER, PM_PWSTST_EMU,
+ * PM_PWSTST_NEON
+ */
+#define OMAP_POWERSTATEST_SHIFT 0
+#define OMAP_POWERSTATEST_MASK (0x3 << 0)
+
+/*
+ * 24XX: PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE, PM_PWSTCTRL_GFX,
+ * PM_PWSTCTRL_DSP, PM_PWSTST_MPU
+ *
+ * 2430: PM_PWSTCTRL_MDM shared bits
+ *
+ * 3430: PM_PWSTCTRL_IVA2, PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE,
+ * PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM, PM_PWSTCTRL_PER,
+ * PM_PWSTCTRL_NEON shared bits
+ */
+#define OMAP_POWERSTATE_SHIFT 0
+#define OMAP_POWERSTATE_MASK (0x3 << 0)
+
+/*
+ * Standardized OMAP reset source bits
+ *
+ * To the extent these happen to match the hardware register bit
+ * shifts, it's purely coincidental. Used by omap-wdt.c.
+ * OMAP_UNKNOWN_RST_SRC_ID_SHIFT is a special value, used whenever
+ * there are any bits remaining in the global PRM_RSTST register that
+ * haven't been identified, or when the PRM code for the current SoC
+ * doesn't know how to interpret the register.
+ */
+#define OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT 0
+#define OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT 1
+#define OMAP_SECU_VIOL_RST_SRC_ID_SHIFT 2
+#define OMAP_MPU_WD_RST_SRC_ID_SHIFT 3
+#define OMAP_SECU_WD_RST_SRC_ID_SHIFT 4
+#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5
+#define OMAP_VDD_MPU_VM_RST_SRC_ID_SHIFT 6
+#define OMAP_VDD_IVA_VM_RST_SRC_ID_SHIFT 7
+#define OMAP_VDD_CORE_VM_RST_SRC_ID_SHIFT 8
+#define OMAP_ICEPICK_RST_SRC_ID_SHIFT 9
+#define OMAP_ICECRUSHER_RST_SRC_ID_SHIFT 10
+#define OMAP_C2C_RST_SRC_ID_SHIFT 11
+#define OMAP_UNKNOWN_RST_SRC_ID_SHIFT 12
+
+#ifndef __ASSEMBLER__
+
+/**
+ * struct prm_reset_src_map - map register bitshifts to standard bitshifts
+ * @reg_shift: bitshift in the PRM reset source register
+ * @std_shift: bitshift equivalent in the standard reset source list
+ *
+ * The fields are signed because -1 is used as a terminator.
+ */
+struct prm_reset_src_map {
+ s8 reg_shift;
+ s8 std_shift;
+};
+
+/**
+ * struct prm_ll_data - fn ptrs to per-SoC PRM function implementations
+ * @read_reset_sources: ptr to the SoC PRM-specific get_reset_source impl
+ * @was_any_context_lost_old: ptr to the SoC PRM context loss test fn
+ * @clear_context_loss_flags_old: ptr to the SoC PRM context loss flag clear fn
+ * @late_init: ptr to the late init function
+ *
+ * XXX @was_any_context_lost_old and @clear_context_loss_flags_old are
+ * deprecated.
+ */
+struct prm_ll_data {
+ u32 (*read_reset_sources)(void);
+ bool (*was_any_context_lost_old)(u8 part, s16 inst, u16 idx);
+ void (*clear_context_loss_flags_old)(u8 part, s16 inst, u16 idx);
+ int (*late_init)(void);
+};
+
+int prm_register(struct prm_ll_data *pld);
+int prm_unregister(struct prm_ll_data *pld);
+
+u32 prm_read_reset_sources(void);
+bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx);
+void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx);
+
+#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/cminst44xx.c | 2 +- arch/arm/mach-omap2/cpuidle44xx.c | 2 +- arch/arm/mach-omap2/display.c | 2 +- arch/arm/mach-omap2/hdq1w.c | 2 +- arch/arm/mach-omap2/i2c.c | 3 +- arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/msdi.c | 2 +- arch/arm/mach-omap2/mux.c | 3 +- arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/powerdomain.c | 2 +- arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c | 2 +- arch/arm/mach-omap2/prm-regbits-33xx.h | 2 +- arch/arm/mach-omap2/prm.h | 164 ---------------------- arch/arm/mach-omap2/prm2xxx.h | 2 +- arch/arm/mach-omap2/prm2xxx_3xxx_private.h | 2 +- arch/arm/mach-omap2/prm33xx.c | 2 +- arch/arm/mach-omap2/prm33xx.h | 2 +- arch/arm/mach-omap2/prm3xxx.h | 2 +- arch/arm/mach-omap2/prm44xx.c | 2 +- arch/arm/mach-omap2/prm44xx.h | 2 +- arch/arm/mach-omap2/prm54xx.h | 2 +- arch/arm/mach-omap2/prm7xx.h | 2 +- arch/arm/mach-omap2/prm_common.c | 2 +- arch/arm/mach-omap2/prminst44xx.c | 2 +- arch/arm/mach-omap2/wd_timer.c | 2 +- include/linux/power/omap/prm.h | 164 ++++++++++++++++++++++ 26 files changed, 189 insertions(+), 189 deletions(-) delete mode 100644 arch/arm/mach-omap2/prm.h create mode 100644 include/linux/power/omap/prm.h