Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3487375pxf; Mon, 29 Mar 2021 03:43:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIWXb9uUzv+Temc+TPOW6/A/H7luShn24cAAhqLiJg7obpvWfrHkvFGXIsLBtolJd2ySZ/ X-Received: by 2002:a17:907:628a:: with SMTP id nd10mr27956021ejc.326.1617014637351; Mon, 29 Mar 2021 03:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617014637; cv=none; d=google.com; s=arc-20160816; b=Zyxhx66SuT2bVInVqkhPS9H1YTlByiLiLcNVFrPtx6+yyiJc8yf79Xx1He7EcA+Ccm 4vrAKX5nYeVncfoOcjrg5Di9/RI/XlAEoefIdhiuRwK7qw1F6GsHJEmqV6y512iCbYEO QeAfCF4Zl6Ds5ugUS1dfiI3RcO9tN0HXVdirrex1xkm6kCXdheKiV8axst47cnvBJtPT LU8GGydNNW9WV3DzOF01U+SuSTNfZNPeAEFS6XCxIdW8goCyAQDGgmPRFWqzMQO8ZS0O umuWL9U51xWy7HW03VdRAKBDi3j+NSuULt7XSm8fUnGGMlIFFCuInK0ca3z5ifPlAZDB vy5Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IxrfaKExEBjF1l93LzEfLKK+rJm6E7cBmelCOWEP1bE=; b=WDDUYbt6g00utzIKXvrukzSJPluxnDoYVoRSLaHT7dihgJah8vhZBvV8cf7+IiGMNz m1MqCqu8uq9KSH6GIcSrSGdQoWcaq/HH+R7O6IXF0z08Bl9DPYfeM9BSH4/hVHE6CkSc cpx6ViyDmDoZyu74ZtC56kOvBonUXkUk5BiTuVeMCWS0nqzhFSYc52BwuzpVtdB1I98z RctOgvPXoysxRZbwd9xJWU64PCGW+7zaQxdnq/tQbIJDQp+wTPBSzc+7k8rkWe9R+2XL GK+YO5WMvB3E5FoI3bQbIaBfbv/WeHFykgMIr317RkI7yzMUD+v27MmTvWujUQsaOpZT pLMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=udNlxWh+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si8024980ejg.204.2021.03.29.03.43.34; Mon, 29 Mar 2021 03:43:57 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=udNlxWh+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234535AbhC2IdR (ORCPT + 99 others); Mon, 29 Mar 2021 04:33:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:37706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232729AbhC2IUg (ORCPT ); Mon, 29 Mar 2021 04:20:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F326A6044F; Mon, 29 Mar 2021 08:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006035; bh=r4ehLPkTKY7zjo9YBi7v7eopGGdkxE0iKoqPsVpoMic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=udNlxWh+n4tW20dS6YbYoyu61DxhlZUgNcnY8G5QE06DzHf9qGCWWJRInRS4BpGzi bO6I80o4HDrduoxjOPH6Fya7ySI9cn/XtLO0Jd3DulLMJnrWZSetVA28t+eEPrarve 00wqmzlMHeRppXukuNLIs5LObEEFRSLSlMzazCaY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yongqin Liu , Tony Lindgren , Sasha Levin Subject: [PATCH 5.10 093/221] soc: ti: omap-prm: Fix occasional abort on reset deassert for dra7 iva Date: Mon, 29 Mar 2021 09:57:04 +0200 Message-Id: <20210329075632.304887135@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit effe89e40037038db7711bdab5d3401fe297d72c ] 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 Signed-off-by: Sasha Levin --- 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 index c8b14b3a171f..fb067b5e4a97 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -522,8 +522,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