Skip to content

Commit

Permalink
Merge tag 'omap-pm-v3.11/voltdm' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/khilman/linux-omap-pm into omap-for-v3.11/pm-voltdomain

OMAP: PM: remove requirement for voltage domain data; remove dummy data
  • Loading branch information
Tony Lindgren committed Jun 18, 2013
2 parents 7d13205 + 63b0420 commit 8bfdfc8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 46 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common)
obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o
obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common)

# OMAP powerdomain framework
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ void __init am33xx_init_early(void)
omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL);
omap3xxx_check_revision();
ti81xx_check_features();
am33xx_voltagedomains_init();
am33xx_powerdomains_init();
am33xx_clockdomains_init();
am33xx_hwmod_init();
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-omap2/powerdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
if (_pwrdm_lookup(pwrdm->name))
return -EEXIST;

if (arch_pwrdm && arch_pwrdm->pwrdm_has_voltdm)
if (!arch_pwrdm->pwrdm_has_voltdm())
goto skip_voltdm;

voltdm = voltdm_lookup(pwrdm->voltdm.name);
if (!voltdm) {
pr_err("powerdomain: %s: voltagedomain %s does not exist\n",
Expand All @@ -111,6 +115,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
pwrdm->voltdm.ptr = voltdm;
INIT_LIST_HEAD(&pwrdm->voltdm_node);
voltdm_add_pwrdm(voltdm, pwrdm);
skip_voltdm:
spin_lock_init(&pwrdm->_lock);

list_add(&pwrdm->node, &pwrdm_list);
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/powerdomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ struct powerdomain {
* @pwrdm_disable_hdwr_sar: Disable Hardware Save-Restore feature for a pd
* @pwrdm_set_lowpwrstchange: Enable pd transitions from a shallow to deep sleep
* @pwrdm_wait_transition: Wait for a pd state transition to complete
* @pwrdm_has_voltdm: Check if a voltdm association is needed
*
* Regarding @pwrdm_set_lowpwrstchange: On the OMAP2 and 3-family
* chips, a powerdomain's power state is not allowed to directly
Expand Down Expand Up @@ -196,6 +197,7 @@ struct pwrdm_ops {
int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm);
int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm);
int (*pwrdm_wait_transition)(struct powerdomain *pwrdm);
int (*pwrdm_has_voltdm)(void);
};

int pwrdm_register_platform_funcs(struct pwrdm_ops *custom_funcs);
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/mach-omap2/prm33xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ static int am33xx_pwrdm_wait_transition(struct powerdomain *pwrdm)
return 0;
}

static int am33xx_check_vcvp(void)
{
/* No VC/VP on am33xx devices */
return 0;
}

struct pwrdm_ops am33xx_pwrdm_operations = {
.pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst,
.pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst,
Expand All @@ -335,4 +341,5 @@ struct pwrdm_ops am33xx_pwrdm_operations = {
.pwrdm_set_mem_onst = am33xx_pwrdm_set_mem_onst,
.pwrdm_set_mem_retst = am33xx_pwrdm_set_mem_retst,
.pwrdm_wait_transition = am33xx_pwrdm_wait_transition,
.pwrdm_has_voltdm = am33xx_check_vcvp,
};
1 change: 0 additions & 1 deletion arch/arm/mach-omap2/voltage.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ int omap_voltage_late_init(void);

extern void omap2xxx_voltagedomains_init(void);
extern void omap3xxx_voltagedomains_init(void);
extern void am33xx_voltagedomains_init(void);
extern void omap44xx_voltagedomains_init(void);

struct voltagedomain *voltdm_lookup(const char *name);
Expand Down
43 changes: 0 additions & 43 deletions arch/arm/mach-omap2/voltagedomains33xx_data.c

This file was deleted.

0 comments on commit 8bfdfc8

Please sign in to comment.