Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2348429rwd; Wed, 14 Jun 2023 01:16:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5UAMjfRyuPqSkaDftM6hsReJoWZ/UGAokSnrheELu3G0yLETXv9pPSbSc4/wDC9hbzZyFE X-Received: by 2002:a17:90a:d081:b0:25d:d224:9fb9 with SMTP id k1-20020a17090ad08100b0025dd2249fb9mr959295pju.24.1686730587538; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a17090a9d8800b00256c97defa9si5088403pjp.54.2023.06.14.01.16.15; 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 S235138AbjFNIF3 (ORCPT + 99 others); Wed, 14 Jun 2023 04:05:29 -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 Content-Transfer-Encoding: 8bit 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 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) -- 2.41.0