From f0e075162f815f9cb769c7bb9003e0ad3b829811 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 13 Jan 2016 13:16:12 +0900 Subject: clk: add API to enable clock The most basic thing for clock is to enable it, but it is missing in this uclass. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass --- include/clk.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include') diff --git a/include/clk.h b/include/clk.h index 371784a..941808a 100644 --- a/include/clk.h +++ b/include/clk.h @@ -33,6 +33,15 @@ struct clk_ops { ulong (*set_rate)(struct udevice *dev, ulong rate); /** + * enable() - Enable the clock for a peripheral + * + * @dev: clock provider + * @periph: Peripheral ID to enable + * @return zero on success, or -ve error code + */ + int (*enable)(struct udevice *dev, int periph); + + /** * get_periph_rate() - Get clock rate for a peripheral * * @dev: Device to check (UCLASS_CLK) @@ -71,6 +80,15 @@ ulong clk_get_rate(struct udevice *dev); ulong clk_set_rate(struct udevice *dev, ulong rate); /** + * clk_enable() - Enable the clock for a peripheral + * + * @dev: clock provider + * @periph: Peripheral ID to enable + * @return zero on success, or -ve error code + */ +int clk_enable(struct udevice *dev, int periph); + +/** * clk_get_periph_rate() - Get current clock rate for a peripheral * * @dev: Device to check (UCLASS_CLK) -- cgit v1.1