]> Git Repo - J-u-boot.git/blame - arch/arm/mach-rockchip/rk3188/clk_rk3188.c
Merge tag 'u-boot-imx-master-20250127' of https://gitlab.denx.de/u-boot/custodians...
[J-u-boot.git] / arch / arm / mach-rockchip / rk3188 / clk_rk3188.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
0a2be69f
HS
2/*
3 * Copyright (C) 2015 Google, Inc
4 * Written by Simon Glass <[email protected]>
0a2be69f
HS
5 */
6
0a2be69f
HS
7#include <dm.h>
8#include <syscon.h>
15f09a1a
KY
9#include <asm/arch-rockchip/clock.h>
10#include <asm/arch-rockchip/cru_rk3188.h>
61b29b82 11#include <linux/err.h>
0a2be69f
HS
12
13int rockchip_get_clk(struct udevice **devp)
14{
15 return uclass_get_device_by_driver(UCLASS_CLK,
65e25bea 16 DM_DRIVER_GET(rockchip_rk3188_cru), devp);
0a2be69f
HS
17}
18
19void *rockchip_get_cru(void)
20{
21 struct rk3188_clk_priv *priv;
22 struct udevice *dev;
23 int ret;
24
25 ret = rockchip_get_clk(&dev);
26 if (ret)
27 return ERR_PTR(ret);
28
29 priv = dev_get_priv(dev);
30
31 return priv->cru;
32}
This page took 0.245106 seconds and 4 git commands to generate.