.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2006-2008 Simtec Electronics |
---|
3 | 4 | * http://armlinux.simtec.co.uk/ |
---|
4 | 5 | * Ben Dooks <ben@simtec.co.uk> |
---|
5 | 6 | * |
---|
6 | 7 | * S3C24XX CPU Frequency scaling |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
24 | 21 | #include <linux/device.h> |
---|
25 | 22 | #include <linux/sysfs.h> |
---|
26 | 23 | #include <linux/slab.h> |
---|
| 24 | +#include <linux/soc/samsung/s3c-cpufreq-core.h> |
---|
| 25 | +#include <linux/soc/samsung/s3c-pm.h> |
---|
27 | 26 | |
---|
28 | 27 | #include <asm/mach/arch.h> |
---|
29 | 28 | #include <asm/mach/map.h> |
---|
30 | 29 | |
---|
31 | | -#include <plat/cpu.h> |
---|
32 | | -#include <plat/cpu-freq-core.h> |
---|
33 | | - |
---|
34 | | -#include <mach/regs-clock.h> |
---|
35 | | - |
---|
36 | 30 | /* note, cpufreq support deals in kHz, no Hz */ |
---|
37 | | - |
---|
38 | 31 | static struct cpufreq_driver s3c24xx_driver; |
---|
39 | 32 | static struct s3c_cpufreq_config cpu_cur; |
---|
40 | 33 | static struct s3c_iotimings s3c24xx_iotiming; |
---|
.. | .. |
---|
71 | 64 | cfg->freq.pclk = pclk = clk_get_rate(clk_pclk); |
---|
72 | 65 | cfg->freq.armclk = armclk = clk_get_rate(clk_arm); |
---|
73 | 66 | |
---|
74 | | - cfg->pll.driver_data = __raw_readl(S3C2410_MPLLCON); |
---|
| 67 | + cfg->pll.driver_data = s3c24xx_read_mpllcon(); |
---|
75 | 68 | cfg->pll.frequency = fclk; |
---|
76 | 69 | |
---|
77 | 70 | cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10); |
---|
.. | .. |
---|
389 | 382 | static int s3c_cpufreq_suspend(struct cpufreq_policy *policy) |
---|
390 | 383 | { |
---|
391 | 384 | suspend_pll.frequency = clk_get_rate(_clk_mpll); |
---|
392 | | - suspend_pll.driver_data = __raw_readl(S3C2410_MPLLCON); |
---|
| 385 | + suspend_pll.driver_data = s3c24xx_read_mpllcon(); |
---|
393 | 386 | suspend_freq = clk_get_rate(clk_arm); |
---|
394 | 387 | |
---|
395 | 388 | return 0; |
---|
.. | .. |
---|
550 | 543 | val |= calc_locktime(rate, cpu_cur.info->locktime_m); |
---|
551 | 544 | |
---|
552 | 545 | pr_info("%s: new locktime is 0x%08x\n", __func__, val); |
---|
553 | | - __raw_writel(val, S3C2410_LOCKTIME); |
---|
| 546 | + s3c24xx_write_locktime(val); |
---|
554 | 547 | } |
---|
555 | 548 | |
---|
556 | 549 | static int s3c_cpufreq_build_freq(void) |
---|