Re: [PATCH 5/5] [CPUFREQ] EXYNOS4210: Add support ASV feature

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

 



Hello,

On Wed, Nov 2, 2011 at 9:43 PM, Kukjin Kim <kgene.kim@xxxxxxxxxxx> wrote:
[]
> +static void __init set_volt_table(void)
> +{
> +       unsigned int tmp, i, asv_group = 0;
> +
> +       tmp = __raw_readl(S5P_INFORM2);

As I've mentioned in the ASV patch thread, do we really need to use an
INFORM register simply to save the id of supported voltage ranges?

Why aren't we using an extern variable here? For example, "extern int
asv_group_id;" and define it at "asv.h" or somewhere else.

At reboot, we are going to init ASV driver and will get the ASV value
again; thus, we don't need to use such a preserving register anyway.
At suspend/resume, the value in RAM does not disappear and the IPL
does not care this value; thus, it is meaningless to use INFORM2 for
this value.


> +
> +       switch (tmp  & (SUPPORT_FREQ_MASK << SUPPORT_FREQ_SHIFT)) {
> +       case SUPPORT_1200MHZ:
> +               asv_group = (tmp & 0xF);
> +               break;
> +       case SUPPORT_1400MHZ:
> +       case SUPPORT_1000MHZ:
> +       default:
> +               /* Not supported and assign typical ASV group */
> +               asv_group = 2;
> +               break;
> +       }
> +
> +       printk(KERN_INFO "DVFS: VDD_ARM Voltage table set with %d Group\n",
> asv_group);
> +
> +       for (i = 0 ; i < CPUFREQ_LEVEL_END ; i++)
> +               exynos4_volt_table[i] = asv_voltage[i][asv_group];
> +}
> +
>  static int __init exynos4_cpufreq_init(void)
>  {
>        int i;
>        unsigned int tmp;
>
> +       set_volt_table();
> +
>        cpu_clk = clk_get(NULL, "armclk");
>        if (IS_ERR(cpu_clk))
>                return PTR_ERR(cpu_clk);
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
MyungJoo Ham, Ph.D.
Mobile Software Platform Lab, DMC Business, Samsung Electronics
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux