diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2017-02-13 12:38:56 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-03-17 01:03:43 +0300 |
commit | 5ae2fd97242d4eea97aeabe8801bb8592b37a8fe (patch) | |
tree | ef81d978357c082ea9f6d6601fcfa8e2edc63747 /arch/arm/mach-rockchip/rk3399 | |
parent | fa72de10452c51ee32f8278cdfabd38a6aafc7f8 (diff) | |
download | u-boot-5ae2fd97242d4eea97aeabe8801bb8592b37a8fe.tar.xz |
rockchip: clk: rk3399: update driver for spl
Add ddr clock setting, add rockchip_get_pmucru API,
and enable of-platdata support.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Added rockchip tag and fix pmuclk_init() build warning:
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3399')
-rw-r--r-- | arch/arm/mach-rockchip/rk3399/clk_rk3399.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3399/clk_rk3399.c b/arch/arm/mach-rockchip/rk3399/clk_rk3399.c index ce706a61e2..cf5b8c9548 100644 --- a/arch/arm/mach-rockchip/rk3399/clk_rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/clk_rk3399.c @@ -31,3 +31,24 @@ void *rockchip_get_cru(void) return priv->cru; } + +static int rockchip_get_pmucruclk(struct udevice **devp) +{ + return uclass_get_device_by_driver(UCLASS_CLK, + DM_GET_DRIVER(rockchip_rk3399_pmuclk), devp); +} + +void *rockchip_get_pmucru(void) +{ + struct rk3399_pmuclk_priv *priv; + struct udevice *dev; + int ret; + + ret = rockchip_get_pmucruclk(&dev); + if (ret) + return ERR_PTR(ret); + + priv = dev_get_priv(dev); + + return priv->pmucru; +} |