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 2FBC4C433F5 for ; Thu, 6 Jan 2022 15:49:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A55BF8363F; Thu, 6 Jan 2022 16:49:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="XW2swsO+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3204F8359C; Thu, 6 Jan 2022 16:49:06 +0100 (CET) Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) (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 6BD5583662 for ; Thu, 6 Jan 2022 16:49:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ua1-x92e.google.com with SMTP id o20so5096990uat.2 for ; Thu, 06 Jan 2022 07:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dUEOI8K0u/zdkDM6Glq0UgjO3FEAe8nyMC4gSHdFMLI=; b=XW2swsO+eWERzelB0A62s0EbBTLuQWuvIPIJwbhef7XEB8UPIxnNZf1bvLRKGHa1ef 9rkeSkQbZH7jlbaNf/FU0sQKklqwgRuJpivND8PAJ0cYumCAXjJTrfCVCEtrpQVrBeX3 PAe5oToq/FOtAGGPKTrMBIzvhxi+uy/nl4l8o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=dUEOI8K0u/zdkDM6Glq0UgjO3FEAe8nyMC4gSHdFMLI=; b=VzzXjdRdIhRm5GQTkVHztmoh0/Dp+FubZsy+uCdSXuxp1MrQ+TKZvtzJRq68o0LQyH YVvcnqK4woZAb/XVJ2g87BK2Wj8422gKY12vBTBfZMJ5bWNdnpll9h3CyGwljU2qiDWH t/Kxagc7C4raNdsAY9n0GUu8g7h5XuADNXqa/pe/o6gngMPhNblpKASuNYoUg6QDWRbX dNwMW46ta5lD669BqbpTLOs2LJRLNTtr8rrYGmfz0fLkQzVt7/7zjYEvkBobiTK2DRJn AbqiWf8prmpZaeJwcLJOT5mx3+JTCa7mOphJn4iQ/qV9HuPWm5SGI6jBD/EoNT2acHag ptlw== X-Gm-Message-State: AOAM533zUIkvolopqDwf8nkoagVhl34ckCWtcr+ssSoxc+yIPAAZtSf3 rEZ9XVZnsYhbfrj2w0vO/q/OpihAiMysFJ2pVpeplVbenqhUr6aH X-Google-Smtp-Source: ABdhPJzjwLnsuNc83mDE4ZhLXCEdBIFCJq/V8ePx+XVvasS4ScAHK2qkpKd67b40u5W94hhw6cu7P0TDIZMonoFOSRA= X-Received: by 2002:a67:ee1a:: with SMTP id f26mr17696730vsp.51.1641484139882; Thu, 06 Jan 2022 07:48:59 -0800 (PST) MIME-Version: 1.0 References: <20220106132100.56f55e02@thinkpad> In-Reply-To: <20220106132100.56f55e02@thinkpad> From: Simon Glass Date: Thu, 6 Jan 2022 08:48:48 -0700 Message-ID: Subject: Re: difference between fdtdec and fdt_support ? To: =?UTF-8?B?TWFyZWsgQmVow7pu?= Cc: U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, On Thu, 6 Jan 2022 at 05:21, Marek Beh=C3=BAn wrote: > > Hi Simon, > > I am a little confused. > > We have > common/fdt_support.c > and > lib/fdtdec.c > > The second one implements for example fdtdec_get_is_enabled(), which I > would rather expect in fdt_support by name fdt_node_is_available(), or > something like that. Should be moved to ofnode > > Also fdtdec does a strange thing with compatible strings: it declares > an enum for compatible strings and then a map which maps this enum > values to compatible strings... Why not just use the compatible strings? Did you see the comment? * NOTE: This list is basically a TODO list for things that need to be * converted to driver model. So don't add new things here unless there is = a * good reason why driver-model conversion is infeasible. Examples include * things which are used before driver model is available. This is effectively a list of things that should be converted to driver model. The list should then go away. > > What is the purpose of having two files implementing fdt stuff? fdtdec - for reading from the DT. Should go away and be replaced with the ofnode API, and fdtaddr.c fdt_support - for updating the DT, e.g. for fixups before booting an OS Regards, Simon