* [RFCv2 0/2] Support TPS65023 with AM35x @ 2011-03-16 7:32 Sanjeev Premi 2011-03-16 7:32 ` [RFCv2 1/2] OMAP3: Add support for TPS65023 (AM35x only) Sanjeev Premi 2011-03-16 7:32 ` [RFCv2 2/2] AM35x: voltage: Basic initialization Sanjeev Premi 0 siblings, 2 replies; 7+ messages in thread From: Sanjeev Premi @ 2011-03-16 7:32 UTC (permalink / raw) To: linux-omap; +Cc: Sanjeev Premi This is a revised set of patches for getting the current AM3517 with TPS65023 working. The patch may not apply cleanly on the latest master; but should be able to give clear list of changes (and hacks) that were necessary to make the combination work. Since, there is a parallel effort for clean-up of voltage layer, attempt to rebase against new baseline would only delay the intended feedback. Sanjeev Premi (2): OMAP3: Add support for TPS65023 (AM35x only) AM35x: voltage: Basic initialization arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/pm.c | 1 + arch/arm/mach-omap2/pm.h | 9 +++ arch/arm/mach-omap2/pmic_tps65023.c | 82 ++++++++++++++++++++++++++ arch/arm/mach-omap2/voltage.c | 110 ++++++++++++++++++++++++++++++++++- 5 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c -- 1.7.2.2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFCv2 1/2] OMAP3: Add support for TPS65023 (AM35x only) 2011-03-16 7:32 [RFCv2 0/2] Support TPS65023 with AM35x Sanjeev Premi @ 2011-03-16 7:32 ` Sanjeev Premi 2011-03-16 7:32 ` [RFCv2 2/2] AM35x: voltage: Basic initialization Sanjeev Premi 1 sibling, 0 replies; 7+ messages in thread From: Sanjeev Premi @ 2011-03-16 7:32 UTC (permalink / raw) To: linux-omap; +Cc: Sanjeev Premi This patch adds support for TPS65023 used with OMAP3 devices. The PMIC is currently hooked to AM35x devices, but can easily be extended for other OMAP3 devices. Signed-off-by: Sanjeev Premi <premi@ti.com> --- arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/pm.c | 1 + arch/arm/mach-omap2/pm.h | 9 ++++ arch/arm/mach-omap2/pmic_tps65023.c | 82 +++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index ac2155d..33d7bc2 100755 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -19,7 +19,8 @@ obj-$(CONFIG_ARCH_TI81XX) += $(omap-2-3-common) $(hwmod-common) obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o -obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_REGULATOR_TPS65023) += pmic_tps65023.o # SMP support ONLY available for OMAP4 obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index a0f9f61..6d3d4c3 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -366,6 +366,7 @@ static int __init omap2_common_pm_late_init(void) /* Init the OMAP TWL parameters */ omap3_twl_init(); omap4_twl_init(); + omap3_tps65023_init(); /* Init the voltage layer */ omap_voltage_late_init(); diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index c98be66..fc575ed 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -139,6 +139,15 @@ static inline int omap4_twl_init(void) } #endif +#ifdef CONFIG_REGULATOR_TPS65023 +extern int omap3_tps65023_init(void); +#else +static inline int omap3_tps65023_init(void) +{ + return -EINVAL; +} +#endif + #ifndef CONFIG_SUSPEND #define omap_pm_ops NULL #endif diff --git a/arch/arm/mach-omap2/pmic_tps65023.c b/arch/arm/mach-omap2/pmic_tps65023.c new file mode 100644 index 0000000..b4d185d --- /dev/null +++ b/arch/arm/mach-omap2/pmic_tps65023.c @@ -0,0 +1,82 @@ +/** + * Implements support for TPS65023 + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <linux/err.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/i2c/twl.h> + +#include <plat/voltage.h> + +#include "pm.h" + +#define TPS65023_VDCDC1_MIN 800000 /* 0.8V */ +#define TPS65023_VDCDC1_STEP 25000 /* 0.025V */ + + +/* + * Get voltage corresponding to specified vsel value using this formula: + * Vout = 0.8V + (25mV x Vsel) + */ +static unsigned long tps65023_vsel_to_uv(const u8 vsel) +{ + return (TPS65023_VDCDC1_MIN + (TPS65023_VDCDC1_STEP * vsel)); +} + +/* + * Get vsel value corresponding to specified voltage using this formula: + * Vsel = (Vout - 0.8V)/ 25mV + */ +static u8 tps65023_uv_to_vsel(unsigned long uv) +{ + return DIV_ROUND_UP(uv - TPS65023_VDCDC1_MIN, TPS65023_VDCDC1_STEP); +} + +/* + * TPS65023 is currently supported only for AM35x devices. + * Therefore, implementation below is specific to this device pair. + */ + +/** + * Voltage information related to the MPU voltage domain of the + * AM35x processors - in relation to the TPS65023. + */ +static struct omap_volt_pmic_info tps65023_am35xx_mpu_volt_info = { + .step_size = 25000, + .on_volt = 1200000, + .vsel_to_uv = tps65023_vsel_to_uv, + .uv_to_vsel = tps65023_uv_to_vsel, +}; + +int __init omap3_tps65023_init(void) +{ + struct voltagedomain *voltdm; + + if (!cpu_is_omap34xx()) + return -ENODEV; + + if (cpu_is_omap3505() || cpu_is_omap3517()) { + voltdm = omap_voltage_domain_lookup("mpu"); + omap_voltage_register_pmic(voltdm, &tps65023_am35xx_mpu_volt_info); + voltdm = omap_voltage_domain_lookup("core"); + omap_voltage_register_pmic(voltdm, &tps65023_am35xx_mpu_volt_info); + } else { + /* TODO: + * Support for other devices that support TPS65023 + */ + } + + return 0; +} -- 1.7.2.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RFCv2 2/2] AM35x: voltage: Basic initialization 2011-03-16 7:32 [RFCv2 0/2] Support TPS65023 with AM35x Sanjeev Premi 2011-03-16 7:32 ` [RFCv2 1/2] OMAP3: Add support for TPS65023 (AM35x only) Sanjeev Premi @ 2011-03-16 7:32 ` Sanjeev Premi 2011-03-16 11:03 ` Vishwanath Sripathy 1 sibling, 1 reply; 7+ messages in thread From: Sanjeev Premi @ 2011-03-16 7:32 UTC (permalink / raw) To: linux-omap; +Cc: Sanjeev Premi This patch adds the basic initialization of voltage layer for AM35x. Since AM35x doesn't support voltage scaling, Many functions emply fucntions have been defined to plug into existing voltage layer. Signed-off-by: Sanjeev Premi <premi@ti.com> --- arch/arm/mach-omap2/voltage.c | 110 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 109 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 2017dc0..a82a55f 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -260,6 +260,40 @@ static struct omap_vdd_info omap3_vdd_info[] = { #define OMAP3_NR_SCALABLE_VDD ARRAY_SIZE(omap3_vdd_info) +/* + * AM35x VDD structures + * + * In AM35x there neither scalable voltage domain nor any hook-up with + * voltage controller/processor. However, when trying to re-use the hwmod + * database for OMAP3, definition of "core" voltage domain is necessary. + * Else, changes in hwmod data structures grow spirally. + * + * As a workaround, "core" voltage domain is defined below. The definition + * doesn't lead to any side-effects. + */ +static struct omap_vdd_info am3517_vdd_info[] = { + { + .dep_vdd_info = NULL, + .nr_dep_vdd = 0, + .vp_enabled = false, + + .voltdm = { + .name = "mpu", + }, + }, + { + .dep_vdd_info = NULL, + .nr_dep_vdd = 0, + .vp_enabled = false, + + .voltdm = { + .name = "core", + }, + }, +}; + +#define AM3517_NR_SCALABLE_VDD ARRAY_SIZE(am3517_vdd_info) + /* OMAP4 VDD sturctures */ static struct omap_vdd_info omap4_vdd_info[] = { { @@ -374,6 +408,15 @@ static struct omap_volt_data omap44xx_vdd_core_volt_data[] = { VOLT_DATA_DEFINE(0, 0, 0, 0), }; +/* AM35x + * + * Fields related to SmartReflex and Voltage Processor are set to 0. + */ +static struct omap_volt_data am35xx_vdd_volt_data[] = { + VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, 0x0, 0x0, 0x0), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + /* OMAP 3430 MPU Core VDD dependency table */ static struct omap_vdd_dep_volt omap34xx_vdd1_vdd2_data[] = { {.main_vdd_volt = 975000, .dep_vdd_volt = 1050000}, @@ -399,6 +442,12 @@ static void (*vp_init) (struct omap_vdd_info *vdd); static int (*vdd_data_configure) (struct omap_vdd_info *vdd); +static int volt_scale_nop (struct omap_vdd_info *vdd, + unsigned long target_volt) +{ + return 0; +} + static u32 omap3_voltage_read_reg(u16 mod, u8 offset) { return omap2_prm_read_mod_reg(mod, offset); @@ -1019,6 +1068,45 @@ static int __init omap3_vdd_data_configure(struct omap_vdd_info *vdd) return 0; } +/** + *Setup VDD related information for AM35x processors + */ +static int __init am3517_vdd_data_configure(struct omap_vdd_info *vdd) +{ + if (!vdd->pmic_info) { + pr_err("%s: PMIC info requried to configure vdd_%s not" + "populated.Hence cannot initialize vdd_%s\n", + __func__, vdd->voltdm.name, vdd->voltdm.name); + return -EINVAL; + } + + if (!strcmp(vdd->voltdm.name, "mpu") || + !strcmp(vdd->voltdm.name, "core")) { + vdd->volt_data = am35xx_vdd_volt_data; + } else { + pr_warning("%s: vdd_%s does not exist in AM35x\n", + __func__, vdd->voltdm.name); + return -EINVAL; + } + + /* Generic voltage parameters */ + vdd->curr_volt = OMAP3430_VDD_MPU_OPP3_UV; + vdd->ocp_mod = OCP_MOD; + vdd->prm_irqst_reg = OMAP3_PRM_IRQSTATUS_MPU_OFFSET; + vdd->read_reg = omap3_voltage_read_reg; + vdd->write_reg = omap3_voltage_write_reg; + vdd->volt_scale = volt_scale_nop; + + /* Init the plist */ + spin_lock_init(&vdd->user_lock); + plist_head_init(&vdd->user_list, &vdd->user_lock); + + /* Init the DVFS mutex */ + mutex_init(&vdd->scaling_mutex); + + return 0; +} + /* OMAP4 specific voltage init functions */ static void __init omap4_vc_init(struct omap_vdd_info *vdd) { @@ -1908,13 +1996,33 @@ int __init omap_voltage_late_init(void) } /** + * AM35x - Empty initialization of voltage controller + */ +static void __init am3517_vc_init(struct omap_vdd_info *vdd) +{ +} + +/** + * AM35x - Empty initialization of voltage processor + */ +static void __init am3517_vp_init(struct omap_vdd_info *vdd) +{ +} + +/** * omap_voltage_early_init()- Volatage driver early init */ static int __init omap_voltage_early_init(void) { int i; - if (cpu_is_omap34xx()) { + if (cpu_is_omap3505() || cpu_is_omap3517()) { + vdd_info = am3517_vdd_info; + nr_scalable_vdd = AM3517_NR_SCALABLE_VDD; + vc_init = am3517_vc_init; + vp_init = am3517_vp_init; + vdd_data_configure = am3517_vdd_data_configure; + } else if (cpu_is_omap34xx()) { vdd_info = omap3_vdd_info; nr_scalable_vdd = OMAP3_NR_SCALABLE_VDD; vc_init = omap3_vc_init; -- 1.7.2.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [RFCv2 2/2] AM35x: voltage: Basic initialization 2011-03-16 7:32 ` [RFCv2 2/2] AM35x: voltage: Basic initialization Sanjeev Premi @ 2011-03-16 11:03 ` Vishwanath Sripathy 2011-03-17 8:30 ` Premi, Sanjeev 0 siblings, 1 reply; 7+ messages in thread From: Vishwanath Sripathy @ 2011-03-16 11:03 UTC (permalink / raw) To: Sanjeev Premi, linux-omap > -----Original Message----- > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- > owner@vger.kernel.org] On Behalf Of Sanjeev Premi > Sent: Wednesday, March 16, 2011 1:02 PM > To: linux-omap@vger.kernel.org > Cc: Sanjeev Premi > Subject: [RFCv2 2/2] AM35x: voltage: Basic initialization > > This patch adds the basic initialization of voltage layer > for AM35x. Since AM35x doesn't support voltage scaling, > Many functions emply fucntions have been defined to plug > into existing voltage layer. > > Signed-off-by: Sanjeev Premi <premi@ti.com> > --- > arch/arm/mach-omap2/voltage.c | 110 > ++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 109 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach- > omap2/voltage.c > index 2017dc0..a82a55f 100644 > --- a/arch/arm/mach-omap2/voltage.c > +++ b/arch/arm/mach-omap2/voltage.c > @@ -260,6 +260,40 @@ static struct omap_vdd_info omap3_vdd_info[] > = { > > #define OMAP3_NR_SCALABLE_VDD ARRAY_SIZE(omap3_vdd_info) > > +/* > + * AM35x VDD structures > + * > + * In AM35x there neither scalable voltage domain nor any hook-up > with > + * voltage controller/processor. However, when trying to re-use the > hwmod > + * database for OMAP3, definition of "core" voltage domain is > necessary. > + * Else, changes in hwmod data structures grow spirally. > + * > + * As a workaround, "core" voltage domain is defined below. The > definition > + * doesn't lead to any side-effects. > + */ > +static struct omap_vdd_info am3517_vdd_info[] = { > + { > + .dep_vdd_info = NULL, > + .nr_dep_vdd = 0, > + .vp_enabled = false, > + > + .voltdm = { > + .name = "mpu", > + }, > + }, > + { > + .dep_vdd_info = NULL, > + .nr_dep_vdd = 0, > + .vp_enabled = false, > + > + .voltdm = { > + .name = "core", > + }, > + }, > +}; > + > +#define AM3517_NR_SCALABLE_VDD ARRAY_SIZE(am3517_vdd_info) > + > /* OMAP4 VDD sturctures */ > static struct omap_vdd_info omap4_vdd_info[] = { > { > @@ -374,6 +408,15 @@ static struct omap_volt_data > omap44xx_vdd_core_volt_data[] = { > VOLT_DATA_DEFINE(0, 0, 0, 0), > }; > > +/* AM35x > + * > + * Fields related to SmartReflex and Voltage Processor are set to 0. > + */ > +static struct omap_volt_data am35xx_vdd_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, 0x0, 0x0, > 0x0), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > /* OMAP 3430 MPU Core VDD dependency table */ > static struct omap_vdd_dep_volt omap34xx_vdd1_vdd2_data[] = { > {.main_vdd_volt = 975000, .dep_vdd_volt = 1050000}, > @@ -399,6 +442,12 @@ static void (*vp_init) (struct omap_vdd_info > *vdd); > > static int (*vdd_data_configure) (struct omap_vdd_info *vdd); > > +static int volt_scale_nop (struct omap_vdd_info *vdd, > + unsigned long target_volt) > +{ > + return 0; > +} > + > static u32 omap3_voltage_read_reg(u16 mod, u8 offset) > { > return omap2_prm_read_mod_reg(mod, offset); > @@ -1019,6 +1068,45 @@ static int __init > omap3_vdd_data_configure(struct omap_vdd_info *vdd) > return 0; > } > > +/** > + *Setup VDD related information for AM35x processors > + */ > +static int __init am3517_vdd_data_configure(struct omap_vdd_info > *vdd) > +{ > + if (!vdd->pmic_info) { > + pr_err("%s: PMIC info requried to configure vdd_%s not" > + "populated.Hence cannot initialize vdd_%s\n", > + __func__, vdd->voltdm.name, vdd- > >voltdm.name); > + return -EINVAL; > + } > + > + if (!strcmp(vdd->voltdm.name, "mpu") || > + !strcmp(vdd->voltdm.name, "core")) { > + vdd->volt_data = am35xx_vdd_volt_data; > + } else { > + pr_warning("%s: vdd_%s does not exist in AM35x\n", > + __func__, vdd->voltdm.name); > + return -EINVAL; > + } > + > + /* Generic voltage parameters */ > + vdd->curr_volt = OMAP3430_VDD_MPU_OPP3_UV; > + vdd->ocp_mod = OCP_MOD; > + vdd->prm_irqst_reg = OMAP3_PRM_IRQSTATUS_MPU_OFFSET; > + vdd->read_reg = omap3_voltage_read_reg; > + vdd->write_reg = omap3_voltage_write_reg; > + vdd->volt_scale = volt_scale_nop; > + > + /* Init the plist */ > + spin_lock_init(&vdd->user_lock); > + plist_head_init(&vdd->user_list, &vdd->user_lock); > + > + /* Init the DVFS mutex */ > + mutex_init(&vdd->scaling_mutex); > + > + return 0; > +} > + > /* OMAP4 specific voltage init functions */ > static void __init omap4_vc_init(struct omap_vdd_info *vdd) > { > @@ -1908,13 +1996,33 @@ int __init omap_voltage_late_init(void) > } > > /** > + * AM35x - Empty initialization of voltage controller > + */ > +static void __init am3517_vc_init(struct omap_vdd_info *vdd) > +{ > +} > + > +/** > + * AM35x - Empty initialization of voltage processor > + */ > +static void __init am3517_vp_init(struct omap_vdd_info *vdd) > +{ > +} > + > +/** > * omap_voltage_early_init()- Volatage driver early init > */ > static int __init omap_voltage_early_init(void) > { > int i; > > - if (cpu_is_omap34xx()) { > + if (cpu_is_omap3505() || cpu_is_omap3517()) { > + vdd_info = am3517_vdd_info; > + nr_scalable_vdd = > AM3517_NR_SCALABLE_VDD; As you have mentioned that there is no voltage scaling supported, then shoudn't nr_scalable_vdd = 0? If nr_scalable_vdd is 0, then you probably would not need any other TPS specific changes in Voltage.c as VP and VC initialization itself is skipped. Vishwa > + vc_init = am3517_vc_init; > + vp_init = am3517_vp_init; > + vdd_data_configure = am3517_vdd_data_configure; > + } else if (cpu_is_omap34xx()) { > vdd_info = omap3_vdd_info; > nr_scalable_vdd = OMAP3_NR_SCALABLE_VDD; > vc_init = omap3_vc_init; > -- > 1.7.2.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [RFCv2 2/2] AM35x: voltage: Basic initialization 2011-03-16 11:03 ` Vishwanath Sripathy @ 2011-03-17 8:30 ` Premi, Sanjeev 2011-03-17 9:03 ` Premi, Sanjeev 0 siblings, 1 reply; 7+ messages in thread From: Premi, Sanjeev @ 2011-03-17 8:30 UTC (permalink / raw) To: Sripathy, Vishwanath, linux-omap@vger.kernel.org Cc: Cousson, Benoit, paul@pwsan.com > -----Original Message----- > From: Sripathy, Vishwanath > Sent: Wednesday, March 16, 2011 4:33 PM > To: Premi, Sanjeev; linux-omap@vger.kernel.org > Subject: RE: [RFCv2 2/2] AM35x: voltage: Basic initialization > > > -----Original Message----- > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- > > owner@vger.kernel.org] On Behalf Of Sanjeev Premi > > Sent: Wednesday, March 16, 2011 1:02 PM > > To: linux-omap@vger.kernel.org > > Cc: Sanjeev Premi > > Subject: [RFCv2 2/2] AM35x: voltage: Basic initialization > > > > This patch adds the basic initialization of voltage layer > > for AM35x. Since AM35x doesn't support voltage scaling, > > Many functions emply fucntions have been defined to plug > > into existing voltage layer. > > > > Signed-off-by: Sanjeev Premi <premi@ti.com> > > --- [snip]...[snip] > > +/** > > + * AM35x - Empty initialization of voltage processor > > + */ > > +static void __init am3517_vp_init(struct omap_vdd_info *vdd) > > +{ > > +} > > + > > +/** > > * omap_voltage_early_init()- Volatage driver early init > > */ > > static int __init omap_voltage_early_init(void) > > { > > int i; > > > > - if (cpu_is_omap34xx()) { > > + if (cpu_is_omap3505() || cpu_is_omap3517()) { > > + vdd_info = am3517_vdd_info; > > + nr_scalable_vdd = > > AM3517_NR_SCALABLE_VDD; > As you have mentioned that there is no voltage scaling supported, then > shoudn't nr_scalable_vdd = 0? > If nr_scalable_vdd is 0, then you probably would not need any > other TPS > specific changes in Voltage.c as VP and VC initialization itself is > skipped. [sp] Yes, there is no voltage scaling; but there are two problems in the flow. Notice I had this value 0 in previous RFC; and yes I expected the vp and vc to be excluded as you say; however, code isn't really meant to do so. Few loops using "nr_scalable_vdd" fail as value "0" doesn't meet the entry criteria. This problem is/was easily fixes by an additional if statement. The things, however, get stuck in HWMOD again when the parent of omap3xxx_l3_main_hwmod is set as "core". Changing this causes another cascade of changes leading to almost duplicating the complete hwmod structure for AM35x. Easy solution was to set use "core". Rest of the changes in the patch ensure that code flows properly - and there is no scaling. ~sanjeev > > Vishwa > > + vc_init = am3517_vc_init; > > + vp_init = am3517_vp_init; > > + vdd_data_configure = am3517_vdd_data_configure; > > + } else if (cpu_is_omap34xx()) { > > vdd_info = omap3_vdd_info; > > nr_scalable_vdd = OMAP3_NR_SCALABLE_VDD; > > vc_init = omap3_vc_init; > > -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [RFCv2 2/2] AM35x: voltage: Basic initialization 2011-03-17 8:30 ` Premi, Sanjeev @ 2011-03-17 9:03 ` Premi, Sanjeev 2011-03-17 20:12 ` Paul Walmsley 0 siblings, 1 reply; 7+ messages in thread From: Premi, Sanjeev @ 2011-03-17 9:03 UTC (permalink / raw) To: Sripathy, Vishwanath, linux-omap@vger.kernel.org Cc: Cousson, Benoit, paul@pwsan.com > -----Original Message----- > From: linux-omap-owner@vger.kernel.org > [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Premi, Sanjeev > Sent: Thursday, March 17, 2011 2:01 PM > To: Sripathy, Vishwanath; linux-omap@vger.kernel.org > Cc: Cousson, Benoit; paul@pwsan.com > Subject: RE: [RFCv2 2/2] AM35x: voltage: Basic initialization > > > -----Original Message----- > > From: Sripathy, Vishwanath > > Sent: Wednesday, March 16, 2011 4:33 PM > > To: Premi, Sanjeev; linux-omap@vger.kernel.org > > Subject: RE: [RFCv2 2/2] AM35x: voltage: Basic initialization > > > > > -----Original Message----- > > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- > > > owner@vger.kernel.org] On Behalf Of Sanjeev Premi > > > Sent: Wednesday, March 16, 2011 1:02 PM > > > To: linux-omap@vger.kernel.org > > > Cc: Sanjeev Premi > > > Subject: [RFCv2 2/2] AM35x: voltage: Basic initialization > > > > > > This patch adds the basic initialization of voltage layer > > > for AM35x. Since AM35x doesn't support voltage scaling, > > > Many functions emply fucntions have been defined to plug > > > into existing voltage layer. > > > > > > Signed-off-by: Sanjeev Premi <premi@ti.com> > > > --- > > [snip]...[snip] > > > > +/** > > > + * AM35x - Empty initialization of voltage processor > > > + */ > > > +static void __init am3517_vp_init(struct omap_vdd_info *vdd) > > > +{ > > > +} > > > + > > > +/** > > > * omap_voltage_early_init()- Volatage driver early init > > > */ > > > static int __init omap_voltage_early_init(void) > > > { > > > int i; > > > > > > - if (cpu_is_omap34xx()) { > > > + if (cpu_is_omap3505() || cpu_is_omap3517()) { > > > + vdd_info = am3517_vdd_info; > > > + nr_scalable_vdd = > > > AM3517_NR_SCALABLE_VDD; > > As you have mentioned that there is no voltage scaling > supported, then > > shoudn't nr_scalable_vdd = 0? > > If nr_scalable_vdd is 0, then you probably would not need any > > other TPS > > specific changes in Voltage.c as VP and VC initialization itself is > > skipped. > > [sp] Yes, there is no voltage scaling; but there are two > problems in the > flow. > Notice I had this value 0 in previous RFC; and yes I expected the > vp and vc to be excluded as you say; however, code isn't really > meant to do so. > Few loops using "nr_scalable_vdd" fail as value "0" > doesn't meet the > entry criteria. This problem is/was easily fixes by an additional > if statement. > > The things, however, get stuck in HWMOD again when the parent of [sp] Being more specific: The parent here refers to "parent" vdd i.e. "vdd_name". ~sanjeev > omap3xxx_l3_main_hwmod is set as "core". Changing this causes > another cascade of changes leading to almost duplicating > the complete > hwmod structure for AM35x. > > Easy solution was to set use "core". Rest of the changes > in the patch > ensure that code flows properly - and there is no scaling. > > ~sanjeev > > > > > Vishwa > > > + vc_init = am3517_vc_init; > > > + vp_init = am3517_vp_init; > > > + vdd_data_configure = am3517_vdd_data_configure; > > > + } else if (cpu_is_omap34xx()) { > > > vdd_info = omap3_vdd_info; > > > nr_scalable_vdd = OMAP3_NR_SCALABLE_VDD; > > > vc_init = omap3_vc_init; > > > -- > -- > To unsubscribe from this list: send the line "unsubscribe > linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [RFCv2 2/2] AM35x: voltage: Basic initialization 2011-03-17 9:03 ` Premi, Sanjeev @ 2011-03-17 20:12 ` Paul Walmsley 0 siblings, 0 replies; 7+ messages in thread From: Paul Walmsley @ 2011-03-17 20:12 UTC (permalink / raw) To: Premi, Sanjeev Cc: Sripathy, Vishwanath, khilman, linux-omap@vger.kernel.org, Cousson, Benoit On Thu, 17 Mar 2011, Premi, Sanjeev wrote: > > The things, however, get stuck in HWMOD again when the parent of > > [sp] Being more specific: > The parent here refers to "parent" vdd i.e. "vdd_name". > > ~sanjeev > > > omap3xxx_l3_main_hwmod is set as "core". Changing this causes > > another cascade of changes leading to almost duplicating > > the complete > > hwmod structure for AM35x. There shouldn't be any vdd_name entries set in the hwmod data. That struct omap_hwmod field will be removed. Instead, voltage domain data should be associated with the powerdomain. Kevin has patches for some of this forthcoming. - Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-17 20:12 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-03-16 7:32 [RFCv2 0/2] Support TPS65023 with AM35x Sanjeev Premi 2011-03-16 7:32 ` [RFCv2 1/2] OMAP3: Add support for TPS65023 (AM35x only) Sanjeev Premi 2011-03-16 7:32 ` [RFCv2 2/2] AM35x: voltage: Basic initialization Sanjeev Premi 2011-03-16 11:03 ` Vishwanath Sripathy 2011-03-17 8:30 ` Premi, Sanjeev 2011-03-17 9:03 ` Premi, Sanjeev 2011-03-17 20:12 ` Paul Walmsley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).