Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4FE9BC6FD19 for ; Tue, 14 Mar 2023 00:39:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93F8486145; Tue, 14 Mar 2023 01:38:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="KKy+wcQd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 569478612D; Tue, 14 Mar 2023 01:38:33 +0100 (CET) Received: from wrqvwxzv.outbound-mail.sendgrid.net (wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6CFC685D7B for ; Tue, 14 Mar 2023 01:38:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=XxYf5cSyzv2em2lreJSvfPvyS22iWAIWFe2FHDvhjcU=; b=KKy+wcQdtRVMVNwnxkL7Dk3sbB84eYGUKrPFqW+0ZMgl1/1UQ1Tmn2ctQupqpk7mYrG1 1IjLau7Mh8IcWnhqNAET3oO4gjJ9BwyXga3x9qf+vQZeypD+M5ltnufTaBeWS5NW9K0f7o PmgjDZuiho6VKk/bn1lKRgDjO0lqyAvCjtDOZ/T/DrCfLXSUYhWrUPARLzJQIBGKR3ZBtX 42DNqw0y60hnlGJc4JgiDsjg8PEs1o7HcbkkOXgdgJSQu51VFaGzqDO8DrJEsFuOJfvtIC s+eQNOZbtx3+IbVUI58kBl0nIsy/BZFD7R4oM7DstawmesD4OMHR66rad9VkpzXg== Received: by filterdrecv-5848969764-8hxzr with SMTP id filterdrecv-5848969764-8hxzr-1-640FC201-1F 2023-03-14 00:38:25.824704115 +0000 UTC m=+1731882.339464737 Received: from bionic.localdomain (unknown) by geopod-ismtpd-8 (SG) with ESMTP id EUY3h_8QRVGc-vm_Mv5-Kw Tue, 14 Mar 2023 00:38:25.624 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 04/12] clk: rockchip: rk3568: Fix reset handler Date: Tue, 14 Mar 2023 00:38:26 +0000 (UTC) Message-Id: <20230314003755.512696-5-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230314003755.512696-1-jonas@kwiboo.se> References: <20230314003755.512696-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h+ync1CU1M8MruXHt?= =?us-ascii?Q?FYa7eZc=2FBywzx4WaUMY2gZ5a7vSTygOmSZBQjN+?= =?us-ascii?Q?KAeUUbKrUCiCrI6CLSTydVeYwMdLUB5MG2gF=2Fip?= =?us-ascii?Q?fNICwfsCfIaIXKaKAAmsO5gf0cVfWVtUfdDcyk7?= =?us-ascii?Q?fXhIIW9WPrMVpQiixy3Yy=2Ffb5PPBh9Ad0RT3NM?= To: Kever Yang , Simon Glass , Philipp Tomsich , Lukasz Majewski , Sean Anderson , Elaine Zhang Cc: Jagan Teki , Eugen Hristev , u-boot@lists.denx.de, Jonas Karlman , Peter Geis , Jagan Teki X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Peter Geis 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 Reviewed-by: Kever Yang Reviewed-by: Jagan Teki Tested-by: Jagan Teki # radxa-cm3 Signed-off-by: Jonas Karlman --- 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 #include #include +#include #include #include @@ -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