similarity index 98%
rename from board/d-link/dns325/Makefile
rename to board/d-link/dnskw/Makefile
@@ -30,7 +30,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o
-COBJS := dns325.o
+COBJS := dnskw.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
similarity index 94%
rename from board/d-link/dns325/dns325.c
rename to board/d-link/dnskw/dnskw.c
@@ -33,15 +33,15 @@
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
#include <asm/arch/gpio.h>
-#include "dns325.h"
+#include "dnskw.h"
DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
/* Gpio configuration */
- kw_config_gpio(DNS325_OE_VAL_LOW, DNS325_OE_VAL_HIGH,
- DNS325_OE_LOW, DNS325_OE_HIGH);
+ kw_config_gpio(DNSKW_OE_VAL_LOW, DNSKW_OE_VAL_HIGH,
+ DNSKW_OE_LOW, DNSKW_OE_HIGH);
/* Multi-Purpose Pins Functionality configuration */
u32 kwmpp_config[] = {
@@ -99,9 +99,9 @@ int board_early_init_f(void)
};
kirkwood_mpp_conf(kwmpp_config);
- kw_gpio_set_blink(DNS325_GPIO_LED_POWER , 1);
+ kw_gpio_set_blink(DNSKW_GPIO_LED_POWER , 1);
- kw_gpio_set_value(DNS325_GPIO_SATA0_EN , 1);
+ kw_gpio_set_value(DNSKW_GPIO_SATA0_EN , 1);
return 0;
}
similarity index 73%
rename from board/d-link/dns325/dns325.h
rename to board/d-link/dnskw/dnskw.h
@@ -26,18 +26,22 @@
* MA 02110-1301 USA
*/
-#ifndef __DNS325_H
-#define __DNS325_H
+#ifndef __DNSKW_H
+#define __DNSKW_H
/* GPIO configuration */
-#define DNS325_OE_LOW 0x00000000
-#define DNS325_OE_HIGH 0x00039604
-#define DNS325_OE_VAL_LOW 0x38000000 /* disable leds */
-#define DNS325_OE_VAL_HIGH 0x00000800 /* disable leds */
+#define DNSKW_OE_LOW 0x00000000
+#define DNSKW_OE_HIGH 0x00039604
-#define DNS325_GPIO_LED_POWER 26
-#define DNS325_GPIO_SATA0_EN 39
-#define DNS325_GPIO_SATA1_EN 40
+#define DNSKW_GPIO_LED_POWER 26
+#define DNSKW_GPIO_SATA0_EN 39
+#define DNSKW_GPIO_SATA1_EN 40
+
+/* DNS-325 specific configuration */
+#ifdef CONFIG_BOARD_IS_DNS325
+#define DNSKW_OE_VAL_LOW 0x38000000 /* disable leds */
+#define DNSKW_OE_VAL_HIGH 0x00000800 /* disable leds */
+#endif /* CONFIG_BOARD_IS_DNS325 */
/* PHY related */
#define MV88E1116_MAC_CTRL_REG 21
@@ -45,4 +49,4 @@
#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
-#endif /* __DNS325_H */
+#endif /* __DNSKW_H */
similarity index 100%
rename from board/d-link/dns325/kwbimage.cfg
rename to board/d-link/dnskw/kwbimage.dns325.cfg
@@ -136,7 +136,7 @@ hawkboard arm arm926ejs da8xxevm davinci
hawkboard_uart arm arm926ejs da8xxevm davinci davinci hawkboard:UART_U_BOOT
enbw_cmc arm arm926ejs enbw_cmc enbw davinci
calimain arm arm926ejs calimain omicron davinci
-dns325 arm arm926ejs - d-link kirkwood
+dns325 arm arm926ejs dnskw d-link kirkwood dnskw:BOARD_IS_DNS325
km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI
km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_RECONFIG_XLX
mgcoge3un arm arm926ejs km_arm keymile kirkwood
similarity index 95%
rename from include/configs/dns325.h
rename to include/configs/dnskw.h
@@ -26,16 +26,21 @@
* MA 02110-1301 USA
*/
-#ifndef _CONFIG_DNS325_H
-#define _CONFIG_DNS325_H
+#ifndef _CONFIG_DNSKW_H
+#define _CONFIG_DNSKW_H
/*
* Machine number definition
*/
+#ifdef CONFIG_BOARD_IS_DNS325
#define MACH_TYPE_DNS325 3800
#define CONFIG_MACH_TYPE MACH_TYPE_DNS325
#define CONFIG_IDENT_STRING "\nD-Link DNS-325"
+#define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage.dns325.cfg
+
+#endif /* CONFIG_BOARD_IS_DNS325 */
+
/*
* High Level Configuration Options (easy to change)
*/
@@ -185,4 +190,4 @@
"fi;" \
"run setnandbootenv subbootcmd;"
-#endif /* _CONFIG_DNS325_H */
+#endif /* _CONFIG_DNSKW_H */
So we can re-use DNS-325 configuration for the DNS-320 without things getting confusing, rename all common parts from dns325 to dnskw, and use a config option to configure DNS-325 specifics. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Cc: prafulla@marvell.com Cc: albert.u.boot@aribaud.net --- board/d-link/{dns325 => dnskw}/Makefile | 2 +- board/d-link/{dns325/dns325.c => dnskw/dnskw.c} | 10 ++++---- board/d-link/{dns325/dns325.h => dnskw/dnskw.h} | 24 ++++++++++++-------- .../kwbimage.cfg => dnskw/kwbimage.dns325.cfg} | 0 boards.cfg | 2 +- include/configs/{dns325.h => dnskw.h} | 11 ++++++--- 6 files changed, 29 insertions(+), 20 deletions(-) rename board/d-link/{dns325 => dnskw}/Makefile (98%) rename board/d-link/{dns325/dns325.c => dnskw/dnskw.c} (94%) rename board/d-link/{dns325/dns325.h => dnskw/dnskw.h} (73%) rename board/d-link/{dns325/kwbimage.cfg => dnskw/kwbimage.dns325.cfg} (100%) rename include/configs/{dns325.h => dnskw.h} (95%)