From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 14 Nov 2016 12:03:59 -0500 Subject: [U-Boot] [PATCH 3/7] sunxi: Enable UBI and NAND support In-Reply-To: <72ae8842-6bce-5757-5e2c-be9d418e7a9a@redhat.com> References: <6c44b7aa93af6ffd76d4d0bee5713f087e082c62.1478621974.git-series.maxime.ripard@free-electrons.com> <49cb76e1-cd3c-c912-8acf-74e98377f199@redhat.com> <20161114141237.pbvskuy76zbyv2iz@lukather> <72ae8842-6bce-5757-5e2c-be9d418e7a9a@redhat.com> Message-ID: <20161114170359.GK27304@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Nov 14, 2016 at 03:21:41PM +0100, Hans de Goede wrote: > Hi, > > On 14-11-16 15:12, Maxime Ripard wrote: > >On Mon, Nov 14, 2016 at 12:18:06PM +0100, Hans de Goede wrote: > >>> #ifdef CONFIG_SPL_SPI_SUNXI > >>>@@ -143,7 +157,14 @@ > >>> #define CONFIG_GENERIC_MMC > >>> #define CONFIG_MMC_SUNXI > >>> #define CONFIG_MMC_SUNXI_SLOT 0 > >>>-#define CONFIG_ENV_IS_IN_MMC > >>>+#endif > >>>+ > >>>+#if defined(CONFIG_ENV_IS_IN_NAND) > >>>+#define CONFIG_ENV_OFFSET 0xc00000 > >>>+#define CONFIG_ENV_SIZE 0x400000 > >>>+#elif defined(CONFIG_ENV_IS_IN_MMC) > >>>+#define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */ > >>>+#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ > >>> #define CONFIG_SYS_MMC_ENV_DEV 0 /* first detected MMC controller */ > >>> #endif > > > >Oh, and this part is broken. It relies on the fact that all board > >define ENV_IS_IN_MMC (which they should), while obviously they > >don't. I'm not exactly sure about what the proper fix would be. > > Yes, this has been a known problem for a while, but never > became an issue due to lack of NAND support. > > My preferred way for dealing with this be would for the > environment code in u-boot allowing to build in multiple > back-ends and use spl_boot_device() which then would need > to loose its spl prefix. For the CHIP devices I'm sure > you can come up with a simpler fix since those don't > have an sdcard-slot. But for other boards this will be > necessary as we really don't want to have separate > nand and mmc u-boot.bin files. > > Anyways this is something for whomever will take over > as sunxi custodian from me. Maybe someone from free-electrons > can co-maintain with Jagan ? I would really like to see the co-maintainer model continue here, if possible, yes. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: