summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Waters <justin@justin-linux.(none)>2008-01-21 16:38:46 -0500
committerJustin Waters <justin@justin-linux.(none)>2008-01-22 11:25:35 -0500
commit405bb978ee2321b6cf5381a012c812bdc7679e40 (patch)
treefcab2b9817cbadafc512f39972468ea9ccecc8d5
parent3c7ac4df9c9718e0bf11705a1a4d0e4b9dae700f (diff)
Fix various configuration problems with Atmel patch
The CMD API has changed significantly since the patches were originally written. This fixes these problems and cleans up the code a little. Signed-off-by: Justin Waters <justin.waters@timesys.com>
-rw-r--r--board/at91rm9200ek/at91rm9200ek.c8
-rw-r--r--board/at91sam9260ek/at91sam9260ek.c6
-rw-r--r--board/at91sam9260ek/dm9161a.c8
-rw-r--r--board/at91sam9260ek/nand.c8
-rw-r--r--board/at91sam9261ek/at91sam9261ek.c4
-rw-r--r--board/at91sam9261ek/nand.c6
-rw-r--r--board/at91sam9263ek/at91sam9263ek.c6
-rw-r--r--board/at91sam9263ek/dm9161a.c7
-rw-r--r--board/at91sam9263ek/nand.c6
-rw-r--r--board/at91sam9rlek/nand.c6
-rw-r--r--common/cmd_flash.c11
-rw-r--r--cpu/arm926ejs/at91sam926x/ether.c9
-rw-r--r--drivers/dataflash.c2
-rw-r--r--drivers/dm9000x.c3
-rw-r--r--drivers/nand/nand.c7
-rw-r--r--include/configs/at91rm9200ek.h22
-rw-r--r--include/configs/at91sam9260ek.h35
-rw-r--r--include/configs/at91sam9261ek.h33
-rw-r--r--include/configs/at91sam9263ek.h33
-rw-r--r--include/configs/at91sam9rlek.h33
20 files changed, 122 insertions, 131 deletions
diff --git a/board/at91rm9200ek/at91rm9200ek.c b/board/at91rm9200ek/at91rm9200ek.c
index 5fd841a826..aacfee6e2b 100644
--- a/board/at91rm9200ek/at91rm9200ek.c
+++ b/board/at91rm9200ek/at91rm9200ek.c
@@ -62,7 +62,7 @@ int dram_init (void)
}
#ifdef CONFIG_DRIVER_ETHER
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
/*
* Name:
@@ -82,14 +82,14 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_ETHER */
/*
* Disk On Chip (NAND) Millenium initialization.
* The NAND lives in the CS2* space
*/
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#ifdef CONFIG_CMD_NAND
extern ulong nand_probe (ulong physadr);
#define AT91_SMARTMEDIA_BASE 0x40000000 /* physical address to access memory on NCS3 */
@@ -139,4 +139,4 @@ void nand_init (void)
#endif
printf ("%4lu MB\n", nand_probe(AT91_SMARTMEDIA_BASE) >> 20);
}
-#endif
+#endif /* CONFIG_CMD_NAND */
diff --git a/board/at91sam9260ek/at91sam9260ek.c b/board/at91sam9260ek/at91sam9260ek.c
index 5fce346a25..d5d9f0dcc2 100644
--- a/board/at91sam9260ek/at91sam9260ek.c
+++ b/board/at91sam9260ek/at91sam9260ek.c
@@ -73,7 +73,7 @@ int board_late_init(void)
DECLARE_GLOBAL_DATA_PTR;
/* Fix Ethernet Initialization Bug when starting Linux from U-Boot */
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
eth_init(gd->bd);
#endif
@@ -110,7 +110,7 @@ int AT91F_Serial_Hardware_Init(void)
#ifdef CONFIG_DRIVER_ETHER
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
extern AT91PS_EMAC p_mac;
@@ -191,5 +191,5 @@ int AT91F_EMAC_Hardware_Init(void)
AT91C_BASE_PIOA->PIO_PDR = (periphAEnable | periphBEnable);
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_ETHER */
diff --git a/board/at91sam9260ek/dm9161a.c b/board/at91sam9260ek/dm9161a.c
index 135e2e1127..4590af077a 100644
--- a/board/at91sam9260ek/dm9161a.c
+++ b/board/at91sam9260ek/dm9161a.c
@@ -26,8 +26,7 @@
#include <dm9161.h>
#ifdef CONFIG_DRIVER_ETHER
-
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
/*
* Name:
@@ -97,7 +96,7 @@ static uchar dm9161a_GetLinkSpeed (AT91PS_EMAC p_mac)
return TRUE;
}
- if ((stat1 & DM9161_100BASE_T4_HD) && (stat2 & DM9161_100HDX)) {
+ if ((stat1 & DM9161_100BASE_TX_HD) && (stat2 & DM9161_100HDX)) {
/*set MII for 100BaseTX and Half Duplex */
p_mac->EMAC_NCFGR = (p_mac->EMAC_NCFGR &
~(AT91C_EMAC_SPD | AT91C_EMAC_FD))
@@ -295,7 +294,6 @@ void at91_GetPhyInterface(AT91PS_PhyOps p_phyops)
p_phyops->Reset = dm9161a_ResetPhy;
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
-
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_ETHER */
diff --git a/board/at91sam9260ek/nand.c b/board/at91sam9260ek/nand.c
index 2a339a9ed7..0d9bdde153 100644
--- a/board/at91sam9260ek/nand.c
+++ b/board/at91sam9260ek/nand.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#ifdef CONFIG_CMD_NAND
#include <nand.h>
@@ -95,7 +95,7 @@ static int at91sam9260ek_nand_ready(struct mtd_info *mtd)
return (*AT91C_PIOC_PDSR & AT91C_PIO_PC13);
}
-void board_nand_init(struct nand_chip *nand)
+int board_nand_init(struct nand_chip *nand)
{
nand->eccmode = NAND_ECC_SOFT;
nand->hwcontrol = at91sam9260ek_nand_hwcontrol;
@@ -103,5 +103,7 @@ void board_nand_init(struct nand_chip *nand)
nand->chip_delay = 18;
at91sam9260ek_nand_init(nand);
+
+ return 0;
}
-#endif
+#endif /* CONFIG_CMD_NAND */
diff --git a/board/at91sam9261ek/at91sam9261ek.c b/board/at91sam9261ek/at91sam9261ek.c
index 003f846b82..b7ef19291c 100644
--- a/board/at91sam9261ek/at91sam9261ek.c
+++ b/board/at91sam9261ek/at91sam9261ek.c
@@ -130,8 +130,8 @@ int board_late_init(void)
DECLARE_GLOBAL_DATA_PTR;
/* Fix Ethernet Initialization Bug when starting Linux from U-Boot */
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
-#ifdef CONFIG_DRIVER_DM9000
+#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_DRIVER_DM9000
/* configure SMC's NCS2 to use it with DM9000 chip */
at91sam9261ek_dm9000_init();
#endif
diff --git a/board/at91sam9261ek/nand.c b/board/at91sam9261ek/nand.c
index ee33961000..1ae7e6119a 100644
--- a/board/at91sam9261ek/nand.c
+++ b/board/at91sam9261ek/nand.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#ifdef CONFIG_CMD_NAND
#include <nand.h>
@@ -100,7 +100,7 @@ static int at91sam9261ek_nand_ready(struct mtd_info *mtd)
return (*AT91C_PIOC_PDSR & AT91C_PIO_PC15);
}
-void board_nand_init(struct nand_chip *nand)
+int board_nand_init(struct nand_chip *nand)
{
/* Init due to switch 8/16 bits mode */
if (nand->write_byte)
@@ -120,5 +120,7 @@ void board_nand_init(struct nand_chip *nand)
nand->chip_delay = 18;
at91sam9261ek_nand_init(nand);
+
+ return 0;
}
#endif
diff --git a/board/at91sam9263ek/at91sam9263ek.c b/board/at91sam9263ek/at91sam9263ek.c
index 05195adc01..d9b8714bcb 100644
--- a/board/at91sam9263ek/at91sam9263ek.c
+++ b/board/at91sam9263ek/at91sam9263ek.c
@@ -74,7 +74,7 @@ int board_late_init(void)
DECLARE_GLOBAL_DATA_PTR;
/* Fix Ethernet Initialization Bug when starting Linux from U-Boot */
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
eth_init(gd->bd);
#endif
@@ -128,7 +128,7 @@ int AT91F_Serial_Hardware_Init(void)
#ifdef CONFIG_DRIVER_ETHER
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
extern AT91PS_EMAC p_mac;
@@ -220,5 +220,5 @@ void AT91F_EMAC_Hardware_Init(void)
#endif
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_ETHER */
diff --git a/board/at91sam9263ek/dm9161a.c b/board/at91sam9263ek/dm9161a.c
index 63177d29fc..6783da2713 100644
--- a/board/at91sam9263ek/dm9161a.c
+++ b/board/at91sam9263ek/dm9161a.c
@@ -26,8 +26,7 @@
#include <dm9161.h>
#ifdef CONFIG_DRIVER_ETHER
-
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
/*
* Name:
@@ -97,7 +96,7 @@ static uchar dm9161a_GetLinkSpeed (AT91PS_EMAC p_mac)
return TRUE;
}
- if ((stat1 & DM9161_100BASE_T4_HD) && (stat2 & DM9161_100HDX)) {
+ if ((stat1 & DM9161_100BASE_TX_HD) && (stat2 & DM9161_100HDX)) {
/*set MII for 100BaseTX and Half Duplex */
p_mac->EMAC_NCFGR = (p_mac->EMAC_NCFGR &
~(AT91C_EMAC_SPD | AT91C_EMAC_FD))
@@ -294,7 +293,7 @@ void at91_GetPhyInterface(AT91PS_PhyOps p_phyops)
p_phyops->Reset = dm9161a_ResetPhy;
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_ETHER */
diff --git a/board/at91sam9263ek/nand.c b/board/at91sam9263ek/nand.c
index 96c15058c1..b8c3e63ac5 100644
--- a/board/at91sam9263ek/nand.c
+++ b/board/at91sam9263ek/nand.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if (CONFIG_CMD_NAND)
#include <nand.h>
@@ -95,7 +95,7 @@ static int at91sam9263ek_nand_ready(struct mtd_info *mtd)
return (*AT91C_PIOA_PDSR & AT91C_PIO_PA22);
}
-void board_nand_init(struct nand_chip *nand)
+int board_nand_init(struct nand_chip *nand)
{
nand->eccmode = NAND_ECC_SOFT;
nand->hwcontrol = at91sam9263ek_nand_hwcontrol;
@@ -103,5 +103,7 @@ void board_nand_init(struct nand_chip *nand)
nand->chip_delay = 18;
at91sam9263ek_nand_init(nand);
+
+ return 0;
}
#endif
diff --git a/board/at91sam9rlek/nand.c b/board/at91sam9rlek/nand.c
index 62623f5fbe..4d30101df2 100644
--- a/board/at91sam9rlek/nand.c
+++ b/board/at91sam9rlek/nand.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#ifdef CONFIG_CMD_NAND
#include <nand.h>
@@ -94,7 +94,7 @@ static int at91sam9RLek_nand_ready(struct mtd_info *mtd)
return (*AT91C_PIOD_PDSR & AT91C_PIO_PD17);
}
-void board_nand_init(struct nand_chip *nand)
+int board_nand_init(struct nand_chip *nand)
{
/* Init due to switch 8/16 bits mode */
if (nand->write_byte)
@@ -114,5 +114,7 @@ void board_nand_init(struct nand_chip *nand)
nand->chip_delay = 18;
at91sam9RLek_nand_init(nand);
+
+ return 0;
}
#endif
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index 817157c1c3..4f9d517b0f 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -455,9 +455,14 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)
int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
#ifndef CFG_NO_FLASH
- flash_info_t *info;
- ulong bank, addr_first, addr_last;
- int i, p, n, sect_first, sect_last;
+ flash_info_t *info;
+ ulong bank, addr_first, addr_last;
+ int i, p, n, sect_first, sect_last;
+#else
+ ulong addr_first, addr_last;
+ int p;
+#endif
+
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
struct mtd_device *dev;
struct part_info *part;
diff --git a/cpu/arm926ejs/at91sam926x/ether.c b/cpu/arm926ejs/at91sam926x/ether.c
index 46b9b98528..fc58c4af4c 100644
--- a/cpu/arm926ejs/at91sam926x/ether.c
+++ b/cpu/arm926ejs/at91sam926x/ether.c
@@ -25,14 +25,13 @@
#ifndef CONFIG_DRIVER_DM9000 /* SAM9261EK uses DM9000 Phy */
#ifdef CONFIG_DRIVER_ETHER
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_CMD_NET
#include <net.h>
#include <at91_net.h>
#include <miiphy.h>
#include <dm9161.h>
-
/* ----- Ethernet Buffer definitions ----- */
/* Receive Transfer descriptor structure */
@@ -254,10 +253,10 @@ int AT91F_EMACInit(bd_t * bd,
if (tick == AT91C_ETH_TIMEOUT)
{
- printf ("-E- Autonegociation Timeout\n\r");
+ printf ("-E- Autonegotiation Timeout\n\r");
return 1;
} else
- printf ("End of Autonegociation\n\r");
+ printf ("End of Autonegotiation\n\r");
/* the sequence write EMAC_SA1L and write EMAC_SA1H must be respected */
p_mac->EMAC_SA1L = (bd->bi_enetaddr[3] << 24) | (bd->bi_enetaddr[2] << 16)
@@ -449,6 +448,6 @@ void eth_halt (void)
{
};
-#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_DM9000 */
#endif /* CONFIG_DRIVER_ETHER */
diff --git a/drivers/dataflash.c b/drivers/dataflash.c
index 3d26e9772b..ec149ebbff 100644
--- a/drivers/dataflash.c
+++ b/drivers/dataflash.c
@@ -61,6 +61,7 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
{0x38000, 0x1fffff, FLAG_PROTECT_CLEAR}, /* data area size to tune */
};
#endif
+#elif
#elif defined(CONFIG_NEW_PARTITION)
/*define the area offsets*/
/* Invalid partitions should be defined with start > end */
@@ -110,6 +111,7 @@ int AT91F_DataflashInit (void)
AT91F_SpiInit ();
for (i = 0; i < CFG_MAX_DATAFLASH_BANKS; i++) {
+ part = 0;
found[i] = 0;
dataflash_info[i].Desc.state = IDLE;
dataflash_info[i].id = 0;
diff --git a/drivers/dm9000x.c b/drivers/dm9000x.c
index 63f1edb7b6..517e6648e5 100644
--- a/drivers/dm9000x.c
+++ b/drivers/dm9000x.c
@@ -300,9 +300,10 @@ eth_init(bd_t * bd)
DM9000_iow(DM9000_ISR, 0x0f); /* Clear interrupt status */
/* Set Node address */
-#ifndef CONFIG_AT91SAM9261EK
+ #ifndef CONFIG_AT91SAM9261EK
for (i = 0; i < 6; i++)
((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
+ #endif
if (is_zero_ether_addr(bd->bi_enetaddr) ||
is_multicast_ether_addr(bd->bi_enetaddr)) {
diff --git a/drivers/nand/nand.c b/drivers/nand/nand.c
index bd219135e5..27b5792bcc 100644
--- a/drivers/nand/nand.c
+++ b/drivers/nand/nand.c
@@ -58,13 +58,6 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
mtd->size = 0;
}
- if (nand_scan(mtd, 1) == 0) {
- if (!mtd->name)
- mtd->name = (char *)default_nand_name;
- } else {
- mtd->name = NULL;
- }
- }
}
void nand_init(void)
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index 1cce149bf1..ceed37ff7a 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -99,18 +99,16 @@
#define CONFIG_BOOTDELAY 3
/* #define CONFIG_ENV_OVERWRITE 1 */
-#define CONFIG_COMMANDS \
- ((CONFIG_CMD_DFL | CFG_CMD_MII |\
- CFG_CMD_DHCP ) & \
- ~(CFG_CMD_BDI | \
- CFG_CMD_IMI | \
- CFG_CMD_AUTOSCRIPT | \
- CFG_CMD_FPGA | \
- CFG_CMD_MISC | \
- CFG_CMD_LOADS ))
-
-/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
-#include <cmd_confdefs.h>
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_DHCP
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_LOADS
#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
#define SECTORSIZE 512
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index e9a9f4eddc..4f4e8c71d4 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -79,25 +79,22 @@
/* #define CONFIG_ENV_OVERWRITE 1 */
#define BOARD_LATE_INIT 1
-#define CONFIG_COMMANDS \
- ((CONFIG_CMD_DFL | \
- CFG_CMD_NET | \
- CFG_CMD_PING | \
- CFG_CMD_ENV | \
- CFG_CMD_USB | \
- CFG_CMD_FLASH | \
- CFG_CMD_AUTOSCRIPT | \
- CFG_CMD_NAND | \
- CFG_CMD_FAT ) & \
- ~(CFG_CMD_BDI | \
- CFG_CMD_IMLS | \
- CFG_CMD_IMI | \
- CFG_CMD_FPGA | \
- CFG_CMD_MISC | \
- CFG_CMD_LOADS))
-
-/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
-#include <cmd_confdefs.h>
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_USB
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_FAT
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_LOADS
#define NAND_MAX_CHIPS 1 /* Max number of NAND devices */
#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index ce21a97cdf..de639090f1 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -79,24 +79,21 @@
/* #define CONFIG_ENV_OVERWRITE 1 */
#define BOARD_LATE_INIT 1
-#define CONFIG_COMMANDS \
- ((CONFIG_CMD_DFL | \
- CFG_CMD_NET | \
- CFG_CMD_ENV | \
- CFG_CMD_USB | \
- CFG_CMD_FLASH | \
- CFG_CMD_NAND | \
- CFG_CMD_AUTOSCRIPT | \
- CFG_CMD_FAT ) & \
- ~(CFG_CMD_BDI | \
- CFG_CMD_IMLS | \
- CFG_CMD_IMI | \
- CFG_CMD_FPGA | \
- CFG_CMD_MISC | \
- CFG_CMD_LOADS))
-
-/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
-#include <cmd_confdefs.h>
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_USB
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_LOADS
#define NAND_MAX_CHIPS 1 /* Max number of NAND devices */
#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index f942393739..052d7238ef 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -94,24 +94,21 @@
/* #define CONFIG_ENV_OVERWRITE 1 */
#define BOARD_LATE_INIT 1
-#define CONFIG_COMMANDS \
- ((CONFIG_CMD_DFL | \
- CFG_CMD_ENV | \
- CFG_CMD_USB | \
- CFG_CMD_FAT | \
- CFG_CMD_NET | \
- CFG_CMD_FLASH | \
- CFG_CMD_AUTOSCRIPT | \
- CFG_CMD_NAND) & \
- ~(CFG_CMD_BDI | \
- CFG_CMD_IMI | \
- CFG_CMD_IMLS | \
- CFG_CMD_FPGA | \
- CFG_CMD_MISC | \
- CFG_CMD_LOADS))
-
-/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
-#include <cmd_confdefs.h>
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_USB
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_NAND
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_LOADS
#define NAND_MAX_CHIPS 1 /* Max number of NAND devices */
#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 6d3f0c804f..fec0c7ea56 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -75,24 +75,21 @@
/* #define CONFIG_ENV_OVERWRITE 1 */
#define BOARD_LATE_INIT 1
-#define CONFIG_COMMANDS \
- ((CONFIG_CMD_DFL | \
- CFG_CMD_ENV | \
- CFG_CMD_FLASH | \
- CFG_CMD_NAND | \
- CFG_CMD_AUTOSCRIPT | \
- CFG_CMD_FAT ) & \
- ~(CFG_CMD_BDI | \
- CFG_CMD_NET | \
- CFG_CMD_USB | \
- CFG_CMD_IMLS | \
- CFG_CMD_IMI | \
- CFG_CMD_FPGA | \
- CFG_CMD_MISC | \
- CFG_CMD_LOADS))
-
-/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
-#include <cmd_confdefs.h>
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_FAT
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_USB
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_LOADS
#define NAND_MAX_CHIPS 1 /* Max number of NAND devices */
#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */