| .. | .. |
|---|
| 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 | * S3C2410 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 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 19 | 16 | #include <linux/clk.h> |
|---|
| 20 | 17 | #include <linux/err.h> |
|---|
| 21 | 18 | #include <linux/io.h> |
|---|
| 19 | +#include <linux/soc/samsung/s3c-cpufreq-core.h> |
|---|
| 20 | +#include <linux/soc/samsung/s3c-pm.h> |
|---|
| 22 | 21 | |
|---|
| 23 | 22 | #include <asm/mach/arch.h> |
|---|
| 24 | 23 | #include <asm/mach/map.h> |
|---|
| 25 | 24 | |
|---|
| 26 | | -#include <mach/regs-clock.h> |
|---|
| 27 | | - |
|---|
| 28 | | -#include <plat/cpu.h> |
|---|
| 29 | | -#include <plat/cpu-freq-core.h> |
|---|
| 25 | +#define S3C2410_CLKDIVN_PDIVN (1<<0) |
|---|
| 26 | +#define S3C2410_CLKDIVN_HDIVN (1<<1) |
|---|
| 30 | 27 | |
|---|
| 31 | 28 | /* Note, 2410A has an extra mode for 1:4:4 ratio, bit 2 of CLKDIV */ |
|---|
| 32 | 29 | |
|---|
| .. | .. |
|---|
| 40 | 37 | if (cfg->divs.p_divisor != cfg->divs.h_divisor) |
|---|
| 41 | 38 | clkdiv |= S3C2410_CLKDIVN_PDIVN; |
|---|
| 42 | 39 | |
|---|
| 43 | | - __raw_writel(clkdiv, S3C2410_CLKDIVN); |
|---|
| 40 | + s3c24xx_write_clkdivn(clkdiv); |
|---|
| 44 | 41 | } |
|---|
| 45 | 42 | |
|---|
| 46 | 43 | static int s3c2410_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg) |
|---|