summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-03-11 12:02:40 -0400
committerTom Rini <trini@ti.com>2013-03-11 12:16:13 -0400
commit76b40ab41eff1f402ee52ba768b09daad293b9bb (patch)
tree4956296adbdc8939aa49d84fa9bd497eef65b7f4 /board
parentde62688bb61c499ecc2d70a3aa8ccf90bb7a8ef6 (diff)
parentfc959081d41aab2d6f4614c5fb3dd1b77ffcdcf4 (diff)
downloadtalos-obmc-uboot-76b40ab41eff1f402ee52ba768b09daad293b9bb.tar.gz
talos-obmc-uboot-76b40ab41eff1f402ee52ba768b09daad293b9bb.zip
Merge u-boot/master into u-boot-ti/master
In master we had already taken a patch to fix the davinci GPIO code for CONFIG_SOC_DM646X and in u-boot-ti we have additional patches to support DA830 (which is CONFIG_SOC_DA8XX && !CONFIG_SOC_DA850). Resolve these conflicts manually and comment the #else/#endif lines for clarity. Conflicts: arch/arm/include/asm/arch-davinci/gpio.h drivers/gpio/da8xx_gpio.c Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/bf609-ezkit/Makefile55
-rw-r--r--board/bf609-ezkit/bf609-ezkit.c67
-rw-r--r--board/chromebook-x86/dts/link.dts2
-rw-r--r--board/keymile/common/common.c13
-rw-r--r--board/keymile/common/ivm.c48
-rw-r--r--board/keymile/km82xx/km82xx.c8
-rw-r--r--board/keymile/km83xx/km83xx.c103
-rw-r--r--board/keymile/scripts/develop-common.txt5
-rw-r--r--board/keymile/scripts/ramfs-common.txt5
-rw-r--r--board/technexion/twister/twister.c8
-rw-r--r--board/technexion/twister/twister.h2
-rw-r--r--board/timll/devkit8000/devkit8000.c8
-rw-r--r--board/timll/devkit8000/devkit8000.h3
13 files changed, 268 insertions, 59 deletions
diff --git a/board/bf609-ezkit/Makefile b/board/bf609-ezkit/Makefile
new file mode 100644
index 0000000000..0bb8fe643e
--- /dev/null
+++ b/board/bf609-ezkit/Makefile
@@ -0,0 +1,55 @@
+#
+# 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
+# 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
+COBJS-$(CONFIG_BFIN_SOFT_SWITCH) += soft_switch.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
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/bf609-ezkit/bf609-ezkit.c b/board/bf609-ezkit/bf609-ezkit.c
new file mode 100644
index 0000000000..0388226db4
--- /dev/null
+++ b/board/bf609-ezkit/bf609-ezkit.c
@@ -0,0 +1,67 @@
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) 2008-2011 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/blackfin.h>
+#include <asm/io.h>
+#include <asm/portmux.h>
+#include "soft_switch.h"
+
+int checkboard(void)
+{
+ printf("Board: ADI BF609 EZ-Kit board\n");
+ printf(" Support: http://blackfin.uclinux.org/\n");
+ return 0;
+}
+
+int board_early_init_f(void)
+{
+ static const unsigned short pins[] = {
+ P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
+ P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
+ P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
+ };
+ peripheral_request_list(pins, "smc0");
+
+ return 0;
+}
+
+#ifdef CONFIG_DESIGNWARE_ETH
+int board_eth_init(bd_t *bis)
+{
+ int ret = 0;
+
+ if (CONFIG_DW_PORTS & 1) {
+ static const unsigned short pins[] = P_RMII0;
+ if (!peripheral_request_list(pins, "emac0"))
+ ret += designware_initialize(0, EMAC0_MACCFG, 1, 0);
+ }
+ if (CONFIG_DW_PORTS & 2) {
+ static const unsigned short pins[] = P_RMII1;
+ if (!peripheral_request_list(pins, "emac1"))
+ ret += designware_initialize(1, EMAC1_MACCFG, 1, 0);
+ }
+
+ return ret;
+}
+#endif
+
+#ifdef CONFIG_BFIN_SDH
+int board_mmc_init(bd_t *bis)
+{
+ return bfin_mmc_init(bis);
+}
+#endif
+
+/* miscellaneous platform dependent initialisations */
+int misc_init_r(void)
+{
+ printf("other init\n");
+ return setup_board_switches();
+}
diff --git a/board/chromebook-x86/dts/link.dts b/board/chromebook-x86/dts/link.dts
index af60f59de7..ae8217d02e 100644
--- a/board/chromebook-x86/dts/link.dts
+++ b/board/chromebook-x86/dts/link.dts
@@ -1,6 +1,6 @@
/dts-v1/;
-/include/ "coreboot.dtsi"
+/include/ ARCH_CPU_DTS
/ {
#address-cells = <1>;
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 6f407b78f2..ef93ed3f66 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -38,9 +38,7 @@
#include "post.h"
#endif
#include "common.h"
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
#include <i2c.h>
-#endif
#if !defined(CONFIG_MPC83xx)
static void i2c_write_start_seq(void);
@@ -185,17 +183,6 @@ void i2c_init_board(void)
}
#endif
-
-#if !defined(MACH_TYPE_KM_KIRKWOOD)
-int ethernet_present(void)
-{
- struct km_bec_fpga *base =
- (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
-
- return in_8(&base->bprth) & PIGGY_PRESENT;
-}
-#endif
-
int board_eth_init(bd_t *bis)
{
if (ethernet_present())
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index eaa924f0e6..22d525602a 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -201,6 +201,22 @@ static int ivm_check_crc(unsigned char *buf, int block)
return 0;
}
+static int calculate_mac_offset(unsigned char *valbuf, unsigned char *buf,
+ int offset)
+{
+ unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6];
+
+ if (offset == 0)
+ return 0;
+
+ val += offset;
+ buf[4] = (val >> 16) & 0xff;
+ buf[5] = (val >> 8) & 0xff;
+ buf[6] = val & 0xff;
+ sprintf((char *)valbuf, "%pM", buf + 1);
+ return 0;
+}
+
static int ivm_analyze_block2(unsigned char *buf, int len)
{
unsigned char valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN];
@@ -210,24 +226,20 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
sprintf((char *)valbuf, "%pM", buf + 1);
ivm_set_value("IVM_MacAddress", (char *)valbuf);
/* if an offset is defined, add it */
-#if defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET)
- if (CONFIG_PIGGY_MAC_ADRESS_OFFSET > 0) {
- unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6];
-
- val += CONFIG_PIGGY_MAC_ADRESS_OFFSET;
- buf[4] = (val >> 16) & 0xff;
- buf[5] = (val >> 8) & 0xff;
- buf[6] = val & 0xff;
- sprintf((char *)valbuf, "%pM", buf + 1);
- }
-#endif
+ calculate_mac_offset(buf, valbuf, CONFIG_PIGGY_MAC_ADRESS_OFFSET);
#ifdef MACH_TYPE_KM_KIRKWOOD
setenv((char *)"ethaddr", (char *)valbuf);
#else
if (getenv("ethaddr") == NULL)
setenv((char *)"ethaddr", (char *)valbuf);
#endif
-
+#ifdef CONFIG_KMVECT1
+/* KMVECT1 has two ethernet interfaces */
+ if (getenv("eth1addr") == NULL) {
+ calculate_mac_offset(buf, valbuf, 1);
+ setenv((char *)"eth1addr", (char *)valbuf);
+ }
+#endif
/* IVM_MacCount */
count = (buf[10] << 24) +
(buf[11] << 16) +
@@ -312,27 +324,15 @@ int ivm_read_eeprom(void)
#if defined(CONFIG_I2C_MUX)
/* First init the Bus, select the Bus */
-#if defined(CONFIG_SYS_I2C_IVM_BUS)
- dev = i2c_mux_ident_muxstring((uchar *)CONFIG_SYS_I2C_IVM_BUS);
-#else
buf = (unsigned char *) getenv("EEprom_ivm");
if (buf != NULL)
dev = i2c_mux_ident_muxstring(buf);
-#endif
if (dev == NULL) {
printf("Error couldnt add Bus for IVM\n");
return -1;
}
i2c_set_bus_num(dev->busid);
#endif
-
- buf = (unsigned char *) getenv("EEprom_ivm_addr");
- if (buf != NULL) {
- ret = strict_strtoul((char *)buf, 16, &dev_addr);
- if (ret != 0)
- return -3;
- }
-
/* add deblocking here */
i2c_make_abort();
diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
index 67b69f6cb3..defc885db7 100644
--- a/board/keymile/km82xx/km82xx.c
+++ b/board/keymile/km82xx/km82xx.c
@@ -385,6 +385,14 @@ void handle_mgcoge3un_reset(void)
}
#endif
+int ethernet_present(void)
+{
+ struct km_bec_fpga *base =
+ (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
+
+ return in_8(&base->bprth) & PIGGY_PRESENT;
+}
+
/*
* Early board initalization.
*/
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 83a8753e5a..faaa39bc20 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -98,17 +98,13 @@ const qe_iop_conf_t qe_iop_conf_tab[] = {
static int board_init_i2c_busses(void)
{
I2C_MUX_DEVICE *dev = NULL;
- uchar *buf;
+ uchar *dtt_bus = (uchar *)"pca9547:70:a";
/* Set up the Bus for the DTTs */
- buf = (unsigned char *) getenv("dtt_bus");
- if (buf != NULL)
- dev = i2c_mux_ident_muxstring(buf);
- if (dev == NULL) {
+ dev = i2c_mux_ident_muxstring(dtt_bus);
+ if (dev == NULL)
printf("Error couldn't add Bus for DTT\n");
- printf("please setup dtt_bus to where your\n");
- printf("DTT is found.\n");
- }
+
return 0;
}
@@ -133,6 +129,28 @@ const uint upma_table[] = {
};
#endif
+static int piggy_present(void)
+{
+ struct km_bec_fpga __iomem *base =
+ (struct km_bec_fpga __iomem *)CONFIG_SYS_KMBEC_FPGA_BASE;
+
+ return in_8(&base->bprth) & PIGGY_PRESENT;
+}
+
+#if defined(CONFIG_KMVECT1)
+int ethernet_present(void)
+{
+ /* ethernet port connected to simple switch without piggy */
+ return 1;
+}
+#else
+int ethernet_present(void)
+{
+ return piggy_present();
+}
+#endif
+
+
int board_early_init_r(void)
{
struct km_bec_fpga *base =
@@ -193,8 +211,75 @@ int misc_init_r(void)
return 0;
}
+#if defined(CONFIG_KMVECT1)
+#include <mv88e6352.h>
+/* Marvell MV88E6122 switch configuration */
+static struct mv88e_sw_reg extsw_conf[] = {
+ /* port 1, FRONT_MDI, autoneg */
+ { PORT(1), PORT_PHY, NO_SPEED_FOR },
+ { PORT(1), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ { PHY(1), PHY_1000_CTRL, NO_ADV },
+ { PHY(1), PHY_SPEC_CTRL, AUTO_MDIX_EN },
+ { PHY(1), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
+ FULL_DUPLEX },
+ /* port 2, unused */
+ { PORT(2), PORT_CTRL, PORT_DIS },
+ { PHY(2), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 3, BP_MII (CPU), PHY mode, 100BASE */
+ { PORT(3), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ /* port 4, ESTAR to slot 11, SerDes, 1000BASE-X */
+ { PORT(4), PORT_STATUS, NO_PHY_DETECT },
+ { PORT(4), PORT_PHY, SPEED_1000_FOR },
+ { PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ /* port 5, ESTAR to slot 13, SerDes, 1000BASE-X */
+ { PORT(5), PORT_STATUS, NO_PHY_DETECT },
+ { PORT(5), PORT_PHY, SPEED_1000_FOR },
+ { PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ /*
+ * Errata Fix: 1.9V Output from Internal 1.8V Regulator,
+ * acc . MV-S300889-00D.pdf , clause 4.5
+ */
+ { PORT(5), 0x1A, 0xADB1 },
+ /* port 6, unused, this port has no phy */
+ { PORT(6), PORT_CTRL, PORT_DIS },
+};
+#endif
+
int last_stage_init(void)
{
+#if defined(CONFIG_KMVECT1)
+ struct km_bec_fpga __iomem *base =
+ (struct km_bec_fpga __iomem *)CONFIG_SYS_KMBEC_FPGA_BASE;
+ u8 tmp_reg;
+
+ /* Release mv88e6122 from reset */
+ tmp_reg = in_8(&base->res1[0]) | 0x10; /* DIRECT3 register */
+ out_8(&base->res1[0], tmp_reg); /* GP28 as output */
+ tmp_reg = in_8(&base->gprt3) | 0x10; /* GP28 to high */
+ out_8(&base->gprt3, tmp_reg);
+
+ /* configure MV88E6122 switch */
+ char *name = "UEC2";
+
+ if (miiphy_set_current_dev(name))
+ return 0;
+
+ mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf,
+ ARRAY_SIZE(extsw_conf));
+
+ mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
+
+ if (piggy_present()) {
+ setenv("ethact", "UEC2");
+ setenv("netdev", "eth1");
+ puts("using PIGGY for network boot\n");
+ } else {
+ setenv("netdev", "eth0");
+ puts("using frontport for network boot\n");
+ }
+#endif
+
#if defined(CONFIG_KMCOGE5NE)
struct bfticu_iomap *base =
(struct bfticu_iomap *)CONFIG_SYS_BFTIC3_BASE;
@@ -280,7 +365,7 @@ int checkboard(void)
{
puts("Board: Keymile " CONFIG_KM_BOARD_NAME);
- if (ethernet_present())
+ if (piggy_present())
puts(" with PIGGY.");
puts("\n");
return 0;
diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index aa3d659527..a6bb1b1d4a 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -1,8 +1,9 @@
altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
-configure=km_setboardid && saveenv && reset
+configure=run set_uimage; km_setboardid && saveenv && reset
subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
-tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage
+tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
toolchain=/opt/eldk
rootfssize=0
+set_uimage=printenv uimage || setenv uimage uImage
diff --git a/board/keymile/scripts/ramfs-common.txt b/board/keymile/scripts/ramfs-common.txt
index c1b45ab029..8a8d287558 100644
--- a/board/keymile/scripts/ramfs-common.txt
+++ b/board/keymile/scripts/ramfs-common.txt
@@ -4,8 +4,9 @@ altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
subbootcmds=tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs add_default addpanic addramfs boot
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
-configure=km_setboardid && saveenv && reset
+configure=run set_uimage; km_setboardid && saveenv && reset
rootfsfile=${hostname}/rootfsImage
setrootfsaddr=setexpr value ${pnvramaddr} - ${rootfssize} && setenv rootfsaddr 0x${value}
-tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage
+tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage
+set_uimage=printenv uimage || setenv uimage uImage
diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c
index 5f197a746a..a28c7043f9 100644
--- a/board/technexion/twister/twister.c
+++ b/board/technexion/twister/twister.c
@@ -165,10 +165,10 @@ void spl_board_prepare_for_linux(void)
int spl_start_uboot(void)
{
int val = 0;
- if (!gpio_request(CONFIG_SPL_OS_BOOT_KEY, "U-Boot key")) {
- gpio_direction_input(CONFIG_SPL_OS_BOOT_KEY);
- val = gpio_get_value(CONFIG_SPL_OS_BOOT_KEY);
- gpio_free(CONFIG_SPL_OS_BOOT_KEY);
+ if (!gpio_request(SPL_OS_BOOT_KEY, "U-Boot key")) {
+ gpio_direction_input(SPL_OS_BOOT_KEY);
+ val = gpio_get_value(SPL_OS_BOOT_KEY);
+ gpio_free(SPL_OS_BOOT_KEY);
}
return val;
}
diff --git a/board/technexion/twister/twister.h b/board/technexion/twister/twister.h
index a2051c0044..cff479c07f 100644
--- a/board/technexion/twister/twister.h
+++ b/board/technexion/twister/twister.h
@@ -38,6 +38,8 @@ const omap3_sysinfo sysinfo = {
#define XR16L2751_UART1_BASE 0x21000000
#define XR16L2751_UART2_BASE 0x23000000
+/* GPIO used to select between U-Boot and kernel */
+#define SPL_OS_BOOT_KEY 55
/*
* IEN - Input Enable
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index 22b3fac398..ebff59e70b 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -171,10 +171,10 @@ void spl_board_prepare_for_linux(void)
int spl_start_uboot(void)
{
int val = 0;
- if (!gpio_request(CONFIG_SPL_OS_BOOT_KEY, "U-Boot key")) {
- gpio_direction_input(CONFIG_SPL_OS_BOOT_KEY);
- val = gpio_get_value(CONFIG_SPL_OS_BOOT_KEY);
- gpio_free(CONFIG_SPL_OS_BOOT_KEY);
+ if (!gpio_request(SPL_OS_BOOT_KEY, "U-Boot key")) {
+ gpio_direction_input(SPL_OS_BOOT_KEY);
+ val = gpio_get_value(SPL_OS_BOOT_KEY);
+ gpio_free(SPL_OS_BOOT_KEY);
}
return !val;
}
diff --git a/board/timll/devkit8000/devkit8000.h b/board/timll/devkit8000/devkit8000.h
index aa69e6c965..c1965e2704 100644
--- a/board/timll/devkit8000/devkit8000.h
+++ b/board/timll/devkit8000/devkit8000.h
@@ -32,6 +32,9 @@ const omap3_sysinfo sysinfo = {
"NAND",
};
+/* GPIO used to select between U-Boot and kernel */
+#define SPL_OS_BOOT_KEY 26
+
/*
* IEN - Input Enable
* IDIS - Input Disable
OpenPOWER on IntegriCloud