
22 Jan
2016
22 Jan
'16
3:50 a.m.
On 20 January 2016 at 20:04, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2016-01-21 11:43 GMT+09:00 Simon Glass sjg@chromium.org:
Add a method which can locate a clock for a device, given its index. This uses the normal device tree bindings to return the clock device and the first argument which is normally used as a peripheral ID in U-Boot.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v4:
- Add a static inline for when OF_CONTROL is not enabled
Changes in v3:
- Use CONFIG_IS_ENABLED(OF_CONTROL) in C and header file
Changes in v2:
- Make the peripheral ID a return value
- Add an assert for clk_devp
- Make the function dependent on OF_CONTROL
Reviewed-by: Masahiro Yamada yamada.masahiro@socionext.com
Added errno.h header from http://patchwork.ozlabs.org/patch/571013/
Applied to u-boot-rockchip.