sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / drivers / clk / at91 / pmc.c
blob526df5ba042ddfd11a2bbe6441bccc6c1eb81f8d
1 /*
2 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 */
11 #include <linux/clk-provider.h>
12 #include <linux/clkdev.h>
13 #include <linux/clk/at91_pmc.h>
14 #include <linux/of.h>
15 #include <linux/mfd/syscon.h>
16 #include <linux/regmap.h>
18 #include <asm/proc-fns.h>
20 #include "pmc.h"
22 int of_at91_get_clk_range(struct device_node *np, const char *propname,
23 struct clk_range *range)
25 u32 min, max;
26 int ret;
28 ret = of_property_read_u32_index(np, propname, 0, &min);
29 if (ret)
30 return ret;
32 ret = of_property_read_u32_index(np, propname, 1, &max);
33 if (ret)
34 return ret;
36 if (range) {
37 range->min = min;
38 range->max = max;
41 return 0;
43 EXPORT_SYMBOL_GPL(of_at91_get_clk_range);