From patchwork Wed Jun 14 08:03:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 107805 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1077648vqr; Wed, 14 Jun 2023 01:16:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Kq3PYqhV+UrFG7KDvhwcWP8Vht1CQ+bOpktHXN7ldvMCtJ0cJtXDxIIL1mPLq2/R4Dh3a X-Received: by 2002:a17:903:443:b0:1b0:ec0:7cff with SMTP id iw3-20020a170903044300b001b00ec07cffmr1030343plb.10.1686730587937; Wed, 14 Jun 2023 01:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686730587; cv=none; d=google.com; s=arc-20160816; b=KS0N/G51eKyc32bpa6u0RoEwjcB1y7DcFXVby3zt8WfQB0GY27p4tTcloUN4EGcaqQ JB1t5G17gImi756j7wZhQrszrhtLuHJ1Uv5tF8kFDqipxa/c6r6OuCjGNbYW0LtUVD6K mT/TxxPPG6Z0ACyhhOQ0cENbpI5IksCW+FY5SoAIeIFjnm1TcZvJ3C1sj6pIjBT/zlXN aQK06VEg88MkXRk0Ayy4h62BdiYcS7XGjxCO86vyqGAwZO0GRX8EJfXkpb9aI2GaR69h UR2pWH2p3lTvvsglzz20WhqEzXaOodNnb5E3gr203dQYNY+7JPmVROUe3SL85/GKwZf3 ClQQ== 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=Q+tYikZK0gXThANycrDIPk1tAYm7mRL5xJ4jDFfX/cY=; b=q3Zjs+sd8ST+kWOZ7ZXhPLpucy72xPEXqG/CEjhaXD2f0Z0ltHn72JmIbyR4c/NaUt 6rkKNZxQkJ6+WUUTnOW5nB0POCberZ9Hj417d++w7U5cMGwS53fS83ngp5Aj5dGV1U1x FVcaXXcCUVNO0hYt9dPDcpqe3r6nj9QHyyE+qha6FfX05B3HBs9lLDupIzmh4zU6AMZW 8fZIBWdCobKW3lDtk8QW4UPaaS68wb0RMQXVXsMx8xdoD0qpsIdN1M4+f2okPSi/noF5 w+JQpTcY0nIibXg1ZWf+1O7L1fuVkM1Han7OOnH+naAQ8EPqhBy7c72TtpVFK5vZ2GaO 9Xyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a170902f68200b001a29280c544si6136539plg.263.2023.06.14.01.16.12; Wed, 14 Jun 2023 01:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235230AbjFNIFa (ORCPT + 99 others); Wed, 14 Jun 2023 04:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243498AbjFNIE3 (ORCPT ); Wed, 14 Jun 2023 04:04:29 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 409291FFB; Wed, 14 Jun 2023 01:04:06 -0700 (PDT) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id CA51C8027; Wed, 14 Jun 2023 08:04:04 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Keerthy , Kevin Hilman , Nishanth Menon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "kernelci . org bot" Subject: [PATCH] bus: ti-sysc: Flush posted write on enable before reset Date: Wed, 14 Jun 2023 11:03:58 +0300 Message-ID: <20230614080358.51516-1-tony@atomide.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768665213166208503?= X-GMAIL-MSGID: =?utf-8?q?1768665213166208503?= 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 --- drivers/bus/ti-sysc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -2142,6 +2142,8 @@ static int sysc_reset(struct sysc *ddata) sysc_val = sysc_read_sysconfig(ddata); sysc_val |= sysc_mask; sysc_write(ddata, sysc_offset, sysc_val); + /* Flush posted write */ + sysc_val = sysc_read_sysconfig(ddata); } if (ddata->cfg.srst_udelay)