From 5e69947f51d72a2f75f2132c2cc8bae3f0ebcdef Mon Sep 17 00:00:00 2001
From: Quentin Armitage <quentin@armitage.org.uk>
Date: Wed, 28 Oct 2015 00:47:17 +0000
Subject: [PATCH] arm: kirkwood: Move configuration of some commands to
 _defconfig files

For Marvell plugs, move the configuration of DHCP, NAND/SF, PING
and USB commands, and HUSH_PARSER into the _defconfig file, rather
than the include/configs/*plug.h files.

This avoids compiler warnings of duplicate definitions if the
option is selected in the .config, but also defined in the
include/configs/*plug.h file.

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
---
 configs/dreamplug_defconfig  | 5 +++++
 configs/guruplug_defconfig   | 5 +++++
 configs/sheevaplug_defconfig | 5 +++++
 include/configs/dreamplug.h  | 4 ----
 include/configs/guruplug.h   | 9 ---------
 include/configs/sheevaplug.h | 9 ---------
 6 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig
index 501fbbfd33..ec2a7490a3 100644
--- a/configs/dreamplug_defconfig
+++ b/configs/dreamplug_defconfig
@@ -5,3 +5,8 @@ CONFIG_TARGET_DREAMPLUG=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPI_FLASH=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig
index 20b83e355b..b7f79a3e06 100644
--- a/configs/guruplug_defconfig
+++ b/configs/guruplug_defconfig
@@ -4,3 +4,8 @@ CONFIG_TARGET_GURUPLUG=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 54e2ad721b..5a37eea2d6 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -4,3 +4,8 @@ CONFIG_TARGET_SHEEVAPLUG=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index bd834e4328..4c5eafb57a 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -46,16 +46,12 @@
  */
 #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
 #define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_EXT4
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_MII
-#define CONFIG_CMD_SF
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
 
 /*
  * mv-common.h should be defined after CMD configs since it used them
diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h
index 48dd0e606b..3f52f11758 100644
--- a/include/configs/guruplug.h
+++ b/include/configs/guruplug.h
@@ -39,24 +39,15 @@
  */
 #define CONFIG_OF_LIBFDT
 
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
-
 /*
  * Commands configuration
  */
 #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
 #define CONFIG_CMD_BOOTZ
 #define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_MII
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
 
 /*
  * mv-common.h should be defined after CMD configs since it used them
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 1eb4858f51..60294ff697 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -39,25 +39,16 @@
  */
 #define CONFIG_OF_LIBFDT
 
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
-
 /*
  * Commands configuration
  */
 #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
 #define CONFIG_CMD_BOOTZ
 #define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_MMC
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
 
 /*
  * mv-common.h should be defined after CMD configs since it used them
-- 
2.39.5