summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/altera/nios2-generic/nios2-generic.c16
-rw-r--r--board/bct-brettl2/config.mk8
-rw-r--r--board/bf506f-ezkit/Makefile (renamed from board/mp2usb/Makefile)18
-rw-r--r--board/bf506f-ezkit/bf506f-ezkit.c27
-rw-r--r--board/bf518f-ezbrd/bf518f-ezbrd.c61
-rw-r--r--board/bf518f-ezbrd/config.mk8
-rw-r--r--board/bf525-ucr2/Makefile (renamed from board/bf537-pnav/config.mk)34
-rw-r--r--board/bf525-ucr2/bf525-ucr2.c16
-rw-r--r--board/bf526-ezbrd/bf526-ezbrd.c29
-rw-r--r--board/bf526-ezbrd/config.mk8
-rw-r--r--board/bf527-ad7160-eval/config.mk8
-rw-r--r--board/bf527-ezkit/config.mk8
-rw-r--r--board/bf527-sdp/config.mk10
-rw-r--r--board/bf533-ezkit/config.mk6
-rw-r--r--board/bf533-stamp/config.mk6
-rw-r--r--board/bf537-minotaur/config.mk8
-rw-r--r--board/bf537-srv1/config.mk8
-rw-r--r--board/bf537-stamp/config.mk6
-rw-r--r--board/bf538f-ezkit/config.mk6
-rw-r--r--board/bf548-ezkit/config.mk6
-rw-r--r--board/bf561-acvilon/config.mk6
-rw-r--r--board/bf561-ezkit/config.mk6
-rw-r--r--board/blackvme/config.mk32
-rw-r--r--board/cm-bf527/config.mk8
-rw-r--r--board/cm-bf533/config.mk6
-rw-r--r--board/cm-bf537e/config.mk6
-rw-r--r--board/cm-bf537u/config.mk6
-rw-r--r--board/cm-bf548/config.mk6
-rw-r--r--board/cm-bf561/config.mk6
-rw-r--r--board/davinci/ea20/Makefile2
-rw-r--r--board/dnp5370/Makefile (renamed from board/blackstamp/config.mk)36
-rw-r--r--board/dnp5370/dnp5370.c104
-rw-r--r--board/eNET/config.mk24
-rw-r--r--board/eNET/eNET_pci.c7
-rw-r--r--board/freescale/corenet_ds/tlb.c12
-rw-r--r--board/freescale/p1022ds/p1022ds.c56
-rw-r--r--board/ibf-dsp561/config.mk6
-rw-r--r--board/ip04/config.mk6
-rw-r--r--board/keymile/km_arm/km_arm.c7
-rw-r--r--board/keymile/mgcoge/mgcoge.c18
-rw-r--r--board/mp2usb/config.mk3
-rw-r--r--board/mp2usb/flash.c552
-rw-r--r--board/mp2usb/mp2usb.c98
-rw-r--r--board/tcm-bf518/config.mk8
-rw-r--r--board/tcm-bf537/config.mk6
45 files changed, 369 insertions, 955 deletions
diff --git a/board/altera/nios2-generic/nios2-generic.c b/board/altera/nios2-generic/nios2-generic.c
index 89848cf041..220a4c44a4 100644
--- a/board/altera/nios2-generic/nios2-generic.c
+++ b/board/altera/nios2-generic/nios2-generic.c
@@ -24,12 +24,28 @@
#include <common.h>
#include <netdev.h>
+#include <mtd/cfi_flash.h>
+#include <asm/io.h>
void text_base_hook(void); /* nop hook for text_base.S */
+#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR)
+static void __early_flash_cmd_reset(void)
+{
+ /* reset flash before we read env */
+ writeb(AMD_CMD_RESET, CONFIG_ENV_ADDR);
+ writeb(FLASH_CMD_RESET, CONFIG_ENV_ADDR);
+}
+void early_flash_cmd_reset(void)
+ __attribute__((weak,alias("__early_flash_cmd_reset")));
+#endif
+
int board_early_init_f(void)
{
text_base_hook();
+#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR)
+ early_flash_cmd_reset();
+#endif
return 0;
}
diff --git a/board/bct-brettl2/config.mk b/board/bct-brettl2/config.mk
index 0c02d440d7..799a6828ac 100644
--- a/board/bct-brettl2/config.mk
+++ b/board/bct-brettl2/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf536-0.3
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/mp2usb/Makefile b/board/bf506f-ezkit/Makefile
index 335734a7ab..cde8168ccf 100644
--- a/board/mp2usb/Makefile
+++ b/board/bf506f-ezkit/Makefile
@@ -1,5 +1,9 @@
#
-# (C) Copyright 2003-2006
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2008 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
@@ -25,14 +29,14 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o
-COBJS := mp2usb.o flash.o
+COBJS-y := $(BOARD).o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS-y))
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/bf506f-ezkit/bf506f-ezkit.c b/board/bf506f-ezkit/bf506f-ezkit.c
new file mode 100644
index 0000000000..638500d0c5
--- /dev/null
+++ b/board/bf506f-ezkit/bf506f-ezkit.c
@@ -0,0 +1,27 @@
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) 2008-2010 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <common.h>
+#include <asm/blackfin.h>
+
+int checkboard(void)
+{
+ printf("Board: ADI BF506F EZ-Kit board\n");
+ printf(" Support: http://blackfin.uclinux.org/\n");
+ return 0;
+}
+
+int board_early_init_f(void)
+{
+ bfin_write_EBIU_MODE(1);
+ SSYNC();
+ bfin_write_FLASH_CONTROL_CLEAR(1);
+ udelay(1);
+ bfin_write_FLASH_CONTROL_SET(1);
+ return 0;
+}
diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c
index ff1ac4cda8..09a2353e7d 100644
--- a/board/bf518f-ezbrd/bf518f-ezbrd.c
+++ b/board/bf518f-ezbrd/bf518f-ezbrd.c
@@ -30,24 +30,21 @@ int checkboard(void)
#if defined(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 0
- /* the MAC is stored in OTP memory page 0xDF */
- uint32_t ret;
- uint64_t otp_mac;
-
- ret = bfrom_OtpRead(0xDF, OTP_LOWER_HALF, &otp_mac);
- if (!(ret & OTP_MASTER_ERROR)) {
- uchar *otp_mac_p = (uchar *)&otp_mac;
-
- for (ret = 0; ret < 6; ++ret)
- mac_addr[ret] = otp_mac_p[5 - ret];
-
- if (is_valid_ether_addr(mac_addr))
+ if (USE_MAC_IN_FLASH) {
+ /* we cram the MAC in the last flash sector */
+ uchar *board_mac_addr = (uchar *)0x203F0096;
+ if (is_valid_ether_addr(board_mac_addr)) {
+ memcpy(mac_addr, board_mac_addr, 6);
valid_mac = true;
+ }
}
-#endif
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
@@ -57,6 +54,13 @@ static void board_init_enetaddr(uchar *mac_addr)
eth_setenv_enetaddr("ethaddr", mac_addr);
}
+/* Only the first run of boards had a KSZ switch */
+#if defined(CONFIG_BFIN_SPI) && __SILICON_REVISION__ == 0
+# define KSZ_POSSIBLE 1
+#else
+# define KSZ_POSSIBLE 0
+#endif
+
#define KSZ_MAX_HZ 5000000
#define KSZ_WRITE 0x02
@@ -109,17 +113,16 @@ static int ksz8893m_reset(struct spi_slave *slave)
return ret;
}
-int board_eth_init(bd_t *bis)
+static bool board_ksz_init(void)
{
- static bool switch_is_alive = false, phy_is_ksz = true;
- int ret;
+ static bool switch_is_alive = false;
if (!switch_is_alive) {
struct spi_slave *slave = spi_setup_slave(0, 1, KSZ_MAX_HZ, SPI_MODE_3);
if (slave) {
if (!spi_claim_bus(slave)) {
- phy_is_ksz = (ksz8893m_reg_read(slave, KSZ_REG_CHID) == 0x88);
- ret = phy_is_ksz ? ksz8893m_reset(slave) : 0;
+ bool phy_is_ksz = (ksz8893m_reg_read(slave, KSZ_REG_CHID) == 0x88);
+ int ret = phy_is_ksz ? ksz8893m_reset(slave) : 0;
switch_is_alive = (ret == 0);
spi_release_bus(slave);
}
@@ -127,10 +130,16 @@ int board_eth_init(bd_t *bis)
}
}
- if (switch_is_alive)
- return bfin_EMAC_initialize(bis);
- else
- return -1;
+ return switch_is_alive;
+}
+
+int board_eth_init(bd_t *bis)
+{
+ if (KSZ_POSSIBLE) {
+ if (!board_ksz_init())
+ return 0;
+ }
+ return bfin_EMAC_initialize(bis);
}
#endif
@@ -142,6 +151,12 @@ int misc_init_r(void)
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, 0x203F0000, 0x203FFFFF, &flash_info[0]);
+#endif
+
return 0;
}
diff --git a/board/bf518f-ezbrd/config.mk b/board/bf518f-ezbrd/config.mk
index 9a54dbfb86..799a6828ac 100644
--- a/board/bf518f-ezbrd/config.mk
+++ b/board/bf518f-ezbrd/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf518-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf537-pnav/config.mk b/board/bf525-ucr2/Makefile
index e29d87f592..cde8168ccf 100644
--- a/board/bf537-pnav/config.mk
+++ b/board/bf525-ucr2/Makefile
@@ -1,7 +1,9 @@
#
+# U-boot - Makefile
+#
# Copyright (c) 2005-2008 Analog Device Inc.
#
-# (C) Copyright 2001
+# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
@@ -23,10 +25,30 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
+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)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-CONFIG_BFIN_CPU = bf537-0.2
+sinclude $(obj).depend
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
+#########################################################################
diff --git a/board/bf525-ucr2/bf525-ucr2.c b/board/bf525-ucr2/bf525-ucr2.c
new file mode 100644
index 0000000000..3e6df1fca8
--- /dev/null
+++ b/board/bf525-ucr2/bf525-ucr2.c
@@ -0,0 +1,16 @@
+/* U-boot - bf525-ucr2.c board specific routines
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <common.h>
+
+int checkboard(void)
+{
+ printf("Board: bf525-ucr2\n");
+ printf("Support: http://www.ucrobotics.com/\n");
+ return 0;
+}
diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c
index 52d82cd87e..4695b1161a 100644
--- a/board/bf526-ezbrd/bf526-ezbrd.c
+++ b/board/bf526-ezbrd/bf526-ezbrd.c
@@ -27,21 +27,20 @@ int checkboard(void)
#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;
- /* the MAC is stored in OTP memory page 0xDF */
- uint32_t ret;
- uint64_t otp_mac;
-
- ret = bfrom_OtpRead(0xDF, OTP_LOWER_HALF, &otp_mac);
- if (!(ret & OTP_MASTER_ERROR)) {
- uchar *otp_mac_p = (uchar *)&otp_mac;
-
- for (ret = 0; ret < 6; ++ret)
- mac_addr[ret] = otp_mac_p[5 - ret];
-
- if (is_valid_ether_addr(mac_addr))
+ if (USE_MAC_IN_FLASH) {
+ /* we cram the MAC in the last flash sector */
+ uchar *board_mac_addr = (uchar *)0x203F0096;
+ if (is_valid_ether_addr(board_mac_addr)) {
+ memcpy(mac_addr, board_mac_addr, 6);
valid_mac = true;
+ }
}
if (!valid_mac) {
@@ -66,5 +65,11 @@ int misc_init_r(void)
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, 0x203F0000, 0x203FFFFF, &flash_info[0]);
+#endif
+
return 0;
}
diff --git a/board/bf526-ezbrd/config.mk b/board/bf526-ezbrd/config.mk
index 46c09ea8f4..799a6828ac 100644
--- a/board/bf526-ezbrd/config.mk
+++ b/board/bf526-ezbrd/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf526-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf527-ad7160-eval/config.mk b/board/bf527-ad7160-eval/config.mk
index a6c272aea7..799a6828ac 100644
--- a/board/bf527-ad7160-eval/config.mk
+++ b/board/bf527-ad7160-eval/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf527-0.2
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf527-ezkit/config.mk b/board/bf527-ezkit/config.mk
index 790fe99b04..799a6828ac 100644
--- a/board/bf527-ezkit/config.mk
+++ b/board/bf527-ezkit/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf527-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf527-sdp/config.mk b/board/bf527-sdp/config.mk
index 7cb935a2af..727177402f 100644
--- a/board/bf527-sdp/config.mk
+++ b/board/bf527-sdp/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf527-0.2
-
-CFLAGS_lib_generic += -O2
-CFLAGS_lzma += -O2
+CFLAGS_lib += -O2
+CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf533-ezkit/config.mk b/board/bf533-ezkit/config.mk
index a0d174924a..c0cb9ffc41 100644
--- a/board/bf533-ezkit/config.mk
+++ b/board/bf533-ezkit/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf533-0.3
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf533-stamp/config.mk b/board/bf533-stamp/config.mk
index a0d174924a..c0cb9ffc41 100644
--- a/board/bf533-stamp/config.mk
+++ b/board/bf533-stamp/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf533-0.3
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf537-minotaur/config.mk b/board/bf537-minotaur/config.mk
index de026356df..4bb6506d84 100644
--- a/board/bf537-minotaur/config.mk
+++ b/board/bf537-minotaur/config.mk
@@ -23,11 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf537-0.2
-
# Set some default LDR flags based on boot mode.
-LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
+LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
diff --git a/board/bf537-srv1/config.mk b/board/bf537-srv1/config.mk
index de026356df..4bb6506d84 100644
--- a/board/bf537-srv1/config.mk
+++ b/board/bf537-srv1/config.mk
@@ -23,11 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf537-0.2
-
# Set some default LDR flags based on boot mode.
-LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
+LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
diff --git a/board/bf537-stamp/config.mk b/board/bf537-stamp/config.mk
index 6694f06617..7c023d1fea 100644
--- a/board/bf537-stamp/config.mk
+++ b/board/bf537-stamp/config.mk
@@ -23,15 +23,9 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf537-0.2
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf538f-ezkit/config.mk b/board/bf538f-ezkit/config.mk
index 4ab1397313..c0cb9ffc41 100644
--- a/board/bf538f-ezkit/config.mk
+++ b/board/bf538f-ezkit/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf538-0.4
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf548-ezkit/config.mk b/board/bf548-ezkit/config.mk
index 9aa1761512..7f38b1469d 100644
--- a/board/bf548-ezkit/config.mk
+++ b/board/bf548-ezkit/config.mk
@@ -23,11 +23,6 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf548-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
@@ -37,4 +32,3 @@ LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1
LDR_FLAGS-BFIN_BOOT_SPI_MASTER := --dma 1
LDR_FLAGS-BFIN_BOOT_UART := --dma 1
LDR_FLAGS-BFIN_BOOT_NAND := --dma 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf561-acvilon/config.mk b/board/bf561-acvilon/config.mk
index 5c88114ac4..4c811ba359 100644
--- a/board/bf561-acvilon/config.mk
+++ b/board/bf561-acvilon/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf561-0.5
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf561-ezkit/config.mk b/board/bf561-ezkit/config.mk
index 19cdefc147..4c811ba359 100644
--- a/board/bf561-ezkit/config.mk
+++ b/board/bf561-ezkit/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf561-0.3
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/blackvme/config.mk b/board/blackvme/config.mk
deleted file mode 100644
index 4d6e0ba8c7..0000000000
--- a/board/blackvme/config.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf561-0.5
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/cm-bf527/config.mk b/board/cm-bf527/config.mk
index 790fe99b04..799a6828ac 100644
--- a/board/cm-bf527/config.mk
+++ b/board/cm-bf527/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf527-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/cm-bf533/config.mk b/board/cm-bf533/config.mk
index a0d174924a..c0cb9ffc41 100644
--- a/board/cm-bf533/config.mk
+++ b/board/cm-bf533/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf533-0.3
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/cm-bf537e/config.mk b/board/cm-bf537e/config.mk
index c5d45c7db7..c0cb9ffc41 100644
--- a/board/cm-bf537e/config.mk
+++ b/board/cm-bf537e/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf537-0.2
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/cm-bf537u/config.mk b/board/cm-bf537u/config.mk
index c5d45c7db7..c0cb9ffc41 100644
--- a/board/cm-bf537u/config.mk
+++ b/board/cm-bf537u/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf537-0.2
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/cm-bf548/config.mk b/board/cm-bf548/config.mk
index da6aa52dfe..5adb6fc163 100644
--- a/board/cm-bf548/config.mk
+++ b/board/cm-bf548/config.mk
@@ -23,11 +23,6 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf548-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
@@ -36,4 +31,3 @@ LDR_FLAGS-BFIN_BOOT_PARA := --dma 6
LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1
LDR_FLAGS-BFIN_BOOT_SPI_MASTER := --dma 1
LDR_FLAGS-BFIN_BOOT_UART := --dma 1
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/cm-bf561/config.mk b/board/cm-bf561/config.mk
index 19cdefc147..4c811ba359 100644
--- a/board/cm-bf561/config.mk
+++ b/board/cm-bf561/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf561-0.3
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/davinci/ea20/Makefile b/board/davinci/ea20/Makefile
index ddd2564269..67ec4612a9 100644
--- a/board/davinci/ea20/Makefile
+++ b/board/davinci/ea20/Makefile
@@ -25,7 +25,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS-y += ea20.o
diff --git a/board/blackstamp/config.mk b/board/dnp5370/Makefile
index 0ca3c904a3..0d176764f1 100644
--- a/board/blackstamp/config.mk
+++ b/board/dnp5370/Makefile
@@ -1,7 +1,9 @@
#
-# Copyright (c) 2005-2008 Analog Device Inc.
+# U-boot - Makefile
#
-# (C) Copyright 2001
+# 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
@@ -23,10 +25,30 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
+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)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-CONFIG_BFIN_CPU = bf532-0.5
+sinclude $(obj).depend
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
+#########################################################################
diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c
new file mode 100644
index 0000000000..da9eb5f191
--- /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/board/eNET/config.mk b/board/eNET/config.mk
deleted file mode 100644
index 9d2dfa535b..0000000000
--- a/board/eNET/config.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# (C) Copyright 2002
-# Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
-#
-# 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
-#
-
-LDPPFLAGS += -DFLASH_SIZE=0x40000
diff --git a/board/eNET/eNET_pci.c b/board/eNET/eNET_pci.c
index fefb1a4fbe..a03090e540 100644
--- a/board/eNET/eNET_pci.c
+++ b/board/eNET/eNET_pci.c
@@ -1,9 +1,9 @@
/*
- * (C) Copyright 2008
- * Graeme Russ, graeme.russ@gmail.com.
+ * (C) Copyright 2008,2009
+ * Graeme Russ, <graeme.russ@gmail.com>
*
* (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -23,6 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
+
#include <common.h>
#include <pci.h>
#include <asm/pci.h>
diff --git a/board/freescale/corenet_ds/tlb.c b/board/freescale/corenet_ds/tlb.c
index 1ae0416248..fe77e798a8 100644
--- a/board/freescale/corenet_ds/tlb.c
+++ b/board/freescale/corenet_ds/tlb.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 Freescale Semiconductor, Inc.
+ * Copyright 2008-2011 Freescale Semiconductor, Inc.
*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@@ -51,9 +51,19 @@ struct fsl_e_tlb_entry tlb_table[] = {
/* TLB 1 */
/* *I*** - Covers boot page */
+#if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L3_ADDR)
+ /*
+ * *I*G - L3SRAM. When L3 is used as 1M SRAM, the address of the
+ * SRAM is at 0xfff00000, it covered the 0xfffff000.
+ */
+ SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L3_ADDR, CONFIG_SYS_INIT_L3_ADDR,
+ MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+ 0, 0, BOOKE_PAGESZ_1M, 1),
+#else
SET_TLB_ENTRY(1, 0xfffff000, 0xfffff000,
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
0, 0, BOOKE_PAGESZ_4K, 1),
+#endif
/* *I*G* - CCSRBAR */
SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 6f20dc3b9b..8b78404b85 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -93,11 +93,19 @@ int checkboard(void)
/* Choose the 11.2896Mhz codec reference clock */
#define CONFIG_PIXIS_BRDCFG1_AUDCLK_11 0x01
+/* Connect to USB2 */
+#define CONFIG_PIXIS_BRDCFG0_USB2 0x10
+/* Connect to TFM bus */
+#define CONFIG_PIXIS_BRDCFG1_TDM 0x0c
+/* Connect to SPI */
+#define CONFIG_PIXIS_BRDCFG0_SPI 0x80
+
int misc_init_r(void)
{
u8 temp;
const char *audclk;
size_t arglen;
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
/* For DVI, enable the TFP410 Encoder. */
@@ -115,22 +123,48 @@ int misc_init_r(void)
return -1;
debug("DVI Encoder Read: 0x%02x\n",temp);
+ /* Enable the USB2 in PMUXCR2 and FGPA */
+ if (hwconfig("usb2")) {
+ clrsetbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_ETSECUSB_MASK,
+ MPC85xx_PMUXCR2_USB);
+ setbits_8(&pixis->brdcfg0, CONFIG_PIXIS_BRDCFG0_USB2);
+ }
+
+ /* tdm and audio can not enable simultaneous*/
+ if (hwconfig("tdm") && hwconfig("audclk")){
+ printf("WARNING: TDM and AUDIO can not be enabled simultaneous !\n");
+ return -1;
+ }
+
+ /* Enable the TDM in PMUXCR and FGPA */
+ if (hwconfig("tdm")) {
+ clrsetbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_TDM_MASK,
+ MPC85xx_PMUXCR_TDM);
+ setbits_8(&pixis->brdcfg1, CONFIG_PIXIS_BRDCFG1_TDM);
+ /* TDM need some configration option by SPI */
+ clrsetbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_SPI_MASK,
+ MPC85xx_PMUXCR_SPI);
+ setbits_8(&pixis->brdcfg0, CONFIG_PIXIS_BRDCFG0_SPI);
+ }
+
/*
* Enable the reference clock for the WM8776 codec, and route the MUX
* pins for SSI. The default is the 12.288 MHz clock
*/
- temp = in_8(&pixis->brdcfg1) & ~(CONFIG_PIXIS_BRDCFG1_SSI_TDM_MASK |
- CONFIG_PIXIS_BRDCFG1_AUDCLK_MASK);
- temp |= CONFIG_PIXIS_BRDCFG1_SSI_TDM_SSI;
-
- audclk = hwconfig_arg("audclk", &arglen);
- /* Check the first two chars only */
- if (audclk && (strncmp(audclk, "11", 2) == 0))
- temp |= CONFIG_PIXIS_BRDCFG1_AUDCLK_11;
- else
- temp |= CONFIG_PIXIS_BRDCFG1_AUDCLK_12;
- out_8(&pixis->brdcfg1, temp);
+ if (hwconfig("audclk")) {
+ temp = in_8(&pixis->brdcfg1) & ~(CONFIG_PIXIS_BRDCFG1_SSI_TDM_MASK |
+ CONFIG_PIXIS_BRDCFG1_AUDCLK_MASK);
+ temp |= CONFIG_PIXIS_BRDCFG1_SSI_TDM_SSI;
+
+ audclk = hwconfig_arg("audclk", &arglen);
+ /* Check the first two chars only */
+ if (audclk && (strncmp(audclk, "11", 2) == 0))
+ temp |= CONFIG_PIXIS_BRDCFG1_AUDCLK_11;
+ else
+ temp |= CONFIG_PIXIS_BRDCFG1_AUDCLK_12;
+ setbits_8(&pixis->brdcfg1, temp);
+ }
return 0;
}
diff --git a/board/ibf-dsp561/config.mk b/board/ibf-dsp561/config.mk
index 80b527c6c5..afa7141816 100644
--- a/board/ibf-dsp561/config.mk
+++ b/board/ibf-dsp561/config.mk
@@ -23,11 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf561-0.5
-
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/ip04/config.mk b/board/ip04/config.mk
index fc818fba43..7c023d1fea 100644
--- a/board/ip04/config.mk
+++ b/board/ip04/config.mk
@@ -23,15 +23,9 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf532-0.5
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 2e20644fba..dcf0f422eb 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -41,9 +41,6 @@
DECLARE_GLOBAL_DATA_PTR;
-static int io_dev;
-extern I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf);
-
/* Multi-Purpose Pins Functionality configuration */
u32 kwmpp_config[] = {
MPP0_NF_IO2,
@@ -122,13 +119,9 @@ int ethernet_present(void)
int misc_init_r(void)
{
- I2C_MUX_DEVICE *i2cdev;
char *str;
int mach_type;
- /* add I2C Bus for I/O Expander */
- i2cdev = i2c_mux_ident_muxstring((uchar *)"pca9554a:70:a");
- io_dev = i2cdev->busid;
puts("Piggy:");
if (ethernet_present() == 0)
puts (" not");
diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index 5c9496c3ce..5dcdf37384 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -293,6 +293,24 @@ int checkboard(void)
return 0;
}
+#define DIPSWITCH_OFFSET 0x89
+#define DIPSWITCH_MASK 0x0f
+
+int last_stage_init(void)
+{
+ u8 dip_switch;
+ /* Dip switch */
+ dip_switch = readb(CONFIG_SYS_BFTICU_BASE + DIPSWITCH_OFFSET);
+ dip_switch &= DIPSWITCH_MASK;
+ /* dip switch 'full reset' or 'db erase' */
+ if (dip_switch & 0x1 || dip_switch & 0x2) {
+ /* start bootloader */
+ puts("DIP: Enabled\n");
+ setenv("actual_bank", "0");
+ }
+ return 0;
+}
+
/*
* Early board initalization.
*/
diff --git a/board/mp2usb/config.mk b/board/mp2usb/config.mk
deleted file mode 100644
index 948e4ffb69..0000000000
--- a/board/mp2usb/config.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0x27F00000
-## For testing: load at 0x20100000 and "go" at 0x201000A4
-#CONFIG_SYS_TEXT_BASE = 0x20100000
diff --git a/board/mp2usb/flash.c b/board/mp2usb/flash.c
deleted file mode 100644
index 21a8ef9e54..0000000000
--- a/board/mp2usb/flash.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * (C) Copyright 2001
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * Modified for the MP2USB by (C) Copyright 2005 Eric Benard
- * ebenard@eukrea.com
- *
- * 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 <common.h>
-#include <linux/byteorder/swab.h>
-
-#define CONFIG_SYS_MAX_FLASH_BANKS 1
-#define PHYS_FLASH_SECT_SIZE 0x00020000 /* 128 KB sectors (x1) */
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
-
-#define FLASH_PORT_WIDTH ushort
-#define FLASH_PORT_WIDTHV vu_short
-#define SWAP(x) __swab16(x)
-
-#define FPW FLASH_PORT_WIDTH
-#define FPWV FLASH_PORT_WIDTHV
-
-#define mb() __asm__ __volatile__ ("" : : : "memory")
-
-/* Intel-compatible flash commands */
-#define INTEL_PROGRAM 0x00100010
-#define INTEL_ERASE 0x00200020
-#define INTEL_PROG 0x00400040
-#define INTEL_CLEAR 0x00500050
-#define INTEL_LOCKBIT 0x00600060
-#define INTEL_PROTECT 0x00010001
-#define INTEL_STATUS 0x00700070
-#define INTEL_READID 0x00900090
-#define INTEL_SUSPEND 0x00B000B0
-#define INTEL_CONFIRM 0x00D000D0
-#define INTEL_RESET 0xFFFFFFFF
-
-/* Intel-compatible flash status bits */
-#define INTEL_FINISHED 0x00800080
-#define INTEL_OK 0x00800080
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-static ulong flash_get_size (FPW *addr, flash_info_t *info);
-static int write_data (flash_info_t *info, ulong dest, FPW data);
-static void flash_get_offsets (ulong base, flash_info_t *info);
-void inline spin_wheel (void);
-
-/*-----------------------------------------------------------------------
- */
-
-unsigned long flash_init (void)
-{
- int i;
- ulong size = 0;
-
- for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
- switch (i) {
- case 0:
- flash_get_size ((FPW *) PHYS_FLASH_1, &flash_info[i]);
- flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
- break;
- default:
- panic ("configured too many flash banks!\n");
- break;
- }
- size += flash_info[i].size;
- }
-
- /* Protect monitor and environment sectors
- */
- flash_protect ( FLAG_PROTECT_SET,
- CONFIG_SYS_FLASH_BASE,
- CONFIG_SYS_FLASH_BASE + monitor_flash_len - 1,
- &flash_info[0] );
-
- flash_protect ( FLAG_PROTECT_SET,
- CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] );
-
- return size;
-}
-
-/*-----------------------------------------------------------------------
- */
-static void flash_get_offsets (ulong base, flash_info_t *info)
-{
- int i;
-
- if (info->flash_id == FLASH_UNKNOWN) {
- return;
- }
-
- if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
- for (i = 0; i < info->sector_count; i++) {
- info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
- info->protect[i] = 0;
- }
- }
-}
-
-/*-----------------------------------------------------------------------
- */
-void flash_print_info (flash_info_t *info)
-{
- int i;
-
- if (info->flash_id == FLASH_UNKNOWN) {
- printf ("missing or unknown FLASH type\n");
- return;
- }
-
- switch (info->flash_id & FLASH_VENDMASK) {
- case FLASH_MAN_INTEL:
- printf ("INTEL ");
- break;
- default:
- printf ("Unknown Vendor ");
- break;
- }
-
- switch (info->flash_id & FLASH_TYPEMASK) {
- case FLASH_28F640J3A:
- printf ("28F640J3A\n");
- break;
- case FLASH_28F128J3A:
- printf ("28F128J3A\n");
- break;
- default:
- printf ("Unknown Chip Type\n");
- break;
- }
-
- printf (" Size: %ld MB in %d Sectors\n",
- info->size >> 20, info->sector_count);
-
- printf (" Sector Start Addresses:");
- for (i = 0; i < info->sector_count; ++i) {
- if ((i % 5) == 0)
- printf ("\n ");
- printf (" %08lX%s",
- info->start[i],
- info->protect[i] ? " (RO)" : " ");
- }
- printf ("\n");
- return;
-}
-
-/*
- * The following code cannot be run from FLASH!
- */
-static ulong flash_get_size (FPW *addr, flash_info_t *info)
-{
- volatile FPW value;
-
- /* Write auto select command: read Manufacturer ID */
- addr[0x5555] = (FPW) 0x00AA00AA;
- addr[0x2AAA] = (FPW) 0x00550055;
- addr[0x5555] = (FPW) 0x00900090;
-
- mb ();
- value = addr[0];
-
- switch (value) {
-
- case (FPW) INTEL_MANUFACT:
- info->flash_id = FLASH_MAN_INTEL;
- break;
-
- default:
- info->flash_id = FLASH_UNKNOWN;
- info->sector_count = 0;
- info->size = 0;
- addr[0] = (FPW) INTEL_RESET; /* restore read mode */
- return (0); /* no or unknown flash */
- }
-
- mb ();
- value = addr[1]; /* device ID */
-
- switch (value) {
-
- case (FPW) INTEL_ID_28F640J3A:
- info->flash_id += FLASH_28F640J3A;
- info->sector_count = 64;
- info->size = 0x00800000;
- break; /* => 8 MB */
-
- case (FPW) INTEL_ID_28F128J3A:
- info->flash_id += FLASH_28F128J3A;
- info->sector_count = 128;
- info->size = 0x01000000;
- break; /* => 16 MB */
-
- default:
- info->flash_id = FLASH_UNKNOWN;
- break;
- }
-
- if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) {
- printf ("** ERROR: sector count %d > max (%d) **\n",
- info->sector_count, CONFIG_SYS_MAX_FLASH_SECT);
- info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
- }
-
- addr[0] = (FPW) INTEL_RESET; /* restore read mode */
-
- return (info->size);
-}
-
-
-/*-----------------------------------------------------------------------
- */
-
-int flash_erase (flash_info_t *info, int s_first, int s_last)
-{
- int prot, sect;
- ulong type, start, last;
- int rcode = 0;
- int cflag, iflag;
-
- if ((s_first < 0) || (s_first > s_last)) {
- if (info->flash_id == FLASH_UNKNOWN) {
- printf ("- missing\n");
- } else {
- printf ("- no sectors to erase\n");
- }
- return 1;
- }
-
- type = (info->flash_id & FLASH_VENDMASK);
- if ((type != FLASH_MAN_INTEL)) {
- printf ("Can't erase unknown flash type %08lx - aborted\n",
- info->flash_id);
- return 1;
- }
-
- prot = 0;
- for (sect = s_first; sect <= s_last; ++sect) {
- if (info->protect[sect]) {
- prot++;
- }
- }
-
- if (prot) {
- printf ("- Warning: %d protected sectors will not be erased!\n",
- prot);
- } else {
- printf ("\n");
- }
-
- start = get_timer (0);
- last = start;
-
- /*
- * Disable interrupts which might cause a timeout
- * here. Remember that our exception vectors are
- * at address 0 in the flash, and we don't want a
- * (ticker) exception to happen while the flash
- * chip is in programming mode.
- */
- cflag = icache_status ();
- icache_disable ();
- /* Disable interrupts which might cause a timeout here */
- iflag = disable_interrupts ();
-
- /* Start erase on unprotected sectors */
- for (sect = s_first; sect <= s_last; sect++) {
- if (info->protect[sect] == 0) { /* not protected */
- FPWV *addr = (FPWV *) (info->start[sect]);
- FPW status;
-
- printf ("Erasing sector %2d ... ", sect);
-
- /* arm simple, non interrupt dependent timer */
- reset_timer_masked ();
-
- *addr = (FPW) INTEL_CLEAR; /* clear status register */
- *addr = (FPW) INTEL_ERASE; /* erase setup */
- *addr = (FPW) INTEL_CONFIRM; /* erase confirm */
-
- while (((status = *addr) & (FPW) INTEL_FINISHED) != (FPW) INTEL_FINISHED) {
- if (get_timer_masked () > CONFIG_SYS_FLASH_ERASE_TOUT) {
- printf ("Timeout\n");
- *addr = (FPW) INTEL_SUSPEND; /* suspend erase */
- *addr = (FPW) INTEL_RESET; /* reset to read mode */
- rcode = 1;
- break;
- }
- }
-
- *addr = (FPWV)INTEL_CLEAR; /* clear status register cmd. */
- *addr = (FPWV)INTEL_RESET; /* resest to read mode */
-
- printf (" done\n");
- }
- }
-
- if (iflag)
- enable_interrupts ();
-
- if (cflag)
- icache_enable ();
-
- return rcode;
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- * 4 - Flash not identified
- */
-
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
- ulong cp, wp;
- FPW data;
- int count, i, l, rc, port_width;
-
- if (info->flash_id == FLASH_UNKNOWN) {
- return 4;
- }
-
- /* get lower word aligned address */
- wp = (addr & ~1);
- port_width = 2;
-
- /*
- * handle unaligned start bytes
- */
- if ((l = addr - wp) != 0) {
- data = 0;
- for (i = 0, cp = wp; i < l; ++i, ++cp) {
- data = (data << 8) | (*(uchar *) cp);
- }
- for (; i < port_width && cnt > 0; ++i) {
- data = (data << 8) | *src++;
- --cnt;
- ++cp;
- }
- for (; cnt == 0 && i < port_width; ++i, ++cp) {
- data = (data << 8) | (*(uchar *) cp);
- }
-
- if ((rc = write_data (info, wp, SWAP (data))) != 0) {
- return (rc);
- }
- wp += port_width;
- }
-
- /*
- * handle word aligned part
- */
- count = 0;
- while (cnt >= port_width) {
- data = 0;
- for (i = 0; i < port_width; ++i) {
- data = (data << 8) | *src++;
- }
- if ((rc = write_data (info, wp, SWAP (data))) != 0) {
- return (rc);
- }
- wp += port_width;
- cnt -= port_width;
- if (count++ > 0x800) {
- spin_wheel ();
- count = 0;
- }
- }
-
- if (cnt == 0) {
- return (0);
- }
-
- /*
- * handle unaligned tail bytes
- */
- data = 0;
- for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) {
- data = (data << 8) | *src++;
- --cnt;
- }
- for (; i < port_width; ++i, ++cp) {
- data = (data << 8) | (*(uchar *) cp);
- }
-
- return (write_data (info, wp, SWAP (data)));
-}
-
-/*-----------------------------------------------------------------------
- * Write a word or halfword to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_data (flash_info_t *info, ulong dest, FPW data)
-{
- FPWV *addr = (FPWV *) dest;
- ulong status;
- int cflag, iflag;
-
- /* Check if Flash is (sufficiently) erased */
- if ((*addr & data) != data) {
- printf ("not erased at %08lx (%lx)\n", (ulong) addr, (ulong) *addr);
- return (2);
- }
- /*
- * Disable interrupts which might cause a timeout
- * here. Remember that our exception vectors are
- * at address 0 in the flash, and we don't want a
- * (ticker) exception to happen while the flash
- * chip is in programming mode.
- */
- cflag = icache_status ();
- icache_disable ();
- /* Disable interrupts which might cause a timeout here */
- iflag = disable_interrupts ();
-
- *addr = (FPW) INTEL_PROG; /* write setup */
- *addr = data;
-
- /* arm simple, non interrupt dependent timer */
- reset_timer_masked ();
-
- /* wait while polling the status register */
- while (((status = *addr) & (FPW) INTEL_FINISHED) != (FPW) INTEL_FINISHED) {
- if (get_timer_masked () > CONFIG_SYS_FLASH_WRITE_TOUT) {
- *addr = (FPW) INTEL_RESET; /* restore read mode */
- return (1);
- }
- }
-
- *addr = (FPW) INTEL_RESET; /* restore read mode */
-
- if (iflag)
- enable_interrupts ();
-
- if (cflag)
- icache_enable ();
-
- return (0);
-}
-
-void inline spin_wheel (void)
-{
- static int p = 0;
- static char w[] = "\\/-";
-
- printf ("\010%c", w[p]);
- (++p == 3) ? (p = 0) : 0;
-}
-
-/*-----------------------------------------------------------------------
- * Set/Clear sector's lock bit, returns:
- * 0 - OK
- * 1 - Error (timeout, voltage problems, etc.)
- */
-int flash_real_protect(flash_info_t *info, long sector, int prot)
-{
- int i;
- int rc = 0;
- FPWV *addr = (FPWV *)(info->start[sector]);
- int flag = disable_interrupts();
-
- *addr = (FPW) INTEL_CLEAR; /* Clear status register */
- if (prot) { /* Set sector lock bit */
- *addr = (FPW) INTEL_LOCKBIT; /* Sector lock bit */
- *addr = (FPW) INTEL_PROTECT; /* set */
- }
- else { /* Clear sector lock bit */
- *addr = (FPW) INTEL_LOCKBIT; /* All sectors lock bits */
- *addr = (FPW) INTEL_CONFIRM; /* clear */
- }
-
- reset_timer_masked ();
-
- while ((*addr & (FPW) INTEL_FINISHED) != (FPW) INTEL_FINISHED) {
- if (get_timer_masked () > CONFIG_SYS_FLASH_UNLOCK_TOUT) {
- printf("Flash lock bit operation timed out\n");
- rc = 1;
- break;
- }
- }
-
- if (*addr != (FPW) INTEL_OK) {
- printf("Flash lock bit operation failed at %08X, CSR=%08X\n",
- (uint)addr, (uint)*addr);
- rc = 1;
- }
-
- if (!rc)
- info->protect[sector] = prot;
-
- /*
- * Clear lock bit command clears all sectors lock bits, so
- * we have to restore lock bits of protected sectors.
- */
- if (!prot)
- {
- for (i = 0; i < info->sector_count; i++)
- {
- if (info->protect[i])
- {
- reset_timer_masked ();
- addr = (FPWV *) (info->start[i]);
- *addr = (FPW) INTEL_LOCKBIT; /* Sector lock bit */
- *addr = (FPW) INTEL_PROTECT; /* set */
- while ((*addr & (FPW) INTEL_FINISHED) != (FPW) INTEL_FINISHED)
- {
- if (get_timer_masked () > CONFIG_SYS_FLASH_UNLOCK_TOUT)
- {
- printf("Flash lock bit operation timed out\n");
- rc = 1;
- break;
- }
- }
- }
- }
- }
-
- if (flag)
- enable_interrupts();
-
- *addr = (FPW) INTEL_RESET; /* Reset to read array mode */
-
- return rc;
-}
diff --git a/board/mp2usb/mp2usb.c b/board/mp2usb/mp2usb.c
deleted file mode 100644
index e5eba6bbc0..0000000000
--- a/board/mp2usb/mp2usb.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * Modified for the MP2USB by (C) Copyright 2005 Eric Benard
- * ebenard@eukrea.com
- *
- * 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 <common.h>
-#include <asm/arch/AT91RM9200.h>
-#include <netdev.h>
-#include <asm/io.h>
-#if defined(CONFIG_DRIVER_ETHER)
-#include <at91rm9200_net.h>
-#include <dm9161.h>
-#endif
-#include <asm/mach-types.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/*
- * Miscelaneous platform dependent initialisations
- */
-
-int board_init (void)
-{
- /* Enable Ctrlc */
- console_init_f ();
-
- /* memory and cpu-speed are setup before relocation */
- /* so we do _nothing_ here */
-
- /* arch number of MP2USB-Board. */
- gd->bd->bi_arch_number = MACH_TYPE_MP2USB;
- /* adress of boot parameters */
- gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
-
- return 0;
-}
-
-int dram_init (void)
-{
- gd->bd->bi_dram[0].start = PHYS_SDRAM;
- gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
- return 0;
-}
-
-#ifdef CONFIG_DRIVER_ETHER
-#if defined(CONFIG_CMD_NET)
-
-/*
- * Name:
- * at91rm9200_GetPhyInterface
- * Description:
- * Initialise the interface functions to the PHY
- * Arguments:
- * None
- * Return value:
- * None
- */
-void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
-{
- p_phyops->Init = dm9161_InitPhy;
- p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
- p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
- p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
-}
-
-#endif
-#endif /* CONFIG_DRIVER_ETHER */
-
-#ifdef CONFIG_DRIVER_AT91EMAC
-int board_eth_init(bd_t *bis)
-{
- int rc = 0;
- rc = at91emac_register(bis, 0);
- return rc;
-}
-#endif
diff --git a/board/tcm-bf518/config.mk b/board/tcm-bf518/config.mk
index 9a54dbfb86..799a6828ac 100644
--- a/board/tcm-bf518/config.mk
+++ b/board/tcm-bf518/config.mk
@@ -23,13 +23,5 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf518-0.0
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/tcm-bf537/config.mk b/board/tcm-bf537/config.mk
index c5d45c7db7..c0cb9ffc41 100644
--- a/board/tcm-bf537/config.mk
+++ b/board/tcm-bf537/config.mk
@@ -23,14 +23,8 @@
# MA 02111-1307 USA
#
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
-CONFIG_BFIN_CPU = bf537-0.2
-
CFLAGS_lib += -O2
CFLAGS_lib/lzma += -O2
# Set some default LDR flags based on boot mode.
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))