diff options
Diffstat (limited to 'arch/arm/plat-mxc/include/mach')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/cpuidle.h | 56 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/iomux-v3.h | 10 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/memory.h | 15 |
3 files changed, 61 insertions, 20 deletions
diff --git a/arch/arm/plat-mxc/include/mach/cpuidle.h b/arch/arm/plat-mxc/include/mach/cpuidle.h new file mode 100644 index 00000000000..2bb109e243b --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/cpuidle.h @@ -0,0 +1,56 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#ifndef __ARCH_ARM_PLAT_MXC_CPUIDLE_H__ +#define __ARCH_ARM_PLAT_MXC_CPUIDLE_H__ + +#include <linux/cpuidle.h> +#include <mach/hardware.h> + +/* for passing cpuidle state info to the cpuidle driver. */ +struct imx_cpuidle_state_data { + enum mxc_cpu_pwr_mode mach_cpu_pwr_state; + char *name; + char *desc; + /* time in uS to exit this idle state */ + unsigned int exit_latency; + /* OPTIONAL - power usage of this idle state in mW */ + unsigned int power_usage; + /* OPTIONAL - in uS. See drivers/cpuidle/governors/menu.c for usage */ + unsigned int target_residency; +}; + +struct imx_cpuidle_data { + unsigned int num_states; + struct cpuidle_driver *imx_cpuidle_driver; + struct imx_cpuidle_state_data *state_data; + int (*mach_cpuidle)(struct cpuidle_device *dev, + struct cpuidle_state *state); + + /* OPTIONAL - parameter of mach_cpuidle_init func below */ + void *mach_init_data; + /* OPTIONAL - callback for mach level cpuidle initialization */ + int (*mach_cpuidle_init)(void *mach_init_data); + /* OPTIONAL - Search drivers/cpuidle/cpuidle.c for usage */ + int (*prepare)(struct cpuidle_device *dev); +}; + +#ifdef CONFIG_CPU_IDLE +int imx_cpuidle_init(struct imx_cpuidle_data *cpuidle_data); +#else +static inline int imx_cpuidle_init(struct imx_cpuidle_data *cpuidle_data) +{ + return -EINVAL; +} +#endif /* CONFIG_CPU_IDLE */ + +#endif /* __ARCH_ARM_PLAT_MXC_CPUIDLE_H__ */ diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index ebbce33097a..45099566fec 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h @@ -89,11 +89,11 @@ typedef u64 iomux_v3_cfg_t; #define PAD_CTL_HYS (1 << 8) #define PAD_CTL_PKE (1 << 7) -#define PAD_CTL_PUE (1 << 6) -#define PAD_CTL_PUS_100K_DOWN (0 << 4) -#define PAD_CTL_PUS_47K_UP (1 << 4) -#define PAD_CTL_PUS_100K_UP (2 << 4) -#define PAD_CTL_PUS_22K_UP (3 << 4) +#define PAD_CTL_PUE (1 << 6 | PAD_CTL_PKE) +#define PAD_CTL_PUS_100K_DOWN (0 << 4 | PAD_CTL_PUE) +#define PAD_CTL_PUS_47K_UP (1 << 4 | PAD_CTL_PUE) +#define PAD_CTL_PUS_100K_UP (2 << 4 | PAD_CTL_PUE) +#define PAD_CTL_PUS_22K_UP (3 << 4 | PAD_CTL_PUE) #define PAD_CTL_ODE (1 << 3) diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index 11be5cdbdd1..3ec84b90224 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h @@ -40,19 +40,4 @@ # endif #endif -#if defined(CONFIG_MX3_VIDEO) -/* - * Increase size of DMA-consistent memory region. - * This is required for mx3 camera driver to capture at least two QXGA frames. - */ -#define CONSISTENT_DMA_SIZE SZ_8M - -#elif defined(CONFIG_MX1_VIDEO) || defined(CONFIG_VIDEO_MX2_HOSTSUPPORT) -/* - * Increase size of DMA-consistent memory region. - * This is required for i.MX camera driver to capture at least four VGA frames. - */ -#define CONSISTENT_DMA_SIZE SZ_4M -#endif /* CONFIG_MX1_VIDEO || CONFIG_VIDEO_MX2_HOSTSUPPORT */ - #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |