From patchwork Wed Jan 8 21:38:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 1219990 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.b="HZ9oizxe"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47tN0l5Wbkz9sPK for ; Thu, 9 Jan 2020 08:38:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0EDF181822; Wed, 8 Jan 2020 22:38:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1578519518; bh=GDuHJ/RbmCIoVO7fv4RjEEpU2Nvagp/re+KmVNnmqeM=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=HZ9oizxeCyPmjJSinY/9iQbF4roSn1ksTgygIKbn+eWwRtd8eEvkkLsF1xCTk1WZD qPY5KXG8QSmZdC+3WsfNBpNKAbaqRmRxTs+p5X7e0AqUT6BVjaM+BwRovQh24MUc7h cjx65E/z/dop6UJTfpRpf6WRflaytlFecHtRz59ZJUiQHTq015MieWEmWc+MZL9bfT xUjWjrjDpG4ItIRov2wvRoHjuAR80iWdov2Bc5WVftNBBWVZjthYC9HUjzq+XHwlnJ pUvZlt70M3rOGUcKtvi9aEjEiRBZDDxmt7eIAoVYUNSCyVT4/iEXSgQs8OEPrbigJU YvEMIZA2nPSjg== Received: by phobos.denx.de (Postfix, from userid 109) id 6F19F81825; Wed, 8 Jan 2020 22:38:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SUBJ_OBFU_PUNCT_FEW, SUBJ_OBFU_PUNCT_MANY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 332838181E for ; Wed, 8 Jan 2020 22:38:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=agust@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 47tN0V5kndz1qr8M; Wed, 8 Jan 2020 22:38:34 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 47tN0V5X4Wz1rkDq; Wed, 8 Jan 2020 22:38:34 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Nwr1VE-HFzni; Wed, 8 Jan 2020 22:38:34 +0100 (CET) X-Auth-Info: CvMU2Adok8E017v43T1URE11TqRinvai/Zr+f4DS2io= Received: from crub.agik.hopto.org (p508B64CC.dip0.t-ipconnect.de [80.139.100.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 8 Jan 2020 22:38:34 +0100 (CET) From: Anatolij Gustschin To: u-boot@lists.denx.de Subject: [PATCH 1/2] dts: add property removal option CONFIG_OF_REMOVE_PROPS Date: Wed, 8 Jan 2020 22:38:32 +0100 Message-Id: <20200108213833.10869-1-agust@denx.de> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean This can be used for device tree size reduction similar as CONFIG_OF_SPL_REMOVE_PROPS option. For tbs2910 board this shrinks the image size: all -2304.0 bss -16.0 text -2288.0 Signed-off-by: Anatolij Gustschin Reviewed-by: Tom Rini --- dts/Kconfig | 8 ++++++++ scripts/Makefile.lib | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dts/Kconfig b/dts/Kconfig index 64c98dd723..49224bee93 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -311,6 +311,14 @@ config OF_SPL_REMOVE_PROPS can be discarded. This option defines the list of properties to discard. +config OF_REMOVE_PROPS + string "List of device tree properties to drop" + depends on OF_CONTROL + default "interrupt-parent interrupts" if PINCTRL + help + Some properties are not used by U-Boot and can be discarded. + This option defines the list of properties to discard. + config SPL_OF_PLATDATA bool "Generate platform data for use in SPL" depends on SPL_OF_CONTROL diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 4ea898a421..3b124369ad 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -235,7 +235,8 @@ $(obj)/%.tab.h: $(src)/%.y FORCE # =========================================================================== quiet_cmd_shipped = SHIPPED $@ -cmd_shipped = cat $< > $@ +cmd_shipped = cat $< | $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ + $(addprefix -P ,$(subst $\",,$(CONFIG_OF_REMOVE_PROPS))) $(obj)/%: $(src)/%_shipped $(call cmd,shipped)