diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2012-11-17 15:22:22 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-20 14:34:08 +0100 |
commit | 97fa4cf442ff2872000d9110686371775795a32b (patch) | |
tree | 24a2347bd5f5620dd5ac6a7d9964029c13245231 /drivers/clk/mvebu/clk.c | |
parent | f4a75d2eb7b1e2206094b901be09adb31ba63681 (diff) | |
download | linux-stable-97fa4cf442ff2872000d9110686371775795a32b.tar.gz linux-stable-97fa4cf442ff2872000d9110686371775795a32b.tar.bz2 linux-stable-97fa4cf442ff2872000d9110686371775795a32b.zip |
clk: mvebu: add mvebu core clocks.
This driver allows to provide DT clocks for core clocks found on
Marvell Kirkwood, Dove & 370/XP SoCs. The core clock frequencies and
ratios are determined by decoding the Sample-At-Reset registers.
Although technically correct, using a divider of 0 will lead to
div_by_zero panic. Let's use a ratio of 0/1 instead to fail later
with a zero clock.
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by Gregory CLEMENT <gregory.clement@free-electrons.com>
Diffstat (limited to 'drivers/clk/mvebu/clk.c')
-rw-r--r-- | drivers/clk/mvebu/clk.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/clk/mvebu/clk.c b/drivers/clk/mvebu/clk.c new file mode 100644 index 000000000000..e6742acf9880 --- /dev/null +++ b/drivers/clk/mvebu/clk.c @@ -0,0 +1,23 @@ +/* + * Marvell EBU SoC clock handling. + * + * Copyright (C) 2012 Marvell + * + * Gregory CLEMENT <gregory.clement@free-electrons.com> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +#include <linux/kernel.h> +#include <linux/clk.h> +#include <linux/clk-provider.h> +#include <linux/of_address.h> +#include <linux/clk/mvebu.h> +#include <linux/of.h> +#include "clk-core.h" + +void __init mvebu_clocks_init(void) +{ + mvebu_core_clk_init(); +} |