diff options
author | Simon Glass <sjg@chromium.org> | 2016-10-01 20:04:52 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-10-30 13:29:06 -0600 |
commit | 5564ed5dd980c1e67780fb6a7fdbe29fd76174ed (patch) | |
tree | bb59988a462d366be5f4099b9195f8669a4c411a /arch/arm/mach-rockchip/rk3288 | |
parent | c8a6bc968312f572cc84e3928ae5a293f2454849 (diff) | |
download | u-boot-imx-5564ed5dd980c1e67780fb6a7fdbe29fd76174ed.zip u-boot-imx-5564ed5dd980c1e67780fb6a7fdbe29fd76174ed.tar.gz u-boot-imx-5564ed5dd980c1e67780fb6a7fdbe29fd76174ed.tar.bz2 |
rockchip: rk3288: Move rockchip_get_cru() out of the driver
This function is called from outside the driver. It should be placed into
common SoC code. Move it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288')
-rw-r--r-- | arch/arm/mach-rockchip/rk3288/clk_rk3288.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3288/clk_rk3288.c b/arch/arm/mach-rockchip/rk3288/clk_rk3288.c index 2099e34..a45b923 100644 --- a/arch/arm/mach-rockchip/rk3288/clk_rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/clk_rk3288.c @@ -9,9 +9,25 @@ #include <dm.h> #include <syscon.h> #include <asm/arch/clock.h> +#include <asm/arch/cru_rk3288.h> int rockchip_get_clk(struct udevice **devp) { return uclass_get_device_by_driver(UCLASS_CLK, DM_GET_DRIVER(rockchip_rk3288_cru), devp); } + +void *rockchip_get_cru(void) +{ + struct rk3288_clk_priv *priv; + struct udevice *dev; + int ret; + + ret = rockchip_get_clk(&dev); + if (ret) + return ERR_PTR(ret); + + priv = dev_get_priv(dev); + + return priv->cru; +} |