From a02a42138eca03908424cbefb46700133d97e01b Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Tue, 29 Mar 2011 15:14:38 -0700 Subject: [PATCH] --- yaml --- r: 272735 b: refs/heads/master c: 08d1c9a3e2dc7a285db7c689c42963d0f5271c1f h: refs/heads/master i: 272733: 8825e02c81d3666cce157f0b4bdaf02f7f7c02ae 272731: 9cfce6aee689dd563096bc2a007c1ddca705aed4 272727: 8824f60a14721aac995c730c2ffcf4af7ca6aa40 272719: a28afa09f4f1c1f3122ec5aa3153c3864318b6fe 272703: b4d88c428f5f47346f1bc477a628d0c9490305d8 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/vc.c | 30 +++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 879531c3e540..f0971fff4737 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5892bb1fc6430d086f5c2a4216f9ed00070e31ad +refs/heads/master: 08d1c9a3e2dc7a285db7c689c42963d0f5271c1f diff --git a/trunk/arch/arm/mach-omap2/vc.c b/trunk/arch/arm/mach-omap2/vc.c index f78e62abe720..72c9cb64a42b 100644 --- a/trunk/arch/arm/mach-omap2/vc.c +++ b/trunk/arch/arm/mach-omap2/vc.c @@ -157,26 +157,11 @@ static void __init omap3_vfsm_init(struct voltagedomain *voltdm) static void __init omap3_vc_init_channel(struct voltagedomain *voltdm) { - struct omap_vc_channel *vc = voltdm->vc; - struct omap_vdd_info *vdd = voltdm->vdd; static bool is_initialized; - u8 on_vsel, onlp_vsel, ret_vsel, off_vsel; - u32 vc_val; if (is_initialized) return; - /* Set up the on, inactive, retention and off voltage */ - on_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->on_volt); - onlp_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->onlp_volt); - ret_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->ret_volt); - off_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->off_volt); - vc_val = ((on_vsel << vc->common->cmd_on_shift) | - (onlp_vsel << vc->common->cmd_onlp_shift) | - (ret_vsel << vc->common->cmd_ret_shift) | - (off_vsel << vc->common->cmd_off_shift)); - voltdm->write(vc_val, vc->cmdval_reg); - /* * Generic VC parameters init * XXX This data should be abstracted out @@ -201,8 +186,6 @@ static void __init omap4_vc_init_channel(struct voltagedomain *voltdm) if (is_initialized) return; - /* TODO: Configure setup times and CMD_VAL values*/ - /* * Generic VC parameters init * XXX This data should be abstracted out @@ -223,6 +206,8 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) { struct omap_vc_channel *vc = voltdm->vc; struct omap_vdd_info *vdd = voltdm->vdd; + u8 on_vsel, onlp_vsel, ret_vsel, off_vsel; + u32 val; if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { pr_err("%s: PMIC info requried to configure vc for" @@ -259,6 +244,17 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) vc->cmd_reg_addr << __ffs(vc->smps_cmdra_mask), vc->common->smps_cmdra_reg); + /* Set up the on, inactive, retention and off voltage */ + on_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->on_volt); + onlp_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->onlp_volt); + ret_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->ret_volt); + off_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->off_volt); + val = ((on_vsel << vc->common->cmd_on_shift) | + (onlp_vsel << vc->common->cmd_onlp_shift) | + (ret_vsel << vc->common->cmd_ret_shift) | + (off_vsel << vc->common->cmd_off_shift)); + voltdm->write(val, vc->cmdval_reg); + /* Configure the setup times */ voltdm->rmw(voltdm->vfsm->voltsetup_mask, vc->setup_time << __ffs(voltdm->vfsm->voltsetup_mask),