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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A100C433F5 for ; Mon, 1 Nov 2021 08:57:11 +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 5639160EFF for ; Mon, 1 Nov 2021 08:57:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5639160EFF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=andestech.com 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 78DC4815A8; Mon, 1 Nov 2021 09:57:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id CEE4183323; Mon, 1 Nov 2021 09:57:06 +0100 (CET) Received: from ATCSQR.andestech.com (atcsqr.andestech.com [60.248.187.195]) (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 B6B6281197 for ; Mon, 1 Nov 2021 09:57:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ycliang@andestech.com Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id 1A18um5h040471; Mon, 1 Nov 2021 16:56:48 +0800 (GMT-8) (envelope-from ycliang@andestech.com) Received: from ubuntu02 (10.0.12.212) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Mon, 1 Nov 2021 16:56:48 +0800 Date: Mon, 1 Nov 2021 16:56:43 +0800 From: Leo Liang To: Bin Meng CC: Rick Chen , U-Boot Mailing List Subject: Re: [PATCH] riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED Message-ID: References: <20211027085908.2051-1-ycliang@andestech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) X-Originating-IP: [10.0.12.212] X-DNSRBL: X-MAIL: ATCSQR.andestech.com 1A18um5h040471 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 On Mon, Nov 01, 2021 at 04:37:32PM +0800, Bin Meng wrote: > Hi Leo, > > On Mon, Nov 1, 2021 at 3:49 PM Leo Liang wrote: > > > > Hi Bin, > > On Mon, Nov 01, 2021 at 02:04:48PM +0800, Bin Meng wrote: > > > Hi Leo, > > > > > > On Wed, Oct 27, 2021 at 4:59 PM Leo Yu-Chi Liang wrote: > > > > > > > > According to ./include/linux/kconfig.h, > > > > CONFIG_IS_ENABLED(OF_BOARD) expands to 0 > > > > when CONFIG_SPL_BUILD is defined because > > > > there is no CONFIG_SPL_OF_BOARD. > > > > > > Why is the change? > > > > > > > The original code was > > > > void *board_fdt_blob_setup(void) > > { > > #if CONFIG_IS_ENABLED(OF_BOARD) > > return (void *)(ulong)gd->arch.firmware_fdt_addr; > > #elif CONFIG_IS_ENABLED(OF_SEPARATE) > > return (void *)CONFIG_SYS_FDT_BASE; > > #else > > return NULL; > > } > > > > But the "return (void *)(ulong)gd->arch.firmware_fdt_addr;" does not get > > compiled even if OF_BOARD is selected when building > > ae350_*_spl_*_defconfig, thus this patch. > > > > The reason is because ./include/linux/kconfig.h states > > "CONFIG_IS_ENABLED(FOO) expands to 1 if CONFIG_SPL_BUILD is defined > > and CONFIG_SPL_FOO is set to 'y'". > > However, we don't have CONFIG_SPL_OF_BOARD, so > > CONFIG_IS_ENABLED(OF_BOARD) only expands to 0. > > > > Thanks! > > Please add: > > Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards") > Reviewed-by: Bin Meng > Will do. Thanks! Best regards, Leo > Regards, > Bin