From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DED9CC83F1C for ; Mon, 28 Aug 2023 10:27:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231283AbjH1K1F (ORCPT ); Mon, 28 Aug 2023 06:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbjH1K0s (ORCPT ); Mon, 28 Aug 2023 06:26:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0429DDC for ; Mon, 28 Aug 2023 03:26:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 86DD162FAD for ; Mon, 28 Aug 2023 10:26:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95DBFC433C7; Mon, 28 Aug 2023 10:26:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693218405; bh=UzWPPFglri7Fszo/1RAkwjU7ydSsf18YWwVP9VZL4Lw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCYtpL6hluxQYZ7VTd2B15dFgU8KF2aSIAPHomajXc/34S1u7JeqN3crhb3Y1n9qk 1TVKgqt51SH+1gohiPaTMn70OUCXivpu/XIuUnouxgx+FzGF4qQnsxSaH9ccU+3ZZx 9T7vsk0YDVE1Ek6axG/VcIvwDkQYefcoFtuRpoHg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "kernelci.org bot" , Tony Lindgren Subject: [PATCH 4.19 075/129] bus: ti-sysc: Flush posted write on enable before reset Date: Mon, 28 Aug 2023 12:12:49 +0200 Message-ID: <20230828101156.100043904@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828101153.030066927@linuxfoundation.org> References: <20230828101153.030066927@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tony Lindgren commit 34539b442b3bc7d5bf10164750302b60b91f18a7 upstream. The am335x devices started producing boot errors for resetting musb module in because of subtle timing changes: Unhandled fault: external abort on non-linefetch (0x1008) ... sysc_poll_reset_sysconfig from sysc_reset+0x109/0x12 sysc_reset from sysc_probe+0xa99/0xeb0 ... The fix is to flush posted write after enable before reset during probe. Note that some devices also need to specify the delay after enable with ti,sysc-delay-us, but this is not needed for musb on am335x based on my tests. Reported-by: kernelci.org bot Closes: https://storage.kernelci.org/next/master/next-20230614/arm/multi_v7_defconfig+CONFIG_THUMB2_KERNEL=y/gcc-10/lab-cip/baseline-beaglebone-black.html Fixes: 596e7955692b ("bus: ti-sysc: Add support for software reset") Signed-off-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman --- drivers/bus/ti-sysc.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -978,6 +978,8 @@ static int sysc_reset(struct sysc *ddata val = sysc_read(ddata, offset); val |= (0x1 << ddata->cap->regbits->srst_shift); sysc_write(ddata, offset, val); + /* Flush posted write */ + val = sysc_read_sysconfig(ddata); /* Poll on reset status */ offset = ddata->offsets[SYSC_SYSSTATUS];