summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-10-01 20:04:51 -0600
committerSimon Glass <sjg@chromium.org>2016-10-30 13:29:06 -0600
commitc8a6bc968312f572cc84e3928ae5a293f2454849 (patch)
tree6941eebae4470884a01ec66cc1c15208ed746381 /drivers
parent92ac73e4c2579444ee5017f37aa61e116ccf15c9 (diff)
downloadu-boot-imx-c8a6bc968312f572cc84e3928ae5a293f2454849.zip
u-boot-imx-c8a6bc968312f572cc84e3928ae5a293f2454849.tar.gz
u-boot-imx-c8a6bc968312f572cc84e3928ae5a293f2454849.tar.bz2
rockchip: rk3399: 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. Also rename the driver symbol to be more consistent with the other rockchip clock drivers. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/rockchip/clk_rk3399.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index 8efb892..2e87e4b 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -18,11 +18,6 @@
DECLARE_GLOBAL_DATA_PTR;
-struct rk3399_clk_priv {
- struct rk3399_cru *cru;
- ulong rate;
-};
-
struct rk3399_pmuclk_priv {
struct rk3399_pmucru *pmucru;
};
@@ -780,25 +775,6 @@ static struct clk_ops rk3399_clk_ops = {
.set_rate = rk3399_clk_set_rate,
};
-void *rockchip_get_cru(void)
-{
- struct udevice *dev;
- fdt_addr_t *addr;
- int ret;
-
- ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(clk_rk3399), &dev);
-
- if (ret)
- return ERR_PTR(ret);
-
- addr = dev_get_addr_ptr(dev);
- if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
- return ERR_PTR(-EINVAL);
-
- return addr;
-}
-
static int rk3399_clk_probe(struct udevice *dev)
{
struct rk3399_clk_priv *priv = dev_get_priv(dev);
@@ -992,7 +968,7 @@ static const struct udevice_id rk3399_pmuclk_ids[] = {
{ }
};
-U_BOOT_DRIVER(pmuclk_rk3399) = {
+U_BOOT_DRIVER(rockchip_rk3399_pmuclk) = {
.name = "pmuclk_rk3399",
.id = UCLASS_CLK,
.of_match = rk3399_pmuclk_ids,