Merge tag 'iommu-updates-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / cpufreq / s3c24xx-cpufreq.c
index 27111fb..37efc0d 100644 (file)
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
 /* note, cpufreq support deals in kHz, no Hz */
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-#define S3C2410_LOCKTIME    S3C2410_CLKREG(0x00)
-#define S3C2410_MPLLCON     S3C2410_CLKREG(0x04)
-
 static struct cpufreq_driver s3c24xx_driver;
 static struct s3c_cpufreq_config cpu_cur;
 static struct s3c_iotimings s3c24xx_iotiming;
@@ -70,7 +64,7 @@ static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg)
        cfg->freq.pclk = pclk = clk_get_rate(clk_pclk);
        cfg->freq.armclk = armclk = clk_get_rate(clk_arm);
 
-       cfg->pll.driver_data = __raw_readl(S3C2410_MPLLCON);
+       cfg->pll.driver_data = s3c24xx_read_mpllcon();
        cfg->pll.frequency = fclk;
 
        cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10);
@@ -388,7 +382,7 @@ static unsigned int suspend_freq;
 static int s3c_cpufreq_suspend(struct cpufreq_policy *policy)
 {
        suspend_pll.frequency = clk_get_rate(_clk_mpll);
-       suspend_pll.driver_data = __raw_readl(S3C2410_MPLLCON);
+       suspend_pll.driver_data = s3c24xx_read_mpllcon();
        suspend_freq = clk_get_rate(clk_arm);
 
        return 0;
@@ -549,7 +543,7 @@ static void s3c_cpufreq_update_loctkime(void)
        val |= calc_locktime(rate, cpu_cur.info->locktime_m);
 
        pr_info("%s: new locktime is 0x%08x\n", __func__, val);
-       __raw_writel(val, S3C2410_LOCKTIME);
+       s3c24xx_write_locktime(val);
 }
 
 static int s3c_cpufreq_build_freq(void)