Browse Source

common: env_sf: Use CONFIG_SF_DEFAULT_xxx as the default value for CONFIG_ENV_SPI_xxx

The default values for the configuration defines CONFIG_ENV_SPI_xxx are
arbitrary values. It makes more sense to set them to the values used by
the sf command.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Jean-Jacques Hiblot 8 years ago
parent
commit
2e4e5ad4c8
1 changed files with 4 additions and 4 deletions
  1. 4 4
      common/env_sf.c

+ 4 - 4
common/env_sf.c

@@ -19,16 +19,16 @@
 #include <dm/device-internal.h>
 #include <dm/device-internal.h>
 
 
 #ifndef CONFIG_ENV_SPI_BUS
 #ifndef CONFIG_ENV_SPI_BUS
-# define CONFIG_ENV_SPI_BUS	0
+# define CONFIG_ENV_SPI_BUS	CONFIG_SF_DEFAULT_BUS
 #endif
 #endif
 #ifndef CONFIG_ENV_SPI_CS
 #ifndef CONFIG_ENV_SPI_CS
-# define CONFIG_ENV_SPI_CS	0
+# define CONFIG_ENV_SPI_CS	CONFIG_SF_DEFAULT_CS
 #endif
 #endif
 #ifndef CONFIG_ENV_SPI_MAX_HZ
 #ifndef CONFIG_ENV_SPI_MAX_HZ
-# define CONFIG_ENV_SPI_MAX_HZ	1000000
+# define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED
 #endif
 #endif
 #ifndef CONFIG_ENV_SPI_MODE
 #ifndef CONFIG_ENV_SPI_MODE
-# define CONFIG_ENV_SPI_MODE	SPI_MODE_3
+# define CONFIG_ENV_SPI_MODE	CONFIG_SF_DEFAULT_MODE
 #endif
 #endif
 
 
 #ifdef CONFIG_ENV_OFFSET_REDUND
 #ifdef CONFIG_ENV_OFFSET_REDUND