Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7354200pxb; Thu, 18 Feb 2021 08:01:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLh6sZ52My2Q/YLcWgRHGb+ivA3cIopOQrUb0k6qgWVxbktn2ErCXR+Kd7nf/0DJKw+dQD X-Received: by 2002:a17:906:7119:: with SMTP id x25mr1938677ejj.362.1613664102262; Thu, 18 Feb 2021 08:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613664102; cv=none; d=google.com; s=arc-20160816; b=T0xSOiJkPCYka3qthW5g3VInwh3kVthEiQUknv46Gl4xwhmJCqCZsRVaJedmtc8rR8 gXLMhVDsNHbnozZyuwqE/1omCN/QZhS8djlx/dklbf+PjIaptz6FNSTee2i5XrB/eR1U u7w48SGaD/ydmE0GBgjtRTd2pyOmRQSG47oqyPYfIvRWUjyfLI051J5LRYbSttuL2AFn eXYd5+hlYV9CSFI0zLiEHMMn1MvcDPI6SDUVNfdOeScjm242M5R9jUP48/8KxAYjKX0P 5sJSm8qU9KJNsk9ZYZiA6IRiIlTGZY8LjipuIZDu66EJICmP5cIkDWQ/+Ivuqcyj1Pw+ RA0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RnNwYDMH7LyYDW2AlnlLL11arhNZYdpjzBNPCwZ8oPg=; b=squsWlMlb9r4AGNYEgO7yKrSfhMpT/aY82Cg9H/Qmm4wg4vw62GW24nMRZBoH8lQFA 92THFEyGRwLU29Dr4dpqNSSMrf6MFsyZ4dA8QhUbISH3eAUu702IEIXjgR5u7+0EFRlP +fFvB9h2jcF8K1kLWbP+MqmEWSJ/pT6a4mNgWU3rU0/CGre9kQR0noTSoZ2bQQ9ERiUl q6jTPbe1Wo2YyguaNRexmCdCZ8a7M4D6HcyKSnE+5Vh4ADwpMX8Ja52KLtV/WzcalklJ JnqeRc+mNSss6Ge7efwlOt3PhNlYdrL60HYOwbKvjBsDnX/JcuyUeFuI+xU6bY94w9uK v4YA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si4499366ejt.638.2021.02.18.08.01.17; Thu, 18 Feb 2021 08:01:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232954AbhBRP7Y (ORCPT + 99 others); Thu, 18 Feb 2021 10:59:24 -0500 Received: from muru.com ([72.249.23.125]:35044 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbhBRN05 (ORCPT ); Thu, 18 Feb 2021 08:26:57 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id CBEA2814A; Thu, 18 Feb 2021 13:24:56 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: Dave Gerlach , Faiz Abbas , Santosh Shilimkar , Suman Anna , Tero Kristo , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Yongqin Liu Subject: [PATCH] soc: ti: omap-prm: Fix occasional abort on reset deassert for dra7 iva Date: Thu, 18 Feb 2021 15:24:26 +0200 Message-Id: <20210218132426.46155-1-tony@atomide.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On reset deassert, we must wait a bit after the rstst bit change before we allow clockdomain autoidle again. Otherwise we get the following oops sometimes on dra7 with iva: Unhandled fault: imprecise external abort (0x1406) at 0x00000000 44000000.ocp:L3 Standard Error: MASTER MPU TARGET IVA_CONFIG (Read Link): At Address: 0x0005A410 : Data Access in User mode during Functional access Internal error: : 1406 [#1] SMP ARM ... (sysc_write_sysconfig) from [] (sysc_enable_module+0xcc/0x260) (sysc_enable_module) from [] (sysc_runtime_resume+0xc8/0x174) (sysc_runtime_resume) from [] (genpd_runtime_resume+0x94/0x224) (genpd_runtime_resume) from [] (__rpm_callback+0xd8/0x180) It is unclear what all devices this might affect, but presumably other devices with the rstst bit too can be affected. So let's just enable the delay for all the devices with rstst bit for now. Later on we may want to limit the list to the know affected devices if needed. Fixes: d30cd83f6853 ("soc: ti: omap-prm: add support for denying idle for reset clockdomain") Reported-by: Yongqin Liu Signed-off-by: Tony Lindgren --- drivers/soc/ti/omap_prm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -830,8 +830,12 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, reset->prm->data->name, id); exit: - if (reset->clkdm) + if (reset->clkdm) { + /* At least dra7 iva needs a delay before clkdm idle */ + if (has_rstst) + udelay(1); pdata->clkdm_allow_idle(reset->clkdm); + } return ret; } -- 2.30.1