summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/calao/sbc35_a9g20/sbc35_a9g20.c1
-rw-r--r--board/calao/tny_a9260/tny_a9260.c5
-rw-r--r--board/denx/m28evk/u-boot.bd8
-rw-r--r--board/eltec/elppc/misc.c2
-rw-r--r--board/esd/cpci750/mv_eth.c34
-rw-r--r--board/freescale/mx51evk/mx51evk.c3
-rw-r--r--board/freescale/mx53loco/mx53loco.c3
-rw-r--r--board/keymile/scripts/README2
-rw-r--r--board/keymile/scripts/develop-common.txt3
-rw-r--r--board/lubbock/lubbock.c6
-rw-r--r--board/nvidia/ventana/Makefile1
-rw-r--r--board/samsung/universal_c210/universal.c2
-rw-r--r--board/ti/panda/panda.c59
13 files changed, 86 insertions, 43 deletions
diff --git a/board/calao/sbc35_a9g20/sbc35_a9g20.c b/board/calao/sbc35_a9g20/sbc35_a9g20.c
index 4f5cff68ec..b6c8791f04 100644
--- a/board/calao/sbc35_a9g20/sbc35_a9g20.c
+++ b/board/calao/sbc35_a9g20/sbc35_a9g20.c
@@ -152,7 +152,6 @@ int board_init(void)
/* Enable Ctrlc */
console_init_f();
- gd->bd->bi_arch_number = MACH_TYPE_SBC35_A9G20;
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
diff --git a/board/calao/tny_a9260/tny_a9260.c b/board/calao/tny_a9260/tny_a9260.c
index 24de177dde..31074d0e21 100644
--- a/board/calao/tny_a9260/tny_a9260.c
+++ b/board/calao/tny_a9260/tny_a9260.c
@@ -86,11 +86,6 @@ int board_init(void)
/* Enable Ctrlc */
console_init_f();
-#if defined(CONFIG_TNY_A9260)
- gd->bd->bi_arch_number = MACH_TYPE_TNY_A9260;
-#elif defined(CONFIG_TNY_A9G20)
- gd->bd->bi_arch_number = MACH_TYPE_TNY_A9G20;
-#endif
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
diff --git a/board/denx/m28evk/u-boot.bd b/board/denx/m28evk/u-boot.bd
index 3ce7f92d70..c60615a456 100644
--- a/board/denx/m28evk/u-boot.bd
+++ b/board/denx/m28evk/u-boot.bd
@@ -4,11 +4,11 @@ sources {
}
section (0) {
- load u_boot_spl > 0x0000;
- load ivt (entry = 0x0014) > 0x8000;
+ load u_boot_spl > 0x0000;
+ load ivt (entry = 0x0014) > 0x8000;
hab call 0x8000;
- load u_boot > 0x40000100;
- load ivt (entry = 0x40000100) > 0x8000;
+ load u_boot > 0x40000100;
+ load ivt (entry = 0x40000100) > 0x8000;
hab call 0x8000;
}
diff --git a/board/eltec/elppc/misc.c b/board/eltec/elppc/misc.c
index d476cd5c1c..89f1b1d355 100644
--- a/board/eltec/elppc/misc.c
+++ b/board/eltec/elppc/misc.c
@@ -116,7 +116,7 @@ int misc_init_r (void)
eerev.etheraddr[5] = 0x4D;
/* cache config word for ELPPC */
- *(int *) &eerev.res[0] = 0;
+ memset(&eerev.res[0], 0, 4);
initSrom = 1; /* force dialog */
copyNv = 1; /* copy to nvram */
diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c
index 781ad2318e..001c1ad44e 100644
--- a/board/esd/cpci750/mv_eth.c
+++ b/board/esd/cpci750/mv_eth.c
@@ -422,7 +422,7 @@ static int mv64360_eth_real_open (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
unsigned int port_num;
- u32 port_status, phy_reg_data;
+ u32 phy_reg_data;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
/* ronen - when we update the MAC env params we only update dev->enetaddr
@@ -520,7 +520,7 @@ static int mv64360_eth_real_open (struct eth_device *dev)
*/
MV_REG_WRITE (MV64360_ETH_MAXIMUM_TRANSMIT_UNIT (port_num), 0);
- port_status = MV_REG_READ (MV64360_ETH_PORT_STATUS_REG (port_num));
+ MV_REG_READ (MV64360_ETH_PORT_STATUS_REG (port_num));
/* Check Link status on phy */
eth_port_read_smi_reg (port_num, 1, &phy_reg_data);
@@ -638,15 +638,6 @@ static int mv64360_eth_free_rx_rings (struct eth_device *dev)
int mv64360_eth_stop (struct eth_device *dev)
{
- ETH_PORT_INFO *ethernet_private;
- struct mv64360_eth_priv *port_private;
- unsigned int port_num;
-
- ethernet_private = (ETH_PORT_INFO *) dev->priv;
- port_private =
- (struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
-
/* Disable all gigE address decoder */
MV_REG_WRITE (MV64360_ETH_BASE_ADDR_ENABLE_REG, 0x3f);
DP (printf ("%s Ethernet stop called ... \n", __FUNCTION__));
@@ -716,7 +707,6 @@ int mv64360_eth_xmit (struct eth_device *dev, volatile void *dataPtr,
{
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
- unsigned int port_num;
PKT_INFO pkt_info;
ETH_FUNC_RET_STATUS status;
struct net_device_stats *stats;
@@ -725,7 +715,6 @@ int mv64360_eth_xmit (struct eth_device *dev, volatile void *dataPtr,
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
@@ -801,7 +790,6 @@ int mv64360_eth_receive (struct eth_device *dev)
{
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
- unsigned int port_num;
PKT_INFO pkt_info;
struct net_device_stats *stats;
@@ -809,7 +797,6 @@ int mv64360_eth_receive (struct eth_device *dev)
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
while ((eth_port_receive (ethernet_private, ETH_Q0, &pkt_info) ==
@@ -900,12 +887,10 @@ static struct net_device_stats *mv64360_eth_get_stats (struct eth_device *dev)
{
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
- unsigned int port_num;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
mv64360_eth_update_stat (dev);
@@ -927,13 +912,10 @@ static void mv64360_eth_update_stat (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
struct net_device_stats *stats;
- unsigned int port_num;
- volatile unsigned int dummy;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
/* These are false updates */
@@ -956,12 +938,12 @@ static void mv64360_eth_update_stat (struct eth_device *dev)
* But the unsigned long in PowerPC and MIPS are 32bit. So the next read
* is just a dummy read for proper work of the GigE port
*/
- dummy = eth_read_mib_counter (ethernet_private->port_num,
+ (void)eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH);
stats->tx_bytes += (unsigned long)
eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_SENT_LOW);
- dummy = eth_read_mib_counter (ethernet_private->port_num,
+ (void)eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_SENT_HIGH);
stats->rx_errors += (unsigned long)
eth_read_mib_counter (ethernet_private->port_num,
@@ -1009,12 +991,10 @@ static void mv64360_eth_print_stat (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
struct net_device_stats *stats;
- unsigned int port_num;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
/* These are false updates */
@@ -2066,13 +2046,13 @@ static void eth_port_init_mac_tables (ETH_PORT eth_port_num)
static void eth_clear_mib_counters (ETH_PORT eth_port_num)
{
int i;
- unsigned int dummy;
/* Perform dummy reads from MIB counters */
for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION;
- i += 4)
- dummy = MV_REG_READ ((MV64360_ETH_MIB_COUNTERS_BASE
+ i += 4) {
+ (void)MV_REG_READ ((MV64360_ETH_MIB_COUNTERS_BASE
(eth_port_num) + i));
+ }
return;
}
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 13c59413ec..e43aaf726e 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -203,7 +203,7 @@ static void setup_usb_h1(void)
mxc_iomux_set_pad(MX51_PIN_EIM_D21, GPIO_PAD);
}
-void board_ehci_hcd_init(int port)
+int board_ehci_hcd_init(int port)
{
/* Set USBH1_STP to GPIO and toggle it */
mxc_request_iomux(MX51_PIN_USBH1_STP, IOMUX_CONFIG_GPIO);
@@ -228,6 +228,7 @@ void board_ehci_hcd_init(int port)
gpio_direction_output(MX51EVK_USBH1_HUB_RST, 0);
mdelay(2);
gpio_set_value(MX51EVK_USBH1_HUB_RST, 1);
+ return 0;
}
#endif
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 57170ce045..ea4d354311 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -79,12 +79,13 @@ static void setup_iomux_uart(void)
}
#ifdef CONFIG_USB_EHCI_MX5
-void board_ehci_hcd_init(int port)
+int board_ehci_hcd_init(int port)
{
/* request VBUS power enable pin, GPIO[8}, gpio7 */
mxc_request_iomux(MX53_PIN_ATA_DA_2, IOMUX_CONFIG_ALT1);
gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 0);
gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1);
+ return 0;
}
#endif
diff --git a/board/keymile/scripts/README b/board/keymile/scripts/README
index 7fbcf741b9..dd935b2c6c 100644
--- a/board/keymile/scripts/README
+++ b/board/keymile/scripts/README
@@ -7,7 +7,7 @@ default environment must be parsed:
run develop : setup environment to configure for rootfs via nfs
run ramfs : setup environment to configure for rootfs in ram
-Last change: 20.05.2011
+Last change: 24.11.2011
develop-common.txt
============================
diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index 93e2967454..aa3d659527 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -2,6 +2,7 @@ altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
configure=km_setboardid && saveenv && reset
subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
-nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:/opt/eldk/${arch}
+nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage
+toolchain=/opt/eldk
rootfssize=0
diff --git a/board/lubbock/lubbock.c b/board/lubbock/lubbock.c
index 437f944715..3527b381df 100644
--- a/board/lubbock/lubbock.c
+++ b/board/lubbock/lubbock.c
@@ -28,6 +28,8 @@
#include <common.h>
#include <netdev.h>
#include <asm/arch/pxa.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -47,6 +49,10 @@ int board_init (void)
/* adress of boot parameters */
gd->bd->bi_boot_params = 0xa0000100;
+ /* Configure GPIO6 and GPIO8 as OUT, AF1. */
+ setbits_le32(GPDR0, (1 << 6) | (1 << 8));
+ clrsetbits_le32(GAFR0_L, (3 << 12) | (3 << 16), (1 << 12) | (1 << 16));
+
return 0;
}
diff --git a/board/nvidia/ventana/Makefile b/board/nvidia/ventana/Makefile
index 9e5a87ffe8..d5140c8135 100644
--- a/board/nvidia/ventana/Makefile
+++ b/board/nvidia/ventana/Makefile
@@ -25,6 +25,7 @@
include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../seaboard)
$(shell mkdir -p $(obj)../common)
endif
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 8393e4fdd6..d0ff8341f6 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -260,7 +260,7 @@ int board_mmc_init(bd_t *bis)
#ifdef CONFIG_USB_GADGET
static int s5pc210_phy_control(int on)
{
- int ret;
+ int ret = 0;
struct pmic *p = get_pmic();
if (pmic_probe(p))
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index b4271fb58a..fc8c0b4bc6 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -24,15 +24,21 @@
#include <common.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
+#include <asm/arch/clocks.h>
+#include <asm/arch/gpio.h>
#include "panda_mux_data.h"
+#define PANDA_ULPI_PHY_TYPE_GPIO 182
+
DECLARE_GLOBAL_DATA_PTR;
const struct omap_sysinfo sysinfo = {
"Board: OMAP4 Panda\n"
};
+struct omap4_scrm_regs *const scrm = (struct omap4_scrm_regs *)0x4a30a000;
+
/**
* @brief board_init
*
@@ -62,6 +68,59 @@ int board_eth_init(bd_t *bis)
*/
int misc_init_r(void)
{
+ int phy_type;
+ u32 auxclk, altclksrc;
+
+ /* EHCI is not supported on ES1.0 */
+ if (omap_revision() == OMAP4430_ES1_0)
+ return 0;
+
+ gpio_direction_input(PANDA_ULPI_PHY_TYPE_GPIO);
+ phy_type = gpio_get_value(PANDA_ULPI_PHY_TYPE_GPIO);
+
+ if (phy_type == 1) {
+ /* ULPI PHY supplied by auxclk3 derived from sys_clk */
+ debug("ULPI PHY supplied by auxclk3\n");
+
+ auxclk = readl(&scrm->auxclk3);
+ /* Select sys_clk */
+ auxclk &= ~AUXCLK_SRCSELECT_MASK;
+ auxclk |= AUXCLK_SRCSELECT_SYS_CLK << AUXCLK_SRCSELECT_SHIFT;
+ /* Set the divisor to 2 */
+ auxclk &= ~AUXCLK_CLKDIV_MASK;
+ auxclk |= AUXCLK_CLKDIV_2 << AUXCLK_CLKDIV_SHIFT;
+ /* Request auxilary clock #3 */
+ auxclk |= AUXCLK_ENABLE_MASK;
+
+ writel(auxclk, &scrm->auxclk3);
+ } else {
+ /* ULPI PHY supplied by auxclk1 derived from PER dpll */
+ debug("ULPI PHY supplied by auxclk1\n");
+
+ auxclk = readl(&scrm->auxclk1);
+ /* Select per DPLL */
+ auxclk &= ~AUXCLK_SRCSELECT_MASK;
+ auxclk |= AUXCLK_SRCSELECT_PER_DPLL << AUXCLK_SRCSELECT_SHIFT;
+ /* Set the divisor to 16 */
+ auxclk &= ~AUXCLK_CLKDIV_MASK;
+ auxclk |= AUXCLK_CLKDIV_16 << AUXCLK_CLKDIV_SHIFT;
+ /* Request auxilary clock #3 */
+ auxclk |= AUXCLK_ENABLE_MASK;
+
+ writel(auxclk, &scrm->auxclk1);
+ }
+
+ altclksrc = readl(&scrm->altclksrc);
+
+ /* Activate alternate system clock supplier */
+ altclksrc &= ~ALTCLKSRC_MODE_MASK;
+ altclksrc |= ALTCLKSRC_MODE_ACTIVE;
+
+ /* enable clocks */
+ altclksrc |= ALTCLKSRC_ENABLE_INT_MASK | ALTCLKSRC_ENABLE_EXT_MASK;
+
+ writel(altclksrc, &scrm->altclksrc);
+
return 0;
}