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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 20604C4338F for ; Tue, 3 Aug 2021 01:40:22 +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 10CA361019 for ; Tue, 3 Aug 2021 01:40:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 10CA361019 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 A23E282D85; Tue, 3 Aug 2021 03:40:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="aMKQIAn+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 99C8A82DB4; Tue, 3 Aug 2021 03:40:16 +0200 (CEST) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (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 915C482BCE for ; Tue, 3 Aug 2021 03:40:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf34.google.com with SMTP id d17so9856301qvn.13 for ; Mon, 02 Aug 2021 18:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XhWds4DYjJe1DkGtC8qCOEVEqcnIjW6GFbMLmuzWG68=; b=aMKQIAn+Cn9bM3Tt/j5lOC6UfM8iH9RufETpHCNIhRPSXyKvASBfCDrnJvrAD3sZXb FvrLSmYwRknaTWmuI92UWt1MWbjjVIqAom4Aa7maFKlJLaYh6PThWALXFyKrXoADP+9+ 8hqhLZObkomlhmPIBxG7I+C2gOMzbVC3yNeGQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XhWds4DYjJe1DkGtC8qCOEVEqcnIjW6GFbMLmuzWG68=; b=MoJU1ZGx9FKlxp5y8SbE+HCLCphkBEpq5FA0T0AQVzT+CMSaud4e2yiZ4wH93D4ibL qkpgUB2ix3Qk7DTSKt1zY7licw83gYcDFWPV8LtIDTM6Rcf6yg4vRGmdGV8CrX12hpxM C10q0t4PfIvALhNYFoX7J4VvvN3YdPH2ZwYRdLSGTcrkMsmyJgZkRrufA64JaSPp61i/ 8+Gk9G1l45nCLsGwKLlIcGuvchoetORevd5sQELlOt1I4/8CQHTUOEQDae+M2Uytf199 1WcZp58wl5hImrgdQG2ynKK/imOwStodmrooTUQmIE948zTDQGlZ68Bhv1gAP/TFpWj9 SarQ== X-Gm-Message-State: AOAM530BBW6Kc3Y3LK004CNR9tOILZGvJHVCJTeo2DbT3lXpeAhXD6mP pQq6zW7l1vnVQF4xXpslcRRvTg== X-Google-Smtp-Source: ABdhPJw1spyPfuC1Jalmjnl56C5yjciNfifphpPUvrvMOi6c22gwdjKq4Z7iUoFtARL95XKgmtO3dg== X-Received: by 2002:a05:6214:332:: with SMTP id j18mr19399846qvu.21.1627954809982; Mon, 02 Aug 2021 18:40:09 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-a0a3-ef76-0712-405d.res6.spectrum.com. [2603:6081:7b01:cbda:a0a3:ef76:712:405d]) by smtp.gmail.com with ESMTPSA id h10sm5506872qta.74.2021.08.02.18.40.08 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Aug 2021 18:40:09 -0700 (PDT) Date: Mon, 2 Aug 2021 21:40:07 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Simon Glass , Stefan Roese , Masami Hiramatsu , Frank Wunderlich , Marek =?iso-8859-1?Q?Beh=FAn?= , U-Boot Mailing List Subject: Re: Broken CONFIG_SPL_SATA_SUPPORT=y Message-ID: <20210803014007.GP9379@bill-the-cat> References: <20210802211806.segctj325v5argwj@pali> <20210802212554.knnm6ndingwooz5k@pali> <20210802214322.GJ9379@bill-the-cat> <20210802215658.vcdxtx6u7tfsi3od@pali> <20210802221120.GM9379@bill-the-cat> <20210802223819.2xh6i6n5d7sxispl@pali> <20210802224648.GO9379@bill-the-cat> <20210802233353.xsqwyrfdkkdju2h2@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Wcg4xOPTM6D+SSuh" Content-Disposition: inline In-Reply-To: <20210802233353.xsqwyrfdkkdju2h2@pali> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --Wcg4xOPTM6D+SSuh Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 03, 2021 at 01:33:53AM +0200, Pali Roh=E1r wrote: > On Monday 02 August 2021 18:46:48 Tom Rini wrote: > > On Tue, Aug 03, 2021 at 12:38:19AM +0200, Pali Roh=E1r wrote: > > > On Monday 02 August 2021 18:11:20 Tom Rini wrote: > > > > On Mon, Aug 02, 2021 at 11:56:58PM +0200, Pali Roh=E1r wrote: > > > > > On Monday 02 August 2021 17:43:22 Tom Rini wrote: > > > > > > On Mon, Aug 02, 2021 at 03:30:20PM -0600, Simon Glass wrote: > > > > > > > Hi Pali, > > > > > > >=20 > > > > > > > On Mon, 2 Aug 2021 at 15:26, Pali Roh=E1r w= rote:> > > > > > > > > On Monday 02 August 2021 15:23:22 Simon Glass wrote: > > > > > > > > > () Hi Pali, > > > > > > > > > > > > > > > > > > On Mon, 2 Aug 2021 at 15:18, Pali Roh=E1r wrote: > > > > > > > > > > > > > > > > > > > > On Monday 02 August 2021 15:14:30 Simon Glass wrote: > > > > > > > > > > > Hi Pali, > > > > > > > > > > > > > > > > > > > > > > On Mon, 2 Aug 2021 at 15:09, Pali Roh=E1r wrote: > > > > > > > > > > > > > > > > > > > > > > > > On Monday 02 August 2021 16:55:34 Tom Rini wrote: > > > > > > > > > > > > > On Sun, Aug 01, 2021 at 02:25:16PM +0200, Pali Ro= h=E1r wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello! > > > > > > > > > > > > > > > > > > > > > > > > > > > > Option CONFIG_SPL_SATA_SUPPORT=3Dy is currently= broken in u-boot master > > > > > > > > > > > > > > branch. If I try to enable it for A38x platform= I'm getting following > > > > > > > > > > > > > > compiler error: > > > > > > > > > > > > > > > > > > > > > > > > > > > > LD spl/u-boot-spl > > > > > > > > > > > > > > arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.= o: in function `ahci_probe_scsi_pci': > > > > > > > > > > > > > > drivers/ata/ahci.c:1205: undefined reference = to `dm_pci_map_bar' > > > > > > > > > > > > > > arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.= c:1215: undefined reference to `dm_pci_read_config16' > > > > > > > > > > > > > > arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.= c:1216: undefined reference to `dm_pci_read_config16' > > > > > > > > > > > > > > arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.= c:1220: undefined reference to `dm_pci_map_bar' > > > > > > > > > > > > > > make[1]: *** [scripts/Makefile.spl:512: spl/u= -boot-spl] Error 1 > > > > > > > > > > > > > > make: *** [Makefile:1977: spl/u-boot-spl] Err= or 2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > You can reproduce it by running following comma= nds: > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ make turris_omnia_defconfig > > > > > > > > > > > > > > $ echo CONFIG_SPL_SATA_SUPPORT=3Dy >> .config > > > > > > > > > > > > > > $ make CROSS_COMPILE=3Darm-linux-gnueabihf- > > > > > > > > > > > > > > > > > > > > > > > > > > > > I workaround it by following patch: > > > > > > > > > > > > > > > > > > > > > > > > > > > > diff --git a/drivers/ata/ahci.c b/drivers/ata/a= hci.c > > > > > > > > > > > > > > index d4047c04f5d0..6bad72e4cfa4 100644 > > > > > > > > > > > > > > --- a/drivers/ata/ahci.c > > > > > > > > > > > > > > +++ b/drivers/ata/ahci.c > > > > > > > > > > > > > > @@ -1196,7 +1196,7 @@ int ahci_probe_scsi(struc= t udevice *ahci_dev, ulong base) > > > > > > > > > > > > > > return 0; > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > -#ifdef CONFIG_DM_PCI > > > > > > > > > > > > > > +#if CONFIG_IS_ENABLED(DM_PCI) > > > > > > > > > > > > > > int ahci_probe_scsi_pci(struct udevice *ahci_d= ev) > > > > > > > > > > > > > > { > > > > > > > > > > > > > > ulong base; > > > > > > > > > > > > > > > > > > > > > > > > > > > > It fixed this particular problem. So it looks l= ike that CONFIG_DM_PCI is > > > > > > > > > > > > > > defined also when building SPL even when it is = not enabled for SPL. > > > > > > > > > > > > > > Whole PCI is disabled in SPL. > > > > > > > > > > > > > > > > > > > > > > > > > > > > But then I got another compile error: > > > > > > > > > > > > > > > > > > > > > > > > > > > > LD spl/u-boot-spl > > > > > > > > > > > > > > arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci-= pci.o: in function `ahci_pci_probe': > > > > > > > > > > > > > > drivers/ata/ahci-pci.c:21: undefined referenc= e to `ahci_probe_scsi_pci' > > > > > > > > > > > > > > make[1]: *** [scripts/Makefile.spl:512: spl/u= -boot-spl] Error 1 > > > > > > > > > > > > > > make: *** [Makefile:1977: spl/u-boot-spl] Err= or 2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > Seems that u-boot is trying to compile and link= ahci-pci.o into SPL > > > > > > > > > > > > > > binary even when it is not enabled nor used. PC= I is completed disabled > > > > > > > > > > > > > > in SPL for this case. > > > > > > > > > > > > > > > > > > > > > > > > > > > > I workaround it by putting whole ahci-pci.c fil= e into one big #idef: > > > > > > > > > > > > > > > > > > > > > > > > > > > > diff --git a/drivers/ata/ahci-pci.c b/drivers/a= ta/ahci-pci.c > > > > > > > > > > > > > > index b1d231e0f9e1..34afebd2f87f 100644 > > > > > > > > > > > > > > --- a/drivers/ata/ahci-pci.c > > > > > > > > > > > > > > +++ b/drivers/ata/ahci-pci.c > > > > > > > > > > > > > > @@ -9,6 +9,8 @@ > > > > > > > > > > > > > > #include > > > > > > > > > > > > > > #include > > > > > > > > > > > > > > > > > > > > > > > > > > > > +#if CONFIG_IS_ENABLED(DM_PCI) > > > > > > > > > > > > > > + > > > > > > > > > > > > > > static int ahci_pci_bind(struct udevice *dev) > > > > > > > > > > > > > > { > > > > > > > > > > > > > > struct udevice *scsi_dev; > > > > > > > > > > > > > > @@ -42,3 +44,5 @@ static struct pci_device_id a= hci_pci_supported[] =3D { > > > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > > > > > U_BOOT_PCI_DEVICE(ahci_pci, ahci_pci_supported= ); > > > > > > > > > > > > > > + > > > > > > > > > > > > > > +#endif > > > > > > > > > > > > > > > > > > > > > > > > > > > > And then finally U-Boot produced final target i= mage u-boot-spl.kwb: > > > > > > > > > > > > > > > > > > > > > > > > > > > > LD spl/u-boot-spl > > > > > > > > > > > > > > OBJCOPY spl/u-boot-spl-nodtb.bin > > > > > > > > > > > > > > SYM spl/u-boot-spl.sym > > > > > > > > > > > > > > CAT spl/u-boot-spl-dtb.bin > > > > > > > > > > > > > > COPY spl/u-boot-spl.bin > > > > > > > > > > > > > > MKIMAGE u-boot-spl.kwb > > > > > > > > > > > > > > > > > > > > > > > > > > > > So this looks like a bug in Kconfig or Makefile= dependences that build > > > > > > > > > > > > > > system is trying to compile and link also files= which should not be > > > > > > > > > > > > > > linked at all. > > > > > > > > > > > > > > > > > > > > > > > > > > Yes, it's a missing dependency in Kconfig. You n= eed to enable SPL_DM > > > > > > > > > > > > > and then quite possibly SPL_OF_CONTROL (I forget = if that was a hard > > > > > > > > > > > > > dependency on the main conversion or not) on the = platform. > > > > > > > > > > > > > > > > > > > > > > > > CONFIG_SPL_DM=3Dy is already enabled > > > > > > > > > > > > > > > > > > > > > > CONFIG_SPL_PCI ? > > > > > > > > > > > > > > > > > > > > > > It seems that pci-uclass.c is not being built for SPL. > > > > > > > > > > > > > > > > > > > > CONFIG_SPL_PCI is not enabled. > > > > > > > > > > > > > > > > > > > > But why should be CONFIG_SPL_PCI needed for SATA? As ab= ove my patches > > > > > > > > > > show no PCI is required for SATA... > > > > > > > > > > > > > > > > > > I suggest investigating what is calling those functions y= ou mention... > > > > > > > > > > > > > > > > > > If you look at ahci_probe_scsi_pci() it is bracketed by: > > > > > > > > > > > > > > > > > > #ifdef CONFIG_DM_PCI > > > > > > > > > > > > > > > > > > Perhaps it should be: > > > > > > > > > > > > > > > > > > #if CONFIG_IS_ENABLED(DM_PCI) > > > > > > > > > > > > > > > > > > so it takes account of SPL? > > > > > > > > > > > > > > > > And this is exactly what I did in first patch attempt. > > > > > > >=20 > > > > > > > Then how about changing the Makefile rule to: > > > > > > >=20 > > > > > > > obj-$(CONFIG_$(SPL_TPL_)AHCI_PCI) +=3D ahci-pci.o > > > > > >=20 > > > > > > But there is no SPL_AHCI_PCI nor TPL_AHCI_PCI. I really want t= o know in > > > > > > addition to how SATA is hooked up on this board what the expect= ed truth > > > > > > table of U-Boot and SPL CONFIG options is expected to be. > > > > >=20 > > > > > What do you mean by hooked? SATA support on A38x is provided by s= tandard > > > > > AHCI interface implemented by ahci_mvebu.c driver (CONFIG_AHCI_MV= EBU). > > > > > No PCIe is involved. > > > >=20 > > > > OK, so why are you building drivers/ata/ahci-pci.c at all? > > >=20 > > > ahci-pci is enabled for proper U-Boot. It is driver for PCIe add-in > > > cards which speak AHCI protocol. You can e.g. insert SATA-based SSD d= isk > > > into e.g. mPCIe form-factor AHCI card and then this mPCIe card you can > > > insert into mPCIe slot on the board. > > >=20 > > > Obviously you cannot load U-Boot from this SSD disk (as bootrom does = not > > > support it) but you can boot Linux kernel and whole Linux system from > > > this disk via proper U-Boot (not SPL), if you enable this driver in > > > U-Boot. > > >=20 > > > So for this kind of usage, it makes sense to enable also driver for > > > AHCI_PCI in proper U-Boot (not SPL). > >=20 > > OK, thanks, that does help. > >=20 > > > > Should you > > > > be enabling SCSI_AHCI_PLAT like the armada 37xx and 8k platforms ar= e? > > >=20 > > > But this is something totally different, not? > >=20 > > Not exactly, no. This shows one of the valid criticism of having both > > SPL and U-Boot (or TPL and SPL and U-Boot) build from a single config > > file. If you had that option enabled, none of the SPL build part would > > try and do PCI things. But if you had that enabled, full U-Boot would > > then fail to do PCI disks. > >=20 > > > > > But I think this is not board neither platform specific, but gene= ral SPL > > > > > U-Boot issue. As I mentioned in the first email, U-Boot build sys= tem is > > > > > trying to compile and link files into SPL which should not and wh= ich are > > > > > not enabled in config at all. More precisely, build system is try= ing to > > > > > link into SPL binary functions from AHCI_PCI even when PCI is not > > > > > enabled in SPL. PCI is enabled only in proper U-Boot. > > > > >=20 > > > > > So this looks like a broken dependency either in Makefile or Kcon= fig, > > > > > but I really do not know where nor why it happens. > > > >=20 > > > > It's a combination of a lack combination testing really. > > > >=20 > > > > > AHCI_PCI depends on PCI and AHCI. AHCI_MVEBU depends only on AHCI= =2E So > > > > > when PCI is not enabled in SPL then also AHCI_PCI must not be ena= bled in > > > > > SPL. But AHCI still can be enabled in SPL even when AHCI_PCI is > > > > > disabled. Therefore also AHCI_MVEBU can be enabled in SPL when PC= I is > > > > > disabled in SPL. > > > >=20 > > > > Why would you be enabling AHCI_PCI and not enabling PCI? Or, what > > > > functionality would you be using in that case? > > >=20 > > > Seems that there is some kind of misunderstanding. > >=20 > > Yes, but I think I see it now. > >=20 > > > Enabling AHCI_PCI without PCI should not be possible and should be > > > disallowed. I'm not trying to enable such combination, I'm trying to > > > show you that build system somehow enabled this nonsense combination.= Or > > > for some unknown reason it is trying to use AHCI_PCI in SPL when PCI = is > > > not enabled in SPL. And I really do not know what is happening here. > > >=20 > > > My guess is that there is some mix of SPL and non-SPL symbol > > > dependences. Build system sees that PCI is enabled for proper U-Boot = and > > > this information somehow propagates into SPL and build system "force" > > > linking of AHCI_PCI into SPL even no PCI is enabled for SPL. And also > > > even when there is no AHCI_PCI config for SPL. > >=20 > > Right, so as you guess, there's a mix of SPL and non-SPL symbols, > > because we don't have SPL symbols for everything, and haven't needed to > > duplicate any of them for PCI or SATA until now. > >=20 > > > So what I need to achieve: > > > * enable AHCI_MVEBU in both proper U-Boot and SPL > > > * enable PCI and AHCI_PCI in proper U-Boot > > > * disable PCI and AHCI_PCI in SPL > > > * make dependences between these options and SPL combination correctly > > > defined, so it would not be possible to enable nonsense combination > >=20 > > Can you not just enable PCI and AHCI_PCI within SPL too? Just because > > ROM doesn't support it doesn't mean SPL cannot. Or do you not have the > > room in the binary? If you don't then yes, a number of symbols need to > > be duplicated to have SPL_FOO options, and code updated to use > > CONFIG_IS_ENABLED(FOO). >=20 > In the last mvebu patch series I tried to reduce size of SPL binary and > also to increase/remove limit for its maximal size. For more mvebu > boards SPL was near its maximal limit as U-Boot is increasing its size > in time. >=20 > So enabling unused features and unused code into SPL is not a good idea. >=20 > Moreover 32bit mvebu is kind of special in way how SPL and proper U-Boot > is used. Bootrom can boot only image in vendor format (called kwbimage) > which is divided into two main parts: DDR init code (loaded only into > CPU cache, responsible for initializing RAM and returning to bootrom) > and main bootloader. Bootloader in our case is proper U-Boot and DDR > init code is now U-Boot SPL binary. (In past for DDR vendor binary was > used, but now SPL contains required DDR driver and so is used). This > applies to 32bit mvebu which includes at least axp, a37x, a38x, msys... >=20 > "Proper vendor way" is that DDR init code (SPL in our case) returns back > to bootrom which loads then rest of the image/bootloader (proper U-Boot > in our case). But because bootrom is reading SPI-NOR slowly, there is > option to compile SPL to not return to bootrom, but rather load this > image (in vendor format) from SPI-NOR and de-facto use standard way for > loading/booting proper U-Boot from SPL. Using of returning to bootrom > has advantage in smaller binary and now everybody can decide if want > smaller binary or binary which is faster for SPI-NOR. If you are > targeting UART booting, you would choose "smaller binary" option as it > would be faster transferred over UART. >=20 > You wrote "Just because ROM doesn't support it doesn't mean SPL cannot." > That would mean that you completely want to ignore "bootloader" part of > vendor kwbimage. And supplied ddr init code (SPL) does not return to > bootrom and instead loads proper U-Boot from completely different > storage about which bootrom has absolutely no idea. Theoretically it > should be possible and then into kwbimage bootloader part you put some > 1 byte nop image. But I think that nobody ever tried it with targeting > AHCI_PCI. Plus current U-Boot Makefile always put proper U-Boot into > "bootloader part of kwimage". So even U-Boot build system is not > prepared for this kind of "experiments" :-) It could be interesting > upgrade for above mentioned platforms but I think that there is no such > big value in it... >=20 > PS: mvebu bootrom supports booting also from PCIe, but this is works > differently as all other methods and does not match how PCIe works in > U-Boot SPL. mvebu bootrom initialize PCIe device, enable bus mastering, > enable memory access and then expects that PCIe device initializes DDR, > then transfers bootloader into RAM (from some its own specific storage) > and poke bootrom to start executing bootloader from RAM. OK, thanks. Then the right fix is to introduce whatever SPL_xxx symbols you need so that you can turn off what you don't want in SPL but leave it enabled in full U-Boot, and update the code to use CONFIG_IS_ENABLED(xxx). If you can do that part, I can iterate over converting everyone else that assumes what we have today is what it wants in SPL and non-SPL. --=20 Tom --Wcg4xOPTM6D+SSuh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEInnAACgkQFHw5/5Y0 tywWTQv/QznuiNxdjlbjme3zAWugCdaI3tsei4rb+UsT/viVj7VYRGJmyeKHYq8D ilPg4Yr3c5zIBCi49soKnQ6ryqv5yJQ7jP3lz//+3+xF8VzvkebUd7VNIE7nM49y TBcLDA8CmYde5GwF0NvRb50dgORWtOQlwi4qXInPXc/Td8nM0DuJOJPWRFJKRDS5 6ptGDFJa5MiXowoczx6VISDwf5pZImuiturAdYaJZnf0GhewTaZPtgsZwreYsBYR VXFDEEAoVva9Qnb7WwSmipM2wbIqklxHpJclKUU50NUW9yfzXj8ALODFFMKJ+Mnu AiSprmyvmUUp9aSsGfnd2m2GGULx6lO98pPeCDacR+8kyUkdvHo+H9Kq7OorFpRz 7U+8ZUvT3YTdPobC8DX/6cWkUisc0WLtFq0dVxp1BQs+FVFMHEMVu1cdu9L35g0I zirSwTfWC0C7KWUecItAbpzYe/210r/CRQ5yOVHHL06HOIlUqvPdJ8R2QtwShHi5 iRQ4SQ44 =+1XC -----END PGP SIGNATURE----- --Wcg4xOPTM6D+SSuh--