Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / mach-s3c / pll-s3c2410.c
blob3fbc99eaa4a203553cdf7d5d65a41877dde84b32
1 // SPDX-License-Identifier: GPL-2.0+
2 //
3 // Copyright (c) 2006-2007 Simtec Electronics
4 // http://armlinux.simtec.co.uk/
5 // Ben Dooks <ben@simtec.co.uk>
6 // Vincent Sanders <vince@arm.linux.org.uk>
7 //
8 // S3C2410 CPU PLL tables
10 #include <linux/types.h>
11 #include <linux/kernel.h>
12 #include <linux/module.h>
13 #include <linux/device.h>
14 #include <linux/list.h>
15 #include <linux/clk.h>
16 #include <linux/err.h>
18 #include <linux/soc/samsung/s3c-cpufreq-core.h>
19 #include <linux/soc/samsung/s3c-pm.h>
21 /* This array should be sorted in ascending order of the frequencies */
22 static struct cpufreq_frequency_table pll_vals_12MHz[] = {
23 { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), },
24 { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), },
25 { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), },
26 { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), },
27 { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), },
28 { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), },
29 { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), },
30 { .frequency = 85000000, .driver_data = PLLVAL(105, 2, 2), },
31 { .frequency = 90000000, .driver_data = PLLVAL(112, 2, 2), },
32 { .frequency = 101000000, .driver_data = PLLVAL(127, 2, 2), },
33 { .frequency = 113000000, .driver_data = PLLVAL(105, 1, 2), },
34 { .frequency = 118000000, .driver_data = PLLVAL(150, 2, 2), },
35 { .frequency = 124000000, .driver_data = PLLVAL(116, 1, 2), },
36 { .frequency = 135000000, .driver_data = PLLVAL(82, 2, 1), },
37 { .frequency = 147000000, .driver_data = PLLVAL(90, 2, 1), },
38 { .frequency = 152000000, .driver_data = PLLVAL(68, 1, 1), },
39 { .frequency = 158000000, .driver_data = PLLVAL(71, 1, 1), },
40 { .frequency = 170000000, .driver_data = PLLVAL(77, 1, 1), },
41 { .frequency = 180000000, .driver_data = PLLVAL(82, 1, 1), },
42 { .frequency = 186000000, .driver_data = PLLVAL(85, 1, 1), },
43 { .frequency = 192000000, .driver_data = PLLVAL(88, 1, 1), },
44 { .frequency = 203000000, .driver_data = PLLVAL(161, 3, 1), },
46 /* 2410A extras */
48 { .frequency = 210000000, .driver_data = PLLVAL(132, 2, 1), },
49 { .frequency = 226000000, .driver_data = PLLVAL(105, 1, 1), },
50 { .frequency = 266000000, .driver_data = PLLVAL(125, 1, 1), },
51 { .frequency = 268000000, .driver_data = PLLVAL(126, 1, 1), },
52 { .frequency = 270000000, .driver_data = PLLVAL(127, 1, 1), },
55 static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif)
57 return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz));
60 static struct subsys_interface s3c2410_plls_interface = {
61 .name = "s3c2410_plls",
62 .subsys = &s3c2410_subsys,
63 .add_dev = s3c2410_plls_add,
66 static int __init s3c2410_pll_init(void)
68 return subsys_interface_register(&s3c2410_plls_interface);
71 arch_initcall(s3c2410_pll_init);
73 static struct subsys_interface s3c2410a_plls_interface = {
74 .name = "s3c2410a_plls",
75 .subsys = &s3c2410a_subsys,
76 .add_dev = s3c2410_plls_add,
79 static int __init s3c2410a_pll_init(void)
81 return subsys_interface_register(&s3c2410a_plls_interface);
83 arch_initcall(s3c2410a_pll_init);