On Wed, Feb 23, 2011 at 23:28, Sanjeev Premi <[email protected]> wrote:
> This patch adds basic initialization in
> the voltage layer for AM35xx processors.
>
> In absence of AVS, functions vp_init() and
> vc_init() are empty.
>
> Signed-off-by: Sanjeev Premi <[email protected]>
> ---
> arch/arm/mach-omap2/voltage.c | 45
> ++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 44 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
> index bbc36e7..63dac11 100644
> --- a/arch/arm/mach-omap2/voltage.c
> +++ b/arch/arm/mach-omap2/voltage.c
> @@ -194,6 +194,30 @@ static struct omap_vdd_info omap3_vdd_info[] = {
>
> #define OMAP3_NR_SCALABLE_VDD ARRAY_SIZE(omap3_vdd_info)
>
> +/*
> + * AM3517 VDD structures
> + * TODO: The values in vp_offs are just a copy of OMAP3 for now.
> + * Assignments need to be looked again; but appears that
> + * they won't ever be used.
> + */
> +static struct omap_vdd_info am3517_vdd_info[] = {
> + {
> + .vp_offs = {
> + .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET,
> + .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET,
> + .vstepmax = OMAP3_PRM_VP1_VSTEPMAX_OFFSET,
> + .vlimitto = OMAP3_PRM_VP1_VLIMITTO_OFFSET,
> + .vstatus = OMAP3_PRM_VP1_STATUS_OFFSET,
> + .voltage = OMAP3_PRM_VP1_VOLTAGE_OFFSET,
> + },
> + .voltdm = {
> + .name = "mpu",
> + },
> + },
> +};
aah! no potential of scaling for Core domain here? ok, I am starting
to get the picture of your question in
http://marc.info/?t=129847134400006&r=1&w=2 with TPS65023.
> +
> +#define AM3517_NR_SCALABLE_VDD 0
> +
> /* OMAP4 VDD sturctures */
> static struct omap_vdd_info omap4_vdd_info[] = {
> {
> @@ -1551,11 +1575,30 @@ int __init omap_voltage_late_init(void)
> }
>
> /**
> + * AM35xx - dummy initialization of voltage controller
> + */
> +static void __init am3517_vc_init(struct omap_vdd_info *vdd)
> +{
> +}
> +/**
> + * AM35xx - dummy 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)
> {
> - 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 = omap3_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;
ok I think (maybe wrongly) features is a better mechanism to introduce
this here. may even be something to look at vc and vp as seperate
devices even initialized at hwmod level - currently we do not do it
and we have a messy voltage.c with all kind of offset initialization.
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html