summaryrefslogtreecommitdiffstats
path: root/drivers/clk/samsung/clk.h
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2013-03-18 13:43:56 +0900
committerKukjin Kim <kgene.kim@samsung.com>2013-03-28 14:46:33 +0900
commit5e2e0195ec89d8e266a2530ffec335c483c64899 (patch)
tree17da880c25938d08d4649f3607b757d94c9f3716 /drivers/clk/samsung/clk.h
parent6e92bf5a01afb1f897aa15a34517da07d7c0c320 (diff)
downloadblackbird-obmc-linux-5e2e0195ec89d8e266a2530ffec335c483c64899.tar.gz
blackbird-obmc-linux-5e2e0195ec89d8e266a2530ffec335c483c64899.zip
clk: samsung: add infrastructure to add separate aliases
The current code adds aliases, if necessary, directly when adding the clock, limiting the number of possible aliases to one. Some platforms need more than one alias, like the hsmmc pclocks on s3c2416 which need a "hsmmc" and "mmc_busclk.0" alias for the s3c- sdhci driver. Therefore add the possibility to separately add clock aliases for previously created clocks. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/clk/samsung/clk.h')
-rw-r--r--drivers/clk/samsung/clk.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index 26a752b18f88..6bacd6fa0200 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -23,6 +23,25 @@
#include <mach/map.h>
/**
+ * struct samsung_clock_alias: information about mux clock
+ * @id: platform specific id of the clock.
+ * @dev_name: name of the device to which this clock belongs.
+ * @alias: optional clock alias name to be assigned to this clock.
+ */
+struct samsung_clock_alias {
+ unsigned int id;
+ const char *dev_name;
+ const char *alias;
+};
+
+#define ALIAS(_id, dname, a) \
+ { \
+ .id = _id, \
+ .dev_name = dname, \
+ .alias = a, \
+ }
+
+/**
* struct samsung_fixed_rate_clock: information about fixed-rate clock
* @id: platform specific id of the clock.
* @name: name of this fixed-rate clock.
@@ -251,6 +270,8 @@ extern void __init samsung_clk_of_register_fixed_ext(
extern void samsung_clk_add_lookup(struct clk *clk, unsigned int id);
+extern void samsung_clk_register_alias(struct samsung_clock_alias *list,
+ unsigned int nr_clk);
extern void __init samsung_clk_register_fixed_rate(
struct samsung_fixed_rate_clock *clk_list, unsigned int nr_clk);
extern void __init samsung_clk_register_fixed_factor(
OpenPOWER on IntegriCloud