Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272741
b: refs/heads/master
c: b7ea803
h: refs/heads/master
i:
  272739: 80324d4
v: v3
  • Loading branch information
Kevin Hilman committed Sep 15, 2011
1 parent 6c41f71 commit 5120196
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 100 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7b0de2b46803062148345ae6a976c1e44a457b6
refs/heads/master: b7ea803e55769768d1eff3b32e4f99837fa6ddb5
11 changes: 4 additions & 7 deletions trunk/arch/arm/mach-omap2/vc.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm,
struct omap_vc_channel *vc = voltdm->vc;
struct omap_vdd_info *vdd = voltdm->vdd;
struct omap_volt_data *volt_data;
const struct omap_vp_common_data *vp_common;
u32 vc_cmdval, vp_errgain_val;

vp_common = vdd->vp_data->vp_common;

/* Check if sufficient pmic info is available for this vdd */
if (!voltdm->pmic) {
pr_err("%s: Insufficient pmic info to scale the vdd_%s\n",
Expand Down Expand Up @@ -148,12 +145,12 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm,

/* Setting vp errorgain based on the voltage */
if (volt_data) {
vp_errgain_val = voltdm->read(vdd->vp_data->vpconfig);
vp_errgain_val = voltdm->read(voltdm->vp->vpconfig);
vdd->vp_rt_data.vpconfig_errorgain = volt_data->vp_errgain;
vp_errgain_val &= ~vp_common->vpconfig_errorgain_mask;
vp_errgain_val &= voltdm->vp->common->vpconfig_errorgain_mask;
vp_errgain_val |= vdd->vp_rt_data.vpconfig_errorgain <<
vp_common->vpconfig_errorgain_shift;
voltdm->write(vp_errgain_val, vdd->vp_data->vpconfig);
voltdm->vp->common->vpconfig_errorgain_shift;
voltdm->write(vp_errgain_val, voltdm->vp->vpconfig);
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap2/voltage.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ static int __init _config_common_vdd_data(struct voltagedomain *voltdm)

/* Generic voltage parameters */
vdd->volt_scale = omap_vp_forceupdate_scale;
vdd->vp_enabled = false;
voltdm->vp->enabled = false;

vdd->vp_rt_data.vpconfig_erroroffset =
(voltdm->pmic->vp_erroroffset <<
vdd->vp_data->vp_common->vpconfig_erroroffset_shift);
voltdm->vp->common->vpconfig_erroroffset_shift);

timeout_val = (sys_clk_speed * voltdm->pmic->vp_timeout_us) / 1000;
vdd->vp_rt_data.vlimitto_timeout = timeout_val;
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/arm/mach-omap2/voltage.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ struct omap_vfsm_instance {
* @node: list_head linking all voltage domains
* @pwrdm_list: list_head linking all powerdomains in this voltagedomain
* @vc: pointer to VC channel associated with this voltagedomain
* @vp: pointer to VP associated with this voltagedomain
* @read: read a VC/VP register
* @write: write a VC/VP register
* @read: read-modify-write a VC/VP register
Expand All @@ -67,6 +68,7 @@ struct voltagedomain {
struct list_head pwrdm_list;
struct omap_vc_channel *vc;
const struct omap_vfsm_instance *vfsm;
struct omap_vp_instance *vp;
struct omap_voltdm_pmic *pmic;

/* VC/VP register access functions: SoC specific */
Expand Down Expand Up @@ -136,21 +138,16 @@ struct omap_voltdm_pmic {
*
* @volt_data : voltage table having the distinct voltages supported
* by the domain and other associated per voltage data.
* @vp_data : the register values, shifts, masks for various
* vp registers
* @vp_rt_data : VP data derived at runtime, not predefined
* @debug_dir : debug directory for this voltage domain.
* @curr_volt : current voltage for this vdd.
* @vp_enabled : flag to keep track of whether vp is enabled or not
* @volt_scale : API to scale the voltage of the vdd.
*/
struct omap_vdd_info {
struct omap_volt_data *volt_data;
struct omap_vp_instance_data *vp_data;
struct omap_vp_runtime_data vp_rt_data;
struct dentry *debug_dir;
u32 curr_volt;
bool vp_enabled;

int (*volt_scale) (struct voltagedomain *voltdm,
unsigned long target_volt);
Expand Down
10 changes: 4 additions & 6 deletions trunk/arch/arm/mach-omap2/voltagedomains3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,14 @@ static const struct omap_vfsm_instance omap3_vdd1_vfsm = {
.voltsetup_mask = OMAP3430_SETUP_TIME1_MASK,
};

static struct omap_vdd_info omap3_vdd1_info = {
.vp_data = &omap3_vp1_data,
};
static struct omap_vdd_info omap3_vdd1_info;

static const struct omap_vfsm_instance omap3_vdd2_vfsm = {
.voltsetup_reg = OMAP3_PRM_VOLTSETUP1_OFFSET,
.voltsetup_mask = OMAP3430_SETUP_TIME2_MASK,
};

static struct omap_vdd_info omap3_vdd2_info = {
.vp_data = &omap3_vp2_data,
};
static struct omap_vdd_info omap3_vdd2_info;

static struct voltagedomain omap3_voltdm_mpu = {
.name = "mpu_iva",
Expand All @@ -57,6 +53,7 @@ static struct voltagedomain omap3_voltdm_mpu = {
.rmw = omap3_prm_vcvp_rmw,
.vc = &omap3_vc_mpu,
.vfsm = &omap3_vdd1_vfsm,
.vp = &omap3_vp_mpu,
.vdd = &omap3_vdd1_info,
};

Expand All @@ -68,6 +65,7 @@ static struct voltagedomain omap3_voltdm_core = {
.rmw = omap3_prm_vcvp_rmw,
.vc = &omap3_vc_core,
.vfsm = &omap3_vdd2_vfsm,
.vp = &omap3_vp_core,
.vdd = &omap3_vdd2_info,
};

Expand Down
15 changes: 6 additions & 9 deletions trunk/arch/arm/mach-omap2/voltagedomains44xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,19 @@ static const struct omap_vfsm_instance omap4_vdd_mpu_vfsm = {
.voltsetup_reg = OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
};

static struct omap_vdd_info omap4_vdd_mpu_info = {
.vp_data = &omap4_vp_mpu_data,
};
static struct omap_vdd_info omap4_vdd_mpu_info;

static const struct omap_vfsm_instance omap4_vdd_iva_vfsm = {
.voltsetup_reg = OMAP4_PRM_VOLTSETUP_IVA_RET_SLEEP_OFFSET,
};

static struct omap_vdd_info omap4_vdd_iva_info = {
.vp_data = &omap4_vp_iva_data,
};
static struct omap_vdd_info omap4_vdd_iva_info;

static const struct omap_vfsm_instance omap4_vdd_core_vfsm = {
.voltsetup_reg = OMAP4_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET,
};

static struct omap_vdd_info omap4_vdd_core_info = {
.vp_data = &omap4_vp_core_data,
};
static struct omap_vdd_info omap4_vdd_core_info;

static struct voltagedomain omap4_voltdm_mpu = {
.name = "mpu",
Expand All @@ -64,6 +58,7 @@ static struct voltagedomain omap4_voltdm_mpu = {
.rmw = omap4_prm_vcvp_rmw,
.vc = &omap4_vc_mpu,
.vfsm = &omap4_vdd_mpu_vfsm,
.vp = &omap4_vp_mpu,
.vdd = &omap4_vdd_mpu_info,
};

Expand All @@ -75,6 +70,7 @@ static struct voltagedomain omap4_voltdm_iva = {
.rmw = omap4_prm_vcvp_rmw,
.vc = &omap4_vc_iva,
.vfsm = &omap4_vdd_iva_vfsm,
.vp = &omap4_vp_iva,
.vdd = &omap4_vdd_iva_info,
};

Expand All @@ -86,6 +82,7 @@ static struct voltagedomain omap4_voltdm_core = {
.rmw = omap4_prm_vcvp_rmw,
.vc = &omap4_vc_core,
.vfsm = &omap4_vdd_core_vfsm,
.vp = &omap4_vp_core,
.vdd = &omap4_vdd_core_info,
};

Expand Down
Loading

0 comments on commit 5120196

Please sign in to comment.