All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Kever Yang <kever.yang@rock-chips.com>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Lukasz Majewski <lukma@denx.de>,
	Sean Anderson <seanga2@gmail.com>,
	Elaine Zhang <zhangqing@rock-chips.com>
Cc: Jagan Teki <jagan@edgeble.ai>,
	Eugen Hristev <eugen.hristev@collabora.com>,
	u-boot@lists.denx.de, Jonas Karlman <jonas@kwiboo.se>,
	Peter Geis <pgwipeout@gmail.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH 04/12] clk: rockchip: rk3568: Fix reset handler
Date: Tue, 14 Mar 2023 00:38:26 +0000 (UTC)	[thread overview]
Message-ID: <20230314003755.512696-5-jonas@kwiboo.se> (raw)
In-Reply-To: <20230314003755.512696-1-jonas@kwiboo.se>

From: Peter Geis <pgwipeout@gmail.com>

The reset handler for rk3568 is missing its private data. This leads to
an abort when a reset is triggered.

  => reset
  resetting ...
  "Synchronous Abort" handler, esr 0x96000045
  elr: 0000000000a2bc04 lr : 0000000000a2bbd4 (reloc)
  elr: 00000000eff9bc04 lr : 00000000eff9bbd4
  x0 : 00000000fdd20000 x1 : 0000000014000001
  x2 : 000000000000fdb9 x3 : 00000000edf77e88
  x4 : 00000000edf50e78 x5 : 00000000edf77530
  x6 : 000000000000001d x7 : 00000000edf8a1d0
  x8 : 00000000ffffffd8 x9 : 0000000000000008
  x10: 000000000000000d x11: 0000000000000006
  x12: 000000000001869f x13: 0000000086c290c5
  x14: 000000009118e878 x15: 0000000000000000
  x16: 00000000eff9bbb8 x17: 0000000012f8c119
  x18: 00000000edf50dc0 x19: 0000000000000000
  x20: 0000000000000001 x21: 0000000000000000
  x22: 00000000edf85900 x23: 0000000000000001
  x24: 00000000effe8bbc x25: 0000000000000000
  x26: 00000000edf85940 x27: 0000000000000000
  x28: 0000000000000000 x29: 00000000edf3c8e0

  Code: d65f03c0 d5033fbf b9400661 529d9502 (b8216802)
  Resetting CPU ...

Add the missing dev_set_priv to the rk3568 clk driver to fix this.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # radxa-cm3
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
Link: https://patchwork.ozlabs.org/project/uboot/patch/20220222013131.3114990-2-pgwipeout@gmail.com/

 drivers/clk/rockchip/clk_rk3568.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c
index 99c195b3afe3..253b69504f93 100644
--- a/drivers/clk/rockchip/clk_rk3568.c
+++ b/drivers/clk/rockchip/clk_rk3568.c
@@ -14,6 +14,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/io.h>
+#include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3568-cru.h>
 
@@ -2937,6 +2938,7 @@ static int rk3568_clk_bind(struct udevice *dev)
 						    glb_srst_fst);
 		priv->glb_srst_snd_value = offsetof(struct rk3568_cru,
 						    glb_srsr_snd);
+		dev_set_priv(sys_child, priv);
 	}
 
 #if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
-- 
2.39.2


  parent reply	other threads:[~2023-03-14  0:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  0:38 [PATCH 00/12] rockchip: Fixes for RK3568 and RK3588 and cleanup Jonas Karlman
2023-03-14  0:38 ` [PATCH 01/12] rockchip: Fix early use of bootph props Jonas Karlman
2023-03-14  3:15   ` Kever Yang
2023-03-14  0:38 ` [PATCH 02/12] rockchip: rk3568: Fix boot device detection Jonas Karlman
2023-03-14  3:16   ` Kever Yang
2023-03-14  0:38 ` [PATCH 03/12] rockchip: rk3568-rock-3a: Sync device tree from linux Jonas Karlman
2023-03-14  3:17   ` Kever Yang
2023-03-14  0:38 ` Jonas Karlman [this message]
2023-03-14  0:38 ` [PATCH 05/12] clk: rockchip: rk3588: Fix clk_aux16m in clock driver Jonas Karlman
2023-03-14  3:21   ` Kever Yang
2023-03-14  0:38 ` [PATCH 06/12] rockchip: rk3588-rock-5b: Fix sdmmc boot Jonas Karlman
2023-03-14  3:22   ` Kever Yang
2023-03-14  0:38 ` [PATCH 07/12] rockchip: rk3588: Add boot device detection Jonas Karlman
2023-03-14  3:22   ` Kever Yang
2023-03-14  0:38 ` [PATCH 08/12] rockchip: tinker-rk3288: Use common BOOT_TARGET_DEVICES Jonas Karlman
2023-03-14  3:28   ` Kever Yang
2023-03-14  0:38 ` [PATCH 09/12] mmc: rockchip_dw_mmc: Fix get_mmc_clk return value Jonas Karlman
2023-03-14  3:25   ` Kever Yang
2023-03-14  0:38 ` [PATCH 10/12] rockchip: include: configs: Remove dangling comments Jonas Karlman
2023-03-14  3:28   ` Kever Yang
2023-03-14  0:38 ` [PATCH 11/12] rockchip: include: configs: Remove unused SDRAM_BANK_SIZE Jonas Karlman
2023-03-14  3:29   ` Kever Yang
2023-03-14  0:38 ` [PATCH 12/12] rockchip: Convert rk35xx to use standard boot Jonas Karlman
2023-03-15 19:43   ` Simon Glass
2023-03-19  6:16   ` Kever Yang
2023-03-19  9:13     ` Jonas Karlman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230314003755.512696-5-jonas@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=eugen.hristev@collabora.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jagan@edgeble.ai \
    --cc=kever.yang@rock-chips.com \
    --cc=lukma@denx.de \
    --cc=pgwipeout@gmail.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.