[PATCH RFC v2 23/23] sysreset: rockchip: use dev_read_addr_ptr get cru base
Anand Moon
linux.amoon at gmail.com
Fri May 31 16:18:37 CEST 2024
From: Andy Yan <andy.yan at rock-chips.com>
Use system api dev_read_addr_ptr to get cru reg base,
rather than rockchip private api rockchip_get_cru, which
will be cleanup later.
Cc: Jagan Teki <jagan at edgeble.ai>
Signed-off-by: Andy Yan <andy.yan at rock-chips.com>
---
drivers/sysreset/sysreset_rockchip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/sysreset/sysreset_rockchip.c b/drivers/sysreset/sysreset_rockchip.c
index 17aa191349..df6422c08b 100644
--- a/drivers/sysreset/sysreset_rockchip.c
+++ b/drivers/sysreset/sysreset_rockchip.c
@@ -8,14 +8,14 @@
#include <errno.h>
#include <sysreset.h>
#include <asm/arch-rockchip/clock.h>
-#include <asm/arch-rockchip/cru_rk3328.h>
+#include <asm/arch-rockchip/cru.h>
#include <asm/arch-rockchip/hardware.h>
#include <linux/err.h>
int rockchip_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
struct sysreset_reg *offset = dev_get_priv(dev);
- unsigned long cru_base = (unsigned long)rockchip_get_cru();
+ unsigned long cru_base = (unsigned long)dev_read_addr_ptr(dev->parent);
if (IS_ERR_VALUE(cru_base))
return (int)cru_base;
--
2.44.0
More information about the U-Boot
mailing list