[U-Boot] mips port

2012-10-06 Thread Dmytro Milinevskyy
Hi,
I'm new to uboot mips port and first decided to try it with qemu.
I've encountered some problems with UART, but I guess that's more qemu
issue(lsr reg is not updated when the line is available).

Another issue I faced was code execution after the relocation is done. The
address of board_init_r is not computed correctly(it was relative to boot
ROM address space/bfc0).
Is it specific to qemu(I don't see the reference here though) or is it a
generic mips port issue? Attached patch allows me to proceed with the boot
in qemu.

And last - why do we need relocation at all with u-boot? Performance
constraints?

Thanks,
-- dmytro
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/6] kerneldoc: Annotate drivers/serial/serial.c

2012-10-06 Thread Marek Vasut
Add kerneldoc annotations into serial core.

Signed-off-by: Marek Vasut 
Cc: Marek Vasut 
Cc: Tom Rini 
---
 drivers/serial/serial.c |  157 +++
 1 file changed, 157 insertions(+)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 57e3b75..7eb4838 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -33,10 +33,27 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct serial_device *serial_devices;
 static struct serial_device *serial_current;
 
+/**
+ * serial_null() - Void registration routine of a serial driver
+ *
+ * This routine implements a void registration routine of a serial driver. The
+ * registration routine of a particular driver is aliased to this empty 
function
+ * in case the driver is not compiled into U-Boot.
+ */
 static void serial_null(void)
 {
 }
 
+/**
+ * serial_initfunc() - Do a forward declaration of driver registration routine
+ * @name:  Name of the real driver registration routine.
+ *
+ * This macro expands onto forward declaration of a driver registration 
routine,
+ * which is then used below in serial_initialize() function. The declaration is
+ * made weak and aliases to serial_null() so in case the driver is not compiled
+ * in, the function is still declared and can be used, but aliases to
+ * serial_null() and thus is optimized away.
+ */
 #define serial_initfunc(name)  \
void name(void) \
__attribute__((weak, alias("serial_null")));
@@ -94,6 +111,15 @@ serial_initfunc(s3c44b0_serial_initialize);
 serial_initfunc(sa1100_serial_initialize);
 serial_initfunc(sh_serial_initialize);
 
+/**
+ * serial_register() - Register serial driver with serial driver core
+ * @dev:   Pointer to the serial driver structure
+ *
+ * This function registers the serial driver supplied via @dev with serial
+ * driver core, thus making U-Boot aware of it and making it available for
+ * U-Boot to use. On platforms that still require manual relocation of constant
+ * variables, relocation of the supplied structure is performed.
+ */
 void serial_register(struct serial_device *dev)
 {
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
@@ -117,6 +143,14 @@ void serial_register(struct serial_device *dev)
serial_devices = dev;
 }
 
+/**
+ * serial_initialize() - Register all compiled-in serial port drivers
+ *
+ * This function registers all serial port drivers that are compiled into
+ * the U-Boot binary with the serial core, thus making them available to
+ * U-Boot to use. Lastly, this function assigns a default serial port to
+ * the serial core. That serial port is then used as a default output.
+ */
 void serial_initialize(void)
 {
mpc8xx_serial_initialize();
@@ -175,6 +209,13 @@ void serial_initialize(void)
serial_assign(default_serial_console()->name);
 }
 
+/**
+ * serial_stdio_init() - Register serial ports with STDIO core
+ *
+ * This function generates a proxy driver for each serial port driver. These
+ * proxy drivers then register with the STDIO core, making the serial drivers
+ * available as STDIO devices.
+ */
 void serial_stdio_init(void)
 {
struct stdio_dev dev;
@@ -199,6 +240,17 @@ void serial_stdio_init(void)
}
 }
 
+/**
+ * serial_assign() - Select the serial output device by name
+ * @name:  Name of the serial driver to be used as default output
+ *
+ * This function configures the serial output multiplexing by selecting which
+ * serial device will be used as default. In case the STDIO "serial" device is
+ * selected as stdin/stdout/stderr, the serial device previously configured by
+ * this function will be used for the particular operation.
+ *
+ * Returns 0 on success, negative on error.
+ */
 int serial_assign(const char *name)
 {
struct serial_device *s;
@@ -213,6 +265,12 @@ int serial_assign(const char *name)
return -EINVAL;
 }
 
+/**
+ * serial_reinit_all() - Reinitialize all compiled-in serial ports
+ *
+ * This function reinitializes all serial ports that are compiled into U-Boot
+ * by calling their serial_start() functions.
+ */
 void serial_reinit_all(void)
 {
struct serial_device *s;
@@ -221,6 +279,20 @@ void serial_reinit_all(void)
s->start();
 }
 
+/**
+ * get_current() - Return pointer to currently selected serial port
+ *
+ * This function returns a pointer to currently selected serial port. The
+ * currently selected serial port is altered by serial_assign() function.
+ *
+ * In case this function is called before relocation or before any serial
+ * port is configured, this function calls default_serial_console() to
+ * determine the serial port. Otherwise, the configured serial port is
+ * returned.
+ *
+ * Returns pointer to the currently selected serial port on success,
+ * NULL on error.
+ */
 static struct serial_device *get_current(void)
 {
struct serial_device *dev;
@@ -245,36 +317,110 @@ static struct serial_d

[U-Boot] [PATCH 2/6] serial: Use default_serial_puts() in drivers

2012-10-06 Thread Marek Vasut
Replace the in-place ad-hoc implementation of serial_puts() within
the drivers with default_serial_puts() call. This cuts down on the
code duplication quite a bit.

Signed-off-by: Marek Vasut 
Cc: Marek Vasut 
Cc: Tom Rini 
---
 arch/mips/cpu/mips32/au1x00/au1x00_serial.c |8 +---
 arch/mips/cpu/mips32/incaip/asc_serial.c|   10 +-
 arch/mips/cpu/xburst/jz_serial.c|8 +---
 arch/powerpc/cpu/mpc5xx/serial.c|   10 +-
 arch/powerpc/cpu/mpc8220/uart.c |9 +
 arch/powerpc/cpu/mpc8260/serial_scc.c   |9 +
 arch/powerpc/cpu/mpc8260/serial_smc.c   |9 +
 arch/powerpc/cpu/mpc85xx/serial_scc.c   |9 +
 arch/sparc/cpu/leon2/serial.c   |9 +
 arch/sparc/cpu/leon3/serial.c   |9 +
 board/Marvell/common/serial.c   |9 +
 board/bmw/serial.c  |   10 +-
 board/cogent/serial.c   |8 +---
 board/esd/cpci750/serial.c  |   10 +-
 board/evb64260/serial.c |9 +
 board/pcippc2/fpga_serial.c |7 ---
 board/pcippc2/fpga_serial.h |1 -
 board/pcippc2/pcippc2.c |3 ++-
 board/prodrive/p3mx/serial.c|   10 +-
 drivers/serial/altera_jtag_uart.c   |8 +---
 drivers/serial/altera_uart.c|9 +
 drivers/serial/atmel_usart.c|8 +---
 drivers/serial/lpc32xx_hsuart.c |8 +---
 drivers/serial/mcfuart.c|9 +
 drivers/serial/ns9750_serial.c  |   15 +--
 drivers/serial/opencores_yanu.c |   10 +-
 drivers/serial/s3c4510b_uart.c  |6 ++
 drivers/serial/s3c64xx.c|8 +---
 drivers/serial/serial_clps7111.c|9 +
 drivers/serial/serial_imx.c |9 +
 drivers/serial/serial_ixp.c |9 +
 drivers/serial/serial_ks8695.c  |9 +
 drivers/serial/serial_lh7a40x.c |9 +
 drivers/serial/serial_lpc2292.c |9 +
 drivers/serial/serial_mxc.c |9 +
 drivers/serial/serial_netarm.c  |9 +
 drivers/serial/serial_pl01x.c   |9 +
 drivers/serial/serial_s3c44b0.c |9 +
 drivers/serial/serial_sa1100.c  |9 +
 drivers/serial/serial_sh.c  |9 +
 40 files changed, 40 insertions(+), 306 deletions(-)

diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_serial.c 
b/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
index 0beac98..3e85b90 100644
--- a/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
+++ b/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
@@ -103,12 +103,6 @@ static void au1x00_serial_putc(const char c)
*uart_tx = (u32)c;
 }
 
-static void au1x00_serial_puts(const char *s)
-{
-   while (*s)
-   serial_putc(*s++);
-}
-
 static int au1x00_serial_getc(void)
 {
volatile u32 *uart_rx = (volatile u32*)(UART0_ADDR+UART_RX);
@@ -137,7 +131,7 @@ static struct serial_device au1x00_serial_drv = {
.stop   = NULL,
.setbrg = au1x00_serial_setbrg,
.putc   = au1x00_serial_putc,
-   .puts   = au1x00_serial_puts,
+   .puts   = default_serial_puts,
.getc   = au1x00_serial_getc,
.tstc   = au1x00_serial_tstc,
 };
diff --git a/arch/mips/cpu/mips32/incaip/asc_serial.c 
b/arch/mips/cpu/mips32/incaip/asc_serial.c
index 08949f4..6f0e4f2 100644
--- a/arch/mips/cpu/mips32/incaip/asc_serial.c
+++ b/arch/mips/cpu/mips32/incaip/asc_serial.c
@@ -236,14 +236,6 @@ static void asc_serial_putc(const char c)
 }
 }
 
-static void asc_serial_puts(const char *s)
-{
-while (*s)
-{
-   serial_putc (*s++);
-}
-}
-
 static int asc_serial_getc(void)
 {
 ulong symbol_mask;
@@ -292,7 +284,7 @@ static struct serial_device asc_serial_drv = {
.stop   = NULL,
.setbrg = asc_serial_setbrg,
.putc   = asc_serial_putc,
-   .puts   = asc_serial_puts,
+   .puts   = default_serial_puts,
.getc   = asc_serial_getc,
.tstc   = asc_serial_tstc,
 };
diff --git a/arch/mips/cpu/xburst/jz_serial.c b/arch/mips/cpu/xburst/jz_serial.c
index 3199007..a147657 100644
--- a/arch/mips/cpu/xburst/jz_serial.c
+++ b/arch/mips/cpu/xburst/jz_serial.c
@@ -109,19 +109,13 @@ static int jz_serial_getc(void)
return readb(&uart->rbr_thr_dllr);
 }
 
-static void jz_serial_puts(const char *s)
-{
-   while (*s)
-   serial_putc(*s++);
-}
-
 static struct serial_device jz_serial_drv = {
.name   = "jz_serial",
.start  = jz_serial_init,
.stop   = NULL,
.setbrg = jz_serial_setbrg,
.putc   = jz_ser

[U-Boot] [PATCH 4/6] serial: Reorder get_current()

2012-10-06 Thread Marek Vasut
Reorder the get_current() function to make it a bit more readable.
The code does not grow and there is minor change in the code logic,
where dev != NULL is now checked in any case.

Signed-off-by: Marek Vasut 
Cc: Marek Vasut 
Cc: Tom Rini 
---
 drivers/serial/serial.c |   21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 1054494..57e3b75 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -225,20 +225,23 @@ static struct serial_device *get_current(void)
 {
struct serial_device *dev;
 
-   if (!(gd->flags & GD_FLG_RELOC) || !serial_current) {
+   if (!(gd->flags & GD_FLG_RELOC))
dev = default_serial_console();
+   else if (!serial_current)
+   dev = default_serial_console();
+   else
+   dev = serial_current;
 
-   /* We must have a console device */
-   if (!dev) {
+   /* We must have a console device */
+   if (!dev) {
 #ifdef CONFIG_SPL_BUILD
-   puts("Cannot find console\n");
-   hang();
+   puts("Cannot find console\n");
+   hang();
 #else
-   panic("Cannot find console\n");
+   panic("Cannot find console\n");
 #endif
-   }
-   } else
-   dev = serial_current;
+   }
+
return dev;
 }
 
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/6] Serial cleanup series

2012-10-06 Thread Marek Vasut
This series does minor cleanup on the serial subsystem. The first patch
implements default_serial_puts() to put an end to endless duplication of
while (*s) { putc(*s++); } variations. The further three patches make use
of it and clean up the serial code slightly.

The remaining two patches annotate the serial core with proper kerneldoc
documentation and add a simple template for it.

Marek Vasut (6):
  serial: Implement default_serial_puts()
  serial: Use default_serial_puts() in drivers
  serial: Reorder serial_assign()
  serial: Reorder get_current()
  kerneldoc: Annotate drivers/serial/serial.c
  kerneldoc: stdio: tmpl: Add stdio template

 arch/mips/cpu/mips32/au1x00/au1x00_serial.c |8 +-
 arch/mips/cpu/mips32/incaip/asc_serial.c|   10 +-
 arch/mips/cpu/xburst/jz_serial.c|8 +-
 arch/powerpc/cpu/mpc5xx/serial.c|   10 +-
 arch/powerpc/cpu/mpc8220/uart.c |9 +-
 arch/powerpc/cpu/mpc8260/serial_scc.c   |9 +-
 arch/powerpc/cpu/mpc8260/serial_smc.c   |9 +-
 arch/powerpc/cpu/mpc85xx/serial_scc.c   |9 +-
 arch/sparc/cpu/leon2/serial.c   |9 +-
 arch/sparc/cpu/leon3/serial.c   |9 +-
 board/Marvell/common/serial.c   |9 +-
 board/bmw/serial.c  |   10 +-
 board/cogent/serial.c   |8 +-
 board/esd/cpci750/serial.c  |   10 +-
 board/evb64260/serial.c |9 +-
 board/pcippc2/fpga_serial.c |7 -
 board/pcippc2/fpga_serial.h |1 -
 board/pcippc2/pcippc2.c |3 +-
 board/prodrive/p3mx/serial.c|   10 +-
 doc/DocBook/Makefile|2 +-
 doc/DocBook/stdio.tmpl  |   46 +++
 drivers/serial/altera_jtag_uart.c   |8 +-
 drivers/serial/altera_uart.c|9 +-
 drivers/serial/atmel_usart.c|8 +-
 drivers/serial/lpc32xx_hsuart.c |8 +-
 drivers/serial/mcfuart.c|9 +-
 drivers/serial/ns9750_serial.c  |   15 +-
 drivers/serial/opencores_yanu.c |   10 +-
 drivers/serial/s3c4510b_uart.c  |6 +-
 drivers/serial/s3c64xx.c|8 +-
 drivers/serial/serial.c |  196 +--
 drivers/serial/serial_clps7111.c|9 +-
 drivers/serial/serial_imx.c |9 +-
 drivers/serial/serial_ixp.c |9 +-
 drivers/serial/serial_ks8695.c  |9 +-
 drivers/serial/serial_lh7a40x.c |9 +-
 drivers/serial/serial_lpc2292.c |9 +-
 drivers/serial/serial_mxc.c |9 +-
 drivers/serial/serial_netarm.c  |9 +-
 drivers/serial/serial_pl01x.c   |9 +-
 drivers/serial/serial_s3c44b0.c |9 +-
 drivers/serial/serial_sa1100.c  |9 +-
 drivers/serial/serial_sh.c  |9 +-
 include/serial.h|2 +
 44 files changed, 271 insertions(+), 321 deletions(-)
 create mode 100644 doc/DocBook/stdio.tmpl

Cc: Tom Rini 

-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/6] serial: Implement default_serial_puts()

2012-10-06 Thread Marek Vasut
U-Boot contains a lot of duplicit implementations of serial_puts()
call which just pipes single characters into the port in loop. Implement
function that does this behavior into common code, so others can make
easy use of it.

This function is called default_serial_puts() and it's sole purpose
is to call putc() in loop on the whole string passed to it.

Signed-off-by: Marek Vasut 
Cc: Marek Vasut 
Cc: Tom Rini 
---
 drivers/serial/serial.c |7 +++
 include/serial.h|2 ++
 2 files changed, 9 insertions(+)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 9550cbd..da41cd5 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -271,6 +271,13 @@ void serial_puts(const char *s)
get_current()->puts(s);
 }
 
+void default_serial_puts(const char *s)
+{
+   struct serial_device *dev = get_current();
+   while (*s)
+   dev->putc(*s++);
+}
+
 #if CONFIG_POST & CONFIG_SYS_POST_UART
 static const int bauds[] = CONFIG_SYS_BAUDRATE_TABLE;
 
diff --git a/include/serial.h b/include/serial.h
index a8d23f5..14f863e 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -20,6 +20,8 @@ struct serial_device {
struct serial_device*next;
 };
 
+void default_serial_puts(const char *s);
+
 extern struct serial_device serial_smc_device;
 extern struct serial_device serial_scc_device;
 extern struct serial_device *default_serial_console(void);
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/6] kerneldoc: stdio: tmpl: Add stdio template

2012-10-06 Thread Marek Vasut
Add STDIO documentation template.

Signed-off-by: Marek Vasut 
Cc: Marek Vasut 
Cc: Tom Rini 
---
 doc/DocBook/Makefile   |2 +-
 doc/DocBook/stdio.tmpl |   46 ++
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 doc/DocBook/stdio.tmpl

diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile
index 5f13d3d..da88b32 100644
--- a/doc/DocBook/Makefile
+++ b/doc/DocBook/Makefile
@@ -8,7 +8,7 @@
 
 include $(TOPDIR)/config.mk
 
-DOCBOOKS := linker_lists.xml
+DOCBOOKS := linker_lists.xml stdio.xml
 
 ###
 # The build process is as follows (targets):
diff --git a/doc/DocBook/stdio.tmpl b/doc/DocBook/stdio.tmpl
new file mode 100644
index 000..4783abb
--- /dev/null
+++ b/doc/DocBook/stdio.tmpl
@@ -0,0 +1,46 @@
+
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
+
+
+ 
+  The U-Boot STDIO subsystem
+
+  
+   
+ This documentation 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
+   
+
+   
+ For more details see the file COPYING in the source
+ distribution of U-Boot Bootloader.
+   
+  
+ 
+
+
+
+  
+ U-Boot Serial subsystem
+!Idrivers/serial/serial.c
+  
+
+
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/6] serial: Reorder serial_assign()

2012-10-06 Thread Marek Vasut
Reorder serial_assign() function to get rid of the extra level of
indentation. Also, adjust the return value to be -EINVAL instead of
positive one to be more consistent.

Signed-off-by: Marek Vasut 
Cc: Marek Vasut 
Cc: Tom Rini 
---
 drivers/serial/serial.c |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index da41cd5..1054494 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -203,13 +204,13 @@ int serial_assign(const char *name)
struct serial_device *s;
 
for (s = serial_devices; s; s = s->next) {
-   if (strcmp(s->name, name) == 0) {
-   serial_current = s;
-   return 0;
-   }
+   if (strcmp(s->name, name))
+   continue;
+   serial_current = s;
+   return 0;
}
 
-   return 1;
+   return -EINVAL;
 }
 
 void serial_reinit_all(void)
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/6 V2] kerneldoc: tmpl: Implement template for LG-arrays

2012-10-06 Thread Marek Vasut
Implement kerneldoc template for linker-generated arrays. This is
the first template in U-Boot that is used to generate kerneldoc
style documentation. This template is very basic.

Signed-off-by: Marek Vasut 

---
 doc/DocBook/Makefile  |2 +-
 doc/DocBook/linker_lists.tmpl |   46 +
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 doc/DocBook/linker_lists.tmpl

V2:
- Rebase on top of testing/dm-kerneldoc

diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile
index 2f2ddfc..5f13d3d 100644
--- a/doc/DocBook/Makefile
+++ b/doc/DocBook/Makefile
@@ -8,7 +8,7 @@
 
 include $(TOPDIR)/config.mk
 
-DOCBOOKS :=
+DOCBOOKS := linker_lists.xml
 
 ###
 # The build process is as follows (targets):
diff --git a/doc/DocBook/linker_lists.tmpl b/doc/DocBook/linker_lists.tmpl
new file mode 100644
index 000..a47377f
--- /dev/null
+++ b/doc/DocBook/linker_lists.tmpl
@@ -0,0 +1,46 @@
+
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
+
+
+ 
+  The U-Boot Linker-Generated Arrays
+  
+  
+   
+ This documentation 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
+   
+  
+   
+ For more details see the file COPYING in the source
+ distribution of U-Boot Bootloader.
+   
+  
+ 
+
+
+
+  
+ Linker-Generated Arrays
+!Iinclude/linker_lists.h
+  
+
+
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/6 V2] common: Convert the U-Boot commands to LG-arrays

2012-10-06 Thread Marek Vasut
This patch converts the old method of creating a list of command
onto the new LG-arrays code. The old u_boot_cmd section is converted
to new u_boot_list_cmd subsection and LG-array macros used as needed.

Minor adjustments had to be made to the common code to work with the
LG-array macros, mostly the fixup_cmdtable() calls are now passed the
ll_entry_start and ll_entry_count instead of linker-generated symbols.

The command.c had to be adjusted as well so it would use the newly
introduced LG-array API instead of directly using linker-generated
symbols.

Signed-off-by: Marek Vasut 
Cc: Joe Hershberger 
Cc: Mike Frysinger 

---
 arch/arm/imx-common/cmd_bmode.c |   11 +++
 arch/avr32/lib/board.c  |4 ++--
 arch/m68k/lib/board.c   |4 ++--
 arch/mips/lib/board.c   |4 ++--
 arch/nds32/lib/board.c  |4 ++--
 arch/sparc/lib/board.c  |4 ++--
 common/cmd_help.c   |8 
 common/command.c|   17 ++---
 doc/README.commands |   10 +-
 include/command.h   |   26 ++
 10 files changed, 50 insertions(+), 42 deletions(-)

V2:
- Rebase on top of testing/dm-kerneldoc

diff --git a/arch/arm/imx-common/cmd_bmode.c b/arch/arm/imx-common/cmd_bmode.c
index 02fe72e..ddc14b0 100644
--- a/arch/arm/imx-common/cmd_bmode.c
+++ b/arch/arm/imx-common/cmd_bmode.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static const struct boot_mode *modes[2];
 
@@ -103,9 +104,11 @@ void add_board_boot_modes(const struct boot_mode *p)
int size;
char *dest;
 
-   if (__u_boot_cmd_bmode.usage) {
-   free(__u_boot_cmd_bmode.usage);
-   __u_boot_cmd_bmode.usage = NULL;
+   cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd);
+
+   if (entry->usage) {
+   free(entry->usage);
+   entry->usage = NULL;
}
 
modes[0] = p;
@@ -114,6 +117,6 @@ void add_board_boot_modes(const struct boot_mode *p)
dest = malloc(size);
if (dest) {
create_usage(dest);
-   __u_boot_cmd_bmode.usage = dest;
+   entry->usage = dest;
}
 }
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index 9d3b76e..e3287c4 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -272,8 +272,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
/*
 * We have to relocate the command table manually
 */
-   fixup_cmdtable(&__u_boot_cmd_start,
-   (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+   fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+   ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
/* there are some other pointer constants we must deal with */
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 67c9a13..2a694b4 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -415,8 +415,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
/*
 * We have to relocate the command table manually
 */
-   fixup_cmdtable(&__u_boot_cmd_start,
-   (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+   fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+   ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
/* there are some other pointer constants we must deal with */
diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index b14b33e..7ddd778 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -266,8 +266,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
/*
 * We have to relocate the command table manually
 */
-   fixup_cmdtable(&__u_boot_cmd_start,
-   (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+   fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+   ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
/* there are some other pointer constants we must deal with */
diff --git a/arch/nds32/lib/board.c b/arch/nds32/lib/board.c
index 89900fe..cd8d6a7 100644
--- a/arch/nds32/lib/board.c
+++ b/arch/nds32/lib/board.c
@@ -320,8 +320,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
/*
 * We have to relocate the command table manually
 */
-   fixup_cmdtable(&__u_boot_cmd_start,
-   (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+   fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+   ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
serial_initialize();
diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c
index ff0e0f2..32d025a 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -246,8 +246,8 @@ void board_init_f(ulong bootflag)
/*
 * We have to relocate th

[U-Boot] [PATCH 2/6 V2] common: Implement support for linker-generated arrays

2012-10-06 Thread Marek Vasut
This patch adds support for linker-generated array. These arrays
are a generalization of the U-Boot command declaration approach.

Basically, the idea is to generate an array, where elements of the
array are statically initialized at compile time and each element
is declared separatelly at different place. Such array is assembled
together into continuous piece of memory by linker and a pointer to
it's first entry can then be retrieved via accessor.

The actual implementation relies on placing any variable that is to
represent an element of LG-array into particular subsection of the
.u_boot_list linker section . The subsection is determined by user
options. Once compiled, it is possible to dump all symbols placed
in .u_boot_list section and the subsections in which they should be
and generate appropriate bounds for each requested subsection of the
.u_boot_list section. Each such subsection thus contains __start and
__end entries at the begining and end respecitively.

This allows for simple run-time traversing of the array, since the
symbols are properly defined.

Signed-off-by: Marek Vasut 
Cc: Joe Hershberger 
Cc: Mike Frysinger 

---
 include/linker_lists.h |  148 
 1 file changed, 148 insertions(+)
 create mode 100644 include/linker_lists.h

V2:
- Rebase on top of testing/dm-kerneldoc

diff --git a/include/linker_lists.h b/include/linker_lists.h
new file mode 100644
index 000..0b405d7
--- /dev/null
+++ b/include/linker_lists.h
@@ -0,0 +1,148 @@
+/*
+ * include/linker_lists.h
+ *
+ * Implementation of linker-generated arrays
+ *
+ * Copyright (C) 2012 Marek Vasut 
+ *
+ * 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.
+ */
+#ifndef __LINKER_LISTS_H__
+#define __LINKER_LISTS_H__
+
+/**
+ * ll_entry_declare() - Declare linker-generated array entry
+ * @_type: Data type of the entry
+ * @_name: Name of the entry
+ * @_section_u:Subsection of u_boot_list in which this entry is placed
+ * (with underscores instead of dots, for name concatenation)
+ * @_section_d:Subsection of u_boot_list in which this entry is placed
+ * (with dots, for section concatenation)
+ *
+ * This macro declares a variable that is placed into a linker-generated
+ * array. This is a basic building block for more advanced use of linker-
+ * generated arrays. The user is expected to build their own macro wrapper
+ * around this one.
+ *
+ * A variable declared using this macro must be compile-time initialized
+ * and is as such placed into subsection of special section, .u_boot_list.
+ * The subsection is specified by the _section_[u,d] parameter, see below.
+ * The base name of the variable is _name, yet the actual variable is
+ * declared as concatenation of
+ *
+ *   %_u_boot_list_ + @_section_u + _ + @_name
+ *
+ * which ensures name uniqueness. This variable shall never be refered
+ * directly though.
+ *
+ * Special precaution must be made when using this macro:
+ * 1) The _type must not contain the "static" keyword, otherwise the entry
+ *is not generated.
+ *
+ * 2) The @_section_u and @_section_d variables must match, the only difference
+ *is that in @_section_u is every dot "." character present in @_section_d
+ *replaced by a single underscore "_" character in @_section_u. The actual
+ *purpose of these parameters is to select proper subsection in the global
+ *.u_boot_list section.
+ *
+ * 3) In case a section is declared that contains some array elements AND a
+ *subsection of this section is declared and contains some elements, it is
+ *imperative that the elements are of the same type.
+ *
+ * 4) In case an outer section is declared that contains some array elements
+ *AND am inner subsection of this section is declared and contains some
+ *elements, then when traversing the outer section, even the elements of
+ *the inner sections are present in the array.
+ *
+ * Example:
+ * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub) = {
+ * .x = 3,
+ * .y = 4,
+ * };
+ */
+#define ll_entry_declare(_type, _name, _section_u, _section_d) \
+   _type _u_boot_list_##_section_u##_##_name __attribute__((   \
+   unused, aligned(4), \
+   section(".u_boot_list."#_section_d"."#_name)))
+
+/**
+ * ll_entry_start() - Point to first entry of linker-generated array
+ * @_type: Data type of the entry
+ * @_section_u:Subsection of u_boot_list in which this entry is placed
+ * (with underscores instead of dots)
+ *
+ * This function returns (_type *) pointer to the very first entry of a
+

[U-Boot] [PATCH 1/6 V2] common: Add symbol handling for generic lists into Makefile

2012-10-06 Thread Marek Vasut
This patch adds essential components for generation of the contents of
the linker section that is used by the linker-generated array. All of
the contents is held in a separate file, u-boot.lst, which is generated
at runtime just before U-Boot is linked.

The purpose of this code is to especially generate the appropriate
boundary symbols around each subsection in the section carrying the
linker-generated arrays. Obviously, the interim linker code for actual
placement of the variables into the section is generated too. The
generated file, u-boot.lst, is included into u-boot.lds via the linker
INCLUDE directive in u-boot.lds .

Adjustments are made in the Makefile and spl/Makefile so that the
u-boot.lds and u-boot-spl.lds depend on their respective .lst files.

Signed-off-by: Marek Vasut 
Cc: Joe Hershberger 
Cc: Mike Frysinger 

---
 .gitignore |1 +
 Makefile   |   19 ---
 config.mk  |2 +
 helper.mk  |   64 
 nand_spl/board/freescale/mpc8536ds/Makefile|9 +++-
 nand_spl/board/freescale/mpc8569mds/Makefile   |9 +++-
 nand_spl/board/freescale/mpc8572ds/Makefile|9 +++-
 nand_spl/board/freescale/mx31pdk/Makefile  |9 +++-
 nand_spl/board/freescale/p1010rdb/Makefile |9 +++-
 nand_spl/board/freescale/p1023rds/Makefile |9 +++-
 nand_spl/board/freescale/p1_p2_rdb/Makefile|9 +++-
 nand_spl/board/freescale/p1_p2_rdb_pc/Makefile |9 +++-
 nand_spl/board/karo/tx25/Makefile  |9 +++-
 spl/.gitignore |1 +
 spl/Makefile   |8 ++-
 15 files changed, 150 insertions(+), 26 deletions(-)
 create mode 100644 helper.mk

V2:
- Rebase on top of testing/dm-kerneldoc
- Fix INCLUDE u-boot.lds in linker scripts. It didn't work with older LD,
  use #include instead and make use of CPP.
- Fix placement of u-boot.lds for NAND SPL

diff --git a/.gitignore b/.gitignore
index d91e91b..1ac43f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@
 /u-boot.sha1
 /u-boot.dis
 /u-boot.lds
+/u-boot.lst
 /u-boot.ubl
 /u-boot.ais
 /u-boot.dtb
diff --git a/Makefile b/Makefile
index 012d325..5d512f3 100644
--- a/Makefile
+++ b/Makefile
@@ -515,7 +515,10 @@ else
 GEN_UBOOT = \
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed  -n -e 
's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
-   cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM 
$(__OBJS) \
+   UNDEF_LST=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
+   sed  -n -e 
's/.*\($(SYM_PREFIX)__u_boot_list_.*\)/-u\1/p'|sort|uniq`;\
+   cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
+   $$UNDEF_SYM $$UNDEF_LST $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
 endif
@@ -548,8 +551,12 @@ $(SUBDIR_EXAMPLES): $(obj)u-boot
 $(LDSCRIPT):   depend
$(MAKE) -C $(dir $@) $(notdir $@)
 
-$(obj)u-boot.lds: $(LDSCRIPT)
-   $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ 
>$@
+# The following line expands into whole rule which generates u-boot.lst,
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(obj)u-boot.lst, $(LIBBOARD) $(LIBS)))
+$(obj)u-boot.lds: $(LDSCRIPT) $(obj)u-boot.lst
+   $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ 
-P - <$< >$@
 
 nand_spl:  $(TIMESTAMP_FILE) $(VERSION_FILE) depend
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
@@ -787,7 +794,7 @@ clean:
@rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image}\
   $(obj)board/matrix_vision/*/bootscript.img \
   $(obj)board/voiceblue/eeprom   \
-  $(obj)u-boot.lds   \
+  $(obj)u-boot.{lds,lst} \
   $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]  \
   $(obj)arch/blackfin/cpu/init.{lds,elf}
@rm -f $(obj)include/bmp_logo.h
@@ -821,8 +828,8 @@ clobber:tidy
@rm -f $(obj)u-boot.dtb
@rm -f $(obj)u-boot.sb
@rm -f $(obj)u-boot.spr
-   @rm -f 
$(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
-   @rm -f 
$(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.lds,u-boot-spl.map}
+   @rm -f 
$(obj)nand_spl/{u-boot.{lds,lst},u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
+   @rm -f 
$(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.{lds,lst},u-boot-spl.map}
@rm -f $(obj)MLO
@rm -f $(obj)tools/xway-

[U-Boot] [PATCH 0/6 V2] Linker-generated arrays (take 2)

2012-10-06 Thread Marek Vasut
This is a second stab at the linker-generated array. Basically, this
concept is a generic abstraction of how u_boot_cmd works today. The
patch 2/4 contains a huge pile of documentation which should clarify
most of the questions.

I don't see size growth, I see size fluctiation in the order of tens
of bytes with these patches applied. Subsequent patch added to this
series removes the __u_boot_cmd section completely.

Marek Vasut (6):
  common: Add symbol handling for generic lists into Makefile
  common: Implement support for linker-generated arrays
  common: Add .u_boot_list into all linker files
  common: Convert the U-Boot commands to LG-arrays
  common: Discard the __u_boot_cmd section
  kerneldoc: tmpl: Implement template for LG-arrays

 .gitignore   |1 +
 Makefile |   19 ++-
 arch/arm/cpu/arm920t/ep93xx/u-boot.lds   |8 +-
 arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds|7 +-
 arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds  |7 +-
 arch/arm/cpu/armv7/omap-common/u-boot-spl.lds|5 +
 arch/arm/cpu/ixp/u-boot.lds  |8 +-
 arch/arm/cpu/u-boot.lds  |8 +-
 arch/arm/imx-common/cmd_bmode.c  |   11 +-
 arch/avr32/cpu/u-boot.lds|8 +-
 arch/avr32/lib/board.c   |4 +-
 arch/blackfin/cpu/u-boot.lds |8 +-
 arch/m68k/lib/board.c|4 +-
 arch/microblaze/cpu/u-boot.lds   |9 +-
 arch/mips/lib/board.c|4 +-
 arch/nds32/cpu/n1213/u-boot.lds  |8 +-
 arch/nds32/lib/board.c   |4 +-
 arch/nios2/cpu/u-boot.lds|   10 +-
 arch/powerpc/cpu/74xx_7xx/u-boot.lds |8 +-
 arch/powerpc/cpu/mpc512x/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc5xx/u-boot.lds   |8 +-
 arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds |6 +-
 arch/powerpc/cpu/mpc5xxx/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc8220/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc824x/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc8260/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc83xx/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc85xx/u-boot-nand.lds |7 +-
 arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds |4 +
 arch/powerpc/cpu/mpc85xx/u-boot.lds  |8 +-
 arch/powerpc/cpu/mpc86xx/u-boot.lds  |8 +-
 arch/powerpc/cpu/ppc4xx/u-boot.lds   |8 +-
 arch/sandbox/cpu/u-boot.lds  |8 +-
 arch/sh/cpu/sh2/u-boot.lds   |9 +-
 arch/sh/cpu/sh3/u-boot.lds   |9 +-
 arch/sh/cpu/sh4/u-boot.lds   |9 +-
 arch/sparc/lib/board.c   |4 +-
 arch/x86/cpu/u-boot.lds  |7 +-
 board/BuS/eb_cpu5282/u-boot.lds  |8 +-
 board/LEOX/elpt860/u-boot.lds|8 +-
 board/RPXClassic/u-boot.lds  |8 +-
 board/RPXClassic/u-boot.lds.debug|8 +-
 board/RPXlite/u-boot.lds |8 +-
 board/RPXlite/u-boot.lds.debug   |8 +-
 board/RPXlite_dw/u-boot.lds  |8 +-
 board/RPXlite_dw/u-boot.lds.debug|8 +-
 board/RRvision/u-boot.lds|8 +-
 board/actux1/u-boot.lds  |8 +-
 board/actux2/u-boot.lds  |8 +-
 board/actux3/u-boot.lds  |8 +-
 board/adder/u-boot.lds   |8 +-
 board/ait/cam_enc_4xx/u-boot-spl.lds |4 +
 board/altera/nios2-generic/u-boot.lds|   10 +-
 board/amcc/acadia/u-boot-nand.lds|6 +-
 board/amcc/bamboo/u-boot-nand.lds|6 +-
 board/amcc/canyonlands/u-boot-nand.lds   |6 +-
 board/amcc/kilauea/u-boot-nand.lds   |6 +-
 board/amcc/sequoia/u-boot-nand.lds   |6 +-
 board/amcc/sequoia/u-boot-ram.lds|6 +-
 board/astro/mcf5373l/u-boot.lds  |8 +-
 board/c2mon/u-boot.lds   |8 +-
 board/c2mon/u-boot.lds.debug |8 +-
 board/cobra5272/u-boot.lds   |8 +-
 board/cogent/u-boot.lds  |8 +-
 board/cogent/u-boot.lds.debug|8 +-
 board/cray/L1/u-boot.lds.debug   |8 +-
 board/dave/PPChameleonEVB/u-boot.lds |8 +-
 board/davinci/da8xxevm/u-boot-spl-da850evm.lds   |6 +
 board/davinci/da8xxevm/u-boot-spl-hawk.lds   |5 +
 board/dbau1x00/u-boot.lds|7 +-
 board/dvlhost/u-boot.lds |  

[U-Boot] [PATCH 3/4 V3] kerneldoc: Implement "Example" section handling

2012-10-06 Thread Marek Vasut
The default kernel-doc strips starting spaces from every single
line in the Example section. This makes the code look bad. Thus,
implement special handling for this section.

Signed-off-by: Marek Vasut 
---
 tools/kernel-doc/kernel-doc |3 +++
 1 file changed, 3 insertions(+)

V3:
- Make use of patman tags in commit description
- Push the patches to testing:

http://git.denx.de/?p=u-boot/u-boot-testing.git;a=shortlog;h=refs/heads/dm-kerneldoc

V2:
- Resend

diff --git a/tools/kernel-doc/kernel-doc b/tools/kernel-doc/kernel-doc
index 8848efd..6347418 100755
--- a/tools/kernel-doc/kernel-doc
+++ b/tools/kernel-doc/kernel-doc
@@ -2424,6 +2424,9 @@ sub process_file($) {
# Continued declaration purpose
chomp($declaration_purpose);
$declaration_purpose .= " " . xml_escape($1);
+   } elsif ($section =~ m/^Example/) {
+   $_ =~ s/^\s*\*//;
+   $contents .= $_;
} else {
$contents .= $1 . "\n";
}
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4 V3] kerneldoc: Add myself to the git-mailrc for kerneldoc

2012-10-06 Thread Marek Vasut
Add entry for kerneldoc into the git-mailrc pointing to the U-Boot ML
and myself.

Signed-off-by: Marek Vasut 
---
 doc/git-mailrc |1 +
 1 file changed, 1 insertion(+)

V3:
- New patch
- Make use of patman tags in commit description
- Push the patches to testing:

http://git.denx.de/?p=u-boot/u-boot-testing.git;a=shortlog;h=refs/heads/dm-kerneldoc

diff --git a/doc/git-mailrc b/doc/git-mailrc
index d7fc3c8..d6e01c3 100644
--- a/doc/git-mailrc
+++ b/doc/git-mailrc
@@ -95,6 +95,7 @@ alias x86uboot, gruss
 
 # Subsystem aliases
 alias cfiuboot, stroese
+alias kerneldoc  uboot, marex
 alias fdtuboot, Jerry Van Baren 
 alias i2cuboot, hs
 alias mmcuboot, afleming
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/4 V3] kerneldoc: Add nicer CSS stylesheet for HTML docs

2012-10-06 Thread Marek Vasut
Import basic CSS stylesheet for the HTML documentation. The base for
the stylesheet is taken from:

http://ds9a.nl/docbook/minimal-page.html

I customized the CSS a bit further, for example to add curvy corners
to example section and change the tint of gray. The HTML documentation
does not look that crude anymore.

Signed-off-by: Marek Vasut 
---
 doc/DocBook/docbook.css|   16 
 doc/DocBook/stylesheet.xsl |1 +
 2 files changed, 17 insertions(+)
 create mode 100644 doc/DocBook/docbook.css

V3:
- Make use of patman tags in commit description
- Push the patches to testing:

http://git.denx.de/?p=u-boot/u-boot-testing.git;a=shortlog;h=refs/heads/dm-kerneldoc

V2:
- Resend

diff --git a/doc/DocBook/docbook.css b/doc/DocBook/docbook.css
new file mode 100644
index 000..7a79ec5
--- /dev/null
+++ b/doc/DocBook/docbook.css
@@ -0,0 +1,16 @@
+body {
+   font-family:sans-serif;
+}
+
+.programlisting {
+   font-family:monospace;
+   font-size:  1em;
+   display:block;
+   padding:10px;
+   border: 1px solid #aaa;
+   color:  #000;
+   background-color:   #eee;
+   overflow:   auto;
+   margin: 1em 0em;
+   border-radius:  6px;
+}
diff --git a/doc/DocBook/stylesheet.xsl b/doc/DocBook/stylesheet.xsl
index 85b2527..8adce56 100644
--- a/doc/DocBook/stylesheet.xsl
+++ b/doc/DocBook/stylesheet.xsl
@@ -7,4 +7,5 @@
 
 2
 1
+../docbook.css
 
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4 V2] Implant kernel-doc from Linux kernel

2012-10-06 Thread Marek Vasut
Dear Tom Rini,

> On Sun, Sep 30, 2012 at 02:21:31AM +0200, Marek Vasut wrote:
> > This patch series implants slightly modified kernel-doc documentation
> > generator from Linux kernel into U-Boot. First patch pulls in all the
> > necessary components with minor modifications made to them to work with
> > the layout of U-Boot source tree and without kbuild.
> > 
> > Further patch implement CSS to make the HTML documentation look a bit
> > nicer. This patch will eventually (hopefully) be further refined by
> > someone more artistically capable than me ;-)
> > 
> > Next patch implements separate handling for "Example:" section, which
> > in the original kernel-doc was in my opinion mistreated. The example
> > section generated a block of code, but the indentation was removed.
> > Thus this patch does avoid removing the indent.
> > 
> > Finally, the last patch implements example of how to use this kernel-doc
> > to generate U-Boot documentation by documenting the Linker-Generated
> > arrays.
> > 
> > NOTE: This patchset (last patch) has a cross-dependency on:
> > [PATCH 0/5] Linker-generated arrays (take 2)
> > 
> > V2: Add proper .gitignore entries, fix build issues (fix Makefiles)
> 
> Thanks for doing all this.  It looks fine and I'll grab this with the
> LG-arrays code once everyone is happy on that side.

I'm spliting the LG-array dep from these ... but I have another problem. If I 
actually add the patman tags here (which I did now), can you pull that repo 
without pulling the tags too? How do we handle that ?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4 V2] doc: kerneldoc: Implant DocBook from Linux kernel

2012-10-06 Thread Marek Vasut
Dear Albert ARIBAUD,

> Hi Marek,
> 
> Comments based on the assumption that we want to sync with the Linux
> tools.
> 
> General comment/hypothetical question: would it not be simpler to patch
> the existing Linux tools in-place so that we can use them on the U-Boot
> tree?
> 
> Detailed comments below in this spirit; ignore if suggestion above is
> stupid/complicated/plain wrong/other(specify...or not).

[...]

Albert, can we just merge this version and resync when I get the patches into 
upstream Linux? This is blocking the LG-arrays and other patches dependent on 
them (like serial stuff).

The other option is to allow /** style comment. Wolfgang, can we do that?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/1] ipu common: reset ipuv3 correctly

2012-10-06 Thread Liu Ying
From: Liu Ying 

This patch checks self-clear sw_ipu_rst bit in
SCR register of SRC controller to be cleared
after setting it to high to reset IPUv3. This
makes sure that IPUv3 finishes sofware reset.
A timeout mechanism is added to stop polling
on the bit status in case the bit could not be
cleared by the hardware automatically within
10 millisecond.

Signed-off-by: Liu Ying 
---
 drivers/video/ipu_common.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 2020da9..fcc1745 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -94,6 +94,7 @@ struct ipu_ch_param {
temp1; \
 })
 
+#define IPU_SW_RST_TOUT_USEC   (1)
 
 void clk_enable(struct clk *clk)
 {
@@ -392,11 +393,20 @@ void ipu_reset(void)
 {
u32 *reg;
u32 value;
+   int timeout = IPU_SW_RST_TOUT_USEC;
 
reg = (u32 *)SRC_BASE_ADDR;
value = __raw_readl(reg);
value = value | SW_IPU_RST;
__raw_writel(value, reg);
+
+   while (__raw_readl(reg) & SW_IPU_RST) {
+   udelay(1);
+   if (!(timeout--)) {
+   printf("ipu software reset timeout\n");
+   break;
+   }
+   };
 }
 
 /*
-- 
1.7.1


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ipu common: reset ipuv3 correctly

2012-10-06 Thread Eric Nelson

Hi Liu Ying,

On 10/06/2012 07:16 AM, Liu Ying wrote:

From: Liu Ying

This patch checks self-clear sw_ipu_rst bit in
SCR register of SRC controller to be cleared
after setting it to high to reset IPUv3. This
makes sure that IPUv3 finishes sofware reset.
A timeout mechanism is added to stop polling
on the bit status in case the bit could not be
cleared by the hardware automatically within
10 millisecond.

Signed-off-by: Liu Ying
---
  drivers/video/ipu_common.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 2020da9..fcc1745 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -94,6 +94,7 @@ struct ipu_ch_param {
temp1; \
  })

+#define IPU_SW_RST_TOUT_USEC   (1)

  void clk_enable(struct clk *clk)
  {
@@ -392,11 +393,20 @@ void ipu_reset(void)
  {
u32 *reg;
u32 value;
+   int timeout = IPU_SW_RST_TOUT_USEC;

reg = (u32 *)SRC_BASE_ADDR;
value = __raw_readl(reg);
value = value | SW_IPU_RST;
__raw_writel(value, reg);
+
+   while (__raw_readl(reg)&  SW_IPU_RST) {
+   udelay(1);
+   if (!(timeout--)) {
+   printf("ipu software reset timeout\n");
+   break;
+   }
+   };
  }

  /*


Tested in the normal (successful) case on SABRE Lite.

Is there a situation under which this is known to fail or
is that a hypothetical?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] yaffs2: Fix GCC 4.6 compile warnings

2012-10-06 Thread Albert ARIBAUD
Hi Anatolij,

On Sat,  6 Oct 2012 11:31:03 +0200, Anatolij Gustschin 
wrote:

> Fix:
> yaffs_guts.c: In function 'yaffs_check_chunk_erased':
> yaffs_guts.c:324:6: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_guts.c: In function 'yaffs_verify_chunk_written':
> yaffs_guts.c:352:6: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
> yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
> [-Wunused-but-set-variable]
> yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
> yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
> [-Wunused-but-set-variable]
> yaffs_guts.c:3179:6: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_guts.c: In function 'yaffs_update_oh':
> yaffs_guts.c:3288:6: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_guts.c: In function 'yaffs_get_obj_name':
> yaffs_guts.c:4447:7: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_summary.c: In function 'yaffs_summary_read':
> yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
> used [-Wunused-but-set-variable]
> yaffs_verify.c: In function 'yaffs_verify_file':
> yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
> [-Wunused-but-set-variable]
> yaffs_yaffs1.c: In function 'yaffs1_scan':
> yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
> yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
> [-Wunused-but-set-variable]
> yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
> yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Charles Manning 
> ---
>  fs/yaffs2/yaffs_guts.c|   27 ---
>  fs/yaffs2/yaffs_summary.c |3 ---
>  fs/yaffs2/yaffs_verify.c  |3 ---
>  fs/yaffs2/yaffs_yaffs1.c  |9 +++--
>  fs/yaffs2/yaffs_yaffs2.c  |   12 +++-
>  5 files changed, 14 insertions(+), 40 deletions(-)
> 
> diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
> index 00d1c5a..21441fd 100644
> --- a/fs/yaffs2/yaffs_guts.c
> +++ b/fs/yaffs2/yaffs_guts.c
> @@ -321,9 +321,8 @@ static int yaffs_check_chunk_erased(struct yaffs_dev 
> *dev, int nand_chunk)
>   int retval = YAFFS_OK;
>   u8 *data = yaffs_get_temp_buffer(dev);
>   struct yaffs_ext_tags tags;
> - int result;
>  
> - result = yaffs_rd_chunk_tags_nand(dev, nand_chunk, data, &tags);
> + yaffs_rd_chunk_tags_nand(dev, nand_chunk, data, &tags);
>  
>   if (tags.ecc_result > YAFFS_ECC_RESULT_NO_ERROR)
>   retval = YAFFS_FAIL;
> @@ -349,9 +348,8 @@ static int yaffs_verify_chunk_written(struct yaffs_dev 
> *dev,
>   int retval = YAFFS_OK;
>   struct yaffs_ext_tags temp_tags;
>   u8 *buffer = yaffs_get_temp_buffer(dev);
> - int result;
>  
> - result = yaffs_rd_chunk_tags_nand(dev, nand_chunk, buffer, &temp_tags);
> + yaffs_rd_chunk_tags_nand(dev, nand_chunk, buffer, &temp_tags);
>   if (memcmp(buffer, data, dev->data_bytes_per_chunk) ||
>   temp_tags.obj_id != tags->obj_id ||
>   temp_tags.chunk_id != tags->chunk_id ||
> @@ -1485,7 +1483,6 @@ static struct yaffs_cache 
> *yaffs_grab_chunk_cache(struct yaffs_dev *dev)
>   struct yaffs_obj *the_obj;
>   int usage;
>   int i;
> - int pushout;
>  
>   if (dev->param.n_caches < 1)
>   return NULL;
> @@ -1506,7 +1503,6 @@ static struct yaffs_cache 
> *yaffs_grab_chunk_cache(struct yaffs_dev *dev)
>   the_obj = dev->cache[0].object;
>   usage = -1;
>   cache = NULL;
> - pushout = -1;
>  
>   for (i = 0; i < dev->param.n_caches; i++) {
>   if (dev->cache[i].object &&
> @@ -1516,7 +1512,6 @@ static struct yaffs_cache 
> *yaffs_grab_chunk_cache(struct yaffs_dev *dev)
>   usage = dev->cache[i].last_use;
>   the_obj = dev->cache[i].object;
>   cache = &dev->cache[i];
> - pushout = i;
>   }
>   }
>  
> @@ -3176,8 +3171,6 @@ static void yaffs_check_obj_details_loaded(struct 
> yaffs_obj *in)
>   struct yaffs_obj_hdr *oh;
>   struct yaffs_dev *dev;
>   struct yaffs_ext_tags tags;
> - int result;
> - int alloc_failed = 0;
>  
>   if (!in || !in->lazy_loaded || in->hdr_chunk < 1)
>   return;
> @@ -3186,7 +3179,7 @@ static void yaffs_check_obj_details_loaded(struct 
> yaffs_obj *in)
>   in->lazy_loaded = 0;
>   buf = yaffs_get_temp_buffer(dev);
>  
> - result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
> + yaffs_rd_chunk_tags_nand(dev, in->

Re: [U-Boot] [PATCH v3 12/23] tegra: Add EMC support for optimal memory timings

2012-10-06 Thread Albert ARIBAUD
Hi Jimmy,

On Mon, 09 Apr 2012 16:52:56 -0700, jimmzhang 
wrote:

> On Mon, 2012-04-02 at 16:18 -0700, Simon Glass wrote:
> > From: Jimmy Zhang 
> > 
> > Add support for setting up the memory controller parameters. Boards
> > can set up an appropriate table in the device tree.
> > 
> 
> Signed-off-by: Jimmy Zhang 
> 
> > Signed-off-by: Simon Glass 
> > ---

This patch causes a warning with building with the debian cross tool
chain:

emc.c: In function 'tegra_set_emc':
emc.c:272:15: warning: 'table' may be used uninitialized in this
function [-Wmaybe-uninitialized] emc.c: In function 'tegra_set_emc':
emc.c:272:15: warning: 'table' may be used uninitialized in this
function [-Wmaybe-uninitialized]

Could you provide a patch to fix this?

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] powerpc: remove not used CONFIG_SYS_TFTP_LOADADDR

2012-10-06 Thread Philippe Reynes
CONFIG_SYS_TFTP_LOADADDR is defined on severals boards,
but it's never used. So we can safely removed it.

Signed-off-by: Philippe Reynes 
---
 README|3 ---
 include/configs/CRAYL1.h  |1 -
 include/configs/GEN860T.h |5 -
 include/configs/TOP860.h  |1 -
 include/configs/ep8260.h  |1 -
 include/configs/utx8245.h |1 -
 6 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/README b/README
index dd250a0..eeb9e44 100644
--- a/README
+++ b/README
@@ -2819,9 +2819,6 @@ Configuration Settings:
non page size aligned address and this could cause major
problems.
 
-- CONFIG_SYS_TFTP_LOADADDR:
-   Default load address for network file downloads
-
 - CONFIG_SYS_LOADS_BAUD_CHANGE:
Enable temporary baudrate change while serial download
 
diff --git a/include/configs/CRAYL1.h b/include/configs/CRAYL1.h
index 1daec69..6bceccb 100644
--- a/include/configs/CRAYL1.h
+++ b/include/configs/CRAYL1.h
@@ -153,7 +153,6 @@
 
 
 #define CONFIG_SYS_LOAD_ADDR   0x10/* where to load what 
we get from TFTP */
-#define CONFIG_SYS_TFTP_LOADADDR   CONFIG_SYS_LOAD_ADDR
 #define CONFIG_SYS_EXTBDINFO   1   /* To use extended 
board_into (bd_t) */
 #define CONFIG_SYS_DRAM_TEST   1
 
diff --git a/include/configs/GEN860T.h b/include/configs/GEN860T.h
index b98cacc..9a649ca 100644
--- a/include/configs/GEN860T.h
+++ b/include/configs/GEN860T.h
@@ -96,11 +96,6 @@
 #defineCONFIG_SYS_LOADS_BAUD_CHANGE
 
 /*
- * Set default load address for tftp network downloads
- */
-#defineCONFIG_SYS_TFTP_LOADADDR
0x0100
-
-/*
  * Turn off the watchdog timer
  */
 #undef CONFIG_WATCHDOG
diff --git a/include/configs/TOP860.h b/include/configs/TOP860.h
index 36921ca..4849f94 100644
--- a/include/configs/TOP860.h
+++ b/include/configs/TOP860.h
@@ -416,7 +416,6 @@
 #define CONFIG_IPADDR  10.0.4.111
 
 #define CONFIG_SYS_LOAD_ADDR   0x0010  /* default load address 
*/
-#defineCONFIG_SYS_TFTP_LOADADDR0x0010
 
 /*
  * For booting Linux, the board info and command line data
diff --git a/include/configs/ep8260.h b/include/configs/ep8260.h
index ccfe032..5a87cc5 100644
--- a/include/configs/ep8260.h
+++ b/include/configs/ep8260.h
@@ -371,7 +371,6 @@
 #defineCONFIG_CLOCKS_IN_MHZ1  /* clocks passsed to Linux in 
MHz */
 
 #define CONFIG_SYS_LOAD_ADDR 0x0010   /* default load address */
-#define CONFIG_SYS_TFTP_LOADADDR 0x0010   /* default load address for 
network file downloads */
 
 #define CONFIG_SYS_HZ1000 /* decrementer freq: 1 ms ticks 
*/
 
diff --git a/include/configs/utx8245.h b/include/configs/utx8245.h
index d203bb4..66568c8 100644
--- a/include/configs/utx8245.h
+++ b/include/configs/utx8245.h
@@ -65,7 +65,6 @@
 #define CONFIG_BOOTARGS"root=/dev/ram console=ttyS0,57600" /* 
RAMdisk */
 #define CONFIG_ETHADDR 00:AA:00:14:00:05   /* UTX5 */
 #define CONFIG_SERVERIP10.8.17.105 /* Spree */
-#define CONFIG_SYS_TFTP_LOADADDR   1
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_addr=FFA0\0" \
-- 
1.7.4.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ipu common: reset ipuv3 correctly

2012-10-06 Thread Fabio Estevam
On Sat, Oct 6, 2012 at 9:59 AM, Fabio Estevam  wrote:
> Hi Liu Ying,
>
> On Sat, Oct 6, 2012 at 7:32 AM, Liu Ying  wrote:
>
>> @@ -397,6 +397,9 @@ void ipu_reset(void)
>> value = __raw_readl(reg);
>> value = value | SW_IPU_RST;
>> __raw_writel(value, reg);
>> +
>> +   while (__raw_readl(reg) & SW_IPU_RST)
>> +   ;
>
> Ok, but if the reset fails we would hand the whole system.

I mean "hang"

>
> Wouldn't it be better to add a timeout here?
>
> Regards,
>
> Fabio Estevam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ipu common: reset ipuv3 correctly

2012-10-06 Thread Fabio Estevam
Hi Liu Ying,

On Sat, Oct 6, 2012 at 7:32 AM, Liu Ying  wrote:

> @@ -397,6 +397,9 @@ void ipu_reset(void)
> value = __raw_readl(reg);
> value = value | SW_IPU_RST;
> __raw_writel(value, reg);
> +
> +   while (__raw_readl(reg) & SW_IPU_RST)
> +   ;

Ok, but if the reset fails we would hand the whole system.

Wouldn't it be better to add a timeout here?

Regards,

Fabio Estevam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/1] ipu common: reset ipuv3 correctly

2012-10-06 Thread Liu Ying
From: Liu Ying 

This patch checks self-clear sw_ipu_rst bit in
SCR register of SRC controller to be cleared
after setting it to high to reset IPUv3. This
makes sure that IPUv3 finishes sofware reset.

Signed-off-by: Liu Ying 
---
 drivers/video/ipu_common.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 2020da9..03b7382 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -397,6 +397,9 @@ void ipu_reset(void)
value = __raw_readl(reg);
value = value | SW_IPU_RST;
__raw_writel(value, reg);
+
+   while (__raw_readl(reg) & SW_IPU_RST)
+   ;
 }
 
 /*
-- 
1.7.1


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ELDK4.2 build failures for highbank, omap4_panda and omap4_sdp4430 (was: [PATCH] yaffs2: Fix GCC 4.6 compile warnings)

2012-10-06 Thread Albert ARIBAUD
Hi,

On Sat, 6 Oct 2012 13:02:49 +0200, Albert ARIBAUD
 wrote:

> Hi All,
> 
> With Anatolij's fix in, ELDK4.2 still fails to build three boards:
> highbank, omap4_panda and omap4_sdp4430 (maintainers CCed).
> 
> Build logs are weird for the two omap boards:
> 
> Configuring for omap4_panda board...
> arm-linux-gnueabi-size: './u-boot': No such file
> make: *** [checkthumb] Erreur 1
> make: INTERNAL: Exiting with 10 jobserver tokens available; should be 9!
> Configuring for omap4_sdp4430 board...
> arm-linux-gnueabi-size: './u-boot': No such file
> make: *** [checkthumb] Erreur 1
> make: INTERNAL: Exiting with 10 jobserver tokens available; should be 9!
> 
> For highbank, it is a matter of emitting instructions invalid for
> armv5.
> 
> Do these boards need to support building with older toolchains?
> 
> Amicalement,

Seems like sricha...@ti.com does not exist any more. That makes

omap4_panda ARM ARMV7 (OMAP4xx SoC)
omap4_sdp4430   ARM ARMV7 (OMAP4xx SoC)
omap5_evm   ARM ARMV7 (OMAP5xx Soc)

Up for bids for a new maintainer.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] ELDK4.2 build failures for highbank, omap4_panda and omap4_sdp4430 (was: [PATCH] yaffs2: Fix GCC 4.6 compile warnings)

2012-10-06 Thread Albert ARIBAUD
Hi All,

With Anatolij's fix in, ELDK4.2 still fails to build three boards:
highbank, omap4_panda and omap4_sdp4430 (maintainers CCed).

Build logs are weird for the two omap boards:

Configuring for omap4_panda board...
arm-linux-gnueabi-size: './u-boot': No such file
make: *** [checkthumb] Erreur 1
make: INTERNAL: Exiting with 10 jobserver tokens available; should be 9!
Configuring for omap4_sdp4430 board...
arm-linux-gnueabi-size: './u-boot': No such file
make: *** [checkthumb] Erreur 1
make: INTERNAL: Exiting with 10 jobserver tokens available; should be 9!

For highbank, it is a matter of emitting instructions invalid for
armv5.

Do these boards need to support building with older toolchains?

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] yaffs2: Fix GCC 4.6 compile warnings

2012-10-06 Thread Anatolij Gustschin
Fix:
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_summary.c: In function 'yaffs_summary_read':
yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
used [-Wunused-but-set-variable]
yaffs_verify.c: In function 'yaffs_verify_file':
yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs1.c: In function 'yaffs1_scan':
yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin 
Cc: Charles Manning 
---
 fs/yaffs2/yaffs_guts.c|   27 ---
 fs/yaffs2/yaffs_summary.c |3 ---
 fs/yaffs2/yaffs_verify.c  |3 ---
 fs/yaffs2/yaffs_yaffs1.c  |9 +++--
 fs/yaffs2/yaffs_yaffs2.c  |   12 +++-
 5 files changed, 14 insertions(+), 40 deletions(-)

diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index 00d1c5a..21441fd 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -321,9 +321,8 @@ static int yaffs_check_chunk_erased(struct yaffs_dev *dev, 
int nand_chunk)
int retval = YAFFS_OK;
u8 *data = yaffs_get_temp_buffer(dev);
struct yaffs_ext_tags tags;
-   int result;
 
-   result = yaffs_rd_chunk_tags_nand(dev, nand_chunk, data, &tags);
+   yaffs_rd_chunk_tags_nand(dev, nand_chunk, data, &tags);
 
if (tags.ecc_result > YAFFS_ECC_RESULT_NO_ERROR)
retval = YAFFS_FAIL;
@@ -349,9 +348,8 @@ static int yaffs_verify_chunk_written(struct yaffs_dev *dev,
int retval = YAFFS_OK;
struct yaffs_ext_tags temp_tags;
u8 *buffer = yaffs_get_temp_buffer(dev);
-   int result;
 
-   result = yaffs_rd_chunk_tags_nand(dev, nand_chunk, buffer, &temp_tags);
+   yaffs_rd_chunk_tags_nand(dev, nand_chunk, buffer, &temp_tags);
if (memcmp(buffer, data, dev->data_bytes_per_chunk) ||
temp_tags.obj_id != tags->obj_id ||
temp_tags.chunk_id != tags->chunk_id ||
@@ -1485,7 +1483,6 @@ static struct yaffs_cache *yaffs_grab_chunk_cache(struct 
yaffs_dev *dev)
struct yaffs_obj *the_obj;
int usage;
int i;
-   int pushout;
 
if (dev->param.n_caches < 1)
return NULL;
@@ -1506,7 +1503,6 @@ static struct yaffs_cache *yaffs_grab_chunk_cache(struct 
yaffs_dev *dev)
the_obj = dev->cache[0].object;
usage = -1;
cache = NULL;
-   pushout = -1;
 
for (i = 0; i < dev->param.n_caches; i++) {
if (dev->cache[i].object &&
@@ -1516,7 +1512,6 @@ static struct yaffs_cache *yaffs_grab_chunk_cache(struct 
yaffs_dev *dev)
usage = dev->cache[i].last_use;
the_obj = dev->cache[i].object;
cache = &dev->cache[i];
-   pushout = i;
}
}
 
@@ -3176,8 +3171,6 @@ static void yaffs_check_obj_details_loaded(struct 
yaffs_obj *in)
struct yaffs_obj_hdr *oh;
struct yaffs_dev *dev;
struct yaffs_ext_tags tags;
-   int result;
-   int alloc_failed = 0;
 
if (!in || !in->lazy_loaded || in->hdr_chunk < 1)
return;
@@ -3186,7 +3179,7 @@ static void yaffs_check_obj_details_loaded(struct 
yaffs_obj *in)
in->lazy_loaded = 0;
buf = yaffs_get_temp_buffer(dev);
 
-   result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
+   yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
oh = (struct yaffs_obj_hdr *)buf;
 
in->yst_mode = oh->yst_mode;
@@ -3196,8 +3189,6 @@ static void yaffs_check_obj_details_loaded(struct 
yaffs_obj *in)
if (in->variant_type ==