Skip to contentSkip to conversation

configs: at91: Remove value of CONFIG_SYS_EXTRA_OPTIONS option

PATCH Superseded Wenyou Yang 1 participant 6 messages Sep 6, 2017

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover configs: at91: Remove value of CONFIG_SYS_EXTRA_OPTIONS option

The CONFIG_SYS_EXTRA_OPTIONS option is deprecated, remove the value of this option from the board default config files.

Changes in v2:
- Rebase the uboot/master (84a42069f253).

Wenyou Yang (5):
ARM: at91: Move CONFIG_AT91FAMILY option to Kconfig
ARM: at91: Add the SoC options to Kconfig
ARM: at91: Remove hardware.h included in configs
ARM: at91: spl: Add macro CONFIG_XXXX_BOOT support
configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignment

 arch/arm/mach-at91/Kconfig                      | 109 ++++++++++++++++++------
 arch/arm/mach-at91/atmel_sfr.c                  |   1 +
 arch/arm/mach-at91/include/mach/at91rm9200.h    |   1 -
 arch/arm/mach-at91/include/mach/at91sam9260.h   |   5 --
 arch/arm/mach-at91/include/mach/at91sam9261.h   |   5 --
 arch/arm/mach-at91/include/mach/at91sam9263.h   |   5 --
 arch/arm/mach-at91/include/mach/at91sam9g45.h   |   5 --
 arch/arm/mach-at91/include/mach/at91sam9rl.h    |   5 --
 arch/arm/mach-at91/include/mach/at91sam9x5.h    |   2 -
 arch/arm/mach-at91/include/mach/sama5d2.h       |   5 --
 arch/arm/mach-at91/include/mach/sama5d3.h       |   5 --
 arch/arm/mach-at91/include/mach/sama5d4.h       |   5 --
 arch/arm/mach-at91/matrix.c                     |   1 +
 arch/arm/mach-at91/phy.c                        |   1 +
 arch/arm/mach-at91/spl.c                        |  16 ++--
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   4 +-
 board/atmel/at91sam9n12ek/at91sam9n12ek.c       |   6 +-
 board/atmel/at91sam9x5ek/at91sam9x5ek.c         |   4 +-
 board/atmel/sama5d2_ptc/sama5d2_ptc.c           |   4 +-
 board/atmel/sama5d3_xplained/sama5d3_xplained.c |   4 +-
 board/atmel/sama5d3xek/sama5d3xek.c             |   2 +-
 board/atmel/sama5d4_xplained/sama5d4_xplained.c |   2 +-
 board/atmel/sama5d4ek/sama5d4ek.c               |   2 +-
 configs/at91sam9m10g45ek_mmc_defconfig          |   2 +-
 configs/at91sam9m10g45ek_nandflash_defconfig    |   2 +-
 configs/at91sam9n12ek_mmc_defconfig             |   2 +-
 configs/at91sam9n12ek_nandflash_defconfig       |   2 +-
 configs/at91sam9n12ek_spiflash_defconfig        |   2 +-
 configs/at91sam9x5ek_dataflash_defconfig        |   2 +-
 configs/at91sam9x5ek_mmc_defconfig              |   2 +-
 configs/at91sam9x5ek_nandflash_defconfig        |   2 +-
 configs/at91sam9x5ek_spiflash_defconfig         |   2 +-
 configs/ma5d4evk_defconfig                      |   2 +-
 configs/sama5d2_ptc_nandflash_defconfig         |   2 +-
 configs/sama5d2_ptc_spiflash_defconfig          |   2 +-
 configs/sama5d2_xplained_mmc_defconfig          |   1 +
 configs/sama5d2_xplained_spiflash_defconfig     |   2 +-
 configs/sama5d36ek_cmp_mmc_defconfig            |   2 +-
 configs/sama5d36ek_cmp_nandflash_defconfig      |   2 +-
 configs/sama5d36ek_cmp_spiflash_defconfig       |   2 +-
 configs/sama5d3_xplained_mmc_defconfig          |   2 +-
 configs/sama5d3_xplained_nandflash_defconfig    |   2 +-
 configs/sama5d3xek_mmc_defconfig                |   2 +-
 configs/sama5d3xek_nandflash_defconfig          |   2 +-
 configs/sama5d3xek_spiflash_defconfig           |   2 +-
 configs/sama5d4_xplained_mmc_defconfig          |   2 +-
 configs/sama5d4_xplained_nandflash_defconfig    |   2 +-
 configs/sama5d4_xplained_spiflash_defconfig     |   2 +-
 configs/sama5d4ek_mmc_defconfig                 |   2 +-
 configs/sama5d4ek_nandflash_defconfig           |   2 +-
 configs/sama5d4ek_spiflash_defconfig            |   2 +-
 configs/vinco_defconfig                         |   2 +-
 drivers/pinctrl/pinctrl-at91.c                  |   1 +
 include/configs/at91-sama5_common.h             |   8 +-
 include/configs/at91sam9m10g45ek.h              |  12 ++-
 include/configs/at91sam9n12ek.h                 |  28 +++---
 include/configs/at91sam9x5ek.h                  |  25 +++---
 include/configs/ma5d4evk.h                      |   9 +-
 include/configs/sama5d2_ptc.h                   |  18 ++--
 include/configs/sama5d2_xplained.h              |   8 +-
 include/configs/sama5d3_xplained.h              |  23 ++---
 include/configs/sama5d3xek.h                    |  31 +++----
 include/configs/sama5d4_xplained.h              |  25 ++----
 include/configs/sama5d4ek.h                     |  26 ++----
 include/configs/vinco.h                         |  13 +--
 65 files changed, 233 insertions(+), 250 deletions(-)
Signature · 1 line
2.13.0
#1 lore raw

PATCH v2 1/5 ARM: at91: Move CONFIG_AT91FAMILY option to Kconfig

From: Wenyou Yang <[email protected]>

Move the CONFIG_AT91FAMILY option from include/mach/<soc>.h header file to Kconfig.

---

Changes in v2: None

 arch/arm/mach-at91/Kconfig                    | 3 +++
 arch/arm/mach-at91/include/mach/at91rm9200.h  | 1 -
 arch/arm/mach-at91/include/mach/at91sam9260.h | 5 -----
 arch/arm/mach-at91/include/mach/at91sam9261.h | 5 -----
 arch/arm/mach-at91/include/mach/at91sam9263.h | 5 -----
 arch/arm/mach-at91/include/mach/at91sam9g45.h | 5 -----
 arch/arm/mach-at91/include/mach/at91sam9rl.h  | 5 -----
 arch/arm/mach-at91/include/mach/at91sam9x5.h  | 2 --
 arch/arm/mach-at91/include/mach/sama5d2.h     | 5 -----
 arch/arm/mach-at91/include/mach/sama5d3.h     | 5 -----
 arch/arm/mach-at91/include/mach/sama5d4.h     | 5 -----
 11 files changed, 3 insertions(+), 43 deletions(-)
arch/arm/mach-at91/Kconfig +3 -0
index 20f7eeaf09..2ca551044b 100644
@@ -1,5 +1,8 @@
 if ARCH_AT91
 
+config AT91FAMILY
+	def_bool y
+
 choice
 	prompt "Atmel AT91 board select"
 	optional
arch/arm/mach-at91/include/mach/at91rm9200.h +0 -1
index d177bdcae5..d15fb7a292 100644
@@ -6,7 +6,6 @@
 #ifndef __AT91RM9200_H__
 #define __AT91RM9200_H__
 
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 family */
 #define CONFIG_ARCH_CPU_INIT	/* we need arch_cpu_init() for hw timers */
 #define CONFIG_AT91_GPIO	/* and require always gpio features */
 
arch/arm/mach-at91/include/mach/at91sam9260.h +0 -5
index 1a4e84b050..24d5dbd68a 100644
@@ -19,11 +19,6 @@
 #define AT91SAM9260_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* Advanced Interrupt Controller (FIQ) */
arch/arm/mach-at91/include/mach/at91sam9261.h +0 -5
index 914a3b0460..06403ce225 100644
@@ -19,11 +19,6 @@
 #define AT91SAM9261_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* Advanced Interrupt Controller (FIQ) */
arch/arm/mach-at91/include/mach/at91sam9263.h +0 -5
index 71675abf82..be9a665db5 100644
@@ -15,11 +15,6 @@
 #define AT91SAM9263_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* Advanced Interrupt Controller (FIQ) */
arch/arm/mach-at91/include/mach/at91sam9g45.h +0 -5
index 5c32e24ed0..96922c4e6b 100644
@@ -13,11 +13,6 @@
 #define AT91SAM9G45_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* Advanced Interrupt Controller (FIQ) */
arch/arm/mach-at91/include/mach/at91sam9rl.h +0 -5
index 70bbf4edaa..8f9155c9ea 100644
@@ -15,11 +15,6 @@
 #define AT91SAM9RL_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* Advanced Interrupt Controller (FIQ) */
arch/arm/mach-at91/include/mach/at91sam9x5.h +0 -2
index e7224e432d..f9710a172f 100644
@@ -12,8 +12,6 @@
 #ifndef __AT91SAM9X5_H__
 #define __AT91SAM9X5_H__
 
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 family */
-
 /*
  * Peripheral identifiers/interrupts.
  */
arch/arm/mach-at91/include/mach/sama5d2.h +0 -5
index 25c85411e5..2ee3d68db3 100644
@@ -11,11 +11,6 @@
 #define __SAMA5D2_H
 
 /*
- * definitions to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* It's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ		0	/* FIQ Interrupt ID */
arch/arm/mach-at91/include/mach/sama5d3.h +0 -5
index d558f95141..0d32e3900f 100644
@@ -14,11 +14,6 @@
 #define SAMA5D3_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* Advanced Interrupt Controller (FIQ) */
arch/arm/mach-at91/include/mach/sama5d4.h +0 -5
index 78cc2a7a0a..7e2657faeb 100644
@@ -11,11 +11,6 @@
 #define __SAMA5D4_H
 
 /*
- * defines to be used in other places
- */
-#define CONFIG_AT91FAMILY	/* It's a member of AT91 */
-
-/*
  * Peripheral identifiers/interrupts.
  */
 #define ATMEL_ID_FIQ	0	/* FIQ Interrupt */
Signature · 1 line
2.13.0
#2 lore raw

PATCH v2 2/5 ARM: at91: Add the SoC options to Kconfig

In reply to Wenyou Yang

From: Wenyou Yang <[email protected]>

To prepare to remove the SoCs options such as SAMA5D2, SAMA5D3 and SAMA5D4 from the CONFIG_SYS_EXTRA_OPTIONS option which is deprecated, add the SoC options to Kconfig.

---

Changes in v2: None

 arch/arm/mach-at91/Kconfig | 106 +++++++++++++++++++++++++++++++++------------
 1 file changed, 79 insertions(+), 27 deletions(-)
arch/arm/mach-at91/Kconfig +79 -27
index 2ca551044b..5dc4dcc4fe 100644
@@ -3,6 +3,58 @@ if ARCH_AT91
 config AT91FAMILY
 	def_bool y
 
+config AT91SAM9260
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9G20
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9XE
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9261
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9263
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9G45
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9M10G45
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9N12
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9RL
+	bool
+	select CPU_ARM926EJS
+
+config AT91SAM9X5
+	bool
+	select CPU_ARM926EJS
+
+config SAMA5D2
+	bool
+	select CPU_V7
+
+config SAMA5D3
+	bool
+	select CPU_V7
+
+config SAMA5D4
+	bool
+	select CPU_V7
+
 choice
 	prompt "Atmel AT91 board select"
 	optional
@@ -13,24 +65,24 @@ config TARGET_AT91RM9200EK
 
 config TARGET_AT91SAM9260EK
 	bool "Atmel at91sam9260 reference board"
-	select CPU_ARM926EJS
+	select AT91SAM9260
 	select BOARD_EARLY_INIT_F
 
 config TARGET_ETHERNUT5
 	bool "Ethernut5 board"
-	select CPU_ARM926EJS
+	select AT91SAM9XE
 
 config TARGET_SNAPPER9260
 	bool "Support snapper9260"
-	select CPU_ARM926EJS
+	select AT91SAM9260
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_GURNARD
 	bool "Support gurnard"
+	select AT91SAM9G45
 	select BOARD_LATE_INIT
-	select CPU_ARM926EJS
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
@@ -38,107 +90,107 @@ config TARGET_GURNARD
 
 config TARGET_AT91SAM9261EK
 	bool "Atmel at91sam9261 reference board"
-	select CPU_ARM926EJS
+	select AT91SAM9261
 	select BOARD_EARLY_INIT_F
 
 config TARGET_PM9261
 	bool "Ronetix pm9261 board"
-	select CPU_ARM926EJS
+	select AT91SAM9261
 
 config TARGET_AT91SAM9263EK
 	bool "Atmel at91sam9263 reference board"
-	select CPU_ARM926EJS
+	select AT91SAM9263
 	select BOARD_EARLY_INIT_F
 
 config TARGET_USB_A9263
 	bool "Caloa USB A9260 board"
-	select CPU_ARM926EJS
+	select AT91SAM9263
 
 config TARGET_PM9263
 	bool "Ronetix pm9263 board"
-	select CPU_ARM926EJS
+	select AT91SAM9263
 
 config TARGET_AT91SAM9M10G45EK
 	bool "Atmel AT91SAM9M10G45-EK board"
-	select CPU_ARM926EJS
+	select AT91SAM9M10G45
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_PM9G45
 	bool "Ronetix pm9g45 board"
-	select CPU_ARM926EJS
+	select AT91SAM9G45
 
 config TARGET_PICOSAM9G45
 	bool "Mini-box picosam9g45 board"
-	select CPU_ARM926EJS
+	select AT91SAM9M10G45
 	select SUPPORT_SPL
 
 config TARGET_AT91SAM9N12EK
 	bool "Atmel AT91SAM9N12-EK board"
-	select CPU_ARM926EJS
+	select AT91SAM9N12
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_AT91SAM9RLEK
 	bool "Atmel at91sam9rl reference board"
-	select CPU_ARM926EJS
+	select AT91SAM9RL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_AT91SAM9X5EK
 	bool "Atmel AT91SAM9X5-EK board"
-	select CPU_ARM926EJS
+	select AT91SAM9X5
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_SAMA5D2_PTC
 	bool "SAMA5D2 PTC board"
-	select CPU_V7
+	select SAMA5D2
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_SAMA5D2_XPLAINED
 	bool "SAMA5D2 Xplained board"
-	select CPU_V7
+	select SAMA5D2
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_SAMA5D3_XPLAINED
 	bool "SAMA5D3 Xplained board"
-	select CPU_V7
+	select SAMA5D3
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_SAMA5D3XEK
 	bool "SAMA5D3X-EK board"
+	select SAMA5D3
 	select BOARD_LATE_INIT
-	select CPU_V7
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_SAMA5D4_XPLAINED
 	bool "SAMA5D4 Xplained board"
-	select CPU_V7
+	select SAMA5D4
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_SAMA5D4EK
 	bool "SAMA5D4 Evaluation Kit"
-	select CPU_V7
+	select SAMA5D4
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 
 config TARGET_MA5D4EVK
 	bool "Aries MA5D4EVK Evaluation Kit"
-	select CPU_V7
+	select SAMA5D4
 	select SUPPORT_SPL
 
 config TARGET_MEESC
 	bool "Support meesc"
-	select CPU_ARM926EJS
+	select AT91SAM9263
 
 config TARGET_CORVUS
 	bool "Support corvus"
-	select CPU_ARM926EJS
+	select AT91SAM9M10G45
 	select SUPPORT_SPL
 	select DM
 	select DM_SERIAL
@@ -147,7 +199,7 @@ config TARGET_CORVUS
 
 config TARGET_TAURUS
 	bool "Support taurus"
-	select CPU_ARM926EJS
+	select AT91SAM9G20
 	select SUPPORT_SPL
 	select DM
 	select DM_SERIAL
@@ -156,7 +208,7 @@ config TARGET_TAURUS
 
 config TARGET_SMARTWEB
 	bool "Support smartweb"
-	select CPU_ARM926EJS
+	select AT91SAM9260
 	select SUPPORT_SPL
 	select DM
 	select DM_SERIAL
@@ -165,7 +217,7 @@ config TARGET_SMARTWEB
 
 config TARGET_VINCO
 	bool "Support VINCO"
-	select CPU_V7
+	select SAMA5D4
 	select SUPPORT_SPL
 
 endchoice
Signature · 1 line
2.13.0
#3 lore raw

PATCH v2 3/5 ARM: at91: Remove hardware.h included in configs

In reply to Wenyou Yang

From: Wenyou Yang <[email protected]>

As said in READRE.kconfig, include/configs/*.h will be removed after all options are switched to Kconfig. As the first step, remove the follow line from include/configs/*.h.

#include <asm/hardware.h>

---

Changes in v2: None

 arch/arm/mach-at91/atmel_sfr.c      |  1 +
 arch/arm/mach-at91/matrix.c         |  1 +
 arch/arm/mach-at91/phy.c            |  1 +
 drivers/pinctrl/pinctrl-at91.c      |  1 +
 include/configs/at91-sama5_common.h |  2 --
 include/configs/at91sam9m10g45ek.h  |  4 +---
 include/configs/at91sam9n12ek.h     |  8 +-------
 include/configs/at91sam9x5ek.h      |  2 --
 include/configs/ma5d4evk.h          |  9 ++++++---
 include/configs/sama5d2_ptc.h       | 10 ++++++----
 include/configs/sama5d2_xplained.h  |  2 +-
 include/configs/sama5d3_xplained.h  | 10 +++++-----
 include/configs/sama5d3xek.h        |  8 ++++----
 include/configs/sama5d4_xplained.h  |  4 ++--
 include/configs/sama5d4ek.h         |  4 ++--
 include/configs/vinco.h             | 11 +++++++----
 16 files changed, 39 insertions(+), 39 deletions(-)
arch/arm/mach-at91/atmel_sfr.c +1 -0
index adf44c6a94..d595ba8836 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/arch/sama5_sfr.h>
 
arch/arm/mach-at91/matrix.c +1 -0
index 57d72700d3..08659c87d4 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/arch/sama5_matrix.h>
 
arch/arm/mach-at91/phy.c +1 -0
index ddd70f5ff0..adb761e1ac 100644
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <asm/hardware.h>
 #include <asm/io.h>
 #include <linux/sizes.h>
 #include <asm/arch/at91_rstc.h>
drivers/pinctrl/pinctrl-at91.c +1 -0
index 38c435e37a..81f30eabe9 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <asm/hardware.h>
 #include <linux/io.h>
 #include <linux/err.h>
 #include <mach/at91_pio.h>
include/configs/at91-sama5_common.h +0 -2
index ff17b4eb4b..435c7dfa8e 100644
@@ -10,8 +10,6 @@
 #ifndef __AT91_SAMA5_COMMON_H
 #define __AT91_SAMA5_COMMON_H
 
-#include <asm/hardware.h>
-
 #define CONFIG_SYS_TEXT_BASE		0x26f00000
 
 /* ARM asynchronous clock */
include/configs/at91sam9m10g45ek.h +1 -3
index 22db94772d..36acaa5506 100644
@@ -11,8 +11,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/hardware.h>
-
 #define CONFIG_SYS_TEXT_BASE		0x73f00000
 
 #define CONFIG_ATMEL_LEGACY		/* required until (g)pio is fixed */
@@ -52,7 +50,7 @@
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_CS6
+#define CONFIG_SYS_SDRAM_BASE           0x70000000
 #define CONFIG_SYS_SDRAM_SIZE		0x08000000
 
 #define CONFIG_SYS_INIT_SP_ADDR \
include/configs/at91sam9n12ek.h +1 -7
index 7d70d8892a..c9adcf9754 100644
@@ -10,12 +10,6 @@
 #ifndef __AT91SAM9N12_CONFIG_H_
 #define __AT91SAM9N12_CONFIG_H_
 
-/*
- * SoC must be defined first, before hardware.h is included.
- * In this case SoC is defined in boards.cfg.
- */
-#include <asm/hardware.h>
-
 #define CONFIG_SYS_TEXT_BASE		0x26f00000
 
 /* ARM asynchronous clock */
@@ -55,7 +49,7 @@
  * that address while providing maximum stack area below.
  */
 # define CONFIG_SYS_INIT_SP_ADDR \
-	(ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
+	(0x00300000 + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* DataFlash */
 #ifdef CONFIG_CMD_SF
include/configs/at91sam9x5ek.h +0 -2
index c50e0b816f..eb798442ca 100644
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_H__
 #define __CONFIG_H__
 
-#include <asm/hardware.h>
-
 #define CONFIG_SYS_TEXT_BASE		0x26f00000
 
 /* ARM asynchronous clock */
include/configs/ma5d4evk.h +6 -3
index 50b21c9d97..0fe1bc1c1d 100644
@@ -14,11 +14,14 @@
 #define CONFIG_SYS_USE_SERIALFLASH	1
 #define CONFIG_BOARD_LATE_INIT
 
+/* Timer */
+#define CONFIG_SYS_TIMER_COUNTER	0xfc06863c
+
 /*
  * Memory configurations
  */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE		0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x10000000
 
 #ifdef CONFIG_SPL_BUILD
@@ -45,8 +48,8 @@
  * Serial Driver
  */
 #define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE		ATMEL_BASE_USART0
-#define CONFIG_USART_ID			ATMEL_ID_USART0
+#define CONFIG_USART_BASE		0xf802c000
+#define CONFIG_USART_ID			6
 
 /*
  * Ethernet
include/configs/sama5d2_ptc.h +6 -4
index b04781893d..75a81f1473 100644
@@ -14,12 +14,14 @@
 
 /* serial console */
 #define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE		ATMEL_BASE_UART0
-#define CONFIG_USART_ID			ATMEL_ID_UART0
+#define CONFIG_USART_BASE		0xf801c000
+#define CONFIG_USART_ID			24
 
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE		0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x20000000
 
+#define CONFIG_SYS_TIMER_COUNTER	0xf804803c
+
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_INIT_SP_ADDR		0x210000
 #else
@@ -48,7 +50,7 @@
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_ATMEL
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3
+#define CONFIG_SYS_NAND_BASE		0x80000000
 /* our ALE is AD21 */
 #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
 /* our CLE is AD22 */
include/configs/sama5d2_xplained.h +1 -1
index 9ceb91924d..2a9e9729d1 100644
@@ -16,7 +16,7 @@
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE           0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x20000000
 
 #ifdef CONFIG_SPL_BUILD
include/configs/sama5d3_xplained.h +5 -5
index 05600c81ff..54ea98d454 100644
@@ -16,16 +16,16 @@
  * This needs to be defined for the OHCI code to work but it is defined as
  * ATMEL_ID_UHPHS in the CPU specific header files.
  */
-#define ATMEL_ID_UHP			ATMEL_ID_UHPHS
+#define ATMEL_ID_UHP			32
 
 /*
  * Specify the clock enable bit in the PMC_SCER register.
  */
-#define ATMEL_PMC_UHP			AT91SAM926x_PMC_UHP
+#define ATMEL_PMC_UHP			(1 <<  6)
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE           0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x10000000
 
 #ifdef CONFIG_SPL_BUILD
@@ -39,7 +39,7 @@
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_ATMEL
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3
+#define CONFIG_SYS_NAND_BASE		0x60000000
 /* our ALE is AD21 */
 #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
 /* our CLE is AD22 */
@@ -62,7 +62,7 @@
 #define CONFIG_USB_ATMEL_CLK_SEL_UPLL
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_SYS_USB_OHCI_CPU_INIT
-#define CONFIG_SYS_USB_OHCI_REGS_BASE		ATMEL_BASE_OHCI
+#define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00600000
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"SAMA5D3 Xplained"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
 #endif
include/configs/sama5d3xek.h +4 -4
index 29b7e8b50a..a7223e2cf0 100644
@@ -21,12 +21,12 @@
  * This needs to be defined for the OHCI code to work but it is defined as
  * ATMEL_ID_UHPHS in the CPU specific header files.
  */
-#define ATMEL_ID_UHP			ATMEL_ID_UHPHS
+#define ATMEL_ID_UHP			32
 
 /*
  * Specify the clock enable bit in the PMC_SCER register.
  */
-#define ATMEL_PMC_UHP			AT91SAM926x_PMC_UHP
+#define ATMEL_PMC_UHP			(1 <<  6)
 
 /* LCD */
 #define LCD_BPP				LCD_COLOR16
@@ -52,7 +52,7 @@
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE           0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x20000000
 
 #ifdef CONFIG_SPL_BUILD
@@ -72,7 +72,7 @@
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_ATMEL
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3
+#define CONFIG_SYS_NAND_BASE		0x60000000
 /* our ALE is AD21 */
 #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
 /* our CLE is AD22 */
include/configs/sama5d4_xplained.h +2 -2
index c8462b0b64..9f0f96f799 100644
@@ -14,7 +14,7 @@
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE           0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x20000000
 
 #ifdef CONFIG_SPL_BUILD
@@ -34,7 +34,7 @@
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_ATMEL
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3
+#define CONFIG_SYS_NAND_BASE		0x80000000
 /* our ALE is AD21 */
 #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
 /* our CLE is AD22 */
include/configs/sama5d4ek.h +2 -2
index fc16ed0420..0410d65ea0 100644
@@ -14,7 +14,7 @@
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE           0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x20000000
 
 #ifdef CONFIG_SPL_BUILD
@@ -34,7 +34,7 @@
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_ATMEL
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3
+#define CONFIG_SYS_NAND_BASE		0x80000000
 /* our ALE is AD21 */
 #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
 /* our CLE is AD22 */
include/configs/vinco.h +7 -4
index e4020d00ce..8c45f4a32e 100644
@@ -23,12 +23,15 @@
 
 /* serial console */
 #define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE		ATMEL_BASE_USART3
-#define	CONFIG_USART_ID			ATMEL_ID_USART3
+#define CONFIG_USART_BASE		0xfc00c000
+#define CONFIG_USART_ID			30
+
+/* Timer */
+#define CONFIG_SYS_TIMER_COUNTER	0xfc06863c
 
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
+#define CONFIG_SYS_SDRAM_BASE           0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x4000000
 
 #define CONFIG_SYS_INIT_SP_ADDR \
@@ -55,7 +58,7 @@
 #ifdef CONFIG_CMD_MMC
 #define CONFIG_SUPPORT_EMMC_BOOT
 #define CONFIG_GENERIC_ATMEL_MCI
-#define ATMEL_BASE_MMCI			ATMEL_BASE_MCI1
+#define ATMEL_BASE_MMCI			0xfc000000
 #define CONFIG_SYS_MMC_CLK_OD		500000
 
 /* For generating MMC partitions */
Signature · 1 line
2.13.0
#4 lore raw

PATCH v2 4/5 ARM: at91: spl: Add macro CONFIG_XXXX_BOOT support

In reply to Wenyou Yang

Use the CONFIG_XXXX_BOOT to indicate the boot media, instead of the CONFIG_SYS_USE_XXXX option, which is declared by CONFIG_SYS_EXTRA_OPTIONS option.

---

Changes in v2: None

 arch/arm/mach-at91/spl.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
arch/arm/mach-at91/spl.c +10 -6
index e113336b7b..c2e2d90a89 100644
@@ -37,7 +37,7 @@ u32 spl_boot_device(void)
 	u32 off = (bootrom_stash.r4 >> ATMEL_SAMA5_BOOT_DEV_ID_OFF) &
 		  ATMEL_SAMA5_BOOT_DEV_ID_MASK;
 
-#if defined(CONFIG_SYS_USE_MMC)
+#if defined(CONFIG_SYS_USE_MMC) || defined(CONFIG_SD_BOOT)
 	if (dev == ATMEL_SAMA5_BOOT_FROM_MCI) {
 #if defined(CONFIG_SPL_OF_CONTROL)
 		return BOOT_DEVICE_MMC1;
@@ -52,7 +52,9 @@ u32 spl_boot_device(void)
 	}
 #endif
 
-#if defined(CONFIG_SYS_USE_SERIALFLASH) || defined(CONFIG_SYS_USE_SPIFLASH)
+#if defined(CONFIG_SYS_USE_SERIALFLASH) || \
+	defined(CONFIG_SYS_USE_SPIFLASH) || \
+	defined(CONFIG_SPI_BOOT)
 	if (dev == ATMEL_SAMA5_BOOT_FROM_SPI)
 		return BOOT_DEVICE_SPI;
 #endif
@@ -71,11 +73,13 @@ u32 spl_boot_device(void)
 #else
 u32 spl_boot_device(void)
 {
-#ifdef CONFIG_SYS_USE_MMC
+#if defined(CONFIG_SYS_USE_MMC) || defined(CONFIG_SD_BOOT)
 	return BOOT_DEVICE_MMC1;
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif defined(CONFIG_SYS_USE_NANDFLASH) || defined(CONFIG_NAND_BOOT)
 	return BOOT_DEVICE_NAND;
-#elif CONFIG_SYS_USE_SERIALFLASH || CONFIG_SYS_USE_SPIFLASH
+#elif defined(CONFIG_SYS_USE_SERIALFLASH) || \
+	defined(CONFIG_SYS_USE_SPIFLASH) || \
+	defined(CONFIG_SPI_BOOT)
 	return BOOT_DEVICE_SPI;
 #endif
 	return BOOT_DEVICE_NONE;
@@ -85,7 +89,7 @@ u32 spl_boot_device(void)
 u32 spl_boot_mode(const u32 boot_device)
 {
 	switch (boot_device) {
-#ifdef CONFIG_SYS_USE_MMC
+#if defined(CONFIG_SYS_USE_MMC) || defined(CONFIG_SD_BOOT)
 	case BOOT_DEVICE_MMC1:
 	case BOOT_DEVICE_MMC2:
 		return MMCSD_MODE_FS;
Signature · 1 line
2.13.0
#5 lore raw

PATCH v2 5/5 configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignment

In reply to Wenyou Yang

To remove the assignment of CONFIG_SYS_EXTRA_OPTIONS option, which is deprecated, use the CONFIG_XXXX_BOOT options to indicate the boot media, and the SoC is selected by the board.

---

Changes in v2:
- Rebase the uboot/master (84a42069f253).

 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |  4 ++--
 board/atmel/at91sam9n12ek/at91sam9n12ek.c       |  6 +++---
 board/atmel/at91sam9x5ek/at91sam9x5ek.c         |  4 ++--
 board/atmel/sama5d2_ptc/sama5d2_ptc.c           |  4 ++--
 board/atmel/sama5d3_xplained/sama5d3_xplained.c |  4 ++--
 board/atmel/sama5d3xek/sama5d3xek.c             |  2 +-
 board/atmel/sama5d4_xplained/sama5d4_xplained.c |  2 +-
 board/atmel/sama5d4ek/sama5d4ek.c               |  2 +-
 configs/at91sam9m10g45ek_mmc_defconfig          |  2 +-
 configs/at91sam9m10g45ek_nandflash_defconfig    |  2 +-
 configs/at91sam9n12ek_mmc_defconfig             |  2 +-
 configs/at91sam9n12ek_nandflash_defconfig       |  2 +-
 configs/at91sam9n12ek_spiflash_defconfig        |  2 +-
 configs/at91sam9x5ek_dataflash_defconfig        |  2 +-
 configs/at91sam9x5ek_mmc_defconfig              |  2 +-
 configs/at91sam9x5ek_nandflash_defconfig        |  2 +-
 configs/at91sam9x5ek_spiflash_defconfig         |  2 +-
 configs/ma5d4evk_defconfig                      |  2 +-
 configs/sama5d2_ptc_nandflash_defconfig         |  2 +-
 configs/sama5d2_ptc_spiflash_defconfig          |  2 +-
 configs/sama5d2_xplained_mmc_defconfig          |  1 +
 configs/sama5d2_xplained_spiflash_defconfig     |  2 +-
 configs/sama5d36ek_cmp_mmc_defconfig            |  2 +-
 configs/sama5d36ek_cmp_nandflash_defconfig      |  2 +-
 configs/sama5d36ek_cmp_spiflash_defconfig       |  2 +-
 configs/sama5d3_xplained_mmc_defconfig          |  2 +-
 configs/sama5d3_xplained_nandflash_defconfig    |  2 +-
 configs/sama5d3xek_mmc_defconfig                |  2 +-
 configs/sama5d3xek_nandflash_defconfig          |  2 +-
 configs/sama5d3xek_spiflash_defconfig           |  2 +-
 configs/sama5d4_xplained_mmc_defconfig          |  2 +-
 configs/sama5d4_xplained_nandflash_defconfig    |  2 +-
 configs/sama5d4_xplained_spiflash_defconfig     |  2 +-
 configs/sama5d4ek_mmc_defconfig                 |  2 +-
 configs/sama5d4ek_nandflash_defconfig           |  2 +-
 configs/sama5d4ek_spiflash_defconfig            |  2 +-
 configs/vinco_defconfig                         |  2 +-
 include/configs/at91-sama5_common.h             |  6 +++---
 include/configs/at91sam9m10g45ek.h              |  8 ++++----
 include/configs/at91sam9n12ek.h                 | 20 ++++++++++----------
 include/configs/at91sam9x5ek.h                  | 23 ++++++++++-------------
 include/configs/sama5d2_ptc.h                   |  8 ++++----
 include/configs/sama5d2_xplained.h              |  6 +++---
 include/configs/sama5d3_xplained.h              | 13 +++----------
 include/configs/sama5d3xek.h                    | 23 +++++++----------------
 include/configs/sama5d4_xplained.h              | 21 +++++++--------------
 include/configs/sama5d4ek.h                     | 22 +++++++---------------
 include/configs/vinco.h                         |  2 +-
 48 files changed, 102 insertions(+), 135 deletions(-)
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +2 -2
index 903732b23b..98430c4246 100644
@@ -84,9 +84,9 @@ void at91_spl_board_init(void)
 	at91_set_pio_pullup(AT91_PIO_PORTD, 7, 1);
 	at91_set_pio_pullup(AT91_PIO_PORTD, 8, 1);
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 	at91_mci_hw_init();
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 	at91sam9m10g45ek_nand_hw_init();
 #endif
 }
board/atmel/at91sam9n12ek/at91sam9n12ek.c +3 -3
index fec93165c1..540adf55b6 100644
@@ -224,11 +224,11 @@ int dram_init(void)
 
 void at91_spl_board_init(void)
 {
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 	at91_mci_hw_init();
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 	at91sam9n12ek_nand_hw_init();
-#elif CONFIG_SYS_USE_SPIFLASH
+#elif CONFIG_SPI_BOOT
 	at91_spi0_hw_init(1 << 4);
 #endif
 }
board/atmel/at91sam9x5ek/at91sam9x5ek.c +2 -2
index 2452e63881..be6dd4a6d3 100644
@@ -235,9 +235,9 @@ int dram_init(void)
 
 void at91_spl_board_init(void)
 {
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 	at91_mci_hw_init();
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 	at91sam9x5ek_nand_hw_init();
 #endif
 }
board/atmel/sama5d2_ptc/sama5d2_ptc.c +2 -2
index 9e6544bc07..c441e69ee4 100644
@@ -196,11 +196,11 @@ int board_eth_init(bd_t *bis)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#ifdef CONFIG_SYS_USE_SERIALFLASH
+#ifdef CONFIG_SPI_BOOT
 	board_spi0_hw_init();
 #endif
 
-#ifdef CONFIG_SYS_USE_NANDFLASH
+#ifdef CONFIG_NAND_BOOT
 	board_nand_hw_init();
 #endif
 }
board/atmel/sama5d3_xplained/sama5d3_xplained.c +2 -2
index ba7f9f2443..f32e86b0cb 100644
@@ -112,11 +112,11 @@ int dram_init(void)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #ifdef CONFIG_GENERIC_ATMEL_MCI
 	sama5d3_xplained_mci0_hw_init();
 #endif
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 	sama5d3_xplained_nand_hw_init();
 #endif
 }
board/atmel/sama5d3xek/sama5d3xek.c +1 -1
index 88bcd876c9..6d473fc06d 100644
@@ -277,7 +277,7 @@ int board_late_init(void)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#if CONFIG_SYS_USE_NANDFLASH
+#if CONFIG_NAND_BOOT
 	sama5d3xek_nand_hw_init();
 #endif
 }
board/atmel/sama5d4_xplained/sama5d4_xplained.c +1 -1
index 854afcb622..195da95bbb 100644
@@ -221,7 +221,7 @@ int dram_init(void)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#if CONFIG_SYS_USE_NANDFLASH
+#if CONFIG_NAND_BOOT
 	sama5d4_xplained_nand_hw_init();
 #endif
 }
board/atmel/sama5d4ek/sama5d4ek.c +1 -1
index ba7974643e..ee07038e2e 100644
@@ -217,7 +217,7 @@ int dram_init(void)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#if CONFIG_SYS_USE_NANDFLASH
+#if CONFIG_NAND_BOOT
 	sama5d4ek_nand_hw_init();
 #endif
 }
configs/at91sam9m10g45ek_mmc_defconfig +1 -1
index e0e37c4f99..6740ec5b30 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9M10G45EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9m10g45ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mmcblk0p2 rw rootwait"
configs/at91sam9m10g45ek_nandflash_defconfig +1 -1
index 3d73f83262..63bb7990e3 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9M10G45EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9m10g45ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) root=/dev/mtdblock7 rw rootfstype=jffs2"
configs/at91sam9n12ek_mmc_defconfig +1 -1
index 4c554f260d..cc567c4dbf 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9N12EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/at91sam9n12ek_nandflash_defconfig +1 -1
index 19053b43a0..663987bc29 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9N12EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/at91sam9n12ek_spiflash_defconfig +1 -1
index 8a4d836843..94481ca2ae 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9N12EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_SPIFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/at91sam9x5ek_dataflash_defconfig +1 -1
index b82b0a714c..9d61dd8de0 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9X5EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_DATAFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_USE_DATAFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw"
configs/at91sam9x5ek_mmc_defconfig +1 -1
index 72c5550692..9fa4801480 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9X5EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="mem=128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
configs/at91sam9x5ek_nandflash_defconfig +1 -1
index 21f5bcbc2d..b28bec7f0b 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9X5EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw"
configs/at91sam9x5ek_spiflash_defconfig +1 -1
index 8880fc97d8..838d8a0ad7 100644
@@ -4,7 +4,7 @@ CONFIG_TARGET_AT91SAM9X5EK=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_DEBUG_UART=y
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_SPIFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw"
configs/ma5d4evk_defconfig +1 -1
index 0d8c109fbc..cbe76b624f 100644
@@ -8,7 +8,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4"
+CONFIG_SYS_EXTRA_OPTIONS=""
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS3,115200"
configs/sama5d2_ptc_nandflash_defconfig +1 -1
index bca3ac2fcb..3f1eb90648 100644
@@ -6,7 +6,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,57600 earlyprintk mtdparts=atmel_nand:6M(bootstrap)ro, 6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=2 root=ubi0:rootfs"
configs/sama5d2_ptc_spiflash_defconfig +1 -1
index e4fb49f662..ad62f47063 100644
@@ -7,7 +7,7 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,57600 earlyprintk mtdparts=atmel_nand:6M(bootstrap)ro, 6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=2 root=ubi0:rootfs"
configs/sama5d2_xplained_mmc_defconfig +1 -0
index dc4d991512..92cbd2293f 100644
@@ -14,6 +14,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p2 rw rootwait"
configs/sama5d2_xplained_spiflash_defconfig +1 -1
index c64b8b8e3b..f0b170c997 100644
@@ -12,7 +12,7 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d36ek_cmp_mmc_defconfig +1 -1
index e517a38377..b6c60cbcae 100644
@@ -5,7 +5,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek_cmp"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait"
configs/sama5d36ek_cmp_nandflash_defconfig +1 -1
index c02cc04bc2..01b57efe03 100644
@@ -5,7 +5,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek_cmp"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d36ek_cmp_spiflash_defconfig +1 -1
index fd2ce15bb7..e29e3a8098 100644
@@ -5,7 +5,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek_cmp"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d3_xplained_mmc_defconfig +1 -1
index 99c4d5a808..b30968d9cc 100644
@@ -13,7 +13,7 @@ CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait"
configs/sama5d3_xplained_nandflash_defconfig +1 -1
index 904c31b27d..65af64f797 100644
@@ -11,7 +11,7 @@ CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d3xek_mmc_defconfig +1 -1
index afb7a51feb..f45449fd93 100644
@@ -13,7 +13,7 @@ CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait"
configs/sama5d3xek_nandflash_defconfig +1 -1
index 6bc0f51698..6217600f01 100644
@@ -11,7 +11,7 @@ CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d3xek_spiflash_defconfig +1 -1
index c225e09111..2fe08e4e59 100644
@@ -12,7 +12,7 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d4_xplained_mmc_defconfig +1 -1
index 0c2b63dab9..4ccdf8d526 100644
@@ -13,7 +13,7 @@ CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait"
configs/sama5d4_xplained_nandflash_defconfig +1 -1
index 3a2dcb12b9..67311f9bcb 100644
@@ -11,7 +11,7 @@ CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d4_xplained_spiflash_defconfig +1 -1
index d82a4cddf2..5c08d37741 100644
@@ -12,7 +12,7 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d4ek_mmc_defconfig +1 -1
index 10c8d0965e..aaa5855b22 100644
@@ -13,7 +13,7 @@ CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait"
configs/sama5d4ek_nandflash_defconfig +1 -1
index 39ff60db8b..901d17bfa3 100644
@@ -11,7 +11,7 @@ CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/sama5d4ek_spiflash_defconfig +1 -1
index 4f848b9175..535031024b 100644
@@ -12,7 +12,7 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
configs/vinco_defconfig +1 -1
index 691320d646..91e3b8fd37 100644
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_VINCO=y
-CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk rw root=/dev/mmcblk0p2 rootfstype=ext4 rootwait quiet lpj=1990656"
include/configs/at91-sama5_common.h +3 -3
index 435c7dfa8e..dc36c2ae6c 100644
@@ -42,7 +42,7 @@
  * Command line configuration.
  */
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 
 #ifdef CONFIG_ENV_IS_IN_MMC
 /* Use raw reserved sectors to save environment */
@@ -63,7 +63,7 @@
 
 #else
 
-#ifdef CONFIG_SYS_USE_NANDFLASH
+#ifdef CONFIG_NAND_BOOT
 /* u-boot env in nand flash */
 #define CONFIG_ENV_OFFSET		0xc0000
 #define CONFIG_ENV_OFFSET_REDUND	0x100000
@@ -71,7 +71,7 @@
 #define CONFIG_BOOTCOMMAND		"nand read 0x21000000 0x180000 0x80000;"	\
 					"nand read 0x22000000 0x200000 0x600000;"	\
 					"bootz 0x22000000 - 0x21000000"
-#elif CONFIG_SYS_USE_SERIALFLASH
+#elif CONFIG_SPI_BOOT
 /* u-boot env in serial flash, by default is bus 0 and cs 0 */
 #define CONFIG_ENV_OFFSET		0x6000
 #define CONFIG_ENV_SIZE			0x2000
include/configs/at91sam9m10g45ek.h +4 -4
index 36acaa5506..2957da9432 100644
@@ -80,7 +80,7 @@
 #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END		0x23e00000
 
-#ifdef CONFIG_SYS_USE_NANDFLASH
+#ifdef CONFIG_NAND_BOOT
 /* bootstrap + u-boot + env in nandflash */
 #define CONFIG_ENV_OFFSET		0x120000
 #define CONFIG_ENV_OFFSET_REDUND	0x100000
@@ -89,7 +89,7 @@
 #define CONFIG_BOOTCOMMAND						\
 	"nand read 0x70000000 0x200000 0x300000;"			\
 	"bootm 0x70000000"
-#elif CONFIG_SYS_USE_MMC
+#elif CONFIG_SD_BOOT
 /* bootstrap + u-boot + env + linux in mmc */
 #define CONFIG_ENV_SIZE		0x4000
 
@@ -115,7 +115,7 @@
 
 #define CONFIG_SYS_MONITOR_LEN		0x80000
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 
 #define CONFIG_SPL_BSS_START_ADDR	0x70000000
 #define CONFIG_SPL_BSS_MAX_SIZE		0x00080000
@@ -125,7 +125,7 @@
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_ECC
include/configs/at91sam9n12ek.h +10 -10
index c9adcf9754..111a7dce7d 100644
@@ -108,7 +108,7 @@
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	1
 #endif
 
-#ifdef CONFIG_SYS_USE_SPIFLASH
+#ifdef CONFIG_SPI_BOOT
 
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_OFFSET		0x5000
@@ -119,7 +119,7 @@
 	"sf probe 0; sf read 0x22000000 0x100000 0x300000; "		\
 	"bootm 0x22000000"
 
-#elif defined(CONFIG_SYS_USE_NANDFLASH)
+#elif defined(CONFIG_NAND_BOOT)
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_OFFSET		0x120000
@@ -131,7 +131,7 @@
 	"nand read 0x22000000 0x200000 0x400000;"			\
 	"bootm 0x22000000 - 0x21000000"
 
-#else /* CONFIG_SYS_USE_MMC */
+#else /* CONFIG_SD_BOOT */
 
 /* bootstrap + u-boot + env + linux in mmc */
 
@@ -180,13 +180,19 @@
 #define CONFIG_SYS_MCKR			0x1301
 #define CONFIG_SYS_MCKR_CSS		0x1302
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
 #elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_SPI_BOOT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8400
+
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_SIZE	0x800
@@ -196,10 +202,4 @@
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 
-#elif CONFIG_SYS_USE_SPIFLASH
-#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8400
-
-#endif
-
 #endif
include/configs/at91sam9x5ek.h +10 -13
index eb798442ca..1d4971c59f 100644
@@ -15,8 +15,6 @@
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK	12000000	/* 12 MHz crystal */
 
-#define CONFIG_AT91SAM9X5EK
-
 #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
@@ -102,7 +100,7 @@
 #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END		0x26e00000
 
-#ifdef CONFIG_SYS_USE_NANDFLASH
+#ifdef CONFIG_NAND_BOOT
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_OFFSET		0x120000
 #define CONFIG_ENV_OFFSET_REDUND	0x100000
@@ -110,7 +108,7 @@
 #define CONFIG_BOOTCOMMAND	"nand read " \
 				"0x22000000 0x200000 0x300000; " \
 				"bootm 0x22000000"
-#elif defined(CONFIG_SYS_USE_SPIFLASH)
+#elif defined(CONFIG_SPI_BOOT)
 /* bootstrap + u-boot + env + linux in spi flash */
 #define CONFIG_ENV_OFFSET	0x5000
 #define CONFIG_ENV_SIZE		0x3000
@@ -128,7 +126,7 @@
 #define CONFIG_BOOTCOMMAND	"sf probe 0; " \
 				"sf read 0x22000000 0x84000 0x294000; " \
 				"bootm 0x22000000"
-#else /* CONFIG_SYS_USE_MMC */
+#else /* CONFIG_SD_BOOT */
 /* bootstrap + u-boot + env + linux in mmc */
 #define CONFIG_ENV_SIZE		0x4000
 #endif
@@ -160,13 +158,18 @@
 #define CONFIG_SYS_MCKR			0x1301
 #define CONFIG_SYS_MCKR_CSS		0x1302
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_SPI_BOOT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8400
+
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_SIZE	0x800
@@ -176,10 +179,4 @@
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 
-#elif CONFIG_SYS_USE_SPIFLASH
-#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8400
-
-#endif
-
 #endif
include/configs/sama5d2_ptc.h +4 -4
index 75a81f1473..3ae16dfc63 100644
@@ -72,7 +72,7 @@
 #define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_MACB_SEARCH_PHY
 
-#ifdef CONFIG_SYS_USE_NANDFLASH
+#ifdef CONFIG_NAND_BOOT
 #undef CONFIG_ENV_OFFSET
 #undef CONFIG_ENV_OFFSET_REDUND
 #undef CONFIG_BOOTCOMMAND
@@ -95,13 +95,14 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
-#ifdef CONFIG_SYS_USE_SERIALFLASH
+#ifdef CONFIG_SPI_BOOT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_PMECC_CAP		8
 #define CONFIG_PMECC_SECTOR_SIZE	512
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
@@ -112,6 +113,5 @@
 #define CONFIG_SYS_NAND_BLOCK_SIZE	0x40000
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
-#endif
 
 #endif
include/configs/sama5d2_xplained.h +3 -3
index 2a9e9729d1..414daaf974 100644
@@ -51,7 +51,7 @@
 #define CONFIG_ATMEL_LCD_RGB565
 #endif
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 
 /* bootstrap + u-boot + env in sd card */
 #undef CONFIG_BOOTCOMMAND
@@ -73,11 +73,11 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
-#elif CONFIG_SYS_USE_SERIALFLASH
+#elif CONFIG_SPI_BOOT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
 
include/configs/sama5d3_xplained.h +3 -10
index 54ea98d454..a6697cdb63 100644
@@ -69,12 +69,6 @@
 
 #define CONFIG_SYS_LOAD_ADDR			0x22000000 /* load address */
 
-#if CONFIG_SYS_USE_NANDFLASH
-/* override the bootcmd, bootargs and other configuration for nandflash env */
-#elif CONFIG_SYS_USE_MMC
-/* override the bootcmd, bootargs and other configuration for sd/mmc env */
-#endif
-
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE		0x300000
@@ -86,13 +80,14 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_SIZE	0x800
@@ -103,5 +98,3 @@
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 
 #endif
-
-#endif
include/configs/sama5d3xek.h +7 -16
index a7223e2cf0..bd93a1e84c 100644
@@ -98,14 +98,6 @@
 
 #define CONFIG_SYS_LOAD_ADDR			0x22000000 /* load address */
 
-#ifdef CONFIG_SYS_USE_SERIALFLASH
-/* override the bootcmd, bootargs and other configuration for spi flash env*/
-#elif CONFIG_SYS_USE_NANDFLASH
-/* override the bootcmd, bootargs and other configuration nandflash env */
-#elif CONFIG_SYS_USE_MMC
-/* override the bootcmd, bootargs and other configuration for sd/mmc env */
-#endif
-
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE		0x300000
@@ -117,13 +109,18 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_SPI_BOOT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
+
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_SIZE	0x800
@@ -133,10 +130,4 @@
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 
-#elif CONFIG_SYS_USE_SERIALFLASH
-#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
-
-#endif
-
 #endif
include/configs/sama5d4_xplained.h +7 -14
index 9f0f96f799..bc8bf3a168 100644
@@ -56,14 +56,6 @@
 #define CONFIG_ATMEL_LCD_RGB565
 #endif
 
-#ifdef CONFIG_SYS_USE_SERIALFLASH
-/* override the bootcmd, bootargs and other configuration for spi flash env */
-#elif CONFIG_SYS_USE_NANDFLASH
-/* override the bootcmd, bootargs and other configuration for nandflash env */
-#elif CONFIG_SYS_USE_MMC
-/* override the bootcmd, bootargs and other configuration for sd/mmc env */
-#endif
-
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE		0x200000
@@ -75,13 +67,19 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
 #elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_SPI_BOOT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
+
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_PMECC_CAP		8
 #define CONFIG_PMECC_SECTOR_SIZE	512
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
@@ -93,9 +91,4 @@
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 
-#elif CONFIG_SYS_USE_SERIALFLASH
-#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
-
-#endif
 #endif
include/configs/sama5d4ek.h +7 -15
index 0410d65ea0..94e8e893c0 100644
@@ -54,14 +54,6 @@
 #define CONFIG_ATMEL_HLCD
 #define CONFIG_ATMEL_LCD_RGB565
 
-#ifdef CONFIG_SYS_USE_SERIALFLASH
-/* override the bootcmd, bootargs and other configuration for spi flash env*/
-#elif CONFIG_SYS_USE_NANDFLASH
-/* override the bootcmd, bootargs and other configuration for nandflash env*/
-#elif CONFIG_SYS_USE_MMC
-/* override the bootcmd, bootargs and other configuration for sd/mmc env */
-#endif
-
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE		0x200000
@@ -73,13 +65,18 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
-#ifdef CONFIG_SYS_USE_MMC
+#ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
-#elif CONFIG_SYS_USE_NANDFLASH
+#elif CONFIG_SPI_BOOT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
+
+#elif CONFIG_NAND_BOOT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
+#endif
 #define CONFIG_PMECC_CAP		8
 #define CONFIG_PMECC_SECTOR_SIZE	512
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
@@ -91,9 +88,4 @@
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 
-#elif CONFIG_SYS_USE_SERIALFLASH
-#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
-
-#endif
 #endif
include/configs/vinco.h +1 -1
index 8c45f4a32e..31d3b73205 100644
@@ -82,7 +82,7 @@
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_USB_ETHER_RNDIS
 
-#ifdef CONFIG_SYS_USE_SERIALFLASH
+#ifdef CONFIG_SPI_BOOT
 /* bootstrap + u-boot + env + linux in serial flash */
 #define CONFIG_ENV_SPI_BUS	CONFIG_SF_DEFAULT_BUS
 #define CONFIG_ENV_SPI_CS	CONFIG_SF_DEFAULT_CS
Signature · 1 line
2.13.0