mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-15 07:43:07 +00:00
ffb191e458
Rockchip RV1126 is a high-performance vision processor SoC for IPC/CVR, especially for AI related application. Add arch core support for it. Signed-off-by: Jagan Teki <jagan@edgeble.ai> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Change-Id: I22fde40ec375e3c6aba39808abf252edc45d4b04
33 lines
670 B
C
33 lines
670 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
|
|
* Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <syscon.h>
|
|
#include <asm/arch-rockchip/clock.h>
|
|
#include <asm/arch-rockchip/cru_rv1126.h>
|
|
#include <linux/err.h>
|
|
|
|
int rockchip_get_clk(struct udevice **devp)
|
|
{
|
|
return uclass_get_device_by_driver(UCLASS_CLK,
|
|
DM_DRIVER_GET(rockchip_rv1126_cru), devp);
|
|
}
|
|
|
|
void *rockchip_get_cru(void)
|
|
{
|
|
struct rv1126_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;
|
|
}
|