diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/mach-omap2/clockdomain44xx.c | 10 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/cminst44xx.c | 14 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_common_data.c | 9 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 6 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 12 | 
5 files changed, 33 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c index 4f04dd11d65..762f2cc542c 100644 --- a/arch/arm/mach-omap2/clockdomain44xx.c +++ b/arch/arm/mach-omap2/clockdomain44xx.c @@ -70,7 +70,7 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm)  static int omap4_clkdm_sleep(struct clockdomain *clkdm)  { -	omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, +	omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition,  					clkdm->cm_inst, clkdm->clkdm_offs);  	return 0;  } @@ -90,8 +90,12 @@ static void omap4_clkdm_allow_idle(struct clockdomain *clkdm)  static void omap4_clkdm_deny_idle(struct clockdomain *clkdm)  { -	omap4_cminst_clkdm_disable_hwsup(clkdm->prcm_partition, -					clkdm->cm_inst, clkdm->clkdm_offs); +	if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) +		omap4_clkdm_wakeup(clkdm); +	else +		omap4_cminst_clkdm_disable_hwsup(clkdm->prcm_partition, +						 clkdm->cm_inst, +						 clkdm->clkdm_offs);  }  static int omap4_clkdm_clk_enable(struct clockdomain *clkdm) diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 1a39945d9ff..1894015ff04 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -235,20 +235,6 @@ void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs)  }  /** - * omap4_cminst_clkdm_force_sleep - try to put a clockdomain into idle - * @part: PRCM partition ID that the clockdomain registers exist in - * @inst: CM instance register offset (*_INST macro) - * @cdoffs: Clockdomain register offset (*_CDOFFS macro) - * - * Put a clockdomain referred to by (@part, @inst, @cdoffs) into idle - * No return value. - */ -void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs) -{ -	_clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_SLEEP, part, inst, cdoffs); -} - -/**   * omap4_cminst_clkdm_force_sleep - try to take a clockdomain out of idle   * @part: PRCM partition ID that the clockdomain registers exist in   * @inst: CM instance register offset (*_INST macro) diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c index aff61385291..9f1ccdc8cc8 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c @@ -50,6 +50,15 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = {  	.dmadisable_shift = SYSC_TYPE2_DMADISABLE_SHIFT,  }; +/** + * struct omap_hwmod_sysc_type3 - TYPE3 sysconfig scheme. + * Used by some IPs on AM33xx + */ +struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3 = { +	.midle_shift	= SYSC_TYPE3_MIDLEMODE_SHIFT, +	.sidle_shift	= SYSC_TYPE3_SIDLEMODE_SHIFT, +}; +  struct omap_dss_dispc_dev_attr omap2_3_dss_dispc_dev_attr = {  	.manager_count		= 2,  	.has_framedonetv_irq	= 0 diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 96114901b93..2f963f702a0 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -526,7 +526,8 @@ int pwrdm_read_next_pwrst(struct powerdomain *pwrdm)   *   * Return the powerdomain @pwrdm's current power state.	Returns -EINVAL   * if the powerdomain pointer is null or returns the current power state - * upon success. + * upon success. Note that if the power domain only supports the ON state + * then just return ON as the current state.   */  int pwrdm_read_pwrst(struct powerdomain *pwrdm)  { @@ -535,6 +536,9 @@ int pwrdm_read_pwrst(struct powerdomain *pwrdm)  	if (!pwrdm)  		return -EINVAL; +	if (pwrdm->pwrsts == PWRSTS_ON) +		return PWRDM_POWER_ON; +  	if (arch_pwrdm && arch_pwrdm->pwrdm_read_pwrst)  		ret = arch_pwrdm->pwrdm_read_pwrst(pwrdm); diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 27455ed0a2a..35675b21607 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -41,6 +41,7 @@ struct omap_device;  extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type1;  extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2; +extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;  /*   * OCP SYSCONFIG bit shifts/masks TYPE1. These are for IPs compliant @@ -72,6 +73,15 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;  #define SYSC_TYPE2_DMADISABLE_SHIFT	16  #define SYSC_TYPE2_DMADISABLE_MASK	(0x1 << SYSC_TYPE2_DMADISABLE_SHIFT) +/* + * OCP SYSCONFIG bit shifts/masks TYPE3. + * This is applicable for some IPs present in AM33XX + */ +#define SYSC_TYPE3_SIDLEMODE_SHIFT	0 +#define SYSC_TYPE3_SIDLEMODE_MASK	(0x3 << SYSC_TYPE3_SIDLEMODE_SHIFT) +#define SYSC_TYPE3_MIDLEMODE_SHIFT	2 +#define SYSC_TYPE3_MIDLEMODE_MASK	(0x3 << SYSC_TYPE3_MIDLEMODE_SHIFT) +  /* OCP SYSSTATUS bit shifts/masks */  #define SYSS_RESETDONE_SHIFT		0  #define SYSS_RESETDONE_MASK		(1 << SYSS_RESETDONE_SHIFT) @@ -379,11 +389,13 @@ struct omap_hwmod_omap2_prcm {   * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data   * @clkctrl_reg: PRCM address of the clock control register   * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM + * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM   * @submodule_wkdep_bit: bit shift of the WKDEP range   */  struct omap_hwmod_omap4_prcm {  	u16		clkctrl_offs;  	u16		rstctrl_offs; +	u16		rstst_offs;  	u16		context_offs;  	u8		submodule_wkdep_bit;  	u8		modulemode;  |