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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83EB1C433EF for ; Wed, 5 Jan 2022 19:37:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 987CC83762; Wed, 5 Jan 2022 20:37:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="kQ8H7flj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B1AD83777; Wed, 5 Jan 2022 20:37:18 +0100 (CET) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 68E1183041 for ; Wed, 5 Jan 2022 20:37:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf34.google.com with SMTP id o10so178645qvc.5 for ; Wed, 05 Jan 2022 11:37:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Qira/dqoh3Bz6Try+WqFZ6XFBRyd7d6to8Gc5qBOCc8=; b=kQ8H7flj0cgpNVZ7k4Yq7YLoJm/FWNun/UxuD6kTndu3w8+tIxpH6iZiE50Wxz7k8M iLSJJsW8ek7Ctnw9A3vFTLKPRv0fxxaM/O4LkoLcSH5JdqG21Xhnsb/yLhSuO1AWdAAF q81dgFQkC3Bi2Bq7/AR4YymmyyIMKQ9ZjUwAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Qira/dqoh3Bz6Try+WqFZ6XFBRyd7d6to8Gc5qBOCc8=; b=SxGNpli4PCgb888B2ihYUfGkJ2r26lYtDGr4xvMWf4mKko3vEaFT5+o5UPfCJYtdVz YDa/m59LOxjcPbhKy0Jn27FmlByB87IKtGetsdrcitdetFwQawfxXM2aFYN0TQFLMyF+ dFGa7V7wVc61a3OnG90D+N/x7zrUFVJJG4Nc9Hk18npOf2LMmDvXcpQhCDpI6CRjkj6N 3pE7aZ9vU5sx0aczRQF2UUVNCDqQaYrgyl6QxkyHKJK/0FqyTm1iE+5v1sQ+93TZ3374 73pr6FOfKUbe4iKMOxslDlUYjVX5g2IwnJ5W0FYbm0D/XJC/pHb2gKIryzLqtVB8mZ8P NoLA== X-Gm-Message-State: AOAM531IMhn7j5BW6cyxBnuxLjtDbe+vUn3NEYlnC3RiJBVlyBvBnzc1 uO0TiC4hRpYmJR0Sq3/4J0V4hQ== X-Google-Smtp-Source: ABdhPJwv9YEffne5GbDQSlqJ2s4YW3WH76OzXRg97RDcTw7V8OiUmISWkW9qtwlDzVqFEH3G6yuVOQ== X-Received: by 2002:a05:6214:23c8:: with SMTP id hr8mr2945835qvb.0.1641411431077; Wed, 05 Jan 2022 11:37:11 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-8841-a9f4-ab99-2748.res6.spectrum.com. [2603:6081:7b01:cbda:8841:a9f4:ab99:2748]) by smtp.gmail.com with ESMTPSA id u12sm7391960qkp.120.2022.01.05.11.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 11:37:10 -0800 (PST) Date: Wed, 5 Jan 2022 14:37:08 -0500 From: Tom Rini To: Marek Vasut Cc: Sean Anderson , u-boot@lists.denx.de, Peng Fan , Simon Glass , Mark Kettenis , lukma@denx.de Subject: Re: [PATCH] Revert "clk: Detect failure to set defaults" Message-ID: <20220105193708.GC2773246@bill-the-cat> References: <20220101185139.470786-1-marex@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jaAa33DYgKWagIMk" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --jaAa33DYgKWagIMk Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 05, 2022 at 08:35:19PM +0100, Marek Vasut wrote: > On 1/1/22 22:41, Sean Anderson wrote: > > Hi Marek, >=20 > Hi, >=20 > > Please CC clock maintainers for future patches. >=20 > btw. I'm surprised the commit 92f1e9a4b31c0bf0f4f61ab823a6a88657323646 has > zero reviews/acks from clock maintainers. >=20 > > On 1/1/22 1:51 PM, Marek Vasut wrote: > > > This reverts commit 92f1e9a4b31c0bf0f4f61ab823a6a88657323646. > > > The aforementioned patch causes massive breakage on all platforms whi= ch > > > have 'assigned-clock' DT property in their DT which references any cl= ock > > > that are not supported by the platform clock driver. That can easily > > > happen either in SPL, or because the clock driver is reduced. Current= ly > > > it seems all iMX8M are affected and fail to boot altogether. > > >=20 > > > Signed-off-by: Marek Vasut > > > Cc: Peng Fan > > > Cc: Simon Glass > > > --- > > > =A0 drivers/clk/clk-uclass.c | 6 +----- > > > =A0 1 file changed, 1 insertion(+), 5 deletions(-) > > >=20 > > > diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c > > > index f2d26427543..094b1abf13c 100644 > > > --- a/drivers/clk/clk-uclass.c > > > +++ b/drivers/clk/clk-uclass.c > > > @@ -846,17 +846,13 @@ void devm_clk_put(struct udevice *dev, struct > > > clk *clk) > > > =A0 int clk_uclass_post_probe(struct udevice *dev) > > > =A0 { > > > -=A0=A0=A0 int ret; > > > - > > > =A0=A0=A0=A0=A0 /* > > > =A0=A0=A0=A0=A0=A0 * when a clock provider is probed. Call clk_set_de= faults() > > > =A0=A0=A0=A0=A0=A0 * also after the device is probed. This takes care= of cases > > > =A0=A0=A0=A0=A0=A0 * where the DT is used to setup default parents an= d rates > > > =A0=A0=A0=A0=A0=A0 * using assigned-clocks > > > =A0=A0=A0=A0=A0=A0 */ > > > -=A0=A0=A0 ret =3D clk_set_defaults(dev, CLK_DEFAULTS_POST); > > > -=A0=A0=A0 if (ret) > > > -=A0=A0=A0=A0=A0=A0=A0 return log_ret(ret); > > > +=A0=A0=A0 clk_set_defaults(dev, CLK_DEFAULTS_POST); > > > =A0=A0=A0=A0=A0 return 0; > > > =A0 } > > >=20 > >=20 > > See [1] for previous discussion. For more background, > >=20 > > - Device trees for i.MX are sync'd with Linux. > > - General clock assignments may live in the clock-controller node, >=20 > clock assignments can be anywhere, even in non-clock-controller nodes. >=20 > > =A0 including those which U-Boot does not implement, but which Linux d= oes. > > =A0 It's OK to not set up these clocks, but U-Boot doesn't know that a= nd > > =A0 fails. > >=20 > > We don't necessarily need to revert this commit, but we do need a way to > > say "it's OK not to set the defaults, since we can function without > > them". Tom suggested doing this in the clock driver last time. I think a > > Kconfig or a device tree property would work, perhaps something like > > 'u-boot,clock-defaults-optional'. >=20 > We didn't need custom DT properties before, Linux doesn't need them eithe= r, > so that approach seems wrong. >=20 > If the clock driver could say "skip unimplemented clock, because I don't > implement them and that is OK", that sounds like the right approach. >=20 > Unless the 2022.01 release should be completely broken for a lot of > platforms, I would propose we revert the clock uclass patch now and re-add > it right after the release, so we would not roll out a completely broken > release and would have more time to fix this properly. It'll be no more broken than v2021.10 was for whatever platforms have problems here, yes? Since that's what has the problematic commit. --=20 Tom --jaAa33DYgKWagIMk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmHV82EACgkQFHw5/5Y0 tywURAv+M0dNr3EGMwFbRyYILoFvp9uDATxTd9LVtKheu0eLTSS5mfq9psO2enA4 p96bB44FAQi0eoidUxRU5sh0C56RP0J1StAPZmHOYTaZEViwGf25oseRf2uYpSkX vN7UCOlmoAzHgPt7mrvQwPoUdWJnrSCmmTCI0R4JQtkQi27kTQZ6UNaupDM524KZ My2e0qBbuMBFTXusFxmDRaAoCfaKxd9/1Q1zxgCGg5tcnvVR3PG+V9aM7jY6LyYN KVE9tw1FZ8ivQbHMbqtyMR+qCMKONTikkhNCTJb1ZCbb92NAoenqT9LJaGSgcuKR kCXDsMtIWP2Z6YIRD0T8h0TdyAT2Yc+CziLJ97BokuxxDHT5cJjWs9qta7PsuRGA M7um0ynve++xgmraD0nA4zGf+6SpcUXus7CTnhXsjUk6doKYGYEWO1yQlP26lGbE KYgNqL/EkXRotPjjbdfBd8OPFxD5VkDld6WPqY/Yx76qfdKkiIpJ5JWfatii9qMw 2kuXvyLj =ZEV4 -----END PGP SIGNATURE----- --jaAa33DYgKWagIMk--