diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-05-19 12:43:25 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-05-29 12:30:17 -0400 |
commit | cf8de5a7f870c7e3940d888e2c6ce6988aeb26c6 (patch) | |
tree | 71a4313ef6f084c4ffc08f28c839176cbb07f655 /drivers/clk/berlin/berlin2-pll.h | |
parent | beca8ccce46b915391fdb93508ac7acbe6adb88d (diff) |
clk: berlin: add driver for BG2x simple PLLs
This is a clock driver for the simple PLLs found on Berlin SoCs.
With repect to PLL registers and features, BG2/BG2CD and BG2Q are
slightly different, e.g. different allowed VCO dividers and bit
shifts.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/berlin/berlin2-pll.h')
-rw-r--r-- | drivers/clk/berlin/berlin2-pll.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/clk/berlin/berlin2-pll.h b/drivers/clk/berlin/berlin2-pll.h new file mode 100644 index 000000000000..8831ce27ac1e --- /dev/null +++ b/drivers/clk/berlin/berlin2-pll.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2014 Marvell Technology Group Ltd. | ||
3 | * | ||
4 | * Alexandre Belloni <alexandre.belloni@free-electrons.com> | ||
5 | * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms and conditions of the GNU General Public License, | ||
9 | * version 2, as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | #ifndef __BERLIN2_PLL_H | ||
20 | #define __BERLIN2_PLL_H | ||
21 | |||
22 | struct clk; | ||
23 | |||
24 | struct berlin2_pll_map { | ||
25 | const u8 vcodiv[16]; | ||
26 | u8 mult; | ||
27 | u8 fbdiv_shift; | ||
28 | u8 rfdiv_shift; | ||
29 | u8 divsel_shift; | ||
30 | }; | ||
31 | |||
32 | struct clk * __init | ||
33 | berlin2_pll_register(const struct berlin2_pll_map *map, | ||
34 | void __iomem *base, const char *name, | ||
35 | const char *parent_name, unsigned long flags); | ||
36 | |||
37 | #endif /* __BERLIN2_PLL_H */ | ||