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 B2066C54EAA for ; Fri, 27 Jan 2023 17:55:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8AD96856DD; Fri, 27 Jan 2023 18:55:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kicherer.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=kicherer.org header.i=@kicherer.org header.b="al/cEVxW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58C8B851E4; Fri, 27 Jan 2023 18:55:50 +0100 (CET) Received: from mail.zeus06.de (www.zeus06.de [194.117.254.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BCFDF856E7 for ; Fri, 27 Jan 2023 18:55:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kicherer.org Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=dev@kicherer.org DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=kicherer.org; h= mime-version:date:from:to:cc:subject:in-reply-to:references :message-id:content-type:content-transfer-encoding; s=k1; bh=RD0 60S05MtgK1cxetRg6zbn0O5kl5YOmxXHpUnT/wX4=; b=al/cEVxWRqGDp0h9qOv zb83HFbmfb1d1XRdkgww9dAADR0QtgFP5OjgrvXgjUxtu3B0LGuMuQdO3lxD0tvf aBmOdIvTt4vzs6IDQ1gSv+pA3PEVY01eIK2mIJwO7F9BV/KtkwFwXrqIRFfWK5Y9 fFLzCs7Nan5Rzkk3UN+rz6jI= Received: (qmail 707364 invoked from network); 27 Jan 2023 18:55:46 +0100 Received: by mail.zeus06.de with ESMTPA; 27 Jan 2023 18:55:46 +0100 X-UD-Smtp-Session: l3s6476p2@uqszk0LzHtPCdf4e MIME-Version: 1.0 Date: Fri, 27 Jan 2023 18:55:46 +0100 From: Mario Kicherer To: Tom Rini Cc: u-boot@lists.denx.de, sbabic@denx.de, festevam@gmail.com, uboot-imx@nxp.com, daniel.schwierzeck@gmail.com, weijie.gao@mediatek.com, GSS_MTK_Uboot_upstream@mediatek.com, rick@andestech.com, ycliang@andestech.com Subject: Re: [PATCH v2 1/2] spl: spl_nor: add BOOT_DEVICE_NOR2 as alternative SPL_LOAD_IMAGE_METHOD In-Reply-To: References: <20230119152822.1214202-1-dev@kicherer.org> <20230119152822.1214202-2-dev@kicherer.org> Message-ID: <0f606ddab66a5dab3b8f0bcb856a73f3@kicherer.org> X-Sender: dev@kicherer.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On 2023-01-27 18:10, Tom Rini wrote: > Yes, all of the platforms that define the value (since it roughly means > "ROM set this value in something we can check") instead of enum'ing it > still compile that file and now fail to build. Okay, I think I understand your point now. I am not sure what's the best way to proceed here. Should I try to build all targets that contain BOOT_DEVICE_NOR and add a #define for BOOT_DEVICE_NOR2 if my patch really breaks the build? Or should I just add a #define BOOT_DEVICE_NOR2 to every #define BOOT_DEVICE_NOR? It looks like a change would be necessary in these files then: arch/arm/include/asm/arch-am33xx/spl.h arch/arm/include/asm/arch-orion5x/spl.h arch/arm/mach-k3/include/mach/j721e_spl.h arch/arm/mach-k3/include/mach/j721s2_spl.h arch/microblaze/include/asm/spl.h arch/powerpc/include/asm/spl.h > Ah, OK. Keep in mind that MMC1/MMC2 are for different physical MMC > devices on a given platform. I think this is more like the case where > you should be able to override spl_nor_get_uboot_base at the board > level > to say if you're loading A or B? Ah yes, it's been a while since I wrote this patch originally. spl_nor_get_uboot_base() chooses between A and B and BOOT_DEVICE_NOR2 signals that I should choose the other one now. Thank you! Mario