summaryrefslogtreecommitdiff
path: root/include/spi_flash.h
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2014-08-20 15:08:48 +0300
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2014-09-24 17:40:10 +0530
commit88e34e5ff76bffa7d56b1d04e0bd2627ee5b584d (patch)
tree21f57c987853c8946082e82a8ccd2907af0f207a /include/spi_flash.h
parent155fa9af95ac5be857a7327e7a968a296e60d4c8 (diff)
downloadu-boot-imx-88e34e5ff76bffa7d56b1d04e0bd2627ee5b584d.zip
u-boot-imx-88e34e5ff76bffa7d56b1d04e0bd2627ee5b584d.tar.gz
u-boot-imx-88e34e5ff76bffa7d56b1d04e0bd2627ee5b584d.tar.bz2
spl: replace CONFIG_SPL_SPI_* with CONFIG_SF_DEFAULT_*
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>
Diffstat (limited to 'include/spi_flash.h')
-rw-r--r--include/spi_flash.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 2db53c7..408a5b4 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -19,6 +19,19 @@
#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