Patchwork [U-Boot,v2] Blackfin: dnp5370: new board port

login
register
mail settings
Submitter Mike Frysinger
Date Dec. 9, 2010, 10:43 a.m.
Message ID <1291891433-16355-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/74874/
State Superseded
Headers show

Comments

Mike Frysinger - Dec. 9, 2010, 10:43 a.m.
From: Andreas Schallenberg <Andreas.Schallenberg@3alitydigital.de>

Info about the hardware can be found here:
	http://www.dilnetpc.com/dnp0086.htm

Signed-off-by: Andreas Schallenberg <Andreas.Schallenberg@3alitydigital.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
	- update to latest mainline
	- add MAINTAINERS entry

 MAINTAINERS               |    4 ++
 board/dnp5370/Makefile    |   54 ++++++++++++++++++
 board/dnp5370/config.mk   |   29 ++++++++++
 board/dnp5370/dnp5370.c   |  104 +++++++++++++++++++++++++++++++++++
 boards.cfg                |    1 +
 doc/README.dnp5370        |   67 +++++++++++++++++++++++
 include/configs/dnp5370.h |  131 +++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 390 insertions(+), 0 deletions(-)
 create mode 100644 board/dnp5370/Makefile
 create mode 100644 board/dnp5370/config.mk
 create mode 100644 board/dnp5370/dnp5370.c
 create mode 100644 doc/README.dnp5370
 create mode 100644 include/configs/dnp5370.h
Wolfgang Denk - Dec. 18, 2010, 11:17 p.m.
Dear Mike Frysinger,

In message <1291891433-16355-1-git-send-email-vapier@gentoo.org> you wrote:
> From: Andreas Schallenberg <Andreas.Schallenberg@3alitydigital.de>
> 
> Info about the hardware can be found here:
> 	http://www.dilnetpc.com/dnp0086.htm
> 
> Signed-off-by: Andreas Schallenberg <Andreas.Schallenberg@3alitydigital.de>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1090,6 +1090,10 @@ Peter Meerwald <devel@bct-electronic.com>
>  
>  	bct-brettl2	BF536
>  
> +M.Hasewinkel (MHA) <info@ssv-embedded.de>
> +
> +	dnp5370		BF537

Please keep list sorted.

> diff --git a/board/dnp5370/config.mk b/board/dnp5370/config.mk
> new file mode 100644
> index 0000000..8227506
> --- /dev/null
> +++ b/board/dnp5370/config.mk
...
> +CONFIG_BFIN_CPU = bf537-0.3

Please mode to board config file, and drop the config.mk

> +#define CONFIG_IPADDR          10.100.100.21
> +#define CONFIG_NETMASK         255.255.0.0
> +#define CONFIG_GATEWAYIP       10.100.100.1
> +#define CONFIG_SERVERIP        10.100.100.12

NAK.  We do not allow this.


Best regards,

Wolfgang Denk
Mike Frysinger - Dec. 19, 2010, 4:50 a.m.
On Saturday, December 18, 2010 18:17:43 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1090,6 +1090,10 @@ Peter Meerwald <devel@bct-electronic.com>
> > 
> >  	bct-brettl2	BF536
> > 
> > +M.Hasewinkel (MHA) <info@ssv-embedded.de>
> > +
> > +	dnp5370		BF537
> 
> Please keep list sorted.

the list is already not sorted, nor is it really feasible to do so.  it's 
grouped by maintainer which may have multiply named boards.

> > --- /dev/null
> > +++ b/board/dnp5370/config.mk
> > +CONFIG_BFIN_CPU = bf537-0.3
> 
> Please mode to board config file, and drop the config.mk

as noted in the other patch, this is the only place for it.

> > +#define CONFIG_IPADDR          10.100.100.21
> > +#define CONFIG_NETMASK         255.255.0.0
> > +#define CONFIG_GATEWAYIP       10.100.100.1
> > +#define CONFIG_SERVERIP        10.100.100.12
> 
> NAK.  We do not allow this.

i dont see why.  these are *default* settings.  there is nothing here that 
prevents people in their own board from overriding at runtime and saving the 
result into their environment.  where as having default settings often makes 
new builds/tests a lot smoother.
-mike
Wolfgang Denk - Dec. 19, 2010, 12:27 p.m.
Dear Mike Frysinger,

In message <201012182350.22451.vapier@gentoo.org> you wrote:
>
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -1090,6 +1090,10 @@ Peter Meerwald <devel@bct-electronic.com>
> > > 
> > >  	bct-brettl2	BF536
> > > 
> > > +M.Hasewinkel (MHA) <info@ssv-embedded.de>
> > > +
> > > +	dnp5370		BF537
> > 
> > Please keep list sorted.
>
> the list is already not sorted, nor is it really feasible to do so.  it's 
> grouped by maintainer which may have multiply named boards.

If you don't want to help to clean up (which I can live with), then
please at least do not add to the mess.

> > > +#define CONFIG_IPADDR          10.100.100.21
> > > +#define CONFIG_NETMASK         255.255.0.0
> > > +#define CONFIG_GATEWAYIP       10.100.100.1
> > > +#define CONFIG_SERVERIP        10.100.100.12
> > 
> > NAK.  We do not allow this.
>
> i dont see why.  these are *default* settings.  there is nothing here that 
> prevents people in their own board from overriding at runtime and saving the 
> result into their environment.  where as having default settings often makes 
> new builds/tests a lot smoother.

It's still NAK.

Best regards,

Wolfgang Denk
Mike Frysinger - Dec. 19, 2010, 4:30 p.m.
On Sunday, December 19, 2010 07:27:05 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > > --- a/MAINTAINERS
> > > > +++ b/MAINTAINERS
> > > > @@ -1090,6 +1090,10 @@ Peter Meerwald <devel@bct-electronic.com>
> > > > 
> > > >  	bct-brettl2	BF536
> > > > 
> > > > +M.Hasewinkel (MHA) <info@ssv-embedded.de>
> > > > +
> > > > +	dnp5370		BF537
> > > 
> > > Please keep list sorted.
> > 
> > the list is already not sorted, nor is it really feasible to do so.  it's
> > grouped by maintainer which may have multiply named boards.
> 
> If you don't want to help to clean up (which I can live with), then
> please at least do not add to the mess.

i'm saying that if the list cant be sorted, then there isnt a mess and there 
isnt anything to "clean up"

> > > > +#define CONFIG_IPADDR          10.100.100.21
> > > > +#define CONFIG_NETMASK         255.255.0.0
> > > > +#define CONFIG_GATEWAYIP       10.100.100.1
> > > > +#define CONFIG_SERVERIP        10.100.100.12
> > > 
> > > NAK.  We do not allow this.
> > 
> > i dont see why.  these are *default* settings.  there is nothing here
> > that prevents people in their own board from overriding at runtime and
> > saving the result into their environment.  where as having default
> > settings often makes new builds/tests a lot smoother.
> 
> It's still NAK.

so the logic here is "because i said so"
-mike
Wolfgang Denk - Dec. 19, 2010, 8:05 p.m.
Dear Mike Frysinger,

In message <201012191130.56370.vapier@gentoo.org> you wrote:
> 
> > If you don't want to help to clean up (which I can live with), then
> > please at least do not add to the mess.
> 
> i'm saying that if the list cant be sorted, then there isnt a mess and there 
> isnt anything to "clean up"

The list can be sorted. Within each section it should be sorted by
last name of the maintainers.

> > > > NAK.  We do not allow this.
> > > 
> > > i dont see why.  these are *default* settings.  there is nothing here
> > > that prevents people in their own board from overriding at runtime and
> > > saving the result into their environment.  where as having default
> > > settings often makes new builds/tests a lot smoother.
> > 
> > It's still NAK.
>
> so the logic here is "because i said so"

This has been discussed several times in the past, and somebody who
has been around as long as you should either remember these arguments
or be able to look them up in the archives. In short: defaults that
may be good for you are most probably bad for (m)any other users of
the board. Instead of spreading such bad defaults we default to not
setting any.

You may call it "policy", if this helps you to accept that.

Best regards,

Wolfgang Denk
Wolfgang Denk - Dec. 19, 2010, 9:17 p.m.
Dear Mike Frysinger,

In message <201012191709.20774.vapier@gentoo.org> you wrote:
>
> > The list can be sorted. Within each section it should be sorted by
> > last name of the maintainers.
> 
> i cant say ive noticed this policy, but changing to that should be easy.

It has been mentioned several times before.

> > This has been discussed several times in the past, and somebody who
> > has been around as long as you should either remember these arguments
> > or be able to look them up in the archives. In short: defaults that
> > may be good for you are most probably bad for (m)any other users of
> > the board. Instead of spreading such bad defaults we default to not
> > setting any.
>
> just because ive seen you use this same logic before ("i said so") doesnt mean 

Just for the records: I'm not alone with this opinion.

> i agree with it or even understand it.  there is no such thing as "bad 
> defaults" when it comes to network settings here.  having a default IP that 
> doesnt match your local LAN is just as "bad" as not having any IP at all.  in 
> both cases, things need the same amount of effort to change.

I disagree. Setting random default values can cause collisions with
existing addresses, i. e. cause trouble that may even interrupt
operation of other, innocent systems; having no values set will only
cause your local system not to work, but will never do any damage to
others.

Best regards,

Wolfgang Denk
Mike Frysinger - Dec. 19, 2010, 10:09 p.m.
On Sunday, December 19, 2010 15:05:34 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > If you don't want to help to clean up (which I can live with), then
> > > please at least do not add to the mess.
> > 
> > i'm saying that if the list cant be sorted, then there isnt a mess and
> > there isnt anything to "clean up"
> 
> The list can be sorted. Within each section it should be sorted by
> last name of the maintainers.

i cant say ive noticed this policy, but changing to that should be easy.

> > > > > NAK.  We do not allow this.
> > > > 
> > > > i dont see why.  these are *default* settings.  there is nothing here
> > > > that prevents people in their own board from overriding at runtime
> > > > and saving the result into their environment.  where as having
> > > > default settings often makes new builds/tests a lot smoother.
> > > 
> > > It's still NAK.
> > 
> > so the logic here is "because i said so"
> 
> This has been discussed several times in the past, and somebody who
> has been around as long as you should either remember these arguments
> or be able to look them up in the archives. In short: defaults that
> may be good for you are most probably bad for (m)any other users of
> the board. Instead of spreading such bad defaults we default to not
> setting any.

just because ive seen you use this same logic before ("i said so") doesnt mean 
i agree with it or even understand it.  there is no such thing as "bad 
defaults" when it comes to network settings here.  having a default IP that 
doesnt match your local LAN is just as "bad" as not having any IP at all.  in 
both cases, things need the same amount of effort to change.
-mike

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 986e0dc..059155b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1090,6 +1090,10 @@  Peter Meerwald <devel@bct-electronic.com>
 
 	bct-brettl2	BF536
 
+M.Hasewinkel (MHA) <info@ssv-embedded.de>
+
+	dnp5370		BF537
+
 #########################################################################
 # End of MAINTAINERS list						#
 #########################################################################
diff --git a/board/dnp5370/Makefile b/board/dnp5370/Makefile
new file mode 100644
index 0000000..6651f3c
--- /dev/null
+++ b/board/dnp5370/Makefile
@@ -0,0 +1,54 @@ 
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2007 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS-y	:= $(BOARD).o
+
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
+SOBJS	:= $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/dnp5370/config.mk b/board/dnp5370/config.mk
new file mode 100644
index 0000000..8227506
--- /dev/null
+++ b/board/dnp5370/config.mk
@@ -0,0 +1,29 @@ 
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2001
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+# This is not actually used for Blackfin boards so do not change it
+#TEXT_BASE = do-not-use-me
+
+CONFIG_BFIN_CPU = bf537-0.3
diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c
new file mode 100644
index 0000000..da9eb5f
--- /dev/null
+++ b/board/dnp5370/dnp5370.c
@@ -0,0 +1,104 @@ 
+/*
+ * U-boot - main board file
+ *
+ * (C) Copyright 2010 3ality Digital Systems
+ *
+ * Copyright (c) 2005-2008 Analog Devices Inc.
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <common.h>
+#include <config.h>
+#include <asm/blackfin.h>
+#include <asm/net.h>
+#include <net.h>
+#include <netdev.h>
+#include <asm/gpio.h>
+
+static void disable_external_watchdog(void)
+{
+#ifdef CONFIG_DNP5370_EXT_WD_DISABLE
+	/* disable external HW watchdog with PH13 = WD1 = 1 */
+	gpio_request(GPIO_PH13, "ext_wd");
+	gpio_direction_output(GPIO_PH13, 1);
+#endif
+}
+
+int checkboard(void)
+{
+	printf("Board: SSV DilNet DNP5370\n");
+	return 0;
+}
+
+#ifdef CONFIG_BFIN_MAC
+static void board_init_enetaddr(uchar *mac_addr)
+{
+#ifdef CONFIG_SYS_NO_FLASH
+# define USE_MAC_IN_FLASH 0
+#else
+# define USE_MAC_IN_FLASH 1
+#endif
+	bool valid_mac = false;
+
+	if (USE_MAC_IN_FLASH) {
+		/* we cram the MAC in the last flash sector */
+		uchar *board_mac_addr = (uchar *)0x202F0000;
+		if (is_valid_ether_addr(board_mac_addr)) {
+			memcpy(mac_addr, board_mac_addr, 6);
+			valid_mac = true;
+		}
+	}
+
+	if (!valid_mac) {
+		puts("Warning: Generating 'random' MAC address\n");
+		bfin_gen_rand_mac(mac_addr);
+	}
+
+	eth_setenv_enetaddr("ethaddr", mac_addr);
+}
+
+int board_eth_init(bd_t *bis)
+{
+	return bfin_EMAC_initialize(bis);
+}
+#endif
+
+/* miscellaneous platform dependent initialisations */
+int misc_init_r(void)
+{
+	disable_external_watchdog();
+
+#ifdef CONFIG_BFIN_MAC
+	uchar enetaddr[6];
+	if (!eth_getenv_enetaddr("ethaddr", enetaddr))
+		board_init_enetaddr(enetaddr);
+#endif
+
+#ifndef CONFIG_SYS_NO_FLASH
+	/* we use the last sector for the MAC address / POST LDR */
+	extern flash_info_t flash_info[];
+	flash_protect(FLAG_PROTECT_SET, 0x202F0000, 0x202FFFFF, &flash_info[0]);
+#endif
+
+	return 0;
+}
diff --git a/boards.cfg b/boards.cfg
index 6da9959..7cb38fe 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -186,6 +186,7 @@  cm-bf537e                    blackfin    blackfin
 cm-bf537u                    blackfin    blackfin
 cm-bf548                     blackfin    blackfin
 cm-bf561                     blackfin    blackfin
+dnp5370                      blackfin    blackfin
 ibf-dsp561                   blackfin    blackfin
 ip04                         blackfin    blackfin
 tcm-bf518                    blackfin    blackfin
diff --git a/doc/README.dnp5370 b/doc/README.dnp5370
new file mode 100644
index 0000000..0172698
--- /dev/null
+++ b/doc/README.dnp5370
@@ -0,0 +1,67 @@ 
+This document describes the board support for
+Dil/NetPC DNP/5370 (http://www.dilnetpc.com/dnp0086.htm) module.
+The distributor is SSV (http://www.ssv-embedded.de),
+
+The module used to develop the support files contains:
+
+*   Processor: Blackfin BF537 Rev 0.3 (600 MHz core / 120MHz RAM)
+
+*   RAM: 32 MB SDRAM
+    Hynix HY57V561620FTP-H 810EA
+    Connected to Blackfin via "Expansion Bus"
+    Address range 0x0000.0000 - 0x1fff.ffff
+
+*   NOR flash: 32 MBit (4 MByte)
+    Exel Semiconductor ES29LVS320EB
+    Connected to Blackfin via "Expansion Bus",
+    Chip Selects 0, 1 and 2, each is connected
+    to a 1 MB memory bank at Blackfin, therefore
+    only 3 MB accessible.
+    Address range 0x2000.0000 - 0x202f.ffff
+    CFI compatible
+
+    Exel Semiconductor was bought by Rohm Semiconductor (www.rohm.com).
+
+*   NAND flash: 64 MBit (8 MByte)
+    Atmel 45DB642D-CNU
+    Connected to Blackfin via SPI
+    CFI compatible
+
+*   Davicom DM9161EP Ethernet PHY
+
+*   A SD card reader, connected via SPI
+
+*   Hardware watchdog MAX823 or TPS3823
+
+(other devices not listed here)
+
+To run it, the module must be inserted in a 64 pin DIL socket
+on another board, e.g. DNP/EVA13 (together: SSV SK28).
+
+The Blackfin is booted from NOR flash. The NOR flash data begins
+with the U-Boot code and is then followed by the Linux code.
+Finally, the MAC is stored in the last sector.
+You may need to adjust these settings to your needs.
+The memory map used to develop the board support is:
+
+Memory map:
+0x00000000 .. 0x01ffffff SDRAM
+0x20000000 .. 0x202fffff NOR flash
+
+RAM use:
+0x01f9bffc .. 0x01fbbffb U-Boot stack
+0x01f9c000 .. 0x01f9ffff U-Boot global data
+0x01fa0000 .. 0x01fbffff U-Boot malloc() RAM
+0x01fc0000 .. 0x01ffffff U-Boot execution RAM
+
+NOR flash use:
+0x20000000 .. 0x0002ffff U-Boot
+0x20004000 .. 0x20005fff U-Boot environment
+0x20030000 .. 0x202effff Linux kernel image
+0x202f0000 .. 0x202fffff MAC address sector
+
+NOR flash is 0x00300000 (3145728) bytes large (3 MB).
+Max space for compressed kernel in flash is 0x002c0000 (2883584) bytes (2.75 MB)
+Max space for u-boot in flash is 0x00030000 (196608) bytes (192 KB)
+
+The module is hardwired to BYPASS boot mode.
diff --git a/include/configs/dnp5370.h b/include/configs/dnp5370.h
new file mode 100644
index 0000000..42ded95
--- /dev/null
+++ b/include/configs/dnp5370.h
@@ -0,0 +1,131 @@ 
+/*
+ * U-boot - Configuration file for SSV DNP5370 board
+ */
+
+#ifndef __CONFIG_DNP5370_H__
+#define __CONFIG_DNP5370_H__
+
+/* this must come first */
+#include <asm/config-pre.h>
+
+/*
+ * Processor Settings
+ */
+#define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_BYPASS
+
+/*
+ * Clock Settings
+ *	CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
+ *	SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
+ */
+#define CONFIG_CLKIN_HZ                 25000000
+#define CONFIG_CLKIN_HALF               0
+#define CONFIG_PLL_BYPASS               0
+#define CONFIG_VCO_MULT                 24
+#define CONFIG_CCLK_DIV                 1
+#define CONFIG_SCLK_DIV                 5
+
+/*
+ * Memory Settings
+ */
+#define CONFIG_MEM_ADD_WDTH     9
+#define CONFIG_MEM_SIZE         32
+
+#define CONFIG_EBIU_SDRRC_VAL   0x03a0
+#define CONFIG_EBIU_SDBCTL_VAL  0x0013
+#define CONFIG_EBIU_SDGCTL_VAL  0x8091998d
+
+#define CONFIG_EBIU_AMGCTL_VAL  0xF7
+#define CONFIG_EBIU_AMBCTL0_VAL 0x7BB07BB0
+#define CONFIG_EBIU_AMBCTL1_VAL 0xFFC27BB0
+
+#define CONFIG_SYS_MONITOR_LEN  (256 * 1024)
+#define CONFIG_SYS_MALLOC_LEN   (128 * 1024)
+
+/*
+ * Network Settings
+ */
+#ifndef __ADSPBF534__
+#define CONFIG_IPADDR          10.100.100.21
+#define CONFIG_NETMASK         255.255.0.0
+#define CONFIG_GATEWAYIP       10.100.100.1
+#define CONFIG_SERVERIP        10.100.100.12
+#define CONFIG_ROOTPATH        /romfs
+
+#define CONFIG_NET_MULTI        1
+#define CONFIG_BFIN_MAC         1
+#define CONFIG_PHY_ADDR         0
+#define CONFIG_RMII             1
+
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#endif
+
+/*
+ * Flash Settings
+ *
+ * Only 3 MB of the 4 MB NOR flash are addressable.
+ * But limiting the flash size does not seem to work.
+ * It seems the CFI detection has precedence.
+ */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_BASE       0x20000000
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_MAX_FLASH_BANKS  1
+#define CONFIG_SYS_MAX_FLASH_SECT   71 /* (M29W320EB) */
+
+/* 512k reserved for u-boot */
+#define CONFIG_SYS_JFFS2_FIRST_SECTOR 15
+
+/*
+ * Env Storage Settings
+ */
+#define CONFIG_ENV_IS_IN_FLASH     1
+#define CONFIG_ENV_ADDR       0x20004000
+#define CONFIG_ENV_SIZE       0x00002000
+#define CONFIG_ENV_SECT_SIZE  0x00002000 /* Total Size of Environment Sector */
+#define CONFIG_ENV_OFFSET     0x00004000 /* (CONFIG_ENV_ADDR - CONFIG_FLASH_BASE) */
+
+#define ENV_IS_EMBEDDED
+#define LDS_BOARD_TEXT \
+	arch/blackfin/lib/libblackfin.o (.text*); \
+	arch/blackfin/cpu/libblackfin.o (.text*); \
+	. = DEFINED(env_offset) ? env_offset : .; \
+	common/env_embedded.o (.text*);
+
+/*
+ * Misc Settings
+ */
+#define CONFIG_CMD_GPIO
+#define CONFIG_CMD_STRINGS
+#define CONFIG_MISC_INIT_R
+#define CONFIG_RTC_BFIN
+#define CONFIG_SYS_LONGHELP
+
+/* This disables the hardware watchdog (not inside the bfin) */
+#define CONFIG_DNP5370_EXT_WD_DISABLE 1
+
+#define CONFIG_UART_CONSOLE 0
+#define CONFIG_BAUDRATE     115200
+#define CONFIG_BOOTCOMMAND  "bootm 0x20030000"
+#define CONFIG_BOOTARGS     "console=ttyBF0,115200 root=/dev/mtdblock3 rootfstype=ext2"
+
+/* Convenience commands to update Linux in NOR flash */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"fetchme=tftpboot 0x01000000 uImage;" \
+		"iminfo\0"\
+	"flashme=protect off 0x20030000 0x2003ffff;" \
+		"erase 0x20030000 0x202effff;" \
+		"cp.b 0x01000000 0x20030000 0x2c0000\0" \
+	"runme=bootm 0x01000000\0"
+
+/* this sets up the default list of enabled commands */
+#include <config_cmd_default.h>
+
+#ifndef CONFIG_BFIN_MAC
+# undef CONFIG_CMD_NET
+# undef CONFIG_CMD_NFS
+#endif
+
+#endif