]> git.sur5r.net Git - u-boot/commitdiff
spl: replace CONFIG_SPL_SPI_* with CONFIG_SF_DEFAULT_*
authorNikita Kiryanov <nikita@compulab.co.il>
Wed, 20 Aug 2014 12:08:48 +0000 (15:08 +0300)
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Wed, 24 Sep 2014 12:10:10 +0000 (17:40 +0530)
Currently, CONFIG_SPL_SPI_* #defines are used for controlling SPI boot in
SPL. These #defines do not allow the user to select SPI mode for the SPI flash
(there's no CONFIG_SPL_SPI_MODE, so the SPI mode is hardcoded in
spi_spl_load.c), and duplicate information already provided by
CONFIG_SF_DEFAULT_* #defines.

Kill CONFIG_SPL_SPI_*, and use CONFIG_SF_DEFAULT_* instead.

Cc: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Vitaly Andrianov <vitalya@ti.com>
Cc: Lars Poeschel <poeschel@lemonage.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Hannes Petermaier <hannes.petermaier@br-automation.com>
Cc: Michal Simek <monstr@monstr.eu>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 files changed:
common/cmd_sf.c
drivers/mtd/spi/spi_spl_load.c
include/configs/am335x_evm.h
include/configs/da850evm.h
include/configs/dra7xx_evm.h
include/configs/ks2_evm.h
include/configs/pcm051.h
include/configs/sama5d3xek.h
include/configs/siemens-am33x-common.h
include/configs/tseries.h
include/configs/zynq-common.h
include/spi_flash.h

index b4ceb71466389ab76120774170cfa7f1ac2ca10f..c60e8d10df6e1ad244a154a795bff79a4d51c8df 100644 (file)
 
 #include <asm/io.h>
 
-#ifndef CONFIG_SF_DEFAULT_SPEED
-# define CONFIG_SF_DEFAULT_SPEED       1000000
-#endif
-#ifndef CONFIG_SF_DEFAULT_MODE
-# define CONFIG_SF_DEFAULT_MODE                SPI_MODE_3
-#endif
-#ifndef CONFIG_SF_DEFAULT_CS
-# define CONFIG_SF_DEFAULT_CS          0
-#endif
-#ifndef CONFIG_SF_DEFAULT_BUS
-# define CONFIG_SF_DEFAULT_BUS         0
-#endif
-
 static struct spi_flash *flash;
 
 
index 1954b7e8860f411f97825caa93735f2c054e839e..59cca0f4d998d1d6b87f9b7ca0a16180f8840bcd 100644 (file)
@@ -56,8 +56,10 @@ void spl_spi_load_image(void)
         * Load U-Boot image from SPI flash into RAM
         */
 
-       flash = spi_flash_probe(CONFIG_SPL_SPI_BUS, CONFIG_SPL_SPI_CS,
-                               CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);
+       flash = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,
+                               CONFIG_SF_DEFAULT_CS,
+                               CONFIG_SF_DEFAULT_SPEED,
+                               CONFIG_SF_DEFAULT_MODE);
        if (!flash) {
                puts("SPI probe failed.\n");
                hang();
index aef0ad3fbe955fd09f1f4e92b2c4665bd73cd817..8fd71fc028667555772397a0007115faee608e5b 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
 
 #define CONFIG_ENV_IS_IN_SPI_FLASH
index 1252d7a54a921f9734ca4c4a0d6f5543f1ca7079..5f857557375232948f9c4b26e23a08013483cb1c 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS 0
-#define CONFIG_SPL_SPI_CS 0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
 #endif
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS 0
-#define CONFIG_SPL_SPI_CS 0
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
index 4143a4ddeb4283ed1473128f9ca850ecc5a26d7e..2eaabdefeea6b791fc8f4cee5e72b220a47773c7 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000
 
 #define CONFIG_SUPPORT_EMMC_BOOT
index 43db581c75deed9ceb00e9ae04eadda6abea0a4d..51926f721f17e6305d408dfe2e08d1816e97a5cd 100644 (file)
@@ -58,8 +58,6 @@
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     CONFIG_SPL_PAD_TO
 #define CONFIG_SPL_FRAMEWORK
 
index 5efcd7613f12d345519893ad212e9ddfde13c3eb..7d102a46996098308dcb09b15ec3d64a8fd791ba 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
 #endif
index 0104d5f90a9bdc24ab2a9088bc9e255386cd43a5..c46baf254f18b7a2c82ff2a0b42b10b601e21b8a 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8400
 
 #endif
index b8fb77e8137eda44dd21b610c2aa6c5b0cb1040e..bf9752f874249d485a032f1b21a680bb8d89fe25 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
 
 #define CONFIG_SPL_LDSCRIPT            "$(CPUDIR)/am33xx/u-boot-spl.lds"
index 1dd13fd1b071ad6b021c889092c2e688a0cfeb38..9a6207048cdc4dacc538d82dce313cd885ee8301 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_BUS             0
-#define CONFIG_SPL_SPI_CS              0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
 #undef CONFIG_ENV_IS_NOWHERE
 #define CONFIG_ENV_IS_IN_SPI_FLASH
index 875cb43f15b8d284272aece7ce16251cba61e777..4c7a7b009ef6e0a529ef582c1e4a1a241ea8562f 100644 (file)
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
-#define CONFIG_SPL_SPI_BUS     0
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x100000
-#define CONFIG_SPL_SPI_CS      0
 #endif
 
 /* for booting directly linux */
index 2db53c74c88efa794eeacab10220d49d56bd0a31..408a5b401cd91e66e88b84eab5c1dcef97681522 100644 (file)
 #include <linux/types.h>
 #include <linux/compiler.h>
 
+#ifndef CONFIG_SF_DEFAULT_SPEED
+# define CONFIG_SF_DEFAULT_SPEED       1000000
+#endif
+#ifndef CONFIG_SF_DEFAULT_MODE
+# define CONFIG_SF_DEFAULT_MODE                SPI_MODE_3
+#endif
+#ifndef CONFIG_SF_DEFAULT_CS
+# define CONFIG_SF_DEFAULT_CS          0
+#endif
+#ifndef CONFIG_SF_DEFAULT_BUS
+# define CONFIG_SF_DEFAULT_BUS         0
+#endif
+
 /* sf param flags */
 #define SECT_4K                1 << 1
 #define SECT_32K       1 << 2