Re: [RFC] omap3: Enable SmartReflex calculations for 720MHz

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 7 jan 2011, om 18:26 heeft Sanjeev Premi het volgende geschreven:

> The eFuse registers do not contain the nValue to be used
> with 720MHz (OPP6). This patch implements procedure to
> calculate the nValue(OPP6) based on the nValue(OPP5).
> 
>  [1] SPRUFF1D-June 2009 section 1.5.2.1.1
> 
> This is first attempt to fit this mechanism into new
> smartreflex framework. Do note a FIXME which is added
> to illustrate the calculations; and express need for
> a mechanism to get nValues for each OPP.
> 
> Signed-off-by: Sanjeev Premi <premi@xxxxxx>
> ---
> arch/arm/mach-omap2/sr_device.c           |   54 +++++++++++++++++++++++++++++
> arch/arm/mach-omap2/voltage.c             |    1 +
> arch/arm/plat-omap/include/plat/voltage.h |    1 +
> 3 files changed, 56 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
> index 786d685..43640a3 100644
> --- a/arch/arm/mach-omap2/sr_device.c
> +++ b/arch/arm/mach-omap2/sr_device.c
> @@ -38,6 +38,51 @@ static struct omap_device_pm_latency omap_sr_latency[] = {
> 	},
> };
> 
> +static void swcalc_opp6_RG(u32 rFuse, u32 gainFuse, u32 deltaNT,
> +                               u32* rAdj, u32* gainAdj)
> +{
> +       u32 nAdj;
> +       u32 g, r;
> +
> +       nAdj = ((1 << (gainFuse + 8))/rFuse) + deltaNT;
> +
> +       for (g = 0; g < GAIN_MAXLIMIT; g++) {

GAIN_MAXLIMIT is undeclared at this point:

arch/arm/mach-omap2/sr_device.c: In function ‘swcalc_opp6_RG’:
arch/arm/mach-omap2/sr_device.c:49: error: ‘GAIN_MAXLIMIT’ undeclared (first use in this function)


> +               r = (1 << (g + 8)) / nAdj;
> +               if (r < 256) {
> +                       *rAdj = r;
> +                       *gainAdj = g;
> +               }
> +       }
> +}
> +
> +#define SWCALC_OPP6_DELTA_NNT	379
> +#define SWCALC_OPP6_DELTA_PNT	227
> +#define GAIN_MAXLIMIT		16

So these have to move up at bit.

regards,

Koen--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux