Received: by 2002:a05:7412:1492:b0:e2:908c:2ebd with SMTP id s18csp596743rdh; Tue, 22 Aug 2023 05:31:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJRkPWm8SW5KNehLS6kbRDxg8TyLN+k+j3ufB/K3nwC7zC+JjukDQsOTL+d8VmH2rLR8gP X-Received: by 2002:a05:6512:39ca:b0:4fe:82a7:814d with SMTP id k10-20020a05651239ca00b004fe82a7814dmr7381760lfu.48.1692707487982; Tue, 22 Aug 2023 05:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692707487; cv=none; d=google.com; s=arc-20160816; b=VD/keFEqBvYRz7c07m6bmM5X9u1JyXtEw8rlm+cvPhDRH+fwPc5vKf4k6F+5rDhW1Z rPu9at2EsjSPV1sOm3PZDbYFHBjl3vfOAR6Sz9UaW5YRN/xHY6fNMjB4t2cTr1TNT+Vi WzXcjWPMX+h3d5aTRWIgt2ca/ogRBkOKvgQBfFiARYBpGR7NWnVqxXggRlPBo0YcXCMl A4VB40WGwEqpMILbDwtJjJKb1PiCta+iC7SfKVrXcRhbEzX2Q/POwDNAmU17TGX3ZC/5 VuggXhZZ29wawQQEWlMOX+M+jMhcVyP+UBjC4PpisVjf3P9G8P99VGnCCm0VdV0Nq1Te zzZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=hAblXO9QbDeP66p5OszNqry7Py09Fts4YOIx7IMKYP8=; fh=IfaFV99c4T7Z9ii2MoOYcqR3nKip1sGjZqNTzSMeBlE=; b=evLYxwZ95dY9A0ODg1bfm2lw2Jgazc+D9KL8lxFOyw82nrfxraQFf9LW7FFNzVdSI6 /PPFCDAwN4FSViZjJOuJn4MblXCvlOghG7e+hFmhd9y+3TtegqagvW5P/eGYIFiiD76c us+UImOVI4bgRDdTMknjfCYn4SGID/tFQ8lCfLMjveMOhFg0qFrpbqQQRIa6v1NG3FE2 YY5U+7jB3mi4ytCCjA8tbLLLJ7uDq2hEFWs/97wXNU4b4DJMGsEF+5EeyU7lLaOYsFL4 ZA5p5PYaaoURSaVSUwHgC9+migkijL7/X14E5ScKQ3jHvnck5pu64eie5JfMfS1rI33Q 47jQ== 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 a14-20020a170906244e00b009889a249ae6si7166822ejb.1026.2023.08.22.05.31.02; Tue, 22 Aug 2023 05:31: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 S234303AbjHVJ1t (ORCPT + 99 others); Tue, 22 Aug 2023 05:27:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234283AbjHVJ1s (ORCPT ); Tue, 22 Aug 2023 05:27:48 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0C43CC8; Tue, 22 Aug 2023 02:27:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id A9F4980A6; Tue, 22 Aug 2023 09:27:45 +0000 (UTC) Date: Tue, 22 Aug 2023 12:27:44 +0300 From: Tony Lindgren To: Julien Panis Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, vigneshr@ti.com Subject: Re: [PATCH] bus: ti-sysc: Use fsleep() instead of usleep_range() in sysc_reset() Message-ID: <20230822092744.GT11676@atomide.com> References: <20230821-fix-ti-sysc-reset-v1-1-5a0a5d8fae55@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230821-fix-ti-sysc-reset-v1-1-5a0a5d8fae55@baylibre.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 * Julien Panis [230821 14:24]: > The am335x-evm started producing boot errors because of subtle timing > changes: > > Unhandled fault: external abort on non-linefetch (0x1008) at 0xf03c1010 > ... > sysc_reset from sysc_probe+0xf60/0x1514 > sysc_probe from platform_probe+0x5c/0xbc > ... > > The fix consists in using the appropriate sleep function in sysc reset. > For flexible sleeping, fsleep is recommended. Here, sysc delay parameter > can take any value in [0 - 255] us range. As a result, fsleep() should > be used, calling udelay() for a sysc delay lower than 10 us. > > Signed-off-by: Julien Panis > Fixes: e709ed70d122 ("bus: ti-sysc: Fix missing reset delay handling") > --- > Fix boot errors for am335x-evm in sysc_reset(), by using fsleep() instead > of usleep_range() function. Thus, udelay() will be called if the configured > sysc delay is lower than 10 us (which is usually the case, since the value > set in the device tree is currently 2 us). OK, interesting. Yeah I've only ever seen values of 2 us needed here. Regards, Tony > --- > drivers/bus/ti-sysc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c > index 4cb23b9e06ea..59b8bdd9203e 100644 > --- a/drivers/bus/ti-sysc.c > +++ b/drivers/bus/ti-sysc.c > @@ -2147,8 +2147,7 @@ static int sysc_reset(struct sysc *ddata) > } > > if (ddata->cfg.srst_udelay) > - usleep_range(ddata->cfg.srst_udelay, > - ddata->cfg.srst_udelay * 2); > + fsleep(ddata->cfg.srst_udelay); > > if (ddata->post_reset_quirk) > ddata->post_reset_quirk(ddata); > > --- > base-commit: f7757129e3dea336c407551c98f50057c22bb266 > change-id: 20230821-fix-ti-sysc-reset-5c164051345b > > Best regards, > -- > Julien Panis >