Lines Matching defs:cfg
61 * @cfg: The cpu frequency settings.
64 * specified in @cfg. The values are stored in @cfg for later use
67 static int s3c2440_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
73 fclk = cfg->freq.fclk;
74 armclk = cfg->freq.armclk;
75 hclk_max = cfg->max.hclk;
103 pdiv = (hclk > cfg->max.pclk) ? 2 : 1;
105 if ((hclk / pdiv) > cfg->max.pclk)
124 cfg->divs.dvs = 1;
127 cfg->divs.dvs = 0;
129 cfg->freq.armclk = armclk;
133 cfg->divs.h_divisor = hdiv;
134 cfg->divs.p_divisor = pdiv;
147 * @cfg: The cpu frequency settings.
149 * Set the divisors from the settings in @cfg, which where generated
152 static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
157 cfg->divs.h_divisor, cfg->divs.p_divisor);
165 switch (cfg->divs.h_divisor) {
190 if (cfg->divs.p_divisor != cfg->divs.h_divisor)
206 clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
235 static int s3c2440_cpufreq_calctable(struct s3c_cpufreq_config *cfg,
241 WARN_ON(cfg->info == NULL);
242 WARN_ON(cfg->board == NULL);
244 ret = run_freq_for(cfg->info->max.hclk,
245 cfg->info->max.fclk,