U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
May 2009
- 178 participants
- 436 discussions

[U-Boot] [PATCH 1/6] esd/common: extend cpld command with address parameter
by matthias.fuchs@esd.eu 04 May '09
by matthias.fuchs@esd.eu 04 May '09
04 May '09
From: Matthias Fuchs <matthias.fuchs(a)esd-electronics.com>
This patch adds support for an address parameter to esd's
cpld command. This is in preparation to remove compiled-in
binary cpld (xsvf) bitstreams.
Signed-off-by: Matthias Fuchs <matthias.fuchs(a)esd.eu>
---
board/esd/common/xilinx_jtag/micro.c | 24 ++++++++++++++++--------
board/esd/common/xilinx_jtag/ports.c | 10 ++++------
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/board/esd/common/xilinx_jtag/micro.c b/board/esd/common/xilinx_jtag/micro.c
index 9b2cf90..37ac0cc 100644
--- a/board/esd/common/xilinx_jtag/micro.c
+++ b/board/esd/common/xilinx_jtag/micro.c
@@ -66,10 +66,7 @@
#include "lenval.h"
#include "ports.h"
-
-extern const unsigned char fpgadata[];
-extern int filesize;
-
+const unsigned char *xsvfdata;
/*============================================================================
* XSVF #define
@@ -1838,12 +1835,23 @@ int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
unsigned long duration;
unsigned long long startClock, endClock;
+ if (argc == 2)
+ xsvfdata = (unsigned char *)simple_strtoul(argv[1], NULL, 16);
+ else {
+#ifdef CONFIG_SYS_XSVF_DEFAULT_ADDR
+ xsvfdata = (unsigned char *)CONFIG_SYS_XSVF_DEFAULT_ADDR;
+#else
+ printf("Usage:\ncpld %s\n", cmdtp->help);
+ return -1;
+#endif
+ }
+
iErrorCode = XSVF_ERRORCODE( XSVF_ERROR_NONE );
pzXsvfFileName = 0;
xsvf_iDebugLevel = 0;
printf("XSVF Player v%s, Xilinx, Inc.\n", XSVF_VERSION);
- printf("XSVF Filesize = %d bytes\n", filesize);
+ printf("Reading XSVF data @ %p\n", xsvfdata);
/* Initialize the I/O. SetPort initializes I/O on first call */
setPort( TMS, 1 );
@@ -1858,7 +1866,7 @@ int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return( iErrorCode );
}
U_BOOT_CMD(
- cpld, 1, 1, do_cpld,
- "Program onboard CPLD",
- NULL
+ cpld, 2, 1, do_cpld,
+ "program onboard CPLD",
+ "<xsvf-addr>"
);
diff --git a/board/esd/common/xilinx_jtag/ports.c b/board/esd/common/xilinx_jtag/ports.c
index ac0d7ac..f039d04 100644
--- a/board/esd/common/xilinx_jtag/ports.c
+++ b/board/esd/common/xilinx_jtag/ports.c
@@ -42,9 +42,7 @@ static int oldstate = 0;
static int newstate = 0;
static int readptr = 0;
-extern long filesize;
-extern const unsigned char fpgadata[];
-
+extern const unsigned char *xsvfdata;
/* if in debugging mode, then just set the variables */
void setPort(short p,short val)
@@ -86,10 +84,10 @@ void pulseClock(void)
void readByte(unsigned char *data)
{
/* pretend reading using a file */
- *data = fpgadata[readptr++];
- newstate = (100 * filepos++) / filesize;
+ *data = xsvfdata[readptr++];
+ newstate = filepos++ >> 10;
if (newstate != oldstate) {
- printf("%4d\r\r\r\r", newstate);
+ printf("%4d kB\r\r\r\r", newstate);
oldstate = newstate;
}
}
--
1.5.3
2
6
Patch adds support for DaVinci DM365.
It does not have the DM9000 like the DM355 but has capability
for 4 BIT ECC correction just like DM355.
This patch lacks 2 features
1) No 4 BIT ECC correction. We will add support for 4 BIT ECC correction
to the NAND driver(davinci_nand.c) soon so that other device like
the DM355 can also use this feature. Other TI SOCs like DA830(Primus)
not yet part of the U-Boot GIT can also use this once support is added.
Some core NAND driver APIs were changed and are being used by TI in
our internal releases but those patches were not accepted when posted to
the MTD list. So this support will have to wait for some time.
2) I have managed to get EMAC working in my branch but i see that there are
patches where the location of the EMAC driver has changed along with a
few other changes. The EMAC on all TI SOCs like DM644x, DM6467, DM365
and DA830 is simlar but not the same. So i need to come up with a patch
which will enable EMAC to work on all TI SOCs.
Patches for the above features mentioned will be added soon. Patch for 4 BIT
ECC correction and EMAC should not take much time to submit but the feature
where we change the NAND read APIs to work along with the EMIF 2.3 IP present
in latest DaVinci SOCs will take some time.
Signed-off-by: Sandeep Paulraj <s-paulraj(a)ti.com>
---
MAKEALL | 1 +
Makefile | 3 +
board/davinci/dm365_evm/Makefile | 52 ++++++++++
board/davinci/dm365_evm/board_init.S | 29 ++++++
board/davinci/dm365_evm/config.mk | 39 ++++++++
board/davinci/dm365_evm/dm365_evm.c | 97 +++++++++++++++++++
board/davinci/dm365_evm/u-boot.lds | 52 ++++++++++
cpu/arm926ejs/davinci/Makefile | 1 +
cpu/arm926ejs/davinci/dm365.c | 39 ++++++++
include/asm-arm/arch-davinci/hardware.h | 3 +
include/configs/davinci_dm365_evm.h | 155 +++++++++++++++++++++++++++++++
11 files changed, 471 insertions(+), 0 deletions(-)
create mode 100644 board/davinci/dm365_evm/Makefile
create mode 100644 board/davinci/dm365_evm/board_init.S
create mode 100644 board/davinci/dm365_evm/config.mk
create mode 100755 board/davinci/dm365_evm/dm365_evm.c
create mode 100644 board/davinci/dm365_evm/u-boot.lds
create mode 100644 cpu/arm926ejs/davinci/dm365.c
create mode 100644 include/configs/davinci_dm365_evm.h
diff --git a/MAKEALL b/MAKEALL
index c65f418..31cbaef 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -529,6 +529,7 @@ LIST_ARM9=" \
davinci_sonata \
davinci_dm355evm \
davinci_dm357_evm \
+ davinci_dm365_evm \
"
#########################################################################
diff --git a/Makefile b/Makefile
index fb0ce64..6a8ffa0 100644
--- a/Makefile
+++ b/Makefile
@@ -2796,6 +2796,9 @@ davinci_dm355evm_config : unconfig
davinci_dm357_evm_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs dm357_evm davinci davinci
+davinci_dm365_evm_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs dm365_evm davinci davinci
+
lpd7a400_config \
lpd7a404_config: unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
diff --git a/board/davinci/dm365_evm/Makefile b/board/davinci/dm365_evm/Makefile
new file mode 100644
index 0000000..a0ed353
--- /dev/null
+++ b/board/davinci/dm365_evm/Makefile
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd(a)denx.de.
+#
+# Copyright (C) 2007 Sergey Kubushyn <ksi(a)koi8.net>
+#
+# 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).a
+
+COBJS := dm365_evm.o
+SOBJS := board_init.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/davinci/dm365_evm/board_init.S b/board/davinci/dm365_evm/board_init.S
new file mode 100644
index 0000000..22d8adc
--- /dev/null
+++ b/board/davinci/dm365_evm/board_init.S
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007 Sergey Kubushyn <ksi(a)koi8.net>
+ *
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * 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 <config.h>
+
+.globl dv_board_init
+dv_board_init:
+
+ mov pc, lr
diff --git a/board/davinci/dm365_evm/config.mk b/board/davinci/dm365_evm/config.mk
new file mode 100644
index 0000000..aa89d0e
--- /dev/null
+++ b/board/davinci/dm365_evm/config.mk
@@ -0,0 +1,39 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <gj(a)denx.de>
+# David Mueller, ELSOFT AG, <d.mueller(a)elsoft.ch>
+#
+# (C) Copyright 2003
+# Texas Instruments, <www.ti.com>
+# Swaminathan <swami.iyer(a)ti.com>
+#
+# Davinci EVM board (ARM925EJS) cpu
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# Davinci EVM has 1 bank of 256 MB DDR RAM
+# Physical Address:
+# 8000'0000 to 9000'0000
+#
+# Copyright (C) 2007 Sergey Kubushyn <ksi(a)koi8.net>
+#
+# Visioneering Corp. Sonata board (ARM926EJS) cpu
+#
+# Sonata board has 1 bank of 128 MB DDR RAM
+# Physical Address:
+# 8000'0000 to 8800'0000
+#
+# Razorstream, LLC. SCHMOOGIE board (ARM926EJS) cpu
+#
+# Schmoogie board has 1 bank of 128 MB DDR RAM
+# Physical Address:
+# 8000'0000 to 8800'0000
+#
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+#
+# we load ourself to 8108 '0000
+#
+#
+
+#Provide at least 16MB spacing between us and the Linux Kernel image
+TEXT_BASE = 0x81080000
diff --git a/board/davinci/dm365_evm/dm365_evm.c b/board/davinci/dm365_evm/dm365_evm.c
new file mode 100755
index 0000000..24b40d0
--- /dev/null
+++ b/board/davinci/dm365_evm/dm365_evm.c
@@ -0,0 +1,97 @@
+/*
+ *
+ * Copyright (C) 2009 Texas Instruments.
+ *
+ * ----------------------------------------------------------------------------
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * ----------------------------------------------------------------------------
+ *
+ */
+#include <common.h>
+#include <i2c.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/i2c_defs.h>
+
+/*******************************************
+ Routine: board_init
+ Description: Board Initialization routine
+*******************************************/
+int board_init(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+
+ /* arch number of DaVinci DM365 */
+ gd->bd->bi_arch_number = 1939;
+
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
+
+ /* Set the Bus Priority Register to appropriate value */
+ REG(VBPR) = 0x20;
+
+ timer_init();
+
+ return 0;
+}
+
+
+/******************************
+ Routine: misc_init_r
+ Description: Misc. init
+******************************/
+int misc_init_r(void)
+{
+ int i;
+ u_int8_t tmp[20], buf[10];
+
+ /* Set Ethernet MAC address from EEPROM */
+ if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0x7f00,
+ CONFIG_SYS_I2C_EEPROM_ADDR_LEN, buf, 6)) {
+ printf("\nEEPROM @ 0x%02x read FAILED!!!\n",
+ CONFIG_SYS_I2C_EEPROM_ADDR);
+ } else {
+ tmp[0] = 0xff;
+ for (i = 0; i < 6; i++)
+ tmp[0] &= buf[i];
+
+ if ((tmp[0] != 0xff) && (getenv("ethaddr") == NULL)) {
+ sprintf((char *)&tmp[0],
+ "%02x:%02x:%02x:%02x:%02x:%02x", buf[0],
+ buf[1], buf[2], buf[3], buf[4], buf[5]);
+ setenv("ethaddr", (char *)&tmp[0]);
+ }
+ }
+
+ if (!eth_hw_init())
+ printf("ethernet init failed!\n");
+
+ return 0;
+}
+
+/******************************
+ Routine: dram_init
+ Description: Memory Info
+******************************/
+int dram_init(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+
+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+ return 0;
+}
+
diff --git a/board/davinci/dm365_evm/u-boot.lds b/board/davinci/dm365_evm/u-boot.lds
new file mode 100644
index 0000000..4d50f2c
--- /dev/null
+++ b/board/davinci/dm365_evm/u-boot.lds
@@ -0,0 +1,52 @@
+/*
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, <gj(a)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
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ . = 0x00000000;
+ . = ALIGN(4);
+ .text :
+ {
+ cpu/arm926ejs/start.o (.text)
+ *(.text)
+ }
+ . = ALIGN(4);
+ .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
+ . = ALIGN(4);
+ .data : { *(.data) }
+ . = ALIGN(4);
+ .got : { *(.got) }
+
+ . = .;
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
+ __u_boot_cmd_end = .;
+
+ . = ALIGN(4);
+ __bss_start = .;
+ .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
+ _end = .;
+}
diff --git a/cpu/arm926ejs/davinci/Makefile b/cpu/arm926ejs/davinci/Makefile
index dee5be4..96e495a 100644
--- a/cpu/arm926ejs/davinci/Makefile
+++ b/cpu/arm926ejs/davinci/Makefile
@@ -30,6 +30,7 @@ LIB = $(obj)lib$(SOC).a
COBJS-y += timer.o psc.o
COBJS-$(CONFIG_SOC_DM355) += dm355.o
COBJS-$(CONFIG_SOC_DM644X) += dm644x.o
+COBJS-$(CONFIG_SOC_DM365) += dm365.o
COBJS-$(CONFIG_DRIVER_TI_EMAC) += ether.o lxt972.o dp83848.o
SOBJS = reset.o
diff --git a/cpu/arm926ejs/davinci/dm365.c b/cpu/arm926ejs/davinci/dm365.c
new file mode 100644
index 0000000..01efb34
--- /dev/null
+++ b/cpu/arm926ejs/davinci/dm365.c
@@ -0,0 +1,39 @@
+/*
+ * TI DM365 SOC specific code
+ *
+ * Copyright (C) 2009 Texas Instruments
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <asm/arch/hardware.h>
+
+
+void davinci_enable_uart0(void)
+{
+ lpsc_on(DAVINCI_LPSC_UART0);
+}
+
+
+#ifdef CONFIG_DRIVER_DAVINCI_I2C
+void davinci_enable_i2c(void)
+{
+ lpsc_on(DAVINCI_LPSC_I2C);
+}
+#endif
diff --git a/include/asm-arm/arch-davinci/hardware.h b/include/asm-arm/arch-davinci/hardware.h
index a28cfb4..d38ab72 100644
--- a/include/asm-arm/arch-davinci/hardware.h
+++ b/include/asm-arm/arch-davinci/hardware.h
@@ -99,6 +99,9 @@ typedef volatile unsigned int * dv_reg_p;
#define DAVINCI_ASYNC_EMIF_CNTRL_BASE 0x01e10000
#define DAVINCI_MMC_SD0_BASE 0x01e11000
+#elif defined(CONFIG_SOC_DM365)
+#define DAVINCI_ASYNC_EMIF_CNTRL_BASE 0x01d10000
+
#endif
/* Power and Sleep Controller (PSC) Domains */
diff --git a/include/configs/davinci_dm365_evm.h b/include/configs/davinci_dm365_evm.h
new file mode 100644
index 0000000..a3a5016
--- /dev/null
+++ b/include/configs/davinci_dm365_evm.h
@@ -0,0 +1,155 @@
+/*
+ * (C) Copyright 2009
+ * Texas Instruments Inc.
+ * Configuation settings for the TI Davinci DM365 EVM board.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+#include <asm/sizes.h>
+
+/*=======*/
+/* Board */
+/*=======*/
+#define CFG_DM365_EVM
+#define CONFIG_SYS_USE_NAND
+#define CONFIG_SOC_DM365
+/*===================*/
+/* SoC Configuration */
+/*===================*/
+#define CONFIG_ARM926EJS /* arm926ejs CPU core */
+#define CONFIG_SYS_CLK_FREQ 297000000 /* Arm Clock frequency */
+#define CONFIG_SYS_TIMERBASE 0x01c21400 /* use timer 0 */
+#define CONFIG_SYS_HZ_CLOCK 24000000
+#define CONFIG_SYS_HZ 1000
+/*====================================================*/
+/* EEPROM definitions for the DM365 EVM */
+/*====================================================*/
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
+#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+/*=============*/
+/* Memory Info */
+/*=============*/
+#define CONFIG_SYS_MALLOC_LEN (0x40000 + 128*1024)
+#define CONFIG_SYS_GBL_DATA_SIZE 128
+#define CONFIG_SYS_MEMTEST_START 0x82000000
+#define CONFIG_SYS_MEMTEST_END 0x90000000
+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
+#define CONFIG_STACKSIZE (256*1024) /* regular stack */
+#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
+#define PHYS_SDRAM_1_SIZE 0x8000000 /* DDR size 128MB */
+/*====================*/
+/* Serial Driver info */
+/*====================*/
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE -4
+#define CONFIG_SYS_NS16550_COM1 0x01c20000 /* Base address of UART0 */
+#define CONFIG_SYS_NS16550_CLK 24000000
+#define CONFIG_CONS_INDEX 1 /* use UART0 for console */
+#define CONFIG_BAUDRATE 115200 /* Default baud rate */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+/*===================*/
+/* I2C Configuration */
+/*===================*/
+#define CONFIG_HARD_I2C
+#define CONFIG_DRIVER_DAVINCI_I2C
+#define CONFIG_SYS_I2C_SPEED 100000
+#define CONFIG_SYS_I2C_SLAVE 10
+/*==================================*/
+/* Network & Ethernet Configuration */
+/*==================================*/
+#define CONFIG_DRIVER_TI_EMAC
+#define CONFIG_MII
+#define CONFIG_BOOTP_DEFAULT
+#define CONFIG_BOOTP_DNS
+#define CONFIG_BOOTP_DNS2
+#define CONFIG_BOOTP_SEND_HOSTNAME
+#define CONFIG_NET_RETRY_COUNT 10
+/*=====================*/
+/* Flash & Environment */
+/*=====================*/
+#define CONFIG_NAND_DAVINCI
+#undef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */
+#define CONFIG_ENV_SECT_SIZE 0x40000 /* Env sector Size */
+#define CONFIG_ENV_SIZE SZ_256K
+#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */
+#define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */
+#define CONFIG_SYS_NAND_BASE 0x02000000
+#define CONFIG_SYS_NAND_HW_ECC
+#define CONFIG_SYS_MAX_NAND_DEVICE 2
+#define CONFIG_ENV_OFFSET 0x3C0000
+#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, \
+ CONFIG_SYS_NAND_BASE + 0x4000}
+#define DEF_BOOTM ""
+/*==============================*/
+/* U-Boot general configuration */
+/*==============================*/
+#undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */
+#define CONFIG_MISC_INIT_R
+#define CONFIG_BOOTDELAY 4
+#define CONFIG_BOOTFILE "uImage" /* Boot file name */
+#define CONFIG_SYS_PROMPT "DM365 EVM > "
+#define CONFIG_SYS_CBSIZE 1024
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
+ sizeof(CONFIG_SYS_PROMPT)+16)
+#define CONFIG_SYS_MAXARGS 16
+#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_LOAD_ADDR 0x80700000
+#define CONFIG_VERSION_VARIABLE
+#define CONFIG_CMDLINE_EDITING
+/*===================*/
+/* Linux Information */
+/*===================*/
+#define LINUX_BOOT_PARAM_ADDR 0x80000100
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+/*=================*/
+/* U-Boot commands */
+/*=================*/
+#include <config_cmd_default.h>
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVES
+#define CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_JFFS2
+/*=======================*/
+/* KGDB support (if any) */
+/*=======================*/
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
+#endif
+#endif /* __CONFIG_H */
--
1.6.0.4
4
7
Feng Kan, Stefan and Grant,
Thanks for all your suggestion.
I tried to add auto-calibration related configuration to my configuation file, but Linux still hangs at the same location. It seems error happened when threads of Linux Kernel tried to access the high 512m memory.
Just like the Kilauea evb, there is no ECC on my board, and I use the same regisger setting for DDR Controller as Kilauea. Maybe you know, Kilauea uses the "MT47H64M16HR" DDRII SDRAM and only one rank. My board uses the "MT47H256M8THN" and two ranks. So, I changed setting of MB0CF & MB1CF.
I think I can confirm all 1024M memory can work well at U-Boot. And if I add the parameter "mem=512M" to bootargs, and set "initrd_high" to "20000000", Linux can boot normally.
Best Regards,
Sun
> Date: Tue, 14 Apr 2009 09:30:46 -0700
> From: fkan(a)amcc.com
> To: sunwx2001(a)hotmail.com
> CC: support(a)amcc.com; linuxppc-dev(a)ozlabs.org
> Subject: Re: Help!Some memory doesn't work on PPC405Ex based board!
>
> Hi SunNeo:
>
> The fact that it is hanging at the same place in kernel seems strange.
> Usually when dram initialization is incorrect,
> the kernel would not run at all. Uboot just hangs at relocate code. I
> suggest you turn on early kernel printf to see
> if you get some other outputs.
>
> P.S when you have discrete memory on board. you have to be sure that
> your calibration values are correct. The RDCC
> RQDC value should be best possible. You can run the fix initialization
> and then lift the autocalibration routine
> to the end of the fix dram init to determine the best RFDC RQDC windows.
> After that recode the fix values for those
> registers.
>
> Feng Kan
> AMCC Software
>
> SunNeo wrote:
> > Hi, Stefan,
> >
> > Thanks for your help.
> >
> > My platform uses the MICRON MT47H256M8THN DDRII SDRAM and the DDRII SDRAM is soldered on the board.
> >
> > As I said, my board was similar with "Kilauea" evb, so I created my configuration header file from Kilauea's at U-Boot. In the configuration file, register value for the DDR SDRAM controller is defined. But I have removed DDR autocalibraton related configuration from the configuration file, do you think this will cause any issues?
> >
> > I'm not sure what you mean about "intensive memory test". I use "mm" cmd under U-Boot command prompt to modify value of high 512M memory, and this command works well.
> >
> > About booting Linux, the kernel hangs at the same location. Always after this print info "<4>Mount-cache hash table entries: 512".
> >
> > Best Regards,
> > Sun
> >
> >
> >> From: sr(a)denx.de
> >> To: linuxppc-dev(a)ozlabs.org
> >> Subject: Re: Help!Some memory doesn't work on PPC405Ex based board!
> >> Date: Tue, 14 Apr 2009 11:23:02 +0200
> >> CC: sunwx2001(a)hotmail.com
> >>
> >> On Monday 13 April 2009, SunNeo wrote:
> >>
> >>> I'm porting Linux-2.6.29 on PPC405Ex based board, it's very similar to AMCC
> >>> "Kilauea" evb.
> >>>
> >>> In my board, two 512MB DDRII memory is connected to 2 ranks of the 405Ex
> >>> CPU. This 1GB memory works well at U-Boot-2009.01, but when I boot
> >>> Linux-2.6.29, the kernel hangs somewhere.
> >>>
> >> Does it just hang "somewhere", or always at the same location? A random hangup
> >> could mean that you are having a memory problem (hardware, or wrong
> >> initialization).
> >>
> >>
> >>> What interesting is, if I
> >>> configured the system to use only 512MB memory at U-Boot, the Linux can
> >>> boot normally .
> >>>
> >> Are you using DIMM's on your platform? Or soldered chips? Which memory
> >> initialization code are you using in U-Boot? And which autocalibration code?
> >>
> >> Did you do some intensive memory test?
> >>
> >> Best regards,
> >> Stefan
> >>
> >
> >
> > _____
> >
> > 把MSN装进手机,更多聊天乐趣等你挖掘! 立刻下载! <http://mobile.msn.com.cn/>
> >
> >
>
_________________________________________________________________
打工,挣钱,买房子,快来MClub一起”金屋藏娇”!
http://club.msn.cn/?from=10
3
7

04 May '09
From: prafulla_wadaskar <prafulla(a)marvell.com>
This is Marvell's 88F6281_A0 based custom board developed
for wireless access point product
This patch is tested for-
1. Boot from DRAM/SPI flash/NFS
2. File transfer using tftp and loadb
3. SPI flash read/write/erase
4. Booting Linux kernel and RFS from SPI flash
Reviewed-by: Ronen Shitrit <rshitrit(a)marvell.com>
Signed-off-by: Prafulla Wadaskar <prafulla(a)marvell.com>
---
Change log
v2: updated as per first review comments
debug_prints updated to debug
v3: updaed as per review comments for v2
added mv88f6281gtw_ge.h file
removed BITxx macros
v4: updated as per review comments for v3
arch_misc_init support is added and used from kirkwood
v5: updated as per review comments for v4
CONFIG_MACH_MV88F6281GTW_GE added
more comments added and
serial configuration removed from mv88f6281gtw_ge.c
MAKEALL | 1 +
Makefile | 3 +
board/Marvell/mv88f6281gtw_ge/Makefile | 51 +++++++
board/Marvell/mv88f6281gtw_ge/config.mk | 25 +++
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c | 89 +++++++++++
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h | 51 +++++++
board/Marvell/mv88f6281gtw_ge/u-boot.lds | 53 +++++++
include/configs/mv88f6281gtw_ge.h | 180 +++++++++++++++++++++++
8 files changed, 453 insertions(+), 0 deletions(-)
create mode 100644 board/Marvell/mv88f6281gtw_ge/Makefile
create mode 100644 board/Marvell/mv88f6281gtw_ge/config.mk
create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h
create mode 100644 board/Marvell/mv88f6281gtw_ge/u-boot.lds
create mode 100644 include/configs/mv88f6281gtw_ge.h
diff --git a/MAKEALL b/MAKEALL
index f13c81a..a7545c9 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -504,6 +504,7 @@ LIST_ARM9=" \
cp946es \
cp966 \
lpd7a400 \
+ mv88f6281gtw_ge \
mx1ads \
mx1fs2 \
netstar \
diff --git a/Makefile b/Makefile
index 1b43832..fdc78bf 100644
--- a/Makefile
+++ b/Makefile
@@ -2795,6 +2795,9 @@ lpd7a400_config \
lpd7a404_config: unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
+mv88f6281gtw_ge_config: unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood
+
mx1ads_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imx
diff --git a/board/Marvell/mv88f6281gtw_ge/Makefile b/board/Marvell/mv88f6281gtw_ge/Makefile
new file mode 100644
index 0000000..8c49a3e
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor <www.marvell.com>
+# Prafulla Wadaskar <prafulla(a)marvell.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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS := mv88f6281gtw_ge.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/Marvell/mv88f6281gtw_ge/config.mk b/board/Marvell/mv88f6281gtw_ge/config.mk
new file mode 100644
index 0000000..fb29a1b
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/config.mk
@@ -0,0 +1,25 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor <www.marvell.com>
+# Prafulla Wadaskar <prafulla(a)marvell.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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+TEXT_BASE = 0x00600000
diff --git a/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c b/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
new file mode 100644
index 0000000..7dc097b
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
@@ -0,0 +1,89 @@
+/*
+ * (C) Copyright 2009
+ * Marvell Semiconductor <www.marvell.com>
+ * Prafulla Wadaskar <prafulla(a)marvell.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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <common.h>
+#include <../drivers/net/phy/mv88e61xx.h>
+#include <netdev.h>
+#include "mv88f6281gtw_ge.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ /*
+ * default gpio configuration
+ * There are maximum 64 gpios controlled through 2 sets of registers
+ * the below configuration configures mainly initial LED status
+ */
+ kw_config_gpio(MV88F6281GTW_GE_OE_VAL_LOW,
+ MV88F6281GTW_GE_OE_VAL_HIGH,
+ MV88F6281GTW_GE_OE_LOW, MV88F6281GTW_GE_OE_HIGH);
+
+ /* Multi-Purpose Pins Functionality configuration */
+ kw_config_mpp(MV88F6281GTW_GE_MPP0_7,
+ MV88F6281GTW_GE_MPP8_15,
+ MV88F6281GTW_GE_MPP16_23,
+ MV88F6281GTW_GE_MPP24_31,
+ MV88F6281GTW_GE_MPP32_39,
+ MV88F6281GTW_GE_MPP40_47, MV88F6281GTW_GE_MPP48_55);
+
+ /*
+ * arch number of board
+ */
+ gd->bd->bi_arch_number = MACH_TYPE_MV88F6281GTW_GE;
+
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
+
+ return 0;
+}
+
+int dram_init(void)
+{
+ int i;
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+ gd->bd->bi_dram[i].start = kw_sdram_bar(i);
+ gd->bd->bi_dram[i].size = kw_sdram_bs(i);
+ }
+ return 0;
+}
+
+#ifdef CONFIG_MV88E61XX_SWITCH
+void reset_phy(void)
+{
+ /* configure and initialize switch */
+ struct mv88e61xx_config swcfg = {
+ .name = "egiga0",
+ .vlancfg = MV88E61XX_VLANCFG_ROUTER,
+ .rgmii_delay = MV88E61XX_RGMII_DELAY_EN,
+ .portstate = MV88E61XX_PORTSTT_FORWARDING,
+ .cpuport = 5,
+ .ports_enabled = (PORT(0) | PORT(1) | PORT(2)
+ | PORT(3) | PORT(4) | PORT(5))
+ };
+
+ mv88e61xx_switch_initialize(&swcfg);
+}
+#endif /* CONFIG_MV88E61XX_SWITCH */
diff --git a/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h b/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h
new file mode 100644
index 0000000..51ceef5
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h
@@ -0,0 +1,51 @@
+/*
+ * (C) Copyright 2009
+ * Marvell Semiconductor <www.marvell.com>
+ * Prafulla Wadaskar <prafulla(a)marvell.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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef __MV88F6281GTW_GE_H
+#define __MV88F6281GTW_GE_H
+
+#define MV88F6281GTW_GE_OE_LOW (~((1 << 7) | (1 << 20) \
+ |(1 << 21))) /*enable GLED,RLED */
+#define MV88F6281GTW_GE_OE_HIGH (~((1 << 4)|(1 << 6)|(1 << 7)|(1 << 12) \
+ |(1 << 13)|(1 << 16)|(1 << 17)))
+#define MV88F6281GTW_GE_OE_VAL_LOW (1 << 20) /*make GLED on */
+#define MV88F6281GTW_GE_OE_VAL_HIGH ((1 << 6)|(1 << 13)|(1 << 16)|(1 << 17))
+
+/*
+ * Default values for MPP registers
+ *
+ * There are maximum 64 Multi-Pourpose Pins on Kirkwood
+ * Each MPP functionality can be configuration by a 4bit value
+ * of MPP control reg, the value and associated functionality is SoC
+ * varient dependent
+ */
+#define MV88F6281GTW_GE_MPP0_7 0x01112222
+#define MV88F6281GTW_GE_MPP8_15 0x11103311
+#define MV88F6281GTW_GE_MPP16_23 0x00001111
+#define MV88F6281GTW_GE_MPP24_31 0x22222222
+#define MV88F6281GTW_GE_MPP32_39 0x40440222
+#define MV88F6281GTW_GE_MPP40_47 0x00004444
+#define MV88F6281GTW_GE_MPP48_55 0x00000000
+
+#endif /* __MV88F6281GTW_GE_H */
diff --git a/board/Marvell/mv88f6281gtw_ge/u-boot.lds b/board/Marvell/mv88f6281gtw_ge/u-boot.lds
new file mode 100644
index 0000000..9695f3f
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/u-boot.lds
@@ -0,0 +1,53 @@
+/*
+ * (C) Copyright 2009
+ * Marvell Semiconductor <www.marvell.com>
+ * Prafulla Wadaskar <prafulla(a)marvell.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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ . = _start;
+ . = ALIGN(4);
+ .text :
+ {
+ cpu/arm926ejs/start.o (.text)
+ *(.text)
+ }
+ .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata))) }
+ . = ALIGN(4);
+ .data : { *(.data) }
+ . = ALIGN(4);
+ .got : { *(.got) }
+
+ . = .;
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
+ __u_boot_cmd_end = .;
+
+ . = ALIGN(4);
+ __bss_start = .;
+ .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
+ _end = .;
+}
+
diff --git a/include/configs/mv88f6281gtw_ge.h b/include/configs/mv88f6281gtw_ge.h
new file mode 100644
index 0000000..6ec59f7
--- /dev/null
+++ b/include/configs/mv88f6281gtw_ge.h
@@ -0,0 +1,180 @@
+/*
+ * (C) Copyright 2009
+ * Marvell Semiconductor <www.marvell.com>
+ * Prafulla Wadaskar <prafulla(a)marvell.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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _CONFIG_MV88F6281GTW_GE_H
+#define _CONFIG_MV88F6281GTW_GE_H
+
+/*
+ * Version number information
+ */
+#define CONFIG_IDENT_STRING "\nMarvell-MV88F6281GTW_GE-A0"
+
+/*
+ * High Level Configuration Options (easy to change)
+ */
+#define CONFIG_MARVELL 1
+#define CONFIG_ARM926EJS 1 /* Basic Architecture */
+#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
+#define CONFIG_KIRKWOOD 1 /* SOC Family Name */
+#define CONFIG_KW88F6281 1 /* SOC Name */
+#define CONFIG_MACH_MV88F6281GTW_GE /* Machine type */
+
+#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */
+#define CONFIG_ARCH_LOWLEVEL_INIT /* enable arch_lowlevel_init */
+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
+#define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */
+#define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */
+#define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */
+
+/*
+ * CLKs configurations
+ */
+#define CONFIG_SYS_HZ 1000
+
+/*
+ * Serial Port configuration
+ * The following definitions let you select what serial you want to use
+ * for your console driver.
+ */
+#define CONFIG_KIRKWOOD_SERIAL /* enable kirkwood serial driver */
+#define CONFIG_CONS_INDEX 0 /*Console on UART0 */
+
+#define CONFIG_BAUDRATE 115200 /* console baudrate */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, \
+ 115200,230400, 460800, 921600 }
+/* auto boot */
+#define CONFIG_BOOTDELAY 3 /* default enable autoboot */
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 8 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_BOOTMAPSZ (8 << 20) /* Initial Memmap for Linux */
+#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
+#define CONFIG_INITRD_TAG 1 /* enable INITRD tag */
+#define CONFIG_SETUP_MEMORY_TAGS 1 /* enable memory tag */
+
+#define CONFIG_SYS_PROMPT "Marvell>> " /* Command Prompt */
+#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buff Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
+ +sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buff */
+/*
+ * Commands configuration
+ */
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_RUN
+#define CONFIG_CMD_LOADB
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_MEMORY
+#define CONFIG_CMD_BOOTD
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_SF
+
+/*
+ * Flash configuration
+ */
+#ifdef CONFIG_CMD_SF
+#define CONFIG_SYS_NO_FLASH 1 /* Declare no NOR flash */
+#define CONFIG_SPI_FLASH 1
+#define CONFIG_HARD_SPI 1
+#define CONFIG_KIRKWOOD_SPI 1
+#define CONFIG_SPI_FLASH_MACRONIX 1
+#define CONFIG_ENV_SPI_BUS 0
+#define CONFIG_ENV_SPI_CS 0
+#define CONFIG_ENV_SPI_MAX_HZ 50000000 /*50Mhz */
+#endif
+
+/*
+ * Environment variables configurations
+ */
+#ifdef CONFIG_SPI_FLASH
+#define CONFIG_ENV_IS_IN_SPI_FLASH 1
+#define CONFIG_ENV_SIZE 0x10000 /* spi flash block (64k) */
+#define CONFIG_ENV_SECT_SIZE 0x10000 /* _64K */
+#else
+#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
+#define CONFIG_ENV_SIZE 0x20000 /* default 128k */
+#endif
+#define CONFIG_ENV_ADDR 0x20000
+#define CONFIG_ENV_OFFSET 0x20000 /* env starts here */
+
+/*
+ * Default environment variables
+ */
+#define CONFIG_BOOTCOMMAND "${x_bootcmd_kernel}; setenv bootargs " \
+ "${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;"
+
+#define CONFIG_MTDPARTS "spi0.0:512k(uboot),512k@512k(psm), " \
+ "2m@1m(kernel),13m@3m(rootfs)\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS "x_bootargs=console=ttyS0,115200 " \
+ "mtdparts="CONFIG_MTDPARTS \
+ "x_bootcmd_kernel=cp.b 0xf8100000 0x6400000 0x200000\0" \
+ "x_bootargs_root=root=/dev/mtdblock3 ro rootfstype=squashfs\0"
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4M */
+/* size in bytes reserved for initial data */
+#define CONFIG_SYS_GBL_DATA_SIZE 128
+
+/*
+ * Other required minimal configurations
+ */
+#define CONFIG_CONSOLE_INFO_QUIET /* some code reduction */
+#define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */
+#define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */
+#define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
+#define CONFIG_NR_DRAM_BANKS 4
+#define CONFIG_STACKSIZE 0x00100000 /* regular stack- 1M */
+#define CONFIG_SYS_LOAD_ADDR 0x00800000 /* default load adr- 8M */
+#define CONFIG_SYS_MEMTEST_START 0x00400000 /* 4M */
+#define CONFIG_SYS_MEMTEST_END 0x007fffff /*(_8M -1) */
+#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */
+#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
+
+/*
+ * Ethernet Driver configuration
+ */
+#ifdef CONFIG_CMD_NET
+#define CONFIG_NETCONSOLE /* include NetConsole support */
+#define CONFIG_NET_MULTI /* specify more that one ports available */
+#define CONFIG_MII /* expose smi ove miiphy interface */
+#define CONFIG_KIRKWOOD_EGIGA /* Enable kirkwood Gbe Controller Driver */
+#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN /* detect link using phy */
+#define CONFIG_KIRKWOOD_EGIGA_PORTS {1,0} /* enable port 0 only */
+#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
+#endif /* CONFIG_CMD_NET */
+
+/*
+ * Marvell 88Exxxx Switch configurations
+ */
+#define CONFIG_RESET_PHY_R /* use reset_phy() to init phy/swtich */
+#define CONFIG_MV88E61XX_SWITCH /* Enable mv88e61xx switch driver */
+
+#endif /* _CONFIG_MV88F6281GTW_GE_H */
--
1.5.3.4
2
5
I was looking at the DaVinci NAND support in current U-Boot
code (i.e. 2009.03 plus patches merged since that release),
and am puzzled by the above-named config option.
Before I submit a patch to remove it from U-Boot GIT (nothing
there enables it, and it will nastify 4-bit support), I thought
I'd see if anyone knows exactly what software it was trying to
emulate. Differences from the current NAND driver in GIT:
- Matches MVL 4.0 (2.6.10) and 5.0 (2.6.18) drivers in handling
NANDx1ECC registers: 0PQR0stu maps to PsQRtu, while the NAND
driver in mainline maps it to ~PQRstu.
- Custom ECC layouts, "not compatible with Linux or RBL/UBL".
- Does some very broken stuff for large page support.
The first of those I can understand; someone wrote some odd and
overly-complex ECC code way back, it worked and then got shipped.
(Although TI's U-Boot 1.2.0 uses soft ECC, instead...)
The other two look like they were experimental code that
should probably not have been merged anywhere...
- Dave
6
11

[U-Boot] [RFC PATCH] console/device: rework function naming
by Jean-Christophe PLAGNIOL-VILLARD 03 May '09
by Jean-Christophe PLAGNIOL-VILLARD 03 May '09
03 May '09
actually the console API use the following naming convention
---Extract---
typedef struct device_t;
int device_register (device_t * dev);
int devices_init (void);
int device_deregister(char *devname);
struct list_head* device_get_list(void);
device_t* device_get_by_name(char* name);
device_t* device_clone(device_t *dev);
---
which is not console dependent and is confusing
instead of using device_XX
we now switch to console_XX and console_device_t
this will also allow to add later a generic device mecanism
in order to have multi generic device support and driver instance
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj(a)jcrosoft.com>
---
board/MAI/AmigaOneG3SE/ps2kbd.c | 6 +-
board/MAI/AmigaOneG3SE/video.c | 6 +-
board/ads5121/ads5121_diu.c | 2 +-
board/bf527-ezkit/video.c | 6 +-
board/bf533-stamp/video.c | 6 +-
board/bf548-ezkit/video.c | 6 +-
board/bmw/bmw.c | 2 +-
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c | 2 +-
board/mpl/common/common_util.c | 4 +-
board/mpl/common/isa.c | 2 +-
board/mpl/common/kbd.c | 6 +-
board/mpl/pati/pati.c | 6 +-
board/netphone/phone_console.c | 6 +-
board/rbc823/kbd.c | 6 +-
board/trab/vfd.c | 2 +-
common/cmd_console.c | 6 +-
common/cmd_log.c | 6 +-
common/cmd_terminal.c | 6 +-
common/console.c | 32 +++---
common/devices.c | 42 ++++----
common/iomux.c | 14 ++--
common/lcd.c | 6 +-
common/serial.c | 8 +-
common/usb_kbd.c | 12 +-
cpu/blackfin/jtag-console.c | 6 +-
cpu/mpc8xx/lcd.c | 2 +-
cpu/mpc8xx/video.c | 6 +-
cpu/pxa/pxafb.c | 2 +-
drivers/input/keyboard.c | 6 +-
drivers/mtd/ubi/build.c | 2 +-
drivers/mtd/ubi/vmt.c | 4 +-
drivers/net/netconsole.c | 6 +-
drivers/serial/arm_dcc.c | 6 +-
drivers/serial/usbtty.c | 6 +-
drivers/usb/musb/musb_hcd.c | 4 +-
drivers/usb/musb/musb_hcd.h | 2 +-
drivers/video/cfb_console.c | 8 +-
include/configs/AmigaOneG3SE.h | 2 +-
include/configs/MIP405.h | 2 +-
include/configs/MPC8610HPCD.h | 2 +-
include/configs/MPC8641HPCN.h | 2 +-
include/configs/PIP405.h | 2 +-
include/configs/VCMA9.h | 2 +-
include/configs/gr_ep2s60.h | 2 +-
include/configs/mp2usb.h | 2 +-
include/console.h | 101 +++++++++++++++++++-
include/devices.h | 126 -------------------------
include/iomux.h | 6 +-
include/serial.h | 2 +-
lib_arm/board.c | 4 +-
lib_avr32/board.c | 4 +-
lib_blackfin/board.c | 4 +-
lib_i386/board.c | 4 +-
lib_i386/video.c | 10 +-
lib_m68k/board.c | 4 +-
lib_mips/board.c | 4 +-
lib_nios/board.c | 4 +-
lib_nios2/board.c | 4 +-
lib_ppc/board.c | 4 +-
lib_sh/board.c | 4 +-
lib_sparc/board.c | 4 +-
61 files changed, 264 insertions(+), 301 deletions(-)
delete mode 100644 include/devices.h
diff --git a/board/MAI/AmigaOneG3SE/ps2kbd.c b/board/MAI/AmigaOneG3SE/ps2kbd.c
index a297005..404d9da 100644
--- a/board/MAI/AmigaOneG3SE/ps2kbd.c
+++ b/board/MAI/AmigaOneG3SE/ps2kbd.c
@@ -34,7 +34,7 @@
*/
#include <common.h>
#include <asm/processor.h>
-#include <devices.h>
+#include <console.h>
#include "ps2kbd.h"
@@ -226,7 +226,7 @@ int overwrite_console (void)
int drv_isa_kbd_init (void)
{
int error;
- device_t kbddev ;
+ console_device_t kbddev ;
char *stdinname = getenv ("stdin");
if(isa_kbd_init() == -1)
@@ -239,7 +239,7 @@ int drv_isa_kbd_init (void)
kbddev.getc = kbd_getc ;
kbddev.tstc = kbd_testc ;
- error = device_register (&kbddev);
+ error = console_register (&kbddev);
if(error==0) {
/* check if this is the standard input device */
if(strcmp(stdinname,DEVNAME)==0) {
diff --git a/board/MAI/AmigaOneG3SE/video.c b/board/MAI/AmigaOneG3SE/video.c
index fc27c68..23a8b72 100644
--- a/board/MAI/AmigaOneG3SE/video.c
+++ b/board/MAI/AmigaOneG3SE/video.c
@@ -22,7 +22,7 @@
*/
#include <common.h>
-#include <devices.h>
+#include <console.h>
#include "memio.h"
#include <part.h>
@@ -98,7 +98,7 @@ int video_inited = 0;
int drv_video_init(void)
{
int error, devices = 1 ;
- device_t vgadev ;
+ console_device_t vgadev ;
if (video_inited) return 1;
video_inited = 1;
video_init();
@@ -112,7 +112,7 @@ int drv_video_init(void)
vgadev.tstc = NULL;
vgadev.start = video_start;
- error = device_register (&vgadev);
+ error = console_register (&vgadev);
if (error == 0)
{
diff --git a/board/ads5121/ads5121_diu.c b/board/ads5121/ads5121_diu.c
index 41a1353..46fb9c3 100644
--- a/board/ads5121/ads5121_diu.c
+++ b/board/ads5121/ads5121_diu.c
@@ -33,7 +33,7 @@
#include "../freescale/common/fsl_diu_fb.h"
#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
-#include <devices.h>
+#include <console.h>
#include <video_fb.h>
#endif
diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c
index 2df6717..ec24ff3 100644
--- a/board/bf527-ezkit/video.c
+++ b/board/bf527-ezkit/video.c
@@ -14,7 +14,7 @@
#include <asm/mach-common/bits/dma.h>
#include <i2c.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
int gunzip(void *, int, unsigned char *, unsigned long *);
@@ -272,7 +272,7 @@ void video_puts(const char *s)
int drv_video_init(void)
{
int error, devices = 1;
- device_t videodev;
+ console_device_t videodev;
u8 *dst;
u32 fbmem_size = LCD_X_RES * LCD_Y_RES * LCD_PIXEL_SIZE + ACTIVE_VIDEO_MEM_OFFSET;
@@ -311,7 +311,7 @@ int drv_video_init(void)
videodev.putc = video_putc; /* 'putc' function */
videodev.puts = video_puts; /* 'puts' function */
- error = device_register(&videodev);
+ error = console_register(&videodev);
return (error == 0) ? devices : error;
}
diff --git a/board/bf533-stamp/video.c b/board/bf533-stamp/video.c
index 3c15eaa..e3fae30 100644
--- a/board/bf533-stamp/video.c
+++ b/board/bf533-stamp/video.c
@@ -18,7 +18,7 @@
#include <asm/mach-common/bits/dma.h>
#include <i2c.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
int gunzip(void *, int, unsigned char *, unsigned long *);
@@ -154,7 +154,7 @@ static void video_init(char *NTSCFrame)
int drv_video_init(void)
{
- device_t videodev;
+ console_device_t videodev;
video_init((void *)NTSC_FRAME_ADDR);
@@ -163,5 +163,5 @@ int drv_video_init(void)
videodev.ext = DEV_EXT_VIDEO;
videodev.flags = DEV_FLAGS_SYSTEM;
- return device_register(&videodev);
+ return console_register(&videodev);
}
diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c
index a6f52bd..f8689d6 100644
--- a/board/bf548-ezkit/video.c
+++ b/board/bf548-ezkit/video.c
@@ -14,7 +14,7 @@
#include <asm/mach-common/bits/dma.h>
#include <i2c.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
int gunzip(void *, int, unsigned char *, unsigned long *);
@@ -282,7 +282,7 @@ void video_puts(const char *s)
int drv_video_init(void)
{
int error, devices = 1;
- device_t videodev;
+ console_device_t videodev;
u8 *dst;
u32 fbmem_size = LCD_X_RES * LCD_Y_RES * LCD_PIXEL_SIZE + ACTIVE_VIDEO_MEM_OFFSET;
@@ -321,7 +321,7 @@ int drv_video_init(void)
videodev.putc = video_putc; /* 'putc' function */
videodev.puts = video_puts; /* 'puts' function */
- error = device_register(&videodev);
+ error = console_register(&videodev);
return (error == 0) ? devices : error;
}
diff --git a/board/bmw/bmw.c b/board/bmw/bmw.c
index 41ce14f..6cca017 100644
--- a/board/bmw/bmw.c
+++ b/board/bmw/bmw.c
@@ -26,7 +26,7 @@
#include <watchdog.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <net.h>
#include <timestamp.h>
#include <dtt.h>
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
index 2b2d5d7..fb9371e 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
@@ -33,7 +33,7 @@
#include "../common/fsl_diu_fb.h"
#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
-#include <devices.h>
+#include <console.h>
#include <video_fb.h>
#endif
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index d169391..aa37370 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -29,7 +29,7 @@
#include <asm/processor.h>
#include <asm/byteorder.h>
#include <i2c.h>
-#include <devices.h>
+#include <console.h>
#include <pci.h>
#include <malloc.h>
#include <bzlib.h>
@@ -429,7 +429,7 @@ void check_env(void)
}
-extern device_t *stdio_devices[];
+extern console_device_t *stdio_devices[];
extern char *stdio_names[];
void show_stdio_dev(void)
diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c
index 91829d4..40ace1f 100644
--- a/board/mpl/common/isa.c
+++ b/board/mpl/common/isa.c
@@ -26,7 +26,7 @@
#include <common.h>
#include <asm/processor.h>
-#include <devices.h>
+#include <console.h>
#include "isa.h"
#include "piix4_pci.h"
#include "kbd.h"
diff --git a/board/mpl/common/kbd.c b/board/mpl/common/kbd.c
index a457635..262e656 100644
--- a/board/mpl/common/kbd.c
+++ b/board/mpl/common/kbd.c
@@ -28,7 +28,7 @@
*/
#include <common.h>
#include <asm/processor.h>
-#include <devices.h>
+#include <console.h>
#include "isa.h"
#include "kbd.h"
@@ -215,7 +215,7 @@ int overwrite_console (void)
int drv_isa_kbd_init (void)
{
int error;
- device_t kbddev ;
+ console_device_t kbddev ;
char *stdinname = getenv ("stdin");
if(isa_kbd_init()==-1)
@@ -228,7 +228,7 @@ int drv_isa_kbd_init (void)
kbddev.getc = kbd_getc ;
kbddev.tstc = kbd_testc ;
- error = device_register (&kbddev);
+ error = console_register (&kbddev);
if(error==0) {
/* check if this is the standard input device */
if(strcmp(stdinname,DEVNAME)==0) {
diff --git a/board/mpl/pati/pati.c b/board/mpl/pati/pati.c
index 85c5af9..a814903 100644
--- a/board/mpl/pati/pati.c
+++ b/board/mpl/pati/pati.c
@@ -46,7 +46,7 @@
#include <common.h>
#include <mpc5xx.h>
-#include <devices.h>
+#include <console.h>
#include <pci_ids.h>
#define PLX9056_LOC
#include "plx9056.h"
@@ -447,7 +447,7 @@ int checkboard (void)
int recbuf[REC_BUFFER_SIZE];
static int r_ptr = 0;
int w_ptr;
-device_t pci_con_dev;
+console_device_t pci_con_dev;
int conn=0;
int buff_full=0;
@@ -584,7 +584,7 @@ void pci_con_connect(void)
pci_con_dev.puts = pci_con_puts;
pci_con_dev.getc = pci_con_getc;
pci_con_dev.tstc = pci_con_tstc;
- device_register (&pci_con_dev);
+ console_register (&pci_con_dev);
printf("PATI ready for PCI connection, type ctrl-c for exit\n");
do {
udelay(10);
diff --git a/board/netphone/phone_console.c b/board/netphone/phone_console.c
index d9b0ad3..85eea29 100644
--- a/board/netphone/phone_console.c
+++ b/board/netphone/phone_console.c
@@ -37,7 +37,7 @@
#include <version.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#include <sed156x.h>
@@ -325,7 +325,7 @@ int phone_getc(void)
int drv_phone_init(void)
{
- device_t console_dev;
+ console_device_t console_dev;
console_init();
@@ -340,7 +340,7 @@ int drv_phone_init(void)
console_dev.tstc = phone_tstc; /* 'tstc' function */
console_dev.getc = phone_getc; /* 'getc' function */
- if (device_register(&console_dev) == 0)
+ if (console_register(&console_dev) == 0)
return 1;
return 0;
diff --git a/board/rbc823/kbd.c b/board/rbc823/kbd.c
index 1d48f6d..dbb2063 100644
--- a/board/rbc823/kbd.c
+++ b/board/rbc823/kbd.c
@@ -30,7 +30,7 @@
#include <common.h>
#include <watchdog.h>
#include <commproc.h>
-#include <devices.h>
+#include <console.h>
#include <lcd.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -249,7 +249,7 @@ int smc1_tstc(void)
int drv_keyboard_init(void)
{
int error = 0;
- device_t kbd_dev;
+ console_device_t kbd_dev;
if (0) {
/* register the keyboard */
@@ -260,7 +260,7 @@ int drv_keyboard_init(void)
kbd_dev.puts = NULL;
kbd_dev.getc = smc1_getc;
kbd_dev.tstc = smc1_tstc;
- error = device_register (&kbd_dev);
+ error = console_register (&kbd_dev);
} else {
lcd_is_enabled = 0;
lcd_disable();
diff --git a/board/trab/vfd.c b/board/trab/vfd.c
index 37d3aa4..cc13f30 100644
--- a/board/trab/vfd.c
+++ b/board/trab/vfd.c
@@ -36,7 +36,7 @@
#include <version.h>
#include <stdarg.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#include <s3c2400.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/cmd_console.c b/common/cmd_console.c
index f861f83..fd7a65d 100644
--- a/common/cmd_console.c
+++ b/common/cmd_console.c
@@ -26,15 +26,15 @@
*/
#include <common.h>
#include <command.h>
-#include <devices.h>
+#include <console.h>
extern void _do_coninfo (void);
int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
{
int l;
- struct list_head *list = device_get_list();
+ struct list_head *list = console_get_list();
struct list_head *pos;
- device_t *dev;
+ console_device_t *dev;
/* Scan for valid output and input devices */
diff --git a/common/cmd_log.c b/common/cmd_log.c
index a03835d..a3c06b8 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -42,7 +42,7 @@
#include <common.h>
#include <command.h>
-#include <devices.h>
+#include <console.h>
#include <post.h>
#include <logbuff.h>
@@ -142,7 +142,7 @@ void logbuff_reset (void)
int drv_logbuff_init (void)
{
- device_t logdev;
+ console_device_t logdev;
int rc;
/* Device initialization */
@@ -154,7 +154,7 @@ int drv_logbuff_init (void)
logdev.putc = logbuff_putc; /* 'putc' function */
logdev.puts = logbuff_puts; /* 'puts' function */
- rc = device_register (&logdev);
+ rc = console_register (&logdev);
return (rc == 0) ? 1 : rc;
}
diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c
index fd3dd48..4586d6d 100644
--- a/common/cmd_terminal.c
+++ b/common/cmd_terminal.c
@@ -26,19 +26,19 @@
*/
#include <common.h>
#include <command.h>
-#include <devices.h>
+#include <console.h>
#include <serial.h>
int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[])
{
int last_tilde = 0;
- device_t *dev = NULL;
+ console_device_t *dev = NULL;
if (argc < 1)
return -1;
/* Scan for selected output/input device */
- dev = device_get_by_name(argv[1]);
+ dev = console_get_by_name(argv[1]);
if (!dev)
return -1;
diff --git a/common/console.c b/common/console.c
index 2add047..ff06a76 100644
--- a/common/console.c
+++ b/common/console.c
@@ -48,7 +48,7 @@ extern int overwrite_console(void);
#endif /* CONFIG_SYS_CONSOLE_IS_IN_ENV */
-static int console_setfile(int file, device_t * dev)
+static int console_setfile(int file, console_device_t * dev)
{
int error = 0;
@@ -96,8 +96,8 @@ static int console_setfile(int file, device_t * dev)
#if defined(CONFIG_CONSOLE_MUX)
/** Console I/O multiplexing *******************************************/
-static device_t *tstcdev;
-device_t **console_devices[MAX_FILES];
+static console_device_t *tstcdev;
+console_device_t **console_devices[MAX_FILES];
int cd_count[MAX_FILES];
/*
@@ -119,7 +119,7 @@ static int console_getc(int file)
static int console_tstc(int file)
{
int i, ret;
- device_t *dev;
+ console_device_t *dev;
disable_ctrlc(1);
for (i = 0; i < cd_count[file]; i++) {
@@ -141,7 +141,7 @@ static int console_tstc(int file)
static void console_putc(int file, const char c)
{
int i;
- device_t *dev;
+ console_device_t *dev;
for (i = 0; i < cd_count[file]; i++) {
dev = console_devices[file][i];
@@ -153,7 +153,7 @@ static void console_putc(int file, const char c)
static void console_puts(int file, const char *s)
{
int i;
- device_t *dev;
+ console_device_t *dev;
for (i = 0; i < cd_count[file]; i++) {
dev = console_devices[file][i];
@@ -167,7 +167,7 @@ static inline void console_printdevs(int file)
iomux_printdevs(file);
}
-static inline void console_doenv(int file, device_t *dev)
+static inline void console_doenv(int file, console_device_t *dev)
{
iomux_doenv(file, dev->name);
}
@@ -197,7 +197,7 @@ static inline void console_printdevs(int file)
printf("%s\n", stdio_devices[file]->name);
}
-static inline void console_doenv(int file, device_t *dev)
+static inline void console_doenv(int file, console_device_t *dev)
{
console_setfile(file, dev);
}
@@ -479,11 +479,11 @@ inline void dbg(const char *fmt, ...)
/** U-Boot INIT FUNCTIONS *************************************************/
-device_t *search_device(int flags, char *name)
+console_device_t *search_device(int flags, char *name)
{
- device_t *dev;
+ console_device_t *dev;
- dev = device_get_by_name(name);
+ dev = console_get_by_name(name);
if (dev && (dev->flags & flags))
return dev;
@@ -494,7 +494,7 @@ device_t *search_device(int flags, char *name)
int console_assign(int file, char *devname)
{
int flag;
- device_t *dev;
+ console_device_t *dev;
/* Check for valid file */
switch (file) {
@@ -537,7 +537,7 @@ int console_init_f(void)
int console_init_r(void)
{
char *stdinname, *stdoutname, *stderrname;
- device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL;
+ console_device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL;
#ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
int i;
#endif /* CONFIG_SYS_CONSOLE_ENV_OVERWRITE */
@@ -645,11 +645,11 @@ done:
/* Called after the relocation - use desired console functions */
int console_init_r(void)
{
- device_t *inputdev = NULL, *outputdev = NULL;
+ console_device_t *inputdev = NULL, *outputdev = NULL;
int i;
- struct list_head *list = device_get_list();
+ struct list_head *list = console_get_list();
struct list_head *pos;
- device_t *dev;
+ console_device_t *dev;
#ifdef CONFIG_SPLASH_SCREEN
/*
diff --git a/common/devices.c b/common/devices.c
index ba53c9b..dd57b31 100644
--- a/common/devices.c
+++ b/common/devices.c
@@ -25,7 +25,7 @@
#include <common.h>
#include <stdarg.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <serial.h>
#ifdef CONFIG_LOGBUFFER
#include <logbuff.h>
@@ -36,8 +36,8 @@
DECLARE_GLOBAL_DATA_PTR;
-static device_t devs;
-device_t *stdio_devices[] = { NULL, NULL, NULL };
+static console_device_t devs;
+console_device_t *stdio_devices[] = { NULL, NULL, NULL };
char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
#if defined(CONFIG_SPLASH_SCREEN) && !defined(CONFIG_SYS_DEVICE_NULLDEV)
@@ -70,7 +70,7 @@ int nulldev_input(void)
static void drv_system_init (void)
{
- device_t dev;
+ console_device_t dev;
memset (&dev, 0, sizeof (dev));
@@ -88,7 +88,7 @@ static void drv_system_init (void)
dev.tstc = serial_tstc;
#endif
- device_register (&dev);
+ console_register (&dev);
#ifdef CONFIG_SYS_DEVICE_NULLDEV
memset (&dev, 0, sizeof (dev));
@@ -100,7 +100,7 @@ static void drv_system_init (void)
dev.getc = nulldev_input;
dev.tstc = nulldev_input;
- device_register (&dev);
+ console_register (&dev);
#endif
}
@@ -108,15 +108,15 @@ static void drv_system_init (void)
* DEVICES
**************************************************************************
*/
-struct list_head* device_get_list(void)
+struct list_head* console_get_list(void)
{
return &(devs.list);
}
-device_t* device_get_by_name(char* name)
+device_t* console_get_by_name(char* name)
{
struct list_head *pos;
- device_t *dev;
+ console_device_t *dev;
if(!name)
return NULL;
@@ -130,9 +130,9 @@ device_t* device_get_by_name(char* name)
return NULL;
}
-device_t* device_clone(device_t *dev)
+device_t* console_clone(console_device_t *dev)
{
- device_t *_dev;
+ console_device_t *_dev;
if(!dev)
return NULL;
@@ -148,11 +148,11 @@ device_t* device_clone(device_t *dev)
return _dev;
}
-int device_register (device_t * dev)
+int console_register (console_device_t * dev)
{
- device_t *_dev;
+ console_device_t *_dev;
- _dev = device_clone(dev);
+ _dev = console_clone(dev);
if(!_dev)
return -1;
list_add_tail(&(_dev->list), &(devs.list));
@@ -162,15 +162,15 @@ int device_register (device_t * dev)
/* deregister the device "devname".
* returns 0 if success, -1 if device is assigned and 1 if devname not found
*/
-#ifdef CONFIG_SYS_DEVICE_DEREGISTER
-int device_deregister(char *devname)
+#ifdef CONFIG_SYS_CONSOLE_DEREGISTER
+int console_deregister(char *devname)
{
int l;
struct list_head *pos;
- device_t *dev;
+ console_device_t *dev;
char temp_names[3][8];
- dev = device_get_by_name(devname);
+ dev = console_get_by_name(devname);
if(!dev) /* device not found */
return -1;
@@ -197,9 +197,9 @@ int device_deregister(char *devname)
}
return 0;
}
-#endif /* CONFIG_SYS_DEVICE_DEREGISTER */
+#endif /* CONFIG_SYS_CONSOLE_DEREGISTER */
-int devices_init (void)
+int consoles_init (void)
{
#ifndef CONFIG_ARM /* already relocated for current ARM implementation */
ulong relocation_offset = gd->reloc_off;
@@ -235,7 +235,7 @@ int devices_init (void)
#endif
drv_system_init ();
#ifdef CONFIG_SERIAL_MULTI
- serial_devices_init ();
+ serial_consoles_init ();
#endif
#ifdef CONFIG_USB_TTY
drv_usbtty_init ();
diff --git a/common/iomux.c b/common/iomux.c
index bdcc853..18e7d8d 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -29,7 +29,7 @@
void iomux_printdevs(const int console)
{
int i;
- device_t *dev;
+ console_device_t *dev;
for (i = 0; i < cd_count[console]; i++) {
dev = console_devices[console][i];
@@ -43,8 +43,8 @@ int iomux_doenv(const int console, const char *arg)
{
char *console_args, *temp, **start;
int i, j, k, io_flag, cs_idx, repeat;
- device_t *dev;
- device_t **cons_set;
+ console_device_t *dev;
+ console_device_t **cons_set;
console_args = strdup(arg);
if (console_args == NULL)
@@ -85,7 +85,7 @@ int iomux_doenv(const int console, const char *arg)
*temp = '\0';
start[i] = temp + 1;
}
- cons_set = (device_t **)calloc(i, sizeof(device_t *));
+ cons_set = (console_device_t **)calloc(i, sizeof(console_device_t *));
if (cons_set == NULL) {
free(start);
free(console_args);
@@ -158,14 +158,14 @@ int iomux_doenv(const int console, const char *arg)
} else {
/* Works even if console_devices[console] is NULL. */
console_devices[console] =
- (device_t **)realloc(console_devices[console],
- cs_idx * sizeof(device_t *));
+ (console_device_t **)realloc(console_devices[console],
+ cs_idx * sizeof(console_device_t *));
if (console_devices[console] == NULL) {
free(cons_set);
return 1;
}
memcpy(console_devices[console], cons_set, cs_idx *
- sizeof(device_t *));
+ sizeof(console_device_t *));
cd_count[console] = cs_idx;
}
diff --git a/common/lcd.c b/common/lcd.c
index 4155170..04b870e 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -34,7 +34,7 @@
#include <command.h>
#include <stdarg.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#if defined(CONFIG_POST)
#include <post.h>
#endif
@@ -355,7 +355,7 @@ static void test_pattern (void)
int drv_lcd_init (void)
{
- device_t lcddev;
+ console_device_t lcddev;
int rc;
lcd_base = (void *)(gd->fb_base);
@@ -373,7 +373,7 @@ int drv_lcd_init (void)
lcddev.putc = lcd_putc; /* 'putc' function */
lcddev.puts = lcd_puts; /* 'puts' function */
- rc = device_register (&lcddev);
+ rc = console_register (&lcddev);
return (rc == 0) ? 1 : rc;
}
diff --git a/common/serial.c b/common/serial.c
index 09385d0..7bf797c 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <serial.h>
-#include <devices.h>
+#include <console.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -139,9 +139,9 @@ void serial_initialize (void)
serial_assign (default_serial_console ()->name);
}
-void serial_devices_init (void)
+void serial_consoles_init (void)
{
- device_t dev;
+ console_device_t dev;
struct serial_device *s = serial_devices;
while (s) {
@@ -156,7 +156,7 @@ void serial_devices_init (void)
dev.getc = s->getc;
dev.tstc = s->tstc;
- device_register (&dev);
+ console_register (&dev);
s = s->next;
}
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index e0d006c..c52192b 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -25,7 +25,7 @@
*
*/
#include <common.h>
-#include <devices.h>
+#include <console.h>
#include <asm/byteorder.h>
#include <usb.h>
@@ -153,7 +153,7 @@ static int usb_kbd_probe(struct usb_device *dev, unsigned int ifnum);
int drv_usb_kbd_init(void)
{
int error,i;
- device_t usb_kbd_dev,*old_dev;
+ console_device_t usb_kbd_dev,*old_dev;
struct usb_device *dev;
char *stdinname = getenv ("stdin");
@@ -168,7 +168,7 @@ int drv_usb_kbd_init(void)
if(usb_kbd_probe(dev,0)==1) { /* Ok, we found a keyboard */
/* check, if it is already registered */
USB_KBD_PRINTF("USB KBD found set up device.\n");
- old_dev = device_get_by_name(DEVNAME);
+ old_dev = console_get_by_name(DEVNAME);
if(old_dev) {
/* ok, already registered, just return ok */
USB_KBD_PRINTF("USB KBD is already registered.\n");
@@ -184,7 +184,7 @@ int drv_usb_kbd_init(void)
usb_kbd_dev.getc = usb_kbd_getc;
usb_kbd_dev.tstc = usb_kbd_testc;
usb_kbd_dev.priv = (void *)dev;
- error = device_register (&usb_kbd_dev);
+ error = console_register (&usb_kbd_dev);
if(error==0) {
/* check if this is the standard input device */
if(strcmp(stdinname,DEVNAME)==0) {
@@ -212,8 +212,8 @@ int drv_usb_kbd_init(void)
/* deregistering the keyboard */
int usb_kbd_deregister(void)
{
-#ifdef CONFIG_SYS_DEVICE_DEREGISTER
- return device_deregister(DEVNAME);
+#ifdef CONFIG_SYS_CONSOLE_DEREGISTER
+ return console_deregister(DEVNAME);
#else
return 1;
#endif
diff --git a/cpu/blackfin/jtag-console.c b/cpu/blackfin/jtag-console.c
index d58582f..a12a643 100644
--- a/cpu/blackfin/jtag-console.c
+++ b/cpu/blackfin/jtag-console.c
@@ -7,7 +7,7 @@
*/
#include <common.h>
-#include <devices.h>
+#include <console.h>
#include <asm/blackfin.h>
#ifndef CONFIG_JTAG_CONSOLE_TIMEOUT
@@ -105,7 +105,7 @@ static int jtag_getc(void)
int drv_jtag_console_init(void)
{
- device_t dev;
+ console_device_t dev;
int ret;
memset(&dev, 0x00, sizeof(dev));
@@ -116,7 +116,7 @@ int drv_jtag_console_init(void)
dev.tstc = jtag_tstc;
dev.getc = jtag_getc;
- ret = device_register(&dev);
+ ret = console_register(&dev);
return (ret == 0 ? 1 : ret);
}
diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c
index 4474e24..2c0e555 100644
--- a/cpu/mpc8xx/lcd.c
+++ b/cpu/mpc8xx/lcd.c
@@ -35,7 +35,7 @@
#include <stdarg.h>
#include <lcdvideo.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#if defined(CONFIG_POST)
#include <post.h>
#endif
diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c
index 4a59927..9f91e82 100644
--- a/cpu/mpc8xx/video.c
+++ b/cpu/mpc8xx/video.c
@@ -36,7 +36,7 @@
#include <timestamp.h>
#include <i2c.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#ifdef CONFIG_VIDEO
@@ -1287,7 +1287,7 @@ int drv_video_init (void)
{
int error, devices = 1;
- device_t videodev;
+ console_device_t videodev;
video_init ((void *)(gd->fb_base)); /* Video initialization */
@@ -1301,7 +1301,7 @@ int drv_video_init (void)
videodev.putc = video_putc; /* 'putc' function */
videodev.puts = video_puts; /* 'puts' function */
- error = device_register (&videodev);
+ error = console_register (&videodev);
return (error == 0) ? devices : error;
}
diff --git a/cpu/pxa/pxafb.c b/cpu/pxa/pxafb.c
index 97efcb6..9f913e9 100644
--- a/cpu/pxa/pxafb.c
+++ b/cpu/pxa/pxafb.c
@@ -32,7 +32,7 @@
#include <version.h>
#include <stdarg.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#include <lcd.h>
#include <asm/arch/pxa-regs.h>
diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c
index 512b9f2..41dca98 100644
--- a/drivers/input/keyboard.c
+++ b/drivers/input/keyboard.c
@@ -11,7 +11,7 @@
#include <common.h>
-#include <devices.h>
+#include <console.h>
#include <keyboard.h>
#undef KBG_DEBUG
@@ -268,7 +268,7 @@ extern int overwrite_console (void);
int kbd_init (void)
{
int error;
- device_t kbddev ;
+ console_device_t kbddev ;
char *stdinname = getenv ("stdin");
if(kbd_init_hw()==-1)
@@ -281,7 +281,7 @@ int kbd_init (void)
kbddev.getc = kbd_getc ;
kbddev.tstc = kbd_testc ;
- error = device_register (&kbddev);
+ error = console_register (&kbddev);
if(error==0) {
/* check if this is the standard input device */
if(strcmp(stdinname,DEVNAME)==0) {
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index f4b01a9..9b94ddc 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -291,7 +291,7 @@ static int ubi_sysfs_init(struct ubi_device *ubi)
ubi->dev.devt = ubi->cdev.dev;
ubi->dev.class = ubi_class;
sprintf(&ubi->dev.bus_id[0], UBI_NAME_STR"%d", ubi->ubi_num);
- err = device_register(&ubi->dev);
+ err = console_register(&ubi->dev);
if (err)
return err;
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 061da64..2b6b137 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -337,7 +337,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)
vol->dev.class = ubi_class;
sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id);
- err = device_register(&vol->dev);
+ err = console_register(&vol->dev);
if (err) {
ubi_err("cannot register device");
goto out_gluebi;
@@ -646,7 +646,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
vol->dev.devt = dev;
vol->dev.class = ubi_class;
sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id);
- err = device_register(&vol->dev);
+ err = console_register(&vol->dev);
if (err)
goto out_gluebi;
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index b2ee5ea..f1644ce 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <command.h>
-#include <devices.h>
+#include <console.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -243,7 +243,7 @@ int nc_tstc (void)
int drv_nc_init (void)
{
- device_t dev;
+ console_device_t dev;
int rc;
memset (&dev, 0, sizeof (dev));
@@ -256,7 +256,7 @@ int drv_nc_init (void)
dev.getc = nc_getc;
dev.tstc = nc_tstc;
- rc = device_register (&dev);
+ rc = console_register (&dev);
return (rc == 0) ? 1 : rc;
}
diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c
index dca73b9..8439037 100644
--- a/drivers/serial/arm_dcc.c
+++ b/drivers/serial/arm_dcc.c
@@ -27,7 +27,7 @@
*/
#include <common.h>
-#include <devices.h>
+#include <console.h>
#if defined(CONFIG_CPU_V6)
/*
@@ -148,7 +148,7 @@ int arm_dcc_tstc(void)
}
#ifdef CONFIG_ARM_DCC_MULTI
-static device_t arm_dcc_dev;
+static console_device_t arm_dcc_dev;
int drv_arm_dcc_init(void)
{
@@ -165,6 +165,6 @@ int drv_arm_dcc_init(void)
arm_dcc_dev.putc = arm_dcc_putc; /* 'putc' function */
arm_dcc_dev.puts = arm_dcc_puts; /* 'puts' function */
- return device_register(&arm_dcc_dev);
+ return console_register(&arm_dcc_dev);
}
#endif
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index f711d0b..88a5651 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <config.h>
#include <circbuf.h>
-#include <devices.h>
+#include <console.h>
#include "usbtty.h"
#include "usb_cdc_acm.h"
#include "usbdescriptors.h"
@@ -70,7 +70,7 @@ static circbuf_t usbtty_output;
/*
* Instance variables
*/
-static device_t usbttydev;
+static console_device_t usbttydev;
static struct usb_device_instance device_instance[1];
static struct usb_bus_instance bus_instance[1];
static struct usb_configuration_instance config_instance[NUM_CONFIGS];
@@ -570,7 +570,7 @@ int drv_usbtty_init (void)
usbttydev.putc = usbtty_putc; /* 'putc' function */
usbttydev.puts = usbtty_puts; /* 'puts' function */
- rc = device_register (&usbttydev);
+ rc = console_register (&usbttydev);
return (rc == 0) ? 1 : rc;
}
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 352a0d4..273ff0a 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -770,7 +770,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe,
*/
void usb_event_poll()
{
- device_t *dev;
+ console_device_t *dev;
struct usb_device *usb_kbd_dev;
struct usb_interface_descriptor *iface;
struct usb_endpoint_descriptor *ep;
@@ -778,7 +778,7 @@ void usb_event_poll()
int maxp;
/* Get the pointer to USB Keyboard device pointer */
- dev = device_get_by_name("usbkbd");
+ dev = console_get_by_name("usbkbd");
usb_kbd_dev = (struct usb_device *)dev->priv;
iface = &usb_kbd_dev->config.if_desc[0];
ep = &iface->ep_desc[0];
diff --git a/drivers/usb/musb/musb_hcd.h b/drivers/usb/musb/musb_hcd.h
index bb83311..dadf284 100644
--- a/drivers/usb/musb/musb_hcd.h
+++ b/drivers/usb/musb/musb_hcd.h
@@ -26,7 +26,7 @@
#include "musb_core.h"
#ifdef CONFIG_USB_KEYBOARD
-#include <devices.h>
+#include <console.h>
extern unsigned char new[];
#endif
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 5ee2314..13ebb4e 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -183,7 +183,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the hardware cursor capability of the
#include <version.h>
#include <linux/types.h>
-#include <devices.h>
+#include <console.h>
#include <video_font.h>
#if defined(CONFIG_CMD_DATE)
@@ -1333,7 +1333,7 @@ static int video_init (void)
int drv_video_init (void)
{
int skip_dev_init;
- device_t console_dev;
+ console_device_t console_dev;
skip_dev_init = 0;
@@ -1354,7 +1354,7 @@ int drv_video_init (void)
console_dev.tstc = NULL; /* 'tstc' function */
console_dev.getc = NULL; /* 'getc' function */
- if (device_register (&console_dev) == 0)
+ if (console_register (&console_dev) == 0)
return 1;
}
#else
@@ -1373,7 +1373,7 @@ int drv_video_init (void)
console_dev.tstc = VIDEO_TSTC_FCT; /* 'tstc' function */
console_dev.getc = VIDEO_GETC_FCT; /* 'getc' function */
- if (device_register (&console_dev) == 0)
+ if (console_register (&console_dev) == 0)
return 1;
}
#endif /* CONFIG_VGA_AS_SINGLE_DEVICE */
diff --git a/include/configs/AmigaOneG3SE.h b/include/configs/AmigaOneG3SE.h
index fe04f27..bfd8257 100644
--- a/include/configs/AmigaOneG3SE.h
+++ b/include/configs/AmigaOneG3SE.h
@@ -363,7 +363,7 @@
#define CONFIG_USB_UHCI 1
#define CONFIG_USB_STORAGE 1
#define CONFIG_USB_KEYBOARD 1
-#define CONFIG_SYS_DEVICE_DEREGISTER 1 /* needed by CONFIG_USB_KEYBOARD */
+#define CONFIG_SYS_CONSOLE_DEREGISTER 1 /* needed by CONFIG_USB_KEYBOARD */
/*
* Autoboot stuff
diff --git a/include/configs/MIP405.h b/include/configs/MIP405.h
index a3869c8..79cc774 100644
--- a/include/configs/MIP405.h
+++ b/include/configs/MIP405.h
@@ -414,7 +414,7 @@
#define CONFIG_USB_STORAGE
/* Enable needed helper functions */
-#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */
+#define CONFIG_SYS_CONSOLE_DEREGISTER /* needs console_deregister */
#endif
/************************************************************
* Debug support
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index 1091043..84d1b66 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -321,7 +321,7 @@
#define CONFIG_PCI_OHCI 1
#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_USB_KEYBOARD 1
-#define CONFIG_SYS_DEVICE_DEREGISTER
+#define CONFIG_SYS_CONSOLE_DEREGISTER
#define CONFIG_SYS_USB_EVENT_POLL 1
#define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci"
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index d8042fb..ecaf558 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -395,7 +395,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_PCI_OHCI 1
#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_USB_KEYBOARD 1
-#define CONFIG_SYS_DEVICE_DEREGISTER
+#define CONFIG_SYS_CONSOLE_DEREGISTER
#define CONFIG_SYS_USB_EVENT_POLL 1
#define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci"
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
diff --git a/include/configs/PIP405.h b/include/configs/PIP405.h
index 5c4d69b..2db18d3 100644
--- a/include/configs/PIP405.h
+++ b/include/configs/PIP405.h
@@ -360,7 +360,7 @@
#define CONFIG_USB_STORAGE
/* Enable needed helper functions */
-#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */
+#define CONFIG_SYS_CONSOLE_DEREGISTER /* needs console_deregister */
/************************************************************
* Debug support
diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h
index 547167f..db68b98 100644
--- a/include/configs/VCMA9.h
+++ b/include/configs/VCMA9.h
@@ -130,7 +130,7 @@
#define CONFIG_DOS_PARTITION 1
/* Enable needed helper functions */
-#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */
+#define CONFIG_SYS_CONSOLE_DEREGISTER /* needs console_deregister */
/************************************************************
* RTC
diff --git a/include/configs/gr_ep2s60.h b/include/configs/gr_ep2s60.h
index 6f58bac..68c96c6 100644
--- a/include/configs/gr_ep2s60.h
+++ b/include/configs/gr_ep2s60.h
@@ -87,7 +87,7 @@
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
/* Enable needed helper functions */
-#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */
+#define CONFIG_SYS_CONSOLE_DEREGISTER /* needs console_deregister */
#endif
/*
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 3225ce7..60ee0ef 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -216,7 +216,7 @@
#define CONFIG_SYS_MAXARGS 32 /* max number of command args */
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */
+#define CONFIG_SYS_CONSOLE_DEREGISTER /* needs console_deregister */
#define CONFIG_SYS_HZ 1000
#define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK/2) /* AT91C_TC0_CMR is implicitly set to */
diff --git a/include/console.h b/include/console.h
index 06ec32a..428102a 100644
--- a/include/console.h
+++ b/include/console.h
@@ -24,15 +24,104 @@
#ifndef _CONSOLE_H_
#define _CONSOLE_H_
-#include <devices.h>
+#include <linux/list.h>
/*
-** VARIABLES
-*/
+ * CONSOLE DEVICES
+ */
+
+#define DEV_FLAGS_INPUT 0x00000001 /* Device can be used as input console */
+#define DEV_FLAGS_OUTPUT 0x00000002 /* Device can be used as output console */
+#define DEV_FLAGS_SYSTEM 0x80000000 /* Device is a system device */
+#define DEV_EXT_VIDEO 0x00000001 /* Video extensions supported */
+
+/* Device information */
+typedef struct console_device {
+ int flags; /* Device flags: input/output/system */
+ int ext; /* Supported extensions */
+ char name[16]; /* Device name */
+
+/* GENERAL functions */
+
+ int (*start) (void); /* To start the device */
+ int (*stop) (void); /* To stop the device */
+
+/* OUTPUT functions */
+
+ void (*putc) (const char c); /* To put a char */
+ void (*puts) (const char *s); /* To put a string (accelerator) */
+
+/* INPUT functions */
-extern device_t *stdio_devices[] ;
-extern char *stdio_names[MAX_FILES] ;
+ int (*tstc) (void); /* To test if a char is ready... */
+ int (*getc) (void); /* To get that char */
-int console_realloc(int top);
+/* Other functions */
+
+ void *priv; /* Private extensions */
+ struct list_head list;
+} console_device_t;
+
+/*
+ * VIDEO EXTENSIONS
+ */
+#define VIDEO_FORMAT_RGB_INDEXED 0x0000
+#define VIDEO_FORMAT_RGB_DIRECTCOLOR 0x0001
+#define VIDEO_FORMAT_YUYV_4_4_4 0x0010
+#define VIDEO_FORMAT_YUYV_4_2_2 0x0011
+
+typedef struct {
+ void *address; /* Address of framebuffer */
+ ushort width; /* Horizontal resolution */
+ ushort height; /* Vertical resolution */
+ uchar format; /* Format */
+ uchar colors; /* Colors number or color depth */
+ void (*setcolreg) (int, int, int, int);
+ void (*getcolreg) (int, void *);
+} video_ext_t;
+
+/*
+ * VARIABLES
+ */
+extern console_console_device_t *stdio_devices[];
+extern char *stdio_names[MAX_FILES];
+
+/*
+ * PROTOTYPES
+ */
+int console_register (console_console_device_t * dev);
+int console_init (void);
+int console_realloc(int top);
+#ifdef CONFIG_SYS_CONSOLE_DEREGISTER
+int console_deregister(char *devname);
+#endif
+struct list_head* console_get_list(void);
+console_device_t* console_get_by_name(char* name);
+console_device_t* console_clone(console_console_device_t *dev);
+
+#ifdef CONFIG_ARM_DCC_MULTI
+int drv_arm_dcc_init(void);
+#endif
+#ifdef CONFIG_LCD
+int drv_lcd_init (void);
+#endif
+#ifdef CONFIG_VFD
+int drv_vfd_init (void);
+#endif
+#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
+int drv_video_init (void);
+#endif
+#ifdef CONFIG_KEYBOARD
+int drv_keyboard_init (void);
+#endif
+#ifdef CONFIG_USB_TTY
+int drv_usbtty_init (void);
+#endif
+#ifdef CONFIG_NETCONSOLE
+int drv_nc_init (void);
+#endif
+#ifdef CONFIG_JTAG_CONSOLE
+int drv_jtag_console_init (void);
+#endif
#endif
diff --git a/include/devices.h b/include/devices.h
deleted file mode 100644
index 3a9881b..0000000
--- a/include/devices.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * (C) Copyright 2000
- * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio(a)tin.it
- *
- * 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 <linux/list.h>
-
-#ifndef _DEVICES_H_
-#define _DEVICES_H_
-
-/*
- * CONSOLE DEVICES
- */
-
-#define DEV_FLAGS_INPUT 0x00000001 /* Device can be used as input console */
-#define DEV_FLAGS_OUTPUT 0x00000002 /* Device can be used as output console */
-#define DEV_FLAGS_SYSTEM 0x80000000 /* Device is a system device */
-#define DEV_EXT_VIDEO 0x00000001 /* Video extensions supported */
-
-/* Device information */
-typedef struct {
- int flags; /* Device flags: input/output/system */
- int ext; /* Supported extensions */
- char name[16]; /* Device name */
-
-/* GENERAL functions */
-
- int (*start) (void); /* To start the device */
- int (*stop) (void); /* To stop the device */
-
-/* OUTPUT functions */
-
- void (*putc) (const char c); /* To put a char */
- void (*puts) (const char *s); /* To put a string (accelerator) */
-
-/* INPUT functions */
-
- int (*tstc) (void); /* To test if a char is ready... */
- int (*getc) (void); /* To get that char */
-
-/* Other functions */
-
- void *priv; /* Private extensions */
- struct list_head list;
-} device_t;
-
-/*
- * VIDEO EXTENSIONS
- */
-#define VIDEO_FORMAT_RGB_INDEXED 0x0000
-#define VIDEO_FORMAT_RGB_DIRECTCOLOR 0x0001
-#define VIDEO_FORMAT_YUYV_4_4_4 0x0010
-#define VIDEO_FORMAT_YUYV_4_2_2 0x0011
-
-typedef struct {
- void *address; /* Address of framebuffer */
- ushort width; /* Horizontal resolution */
- ushort height; /* Vertical resolution */
- uchar format; /* Format */
- uchar colors; /* Colors number or color depth */
- void (*setcolreg) (int, int, int, int);
- void (*getcolreg) (int, void *);
-} video_ext_t;
-
-/*
- * VARIABLES
- */
-extern device_t *stdio_devices[];
-extern char *stdio_names[MAX_FILES];
-
-/*
- * PROTOTYPES
- */
-int device_register (device_t * dev);
-int devices_init (void);
-#ifdef CONFIG_SYS_DEVICE_DEREGISTER
-int device_deregister(char *devname);
-#endif
-struct list_head* device_get_list(void);
-device_t* device_get_by_name(char* name);
-device_t* device_clone(device_t *dev);
-
-#ifdef CONFIG_ARM_DCC_MULTI
-int drv_arm_dcc_init(void);
-#endif
-#ifdef CONFIG_LCD
-int drv_lcd_init (void);
-#endif
-#ifdef CONFIG_VFD
-int drv_vfd_init (void);
-#endif
-#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
-int drv_video_init (void);
-#endif
-#ifdef CONFIG_KEYBOARD
-int drv_keyboard_init (void);
-#endif
-#ifdef CONFIG_USB_TTY
-int drv_usbtty_init (void);
-#endif
-#ifdef CONFIG_NETCONSOLE
-int drv_nc_init (void);
-#endif
-#ifdef CONFIG_JTAG_CONSOLE
-int drv_jtag_console_init (void);
-#endif
-
-#endif /* _DEVICES_H_ */
diff --git a/include/iomux.h b/include/iomux.h
index 257c1f7..2eb566c 100644
--- a/include/iomux.h
+++ b/include/iomux.h
@@ -24,7 +24,7 @@
#ifndef _IO_MUX_H
#define _IO_MUX_H
-#include <devices.h>
+#include <console.h>
/*
* Stuff required to support console multiplexing.
@@ -34,7 +34,7 @@
* Pointers to devices used for each file type. Defined in console.c
* but storage is allocated in iomux.c.
*/
-extern device_t **console_devices[MAX_FILES];
+extern console_device_t **console_devices[MAX_FILES];
/*
* The count of devices assigned to each FILE. Defined in console.c
* and populated in iomux.c.
@@ -43,6 +43,6 @@ extern int cd_count[MAX_FILES];
int iomux_doenv(const int, const char *);
void iomux_printdevs(const int);
-device_t *search_device(int, char *);
+console_device_t *search_device(int, char *);
#endif /* _IO_MUX_H */
diff --git a/include/serial.h b/include/serial.h
index e3d8b36..b756e61 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -47,7 +47,7 @@ extern struct serial_device serial_btuart_device;
extern struct serial_device serial_stuart_device;
extern void serial_initialize(void);
-extern void serial_devices_init(void);
+extern void serial_consoles_init(void);
extern int serial_assign(char * name);
extern void serial_reinit_all(void);
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 9fbb4bf..8d17e96 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -41,7 +41,7 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <timestamp.h>
#include <version.h>
#include <net.h>
@@ -388,7 +388,7 @@ void start_armboot (void)
/* IP Address */
gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
- devices_init (); /* get the devices list going. */
+ consoles_init (); /* get the devices list going. */
jumptable_init ();
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 57115df..bef5de4 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -22,7 +22,7 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <timestamp.h>
#include <version.h>
#include <net.h>
@@ -350,7 +350,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
- devices_init();
+ consoles_init();
jumptable_init();
console_init_r();
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index 49465d2..27c06e3 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <command.h>
-#include <devices.h>
+#include <console.h>
#include <environment.h>
#include <malloc.h>
#include <net.h>
@@ -354,7 +354,7 @@ void board_init_r(gd_t * id, ulong dest_addr)
env_relocate();
/* Initialize devices */
- devices_init();
+ consoles_init();
jumptable_init();
/* Initialize the console (after the relocation and devices init) */
diff --git a/lib_i386/board.c b/lib_i386/board.c
index e18dfa5..50d490f 100644
--- a/lib_i386/board.c
+++ b/lib_i386/board.c
@@ -31,7 +31,7 @@
#include <common.h>
#include <watchdog.h>
#include <command.h>
-#include <devices.h>
+#include <console.h>
#include <timestamp.h>
#include <version.h>
#include <malloc.h>
@@ -299,7 +299,7 @@ void start_i386boot (void)
show_boot_progress(0x27);
- devices_init ();
+ consoles_init ();
jumptable_init ();
diff --git a/lib_i386/video.c b/lib_i386/video.c
index cd89457..f6145d3 100644
--- a/lib_i386/video.c
+++ b/lib_i386/video.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <pci.h>
-#include <devices.h>
+#include <console.h>
#include <i8042.h>
#include <asm/ptrace.h>
#include <asm/realmode.h>
@@ -168,8 +168,8 @@ int video_init(void)
{
u16 pos;
- static device_t vga_dev;
- static device_t kbd_dev;
+ static console_device_t vga_dev;
+ static console_device_t kbd_dev;
vidmem = (char *) 0xb8000;
vidport = 0x3d4;
@@ -203,7 +203,7 @@ int video_init(void)
vga_dev.tstc = NULL; /* 'tstc' function */
vga_dev.getc = NULL; /* 'getc' function */
- if (device_register(&vga_dev) == 0) {
+ if (console_register(&vga_dev) == 0) {
return 1;
}
@@ -220,7 +220,7 @@ int video_init(void)
kbd_dev.tstc = i8042_tstc; /* 'tstc' function */
kbd_dev.getc = i8042_getc; /* 'getc' function */
- if (device_register(&kbd_dev) == 0) {
+ if (console_register(&kbd_dev) == 0) {
return 1;
}
return 0;
diff --git a/lib_m68k/board.c b/lib_m68k/board.c
index db45b00..2f41833 100644
--- a/lib_m68k/board.c
+++ b/lib_m68k/board.c
@@ -28,7 +28,7 @@
#include <watchdog.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <asm/immap.h>
@@ -597,7 +597,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
/** leave this here (after malloc(), environment and PCI are working) **/
/* Initialize devices */
- devices_init ();
+ consoles_init ();
/* Initialize the jump table for applications */
jumptable_init ();
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 6fc4845..f2eafd3 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <timestamp.h>
#include <version.h>
#include <net.h>
@@ -413,7 +413,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
/** leave this here (after malloc(), environment and PCI are working) **/
/* Initialize devices */
- devices_init ();
+ consoles_init ();
jumptable_init ();
diff --git a/lib_nios/board.c b/lib_nios/board.c
index 63e79ae..a032624 100644
--- a/lib_nios/board.c
+++ b/lib_nios/board.c
@@ -25,7 +25,7 @@
*/
#include <common.h>
-#include <devices.h>
+#include <console.h>
#include <watchdog.h>
#include <net.h>
#ifdef CONFIG_STATUS_LED
@@ -153,7 +153,7 @@ void board_init (void)
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
WATCHDOG_RESET ();
- devices_init();
+ consoles_init();
jumptable_init();
console_init_r();
/*
diff --git a/lib_nios2/board.c b/lib_nios2/board.c
index 70fad1b..f21c075 100644
--- a/lib_nios2/board.c
+++ b/lib_nios2/board.c
@@ -25,7 +25,7 @@
*/
#include <common.h>
-#include <devices.h>
+#include <console.h>
#include <watchdog.h>
#include <net.h>
#ifdef CONFIG_STATUS_LED
@@ -159,7 +159,7 @@ void board_init (void)
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
WATCHDOG_RESET ();
- devices_init();
+ consoles_init();
jumptable_init();
console_init_r();
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 9e944fa..46eabde 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -25,7 +25,7 @@
#include <watchdog.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h>
#endif
@@ -933,7 +933,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
/** leave this here (after malloc(), environment and PCI are working) **/
/* Initialize devices */
- devices_init ();
+ consoles_init ();
/* Initialize the jump table for applications */
jumptable_init ();
diff --git a/lib_sh/board.c b/lib_sh/board.c
index 2fd213b..4c059be 100644
--- a/lib_sh/board.c
+++ b/lib_sh/board.c
@@ -21,7 +21,7 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <timestamp.h>
#include <version.h>
#include <watchdog.h>
@@ -150,7 +150,7 @@ init_fnc_t *init_sequence[] =
sh_mem_env_init,
INIT_FUNC_NAND_INIT/* Flash memory (NAND) init */
INIT_FUNC_PCI_INIT /* PCI init */
- devices_init,
+ consoles_init,
console_init_r,
interrupt_init,
#ifdef BOARD_LATE_INIT
diff --git a/lib_sparc/board.c b/lib_sparc/board.c
index 2f3e673..c2fc8e6 100644
--- a/lib_sparc/board.c
+++ b/lib_sparc/board.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
-#include <devices.h>
+#include <console.h>
#include <config.h>
#if defined(CONFIG_CMD_IDE)
#include <ide.h>
@@ -404,7 +404,7 @@ void board_init_f(ulong bootflag)
#endif
/* Initialize devices */
- devices_init();
+ consoles_init();
/* Initialize the jump table for applications */
jumptable_init();
--
1.6.1.3
3
7
British Lottery Headquarter6/49
P O Box 1010, 3b Olympic Way,
Sefton Business Park,Aintree,
Liverpool , L30 1RD
2009 BRITISH EMAIL LOTTERY WINNER
We are notifying you on our Online Draw held on 25th/Apr/2009, where your
Email emerged one of the Five lucky winners who won the first prize of a total
sum of £1,263,58400 from a total payout prize pool of £8,075,997.00 in our
Online Lottery Draw.
Your e-mail was attached to Ticket no:025-1146-1992-750, Serial no:2113-
05,Lucky no:08-11-17-30-32-41bonus no:47,REFNO:BRLFGP2551256/02,You have been
Selected for a cash prize of £1,263,584.00(One Million Two Hundred and Sixty-
three Thousand, Five Hundred and Eighty-four Pounds Sterling). The Selection
process was carried out through random selection in our computerized email
selection system(ess) from a database of over 250,000 email addresses Drawn
from which you were selected.
THE BRITISH NATIONAL LOTTERY is approved by the British Gaming Board. To begin
the processing of your prize you are to contact the payment Bank (ROYAL BANK OF
SCOTLAND) for more information as regards procedures to claim your prize.You
are to contact the Royal Bank Of Scotland with details given below and also
fill the payment processing form:
Name: Mr. Hamilton Reeds
Email: (uktransferdepartment(a)live.co.uk)
Office Tel: +(44) 0702 4075871 (You can confirm your winning with a telephone
call to the office of Mr. Hamilton Reeds).
PAYMENT PROCESSING FORM:
(1) FULL NAME
(2) FULL ADDRESS
(3) NATIONALITY
(4) AGE
(5) OCCUPATION
(6) TELEPHONE NUMBER
(7) SEX(8) TOTAL AMOUNT WON
(9) COUNTRY
NOTE:YOU MUST ENDEAVOUR TO STATE THE FOLLOWING :Ticket no:025-1146-1992-750,
Serial no:2113-05, Lucky no:08-11-17-30-32-41bonus
no:47,REFNO:BRLFGP2551256/02, so that they can attend to you timely.
*Winners are advised to keep their winning details/information confidential
from the public to avoid Fraudulent claim (IMPORTANT) pending the prize claim
by Winner. *Staff of the British Lottery are not to partake in this Lottery.
Congratulation!!
Sincerely,
Stella Roberts (Mrs).
1
0

[U-Boot] U-boot snapshot for commit dfc91c33957c95da34e3888dc87912d5c15a7603
by alfred steele 03 May '09
by alfred steele 03 May '09
03 May '09
All,
How do i get a snapshot of commit
dfc91c33957c95da34e3888dc87912d5c15a7603 from the GIT web. I tried
clicking on tree after putting the commit no in the text box but the
commit tarball i got wasn't the one i intended to.
Thanks for your help
-Alfred.
2
1
remove duplicated and clean it
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj(a)jcrosoft.com>
---
include/asm-arm/arch-arm925t/sizes.h | 50 ----------------------------
include/asm-arm/arch-arm926ejs/sizes.h | 51 -----------------------------
include/asm-arm/arch-omap/sizes.h | 52 ------------------------------
include/asm-arm/arch-omap24xx/omap2420.h | 2 +-
include/asm-arm/arch-omap24xx/sizes.h | 49 ----------------------------
include/asm-arm/sizes.h | 6 +++-
include/configs/h2_p2_dbg_board.h | 2 +-
include/configs/omap1510.h | 2 +-
include/configs/omap730.h | 2 +-
9 files changed, 9 insertions(+), 207 deletions(-)
delete mode 100644 include/asm-arm/arch-arm925t/sizes.h
delete mode 100644 include/asm-arm/arch-arm926ejs/sizes.h
delete mode 100644 include/asm-arm/arch-omap/sizes.h
delete mode 100644 include/asm-arm/arch-omap24xx/sizes.h
diff --git a/include/asm-arm/arch-arm925t/sizes.h b/include/asm-arm/arch-arm925t/sizes.h
deleted file mode 100644
index 7319bd9..0000000
--- a/include/asm-arm/arch-arm925t/sizes.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- */
-/* DO NOT EDIT!! - this file automatically generated
- * from .s file by awk -f s2h.awk
- */
-/* Size defintions
- * Copyright (C) ARM Limited 1998. All rights reserved.
- */
-
-#ifndef __sizes_h
-#define __sizes_h 1
-
-/* handy sizes */
-#define SZ_1K 0x00000400
-#define SZ_4K 0x00001000
-#define SZ_8K 0x00002000
-#define SZ_16K 0x00004000
-#define SZ_64K 0x00010000
-#define SZ_128K 0x00020000
-#define SZ_256K 0x00040000
-#define SZ_512K 0x00080000
-
-#define SZ_1M 0x00100000
-#define SZ_2M 0x00200000
-#define SZ_4M 0x00400000
-#define SZ_8M 0x00800000
-#define SZ_16M 0x01000000
-#define SZ_32M 0x02000000
-#define SZ_64M 0x04000000
-#define SZ_128M 0x08000000
-#define SZ_256M 0x10000000
-#define SZ_512M 0x20000000
-
-#define SZ_1G 0x40000000
-#define SZ_2G 0x80000000
-
-#endif /* __sizes_h */
diff --git a/include/asm-arm/arch-arm926ejs/sizes.h b/include/asm-arm/arch-arm926ejs/sizes.h
deleted file mode 100644
index ef0b99b..0000000
--- a/include/asm-arm/arch-arm926ejs/sizes.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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, MA0 2111-1307
- * USA
- */
-/* DO NOT EDIT!! - this file automatically generated
- * from .s file by awk -f s2h.awk
- */
-/* Size defintions
- * Copyright (C) ARM Limited 1998. All rights reserved.
- */
-
-#ifndef __sizes_h
-#define __sizes_h 1
-
-/* handy sizes */
-#define SZ_1K 0x00000400
-#define SZ_4K 0x00001000
-#define SZ_8K 0x00002000
-#define SZ_16K 0x00004000
-#define SZ_64K 0x00010000
-#define SZ_128K 0x00020000
-#define SZ_256K 0x00040000
-#define SZ_512K 0x00080000
-
-#define SZ_1M 0x00100000
-#define SZ_2M 0x00200000
-#define SZ_4M 0x00400000
-#define SZ_8M 0x00800000
-#define SZ_16M 0x01000000
-#define SZ_32M 0x02000000
-#define SZ_64M 0x04000000
-#define SZ_128M 0x08000000
-#define SZ_256M 0x10000000
-#define SZ_512M 0x20000000
-
-#define SZ_1G 0x40000000
-#define SZ_2G 0x80000000
-
-#endif /* __sizes_h */
diff --git a/include/asm-arm/arch-omap/sizes.h b/include/asm-arm/arch-omap/sizes.h
deleted file mode 100644
index f8d92ca..0000000
--- a/include/asm-arm/arch-omap/sizes.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- */
-/* DO NOT EDIT!! - this file automatically generated
- * from .s file by awk -f s2h.awk
- */
-/* Size defintions
- * Copyright (C) ARM Limited 1998. All rights reserved.
- */
-
-#ifndef __sizes_h
-#define __sizes_h 1
-
-/* handy sizes */
-#define SZ_1K 0x00000400
-#define SZ_4K 0x00001000
-#define SZ_8K 0x00002000
-#define SZ_16K 0x00004000
-#define SZ_64K 0x00010000
-#define SZ_128K 0x00020000
-#define SZ_256K 0x00040000
-#define SZ_512K 0x00080000
-
-#define SZ_1M 0x00100000
-#define SZ_2M 0x00200000
-#define SZ_4M 0x00400000
-#define SZ_8M 0x00800000
-#define SZ_16M 0x01000000
-#define SZ_32M 0x02000000
-#define SZ_64M 0x04000000
-#define SZ_128M 0x08000000
-#define SZ_256M 0x10000000
-#define SZ_512M 0x20000000
-
-#define SZ_1G 0x40000000
-#define SZ_2G 0x80000000
-
-#endif
-
-/* END */
diff --git a/include/asm-arm/arch-omap24xx/omap2420.h b/include/asm-arm/arch-omap24xx/omap2420.h
index 0c11bec..6032419 100644
--- a/include/asm-arm/arch-omap24xx/omap2420.h
+++ b/include/asm-arm/arch-omap24xx/omap2420.h
@@ -25,7 +25,7 @@
#ifndef _OMAP2420_SYS_H_
#define _OMAP2420_SYS_H_
-#include <asm/arch/sizes.h>
+#include <asm/sizes.h>
/*
* 2420 specific Section
diff --git a/include/asm-arm/arch-omap24xx/sizes.h b/include/asm-arm/arch-omap24xx/sizes.h
deleted file mode 100644
index aaba18f..0000000
--- a/include/asm-arm/arch-omap24xx/sizes.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- */
-/* Size defintions
- * Copyright (C) ARM Limited 1998. All rights reserved.
- */
-
-#ifndef __sizes_h
-#define __sizes_h 1
-
-/* handy sizes */
-#define SZ_1K 0x00000400
-#define SZ_4K 0x00001000
-#define SZ_8K 0x00002000
-#define SZ_16K 0x00004000
-#define SZ_32K 0x00008000
-#define SZ_64K 0x00010000
-#define SZ_128K 0x00020000
-#define SZ_256K 0x00040000
-#define SZ_512K 0x00080000
-
-#define SZ_1M 0x00100000
-#define SZ_2M 0x00200000
-#define SZ_4M 0x00400000
-#define SZ_8M 0x00800000
-#define SZ_16M 0x01000000
-#define SZ_31M 0x01F00000
-#define SZ_32M 0x02000000
-#define SZ_64M 0x04000000
-#define SZ_128M 0x08000000
-#define SZ_256M 0x10000000
-#define SZ_512M 0x20000000
-
-#define SZ_1G 0x40000000
-#define SZ_2G 0x80000000
-
-#endif /* __sizes_h */
diff --git a/include/asm-arm/sizes.h b/include/asm-arm/sizes.h
index f8d92ca..503843d 100644
--- a/include/asm-arm/sizes.h
+++ b/include/asm-arm/sizes.h
@@ -16,7 +16,7 @@
/* DO NOT EDIT!! - this file automatically generated
* from .s file by awk -f s2h.awk
*/
-/* Size defintions
+/* Size definitions
* Copyright (C) ARM Limited 1998. All rights reserved.
*/
@@ -24,6 +24,10 @@
#define __sizes_h 1
/* handy sizes */
+#define SZ_16 0x00000010
+#define SZ_256 0x00000100
+#define SZ_512 0x00000200
+
#define SZ_1K 0x00000400
#define SZ_4K 0x00001000
#define SZ_8K 0x00002000
diff --git a/include/configs/h2_p2_dbg_board.h b/include/configs/h2_p2_dbg_board.h
index e0d823f..a4dea7d 100644
--- a/include/configs/h2_p2_dbg_board.h
+++ b/include/configs/h2_p2_dbg_board.h
@@ -31,7 +31,7 @@
#ifndef __INCLUDED_H2_P2_DBH_BOARD_H
#define __INCLUDED_H2_P2_DBH_BOARD_H
-#include <asm/arch/sizes.h>
+#include <asm/sizes.h>
/*
* The Debug board is designed to function with the P2 Sample, H2
diff --git a/include/configs/omap1510.h b/include/configs/omap1510.h
index 931560c..e6d9c7a 100644
--- a/include/configs/omap1510.h
+++ b/include/configs/omap1510.h
@@ -28,7 +28,7 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <asm/arch/sizes.h>
+#include <asm/sizes.h>
/*
There are 2 sets of general I/O -->
diff --git a/include/configs/omap730.h b/include/configs/omap730.h
index 04d5144..c7682a1 100644
--- a/include/configs/omap730.h
+++ b/include/configs/omap730.h
@@ -31,7 +31,7 @@
#ifndef __INCLUDED_OMAP730_H
#define __INCLUDED_OMAP730_H
-#include <asm/arch/sizes.h>
+#include <asm/sizes.h>
/***************************************************************************
* OMAP730 Configuration Registers
--
1.6.1.3
2
4
This patch corrects the missing PLLB initialization in usb_cpu_init()
for AT91SAM9261.
Because of the missing PLLB initialization, the USB support for all
AT91SAM9261 based boards doesn't work.
Signed-off-by: Ilko Iliev <iliev(a)ronetix.at>
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index c35319c..4066820 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -34,7 +34,8 @@ int usb_cpu_init(void)
{
#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
- defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
+ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
+ defined(CONFIG_AT91SAM9261)
/* Enable PLLB */
at91_sys_write(AT91_CKGR_PLLBR, get_pllb_init());
while ((at91_sys_read(AT91_PMC_SR) & AT91_PMC_LOCKB) !=
AT91_PMC_LOCKB)
3
5