@@ -1084,22 +1084,6 @@ config SPL_SPI_SUNXI
sunxi SPI Flash. It uses the same method as the boot ROM, so does
not need any extra configuration.
-config SPL_SPI_SUNXI_NAND
- bool "Support for SPI NAND Flash on Allwinner SoCs in SPL"
- depends on SPL_SPI_SUNXI
- help
- Enable support for SPI NAND Flash. This option allows SPL to mimic
- Allwinner boot ROM's behavior to gain support for SPI NAND Flash;
- a fixed page size needs to be assumed when building the SPL image.
-
-config SPL_SPI_SUNXI_NAND_ASSUMED_PAGESIZE
- hex "Assumed pagesize for SPI NAND Flash in SPL"
- depends on SPL_SPI_SUNXI_NAND
- default 0x400 if MACH_SUNIV
- help
- Set the page size assumed by the SPL SPI NAND code, the default
- value is the same with the boot ROM.
-
config PINE64_DT_SELECTION
bool "Enable Pine64 device tree selection code"
depends on MACH_SUN50I
@@ -344,7 +344,7 @@ static void spi0_xfer(const u8 *txbuf, u32 txlen, u8 *rxbuf, u32 rxlen)
}
}
-#if defined(CONFIG_SPL_SPI_SUNXI_NAND)
+#if defined(CONFIG_SPL_SPINAND_SUPPORT)
static int spi0_nand_switch_page(u32 page)
{
unsigned count;
@@ -430,11 +430,11 @@ static ulong spi_load_read_nor(struct spl_load_info *load, ulong sector,
return count;
}
-#if defined(CONFIG_SPL_SPI_SUNXI_NAND)
+#if defined(CONFIG_SPL_SPINAND_SUPPORT)
static ulong spi_load_read_nand(struct spl_load_info *load, ulong sector,
ulong count, void *buf)
{
- const ulong pagesize = CONFIG_SPL_SPI_SUNXI_NAND_ASSUMED_PAGESIZE;
+ const ulong pagesize = CONFIG_SPL_SPINAND_PAGE_SIZE;
ulong remain = count;
while (remain) {
@@ -501,7 +501,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
spi0_init();
switch (bootdev->boot_device) {
-#if defined(CONFIG_SPL_SPI_SUNXI_NAND)
+#if defined(CONFIG_SPL_SPINAND_SUPPORT)
case BOOT_DEVICE_SPINAND:
spi0_nand_reset();
load.read = spi_load_read_nand;
@@ -524,6 +524,6 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
/* Use priorty 0 to override the default if it happens to be linked in */
SPL_LOAD_IMAGE_METHOD("sunxi SPI", 0, BOOT_DEVICE_SPI, spl_spi_load_image);
-#if IS_ENABLED(CONFIG_SPL_SPI_SUNXI_NAND)
+#if IS_ENABLED(CONFIG_SPL_SPINAND_SUPPORT)
SPL_LOAD_IMAGE_METHOD("sunxi SPI NAND", 0, BOOT_DEVICE_SPINAND, spl_spi_load_image);
#endif
Use the newly created SPL_SPINAND configuration options instead of sunxi-only options. No backwards compatibility is needed as the SPI NAND patches are not mainline yet. Signed-off-by: John Watts <contact@jookia.org> --- arch/arm/mach-sunxi/Kconfig | 16 ---------------- arch/arm/mach-sunxi/spl_spi_sunxi.c | 10 +++++----- 2 files changed, 5 insertions(+), 21 deletions(-)