From patchwork Thu Jul 20 09:07:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 791534 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="zZN0hmpb"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xCpMB1wnLz9ryQ for ; Thu, 20 Jul 2017 19:22:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 01FCDC21DDA; Thu, 20 Jul 2017 09:18:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2556DC21DCC; Thu, 20 Jul 2017 09:09:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E1A58C21DC0; Thu, 20 Jul 2017 09:08:57 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.denx.de (Postfix) with ESMTPS id CC710C21C72 for ; Thu, 20 Jul 2017 09:07:56 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id y43so9812571wrd.0 for ; Thu, 20 Jul 2017 02:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=D/cTETcsSCbJt34QkseRbQlAdvHx4QfpSrwQBmUfK3s=; b=zZN0hmpbjMVIGGklJogw6ZT7eQyxEau+YRAcxSyR7ysS1f/xVM/reVIQrW57AhTpnN iMpes4y5xTcLNJJrIbDy4vfPDA78eaUt04K4v4mamayzB2cF3e8bI49Edk4bKc3NF3Y8 l6RsOdIgvNnOJIJPqEag1XU7+/frKyUmzJjANyHyk/0XJUzgKB3m7XPdzPj/5FwgfaI8 VQjQHoVETTEUfEQNrX9OdO+UHwK29oiywtnf5qM5fRtVGYNVKgAGCavazpf83L8wrw0n ohOUxtewQfqNFTQpEJSTq7s3HSdHJPwbdmIPH+1njthWoUlw56Laj5B4Ukz2i06XUzW7 TfFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=D/cTETcsSCbJt34QkseRbQlAdvHx4QfpSrwQBmUfK3s=; b=pu0IxLXNyf43p7ydjv7P169AXYmeLuZCB3rMV21T6gzAF0Vt/rr3teGes7/25ydeV/ 0ciL12HR0BvYOlSY8gX7ucWeYlzA2Y2Kgk1mu3IpIYIrLj7e/zQyAvMDvQXhCCUvAhTt 890+huYY2CcxARDeKNZFXdw6MuhnPPrEhsOphuhQuQEt5bS6OSMQPpiVZM5sS4AFqBiC BeEFW4SV8/otBFjHEeAYAIGDLP0U5LPfB4+OoUi+NMWXJNGdg82Ex9gh5lhxD4rYpZ+w n/3P/ue0mvHC2VAuL87xXg6qXOV6ZyRfWiAH7Itd1EhhevknjRPbeRE2AEKWOUinVx5+ oY+A== X-Gm-Message-State: AIVw1133vn6JPNwiIbIevxi4z0VPO8mkNtLTgtDiJLE2APAGFF9EMr4L VSwnSbG1EHXUqkefH0A= X-Received: by 10.223.133.146 with SMTP id 18mr2500052wrt.214.1500541676325; Thu, 20 Jul 2017 02:07:56 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id 66sm1898879wmj.29.2017.07.20.02.07.55 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 20 Jul 2017 02:07:55 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Thu, 20 Jul 2017 11:07:46 +0200 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Cc: Albert Aribaud Subject: [U-Boot] [PATCH 5/8] arm64: zynqmp: Add Kconfig option for adding psu_init to binary X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There is a need to include psu_init also in mini u-boot configuration that's why handle psu_init via Kconfig property. Signed-off-by: Michal Simek --- arch/arm/cpu/armv8/zynqmp/Kconfig | 5 +++++ board/xilinx/zynqmp/Makefile | 6 +++++- board/xilinx/zynqmp/zynqmp.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig index 2a0e8f2cbf66..5ffc9f6c867b 100644 --- a/arch/arm/cpu/armv8/zynqmp/Kconfig +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig @@ -62,6 +62,11 @@ config DEFINE_TCM_OCM_MMAP This option if enabled defines the TCM and OCM memory and its memory attributes in MMU table entry. +config ZYNQMP_PSU_INIT_ENABLED + bool "Include psu_init" + help + Include psu_init to full u-boot. SPL include psu_init by default. + config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED bool "Overwrite SPL bootmode" depends on SPL diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile index 9d69d6546e2c..75aab92f0473 100644 --- a/board/xilinx/zynqmp/Makefile +++ b/board/xilinx/zynqmp/Makefile @@ -20,7 +20,11 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/ endif endif -obj-$(CONFIG_SPL_BUILD) += $(init-objs) +ifdef_any_of = $(filter-out undefined,$(foreach v,$(1),$(origin $(v)))) + +ifneq ($(call ifdef_any_of, CONFIG_ZYNQMP_PSU_INIT_ENABLED CONFIG_SPL_BUILD),) +obj-y += $(init-objs) +endif # Suppress "warning: function declaration isn't a prototype" CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 442637bcae2c..ecdae5e261f6 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -119,7 +119,7 @@ int board_early_init_f(void) zynqmp_pmufw_version(); #endif -#if defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED) psu_init(); #endif