Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5503427rwb; Tue, 22 Nov 2022 00:30:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf61bvt+taS1N5mYv0PUYM+Ddv8NsraUaPEY6thVIijmHltgj5puPAfj3aMrHYOdCxcK+dwl X-Received: by 2002:a05:6402:2987:b0:45c:a9d3:d535 with SMTP id eq7-20020a056402298700b0045ca9d3d535mr19896402edb.0.1669105826656; Tue, 22 Nov 2022 00:30:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669105826; cv=none; d=google.com; s=arc-20160816; b=HHxlIZs1v8io3u9lW6rc8YjSbFk9I79amfiNvdYN+0XBU8UMx3CRxHOQGpLeOCAUlg ERCfaR9m2FgnayNjHKhfWIi92wowXdN2ZeKaZXXWQdaz2wqc0AloJAccvU5ScdahE0tV 9iWFzdiIdBoa3l0IPpg+bJacSkYwUu3im4MLrYV2S0n0PI4V1Or/QfN2d1zpI2vKCqtW TgI3faQraTTHiW5UGpy+rIVsWU3jG1M4mxxBQ51m/Uyiwwf74kVlM5q/P5vUgMnUeEl7 mh+dq7qNgJPIeecjR7VFBpVkN9SuoaTYuWCLpWWWHu8XyntcUcSujxjg3H5idiR1gwV4 vELQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=+a9AQHe77TpOi1nNEBNs7a4bTR4w2mw5oUVGtsuLCj8=; b=JNJcSukiukBjIhlUmvunzleOjBrz/u92u7CAVKEVvnL79nsFpYqpbKRvwPaJocCc8r HVPXL2z2C5LgG/wWZQKCmu8haZFpqi2Op6XzWvwtiWOWmBZSniGehC4/aUgQUypyff5f MJxMiWV1ZxnVoCZDK5lx1q7f+BuYld/JCvoTJ85xh5kAU5n+S93itzy80K/V165pFApq 1e+D++Dtt5td4iWJYEOOfwcpkXILT18M7JnV5ORPkw19HpmWaGkVsJ6/XW9f0+kxztXa gAjjHSuDTWUDryw0eC7jvxzlY7+M1STdtyx/AUudPe+zkYgw9kvy4l1iHHcuEzO9hKyc g1kQ== 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 b22-20020a170906491600b007ada030c2e9si9936692ejq.944.2022.11.22.00.30.03; Tue, 22 Nov 2022 00:30:26 -0800 (PST) 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 S232790AbiKVI0Z (ORCPT + 92 others); Tue, 22 Nov 2022 03:26:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232731AbiKVIZw (ORCPT ); Tue, 22 Nov 2022 03:25:52 -0500 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65AE64047B; Tue, 22 Nov 2022 00:25:50 -0800 (PST) Received: by mail-qt1-f179.google.com with SMTP id jr19so8833934qtb.7; Tue, 22 Nov 2022 00:25:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+a9AQHe77TpOi1nNEBNs7a4bTR4w2mw5oUVGtsuLCj8=; b=LCkYXeCBi5miYV1qs8WXYwAxOvVQgl3OpcFXqgrvDOMoDjeNEEYOC8K+SxAeMjGidu PEnTce3Zmpu1FjuTgHzMCmJmgED0oyg8T+Q9jXmgr685rsOyP9cADveIeAA/e0HX9SQP 5Dx5qtmAHX6ButOzq5q+8ukasM/r8wj0QaQISnSZXiAHtPkr3kxCWn++zMHOxedfaA/U 5jpXC4KJzbXdiyfIG6HvckZJkN4A/4JTAZ4qCP73KpusGbsT7XsM8a6BOx+6WXy+x9pa MwmCPtyxk+V4hLpcOoFKFw6QC+nygEUzTa75zLRedXl6PWNMA6VPOTMvZNpkCPcoeT7v MQbg== X-Gm-Message-State: ANoB5pkK+XaKoj5qn313qdhd4TfFW21VSnRL+rVLw2iNY8s3JIKH0WZ4 sP3DQqmodyB1mstmmh+JYUcemltHG2VwjA== X-Received: by 2002:a05:622a:4d4e:b0:39a:78d4:57e with SMTP id fe14-20020a05622a4d4e00b0039a78d4057emr5838777qtb.118.1669105549313; Tue, 22 Nov 2022 00:25:49 -0800 (PST) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com. [209.85.219.173]) by smtp.gmail.com with ESMTPSA id h9-20020a05620a244900b006fbdeecad51sm7310306qkn.48.2022.11.22.00.25.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 00:25:48 -0800 (PST) Received: by mail-yb1-f173.google.com with SMTP id b131so16482694yba.11; Tue, 22 Nov 2022 00:25:48 -0800 (PST) X-Received: by 2002:a25:8249:0:b0:6dd:b521:a8f2 with SMTP id d9-20020a258249000000b006ddb521a8f2mr2342411ybn.380.1669105548029; Tue, 22 Nov 2022 00:25:48 -0800 (PST) MIME-Version: 1.0 References: <20221114111513.1436165-1-herve.codina@bootlin.com> <20221114111513.1436165-3-herve.codina@bootlin.com> <20221115150417.513955a7@bootlin.com> <20221118112349.7f09eefb@bootlin.com> <20221121165921.559d6538@bootlin.com> <4e54bfb4-bb67-73b8-f58f-56797c5925d3@linaro.org> <1f12883b-1e37-7f2b-f9e9-c8bad290a133@linaro.org> In-Reply-To: <1f12883b-1e37-7f2b-f9e9-c8bad290a133@linaro.org> From: Geert Uytterhoeven Date: Tue, 22 Nov 2022 09:25:36 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/7] dt-bindings: clock: renesas,r9a06g032-sysctrl: Add h2mode property To: Krzysztof Kozlowski Cc: Herve Codina , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Greg Kroah-Hartman , Magnus Damm , Gareth Williams , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Thomas Petazzoni , Miquel Raynal Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Hi Krzysztof, On Tue, Nov 22, 2022 at 8:45 AM Krzysztof Kozlowski wrote: > On 21/11/2022 21:46, Geert Uytterhoeven wrote: > >> This does not change anything. Herve wrote: > >> > >>> probe some devices (USB host and probably others) > >> > >> Why some can be probed earlier and some not, if there are no > >> dependencies? If there are dependencies, it's the same case with sysctrl > >> touching the register bit and the USB controller touching it (as well > >> via syscon, but that's obvious, I assume). > >> > >> Where is the synchronization problem? > > > > The h2mode bit (and probably a few other controls we haven't figured out > > yet) in the sysctrl must be set before any of the USB devices is active. > > Hence it's safest for the sysctrl to do this before any of the USB drivers > > probes. > > Again, this does not differ from many, many of other devices. All of > them must set something in system controller block, before they start > operating (or at specific time). It's exactly the same everywhere. The issue here is that there are two _different drivers_ (USB host and device). When both are modular, and the driver that depends on the sysctrl setting is loaded second, you have a problem: the sysctrl change must not be done when the first driver is already using the hardware. Hence the sysctrl driver should take care of it itself during early initialization (it's the main clock controller, so it's a dependency for all other I/O device drivers). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds