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 D6276C433EF for ; Sat, 1 Jan 2022 21:41:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 299BE82F3E; Sat, 1 Jan 2022 22:41:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="im2QL2Wn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D7C38302C; Sat, 1 Jan 2022 22:41:31 +0100 (CET) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (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 CDD86811B2 for ; Sat, 1 Jan 2022 22:41:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x730.google.com with SMTP id 202so24136745qkg.13 for ; Sat, 01 Jan 2022 13:41:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=e4tJskdnfVVS9JWYyEmCICHsO6cSPga5x9XPCnpFqIs=; b=im2QL2WnsStDmbCxezkLOUn5vLd/tpsn62ESE+FNh8x22Vd7WkuzM/sSdvYmVlunnr 3qbKqdkre5SLJsmq32HS6a+2/MQhe0j2vz90y0xgusS8XSy7aw+YjcgDNEbGrpzgtMEb 82BKgOwkm/gwcvhSc2yCE9ezD0Nvy+eHbaBNNvr0eP0tdNgffTB147Hc5I33lE/CXIFn wGKudhMjKaPVwA5AQtr+jY2AxPlVDj+LEP6FQnTVBobS9iZZprdryKMbOBieLgtRXivm k5XPL7ZdR5X3MkOVEN855ETZiaH4OS9OPC4s83r4OFHeAVYxLvJyllHUi/6cyuyrnPdL +S4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=e4tJskdnfVVS9JWYyEmCICHsO6cSPga5x9XPCnpFqIs=; b=r6884pGpowejCXn1hHjEVEVtzmyyzJxIlSdSE0qtGPh1QqKETlg72n/734uf2wgroy +5+Vlj/ZGHeu+rd7sKELHJsgdJeQSAT/AAnydbJLEclWUOCJUcNOOl/TvybmdB+Idwt3 0kUMdv2vHkd7ANBcA/Jl69NnN9ELJsWSHWcpxWJxKNniwhdnjttTmRTEfAUAYfHW/aT9 b5+XkwWZD/PArZnTsf0CxEMp7eaOzS5voXMpgYz0p3y9bFETQTPn/uTDZhZKTZ48qek4 AOX0OjC/rfujPnhZuqD4QZo9zEhGW/tH/5+0NHu9w+M+EiCt0X7FqEJMUK77HfAHfB+/ ecPA== X-Gm-Message-State: AOAM532YgsB5B9ITb7VaI1VHPoN76ew0GZ+GqAZAn9MXOWwHsDmlsAtx 7G/14zdRQbKVBIeexTRH5NE= X-Google-Smtp-Source: ABdhPJyNTdJUJFvfCLiFF6pdhryjsrT8w1fmXG+ub97B3w0S7wJBMW0KorTh8kMp/+j+FUhuxFg/Ww== X-Received: by 2002:a05:620a:c4c:: with SMTP id u12mr18787532qki.784.1641073286643; Sat, 01 Jan 2022 13:41:26 -0800 (PST) Received: from [192.168.1.201] (pool-108-18-207-184.washdc.fios.verizon.net. [108.18.207.184]) by smtp.googlemail.com with ESMTPSA id y5sm23465547qkp.103.2022.01.01.13.41.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jan 2022 13:41:26 -0800 (PST) From: Sean Anderson Subject: Re: [PATCH] Revert "clk: Detect failure to set defaults" To: Marek Vasut , u-boot@lists.denx.de Cc: Peng Fan , Simon Glass , Tom Rini , Mark Kettenis , lukma@denx.de References: <20220101185139.470786-1-marex@denx.de> Message-ID: Date: Sat, 1 Jan 2022 16:41:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20220101185139.470786-1-marex@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 Hi Marek, Please CC clock maintainers for future patches. On 1/1/22 1:51 PM, Marek Vasut wrote: > This reverts commit 92f1e9a4b31c0bf0f4f61ab823a6a88657323646. > The aforementioned patch causes massive breakage on all platforms which > have 'assigned-clock' DT property in their DT which references any clock > that are not supported by the platform clock driver. That can easily > happen either in SPL, or because the clock driver is reduced. Currently > it seems all iMX8M are affected and fail to boot altogether. > > Signed-off-by: Marek Vasut > Cc: Peng Fan > Cc: Simon Glass > --- > drivers/clk/clk-uclass.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > 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) > > int clk_uclass_post_probe(struct udevice *dev) > { > - int ret; > - > /* > * when a clock provider is probed. Call clk_set_defaults() > * also after the device is probed. This takes care of cases > * where the DT is used to setup default parents and rates > * using assigned-clocks > */ > - ret = clk_set_defaults(dev, CLK_DEFAULTS_POST); > - if (ret) > - return log_ret(ret); > + clk_set_defaults(dev, CLK_DEFAULTS_POST); > > return 0; > } > See [1] for previous discussion. For more background, - Device trees for i.MX are sync'd with Linux. - General clock assignments may live in the clock-controller node, including those which U-Boot does not implement, but which Linux does. It's OK to not set up these clocks, but U-Boot doesn't know that and fails. 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'. --Sean [1] https://lore.kernel.org/u-boot/20211029012801.15193-1-peng.fan@oss.nxp.com/