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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6948BC4338F for ; Mon, 23 Aug 2021 06:50:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E617661284 for ; Mon, 23 Aug 2021 06:50:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E617661284 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 80F26831A9; Mon, 23 Aug 2021 08:50:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu 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=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="UweXD6AR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8095831A9; Mon, 23 Aug 2021 08:50:42 +0200 (CEST) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 184EE831C7 for ; Mon, 23 Aug 2021 08:50:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x630.google.com with SMTP id x11so34884164ejv.0 for ; Sun, 22 Aug 2021 23:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=5s9qRujU71vu3SICQghKAXhIlR3THnvd6IfeddWS2IM=; b=UweXD6ARG+4mggLdBbv7ustERiErJs5Fkw6BJ4hiOU0gI/zamRLV6/YOLqEi1TqVTN ZFweR7IOUSz+VLmjmsb5LV02if5kpxXYCDcDn1CGlsVepWU6/jeI3rbAdZA91DXlpw6P k/2Io2lPoK+qXg+m/ReSZJCHFMxmLbitBvPi0+QYN0UVNmsEKVZVoYbfep4bhLRT01+H n9tmrue9Bb7nzdSXwUxk1XmKvI3qOS5ok4nVUGwshWKYnJjI398ZHvoWRla57/ryox+g SY83l9BER8b+cfJnVmAOzUipLCDw5KodzbqQfgy9BeDbVhbgAsq21FwxencPoDnvPfZ+ n/6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5s9qRujU71vu3SICQghKAXhIlR3THnvd6IfeddWS2IM=; b=QBj8QkT6q1Q9G6R2namEmuJYB5wmST5Xx/SdiSUiD5iVgSNIVIQrfEj970MdslC7rS hckbfkl7fB2f60flvScfH3nSLLBBkSTHG2gKucH2thvVB7Rx6vYEHnoaMhVNMxXVTlIc yNcNsHqXAU2yR7BT0VRA/+ZW1rBzuAdpm0Zo3U0VYW9ZEJe3fYpKiaxcaulfPtZcx+XB 4V/VtqQDPuhKZEhHBPnoCM8DC5Kvozv3nWBERugf40ULYF3P7z25A+ZhzugMOsGaK/9c 28D2o57YJy85+uLMCU8gdssIh8m1K0wyWzMOl67D40qJKgqajtFOCyOur9QxvXy5i7Rj /YdA== X-Gm-Message-State: AOAM5309YvIEy0FRMiPPWJ3WArPf1d+CVNL4xzDj/7vPptIJtOPXTjpy OmfkRoKLwhy6pLec+x2Rhlywvo7DBZHNPe4bwFjdsUNwe4B5Uw== X-Google-Smtp-Source: ABdhPJy3cQGXMjsOwzTvW2Asu5cZXqdYdTHLQrEg2cW/SxL0F/9ucujNO6VO9siJ1C5gPCxcSIIkeaAyoJqH2M9auBU= X-Received: by 2002:a17:907:1b06:: with SMTP id mp6mr34608183ejc.188.1629701433523; Sun, 22 Aug 2021 23:50:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Michal Simek Date: Mon, 23 Aug 2021 08:50:22 +0200 Message-ID: Subject: Re: [PATCH] fdt_support: Add kernel-doc for fdt_fixup_memory_banks() To: U-Boot , git , Tom Rini Cc: Simon Glass Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 =C3=BAt 10. 8. 2021 v 9:30 odes=C3=ADlatel Michal Simek napsal: > > Add kernel-doc description for fdt_fixup_memory_banks() because it is > implemented in one specific way and this information should be available > for others to decide if their SoC conforms to it. > If you don't want U-Boot to update your memory DT layout please disable > CONFIG_ARCH_FIXUP_FDT_MEMORY. > > Signed-off-by: Michal Simek > --- > > common/fdt_support.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/common/fdt_support.c b/common/fdt_support.c > index 4341d84bd5ec..8992ac5d3fca 100644 > --- a/common/fdt_support.c > +++ b/common/fdt_support.c > @@ -420,6 +420,24 @@ static int fdt_pack_reg(const void *fdt, void *buf, = u64 *address, u64 *size, > #else > #define MEMORY_BANKS_MAX 4 > #endif > + > +/** > + * fdt_fixup_memory_banks - Update DT memory node > + * @blob: Pointer to DT blob > + * @start: Pointer to memory start addresses array > + * @size: Pointer to memory sizes array > + * @banks: Number of memory banks > + * > + * Return: 0 on success, negative value on failure > + * > + * Based on the passed number of banks and arrays, the function is able = to > + * update existing DT memory nodes to match run time detected/changed me= mory > + * configuration. Implementation is handling one specific case with only= one > + * memory node where multiple tuples could be added/updated. > + * The case where multiple memory nodes with a single tuple (base, size)= are > + * used, this function is only updating the first memory node without re= moving > + * others. > + */ > int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int bank= s) > { > int err, nodeoffset; > -- > 2.32.0 > Applied. M --=20 Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs