[U-Boot] [PATCH] arm: atmel: remove the config.mk file

2013-08-12 Thread Bo Shen
remove the config.mk file
move text base define to board config file for following boards
  - at91sam9m10g45ek
  - at91sam9x5ek

Signed-off-by: Bo Shen 

---
 board/atmel/at91sam9m10g45ek/config.mk |1 -
 board/atmel/at91sam9x5ek/config.mk |1 -
 include/configs/at91sam9m10g45ek.h |2 ++
 include/configs/at91sam9x5ek.h |2 ++
 4 files changed, 4 insertions(+), 2 deletions(-)
 delete mode 100644 board/atmel/at91sam9m10g45ek/config.mk
 delete mode 100644 board/atmel/at91sam9x5ek/config.mk

diff --git a/board/atmel/at91sam9m10g45ek/config.mk 
b/board/atmel/at91sam9m10g45ek/config.mk
deleted file mode 100644
index 9d3c5ae..000
--- a/board/atmel/at91sam9m10g45ek/config.mk
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0x73f0
diff --git a/board/atmel/at91sam9x5ek/config.mk 
b/board/atmel/at91sam9x5ek/config.mk
deleted file mode 100644
index 6589a12..000
--- a/board/atmel/at91sam9x5ek/config.mk
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0x26f0
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index 2aea555..fc4ecec 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -13,6 +13,8 @@
 
 #include 
 
+#define CONFIG_SYS_TEXT_BASE   0x73f0
+
 #define CONFIG_AT91_LEGACY
 #define CONFIG_ATMEL_LEGACY/* required until (g)pio is fixed */
 
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index 2b1533c..f844a91 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -11,6 +11,8 @@
 
 #include 
 
+#define CONFIG_SYS_TEXT_BASE   0x26f0
+
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK 1200/* 12 MHz crystal */
-- 
1.7.9.5

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


[U-Boot] [PATCH 4/4] gpio: atmel: add copyright and remove error header info

2013-08-12 Thread Bo Shen
Signed-off-by: Bo Shen 

---
 drivers/gpio/at91_gpio.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 3de0844..72161dc 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -1,5 +1,5 @@
 /*
- * Memory Setup stuff - taken from blob memsetup.S
+ * Copyright (C) 2013 Bo Shen 
  *
  * Copyright (C) 2009 Jens Scharsig (js_at...@scharsoft.de)
  *
-- 
1.7.9.5

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


[U-Boot] [PATCH 1/4] gpio: atmel: fix code to use pointer for pio port

2013-08-12 Thread Bo Shen
fix code to use pointer for pio port as the warning message suggested
remove the warning message

Signed-off-by: Bo Shen 
---
 drivers/gpio/at91_gpio.c |  232 ++
 1 file changed, 134 insertions(+), 98 deletions(-)

diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 2322914..15f396f 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -8,16 +8,6 @@
  * SPDX-License-Identifier:GPL-2.0+
  */
 
-/*
- * WARNING:
- *
- * As the code is right now, it expects all PIO ports A,B,C,...
- * to be evenly spaced in the memory map:
- * ATMEL_BASE_PIOA + port * sizeof at91pio_t
- * This might not necessaryly be true in future Atmel SoCs.
- * This code should be fixed to use a pointer array to the ports.
- */
-
 #include 
 #include 
 #include 
@@ -25,19 +15,52 @@
 #include 
 #include 
 
+static unsigned at91_pio_get_port(unsigned port)
+{
+   unsigned at91_port;
+
+   switch (port) {
+   case AT91_PIO_PORTA:
+   at91_port = ATMEL_BASE_PIOA;
+   break;
+   case AT91_PIO_PORTB:
+   at91_port = ATMEL_BASE_PIOB;
+   break;
+   case AT91_PIO_PORTC:
+   at91_port = ATMEL_BASE_PIOC;
+   break;
+   #if (ATMEL_PIO_PORTS > 3)
+   case AT91_PIO_PORTD:
+   at91_port = ATMEL_BASE_PIOD;
+   break;
+   #endif
+   #if (ATMEL_PIO_PORTS > 4)
+   case AT91_PIO_PORTE:
+   at91_port = ATMEL_BASE_PIOE;
+   break;
+   #endif
+   default:
+   at91_port = 0;
+   break;
+   }
+
+   return at91_port;
+}
+
 int at91_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)
 {
-   at91_pio_t  *pio = (at91_pio_t *) ATMEL_BASE_PIOA;
-   u32 mask;
+   at91_port_t *at91_port = (at91_port_t *)at91_pio_get_port(port);
+   u32 mask;
 
if ((port < ATMEL_PIO_PORTS) && (pin < 32)) {
mask = 1 << pin;
if (use_pullup)
-   writel(1 << pin, &pio->port[port].puer);
+   writel(1 << pin, &at91_port->puer);
else
-   writel(1 << pin, &pio->port[port].pudr);
-   writel(mask, &pio->port[port].per);
+   writel(1 << pin, &at91_port->pudr);
+   writel(mask, &at91_port->per);
}
+
return 0;
 }
 
@@ -46,15 +69,16 @@ int at91_set_pio_pullup(unsigned port, unsigned pin, int 
use_pullup)
  */
 int at91_set_pio_periph(unsigned port, unsigned pin, int use_pullup)
 {
-   at91_pio_t  *pio = (at91_pio_t *) ATMEL_BASE_PIOA;
-   u32 mask;
+   at91_port_t *at91_port = (at91_port_t *)at91_pio_get_port(port);
+   u32 mask;
 
if ((port < ATMEL_PIO_PORTS) && (pin < 32)) {
mask = 1 << pin;
-   writel(mask, &pio->port[port].idr);
+   writel(mask, &at91_port->idr);
at91_set_pio_pullup(port, pin, use_pullup);
-   writel(mask, &pio->port[port].per);
+   writel(mask, &at91_port->per);
}
+
return 0;
 }
 
@@ -63,23 +87,24 @@ int at91_set_pio_periph(unsigned port, unsigned pin, int 
use_pullup)
  */
 int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup)
 {
-   at91_pio_t  *pio = (at91_pio_t *) ATMEL_BASE_PIOA;
-   u32 mask;
+   at91_port_t *at91_port = (at91_port_t *)at91_pio_get_port(port);
+   u32 mask;
 
if ((port < ATMEL_PIO_PORTS) && (pin < 32)) {
mask = 1 << pin;
-   writel(mask, &pio->port[port].idr);
+   writel(mask, &at91_port->idr);
at91_set_pio_pullup(port, pin, use_pullup);
 #if defined(CPU_HAS_PIO3)
-   writel(readl(&pio->port[port].abcdsr1) & ~mask,
-   &pio->port[port].abcdsr1);
-   writel(readl(&pio->port[port].abcdsr2) & ~mask,
-   &pio->port[port].abcdsr2);
+   writel(readl(&at91_port->abcdsr1) & ~mask,
+  &at91_port->abcdsr1);
+   writel(readl(&at91_port->abcdsr2) & ~mask,
+  &at91_port->abcdsr2);
 #else
-   writel(mask, &pio->port[port].asr);
+   writel(mask, &at91_port->asr);
 #endif
-   writel(mask, &pio->port[port].pdr);
+   writel(mask, &at91_port->pdr);
}
+
return 0;
 }
 
@@ -88,23 +113,24 @@ int at91_set_a_periph(unsigned port, unsigned pin, int 
use_pullup)
  */
 int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup)
 {
-   at91_pio_t  *pio = (at91_pio_t *) ATMEL_BASE_PIOA;
-   u32 mask;
+   at91_port_t *at91_port = (at91_port_t *)at91_pio_get_port(port);
+   u32 mask;
 
if ((port < ATMEL_PIO_PORTS) && (pin < 32)) {
mask = 1 << pin;
-   writel(mask, &pio->port[port].idr);
+

[U-Boot] [PATCH 2/4] gpio: atmel: remove the at91_pio definition

2013-08-12 Thread Bo Shen
the at91_pio definition is no longer needed, so remove it

Signed-off-by: Bo Shen 
---
 arch/arm/include/asm/arch-at91/at91_pio.h |   15 ---
 1 file changed, 15 deletions(-)

diff --git a/arch/arm/include/asm/arch-at91/at91_pio.h 
b/arch/arm/include/asm/arch-at91/at91_pio.h
index 676f024..ba61542 100644
--- a/arch/arm/include/asm/arch-at91/at91_pio.h
+++ b/arch/arm/include/asm/arch-at91/at91_pio.h
@@ -109,21 +109,6 @@ typedef struct at91_port {
 #endif
 } at91_port_t;
 
-typedef union at91_pio {
-   struct {
-   at91_port_t pioa;
-   at91_port_t piob;
-   at91_port_t pioc;
-   #if (ATMEL_PIO_PORTS > 3)
-   at91_port_t piod;
-   #endif
-   #if (ATMEL_PIO_PORTS > 4)
-   at91_port_t pioe;
-   #endif
-   } ;
-   at91_port_t port[ATMEL_PIO_PORTS];
-} at91_pio_t;
-
 #ifdef CONFIG_AT91_GPIO
 int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup);
 int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup);
-- 
1.7.9.5

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


[U-Boot] [PATCH 3/4] gpio: atmel: add gpio common API support

2013-08-12 Thread Bo Shen
add gpio common API support for gpio command

Signed-off-by: Bo Shen 
---
 drivers/gpio/at91_gpio.c |   43 +++
 1 file changed, 43 insertions(+)

diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 15f396f..3de0844 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -363,3 +363,46 @@ int at91_get_pio_value(unsigned port, unsigned pin)
 
return pdsr != 0;
 }
+
+/* Common GPIO API */
+
+#define at91_gpio_to_port(gpio)(gpio / 32)
+#define at91_gpio_to_pin(gpio) (gpio % 32)
+
+int gpio_request(unsigned gpio, const char *label)
+{
+   return 0;
+}
+
+int gpio_free(unsigned gpio)
+{
+   return 0;
+}
+
+int gpio_direction_input(unsigned gpio)
+{
+   at91_set_pio_input(at91_gpio_to_port(gpio),
+  at91_gpio_to_pin(gpio), 0);
+   return 0;
+}
+
+int gpio_direction_output(unsigned gpio, int value)
+{
+   at91_set_pio_output(at91_gpio_to_port(gpio),
+   at91_gpio_to_pin(gpio), value);
+   return 0;
+}
+
+int gpio_get_value(unsigned gpio)
+{
+   return (int) at91_get_pio_value(at91_gpio_to_port(gpio),
+   at91_gpio_to_pin(gpio));
+}
+
+int gpio_set_value(unsigned gpio, int value)
+{
+   at91_set_pio_value(at91_gpio_to_port(gpio),
+  at91_gpio_to_pin(gpio), value);
+
+   return 0;
+}
-- 
1.7.9.5

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


[U-Boot] [PATCH 0/4] gpio: atmel: fix code to use pointer for pio port

2013-08-12 Thread Bo Shen
This patch set fix code to use pointer for pio port as the warning
message suggested, remove the warning message
remove unused at91_pio structure definition
add common gpio API
add copyright and remove error header info

runtime testing on at91sam9x5ek and sama5d3xek board
compile testing for all atmel ek board


Bo Shen (4):
  gpio: atmel: fix code to use pointer for pio port
  gpio: atmel: remove the at91_pio definition
  gpio: atmel: add gpio common API support
  gpio: atmel: add copyright and remove error header info

 arch/arm/include/asm/arch-at91/at91_pio.h |   15 --
 drivers/gpio/at91_gpio.c  |  277 ++---
 2 files changed, 178 insertions(+), 114 deletions(-)

-- 
1.7.9.5

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


[U-Boot] [PATCH] Add code for spi half duplex operation for enc28j60

2013-08-12 Thread Asok Subramanian
Add code for spi half duplex operation for enc28j60


The current  code assumes full duplex spi operation. But there are processors 
like imx23 which
only permit half duplex operation. This fix does half duplex operation based on 
the definition
of CONFIG_SPI_HALF_DUPLEX 

Signed-off-by: Asok Subramanian 
---
 drivers/net/enc28j60.c |   23 +++
 1 file changed, 23 insertions(+)

diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index ec33764..753fe26 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -157,9 +157,17 @@ static u8 enc_r8(enc_dev_t *enc, const u16 reg)
 
 enc_set_bank(enc, reg);
 dout[0] = CMD_RCR(reg);
+#ifndef CONFIG_SPI_HALF_DUPLEX
 spi_xfer(enc->slave, nbytes * 8, dout, din,
     SPI_XFER_BEGIN | SPI_XFER_END);
 return din[nbytes-1];
+#else
+    spi_xfer(enc->slave, (nbytes -1) * 8, dout, NULL,
+    SPI_XFER_BEGIN );
+    spi_xfer(enc->slave,   8,  NULL, din,
+    SPI_XFER_END );
+    return din[0];
+#endif
 }
 
 /*
@@ -175,6 +183,7 @@ static u16 enc_r16(enc_dev_t *enc, const u16 reg)
 
 enc_set_bank(enc, reg);
 dout[0] = CMD_RCR(reg);
+#ifndef CONFIG_SPI_HALF_DUPLEX
 spi_xfer(enc->slave, nbytes * 8, dout, din,
     SPI_XFER_BEGIN | SPI_XFER_END);
 result = din[nbytes-1];
@@ -183,6 +192,20 @@ static u16 enc_r16(enc_dev_t *enc, const u16 reg)
     SPI_XFER_BEGIN | SPI_XFER_END);
 result |= din[nbytes-1] << 8;
 return result;
+#else
+    spi_xfer(enc->slave, (nbytes -1) * 8, dout, NULL,
+    SPI_XFER_BEGIN );
+    spi_xfer(enc->slave,   8,  NULL, din,
+    SPI_XFER_END );
+    result = din[0];
+    dout[0]++; /* next register */
+    spi_xfer(enc->slave, (nbytes -1) * 8, dout, NULL,
+    SPI_XFER_BEGIN );
+    spi_xfer(enc->slave,   8,  NULL, din,
+    SPI_XFER_END );
+    result |= din[0] << 8;
+    return result;
+#endif
 }
 
 /*
-- 
1.7.9.5___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v8 RESEND 2/2] console: usb: kbd: To improve TFTP booting performance

2013-08-12 Thread Marek Vasut
Dear Stephen Warren,

> On 08/11/2013 12:08 PM, Marek Vasut wrote:
> > Dear Jim Lin,
> > 
> >> TFTP booting is slow when a USB keyboard is installed and
> >> stdin has usbkbd added.
> >> This fix is to change Ctrl-C polling for USB keyboard to every second
> >> when NET transfer is running.
> >> 
> >> diff --git a/include/usb.h b/include/usb.h
> >> 
> >> +extern int __maybe_unused net_busy_flag;
> > 
> > I wonder what would happen if you declared it here as
> > 
> > static int __maybe_unused
> > 
> > Would it have some side-effects?
> 
> Then each file that includes this header will get a separate copy of the
> variable.

Ah, you're right.

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 v2 5/7] tools: add padding of data image file for imximage

2013-08-12 Thread Marek Vasut
Dear Stefano Babic,

> Implement function vrec_header to be able to pad the final
> data image file according the what has been calculated for
> boot_data.length.
> 
> Signed-off-by: Stefano Babic 
> ---

[...]

> + if (!imxhdr) {
> + fprintf(stderr, "%s: malloc return failure: %s\n",
> + params->cmdname, strerror(errno));
> + exit(EXIT_FAILURE);
> + }
> +
> + memset(imxhdr, 0, alloc_len);
> +
> + tparams->header_size = alloc_len;
> + tparams->hdr = imxhdr;
> +
> + /* determine data image file length */

Why dont you just call stat(2) here instead of the open+fstat+close combo?

> + dfd = open(datafile, O_RDONLY|O_BINARY);
> + if (dfd < 0) {
> + fprintf(stderr, "%s: Can't open %s: %s\n",
> + params->cmdname, datafile, strerror(errno));
> + exit(EXIT_FAILURE);
> + }
> +
> + if (fstat(dfd, &sbuf) < 0) {
> + fprintf(stderr, "%s: Can't stat %s: %s\n",
> + params->cmdname, datafile, strerror(errno));
> + exit(EXIT_FAILURE);
> + }
> +
> + pad_len = ROUND(sbuf.st_size, 4096) - sbuf.st_size;
> +
> + close(dfd);
> +
> + /* TODO: check i.MX image V1 handling, for now use 'old' style */

[...]

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


[U-Boot] [PATCH 0/6] handle compression buffer overflows

2013-08-12 Thread Kees Cook
[sending, now subscribed so mailman won't yell at me]

This series fixes gzip, lzma, and lzo to not overflow when writing
to output buffers. Without this, it might be possible for untrusted
compressed input to overflow the buffers used to hold the decompressed
image.

To catch these conditions, I added a series of compression tests available
in the sandbox build. Without the fixes in patches 3, 4, and 5, the
overflows are visible.

Thanks,

-Kees

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


[U-Boot] [PATCH 1/6] sandbox: add compression tests

2013-08-12 Thread Kees Cook
This adds the "test_compression" command when building the sandbox. This
tests the existing compression and decompression routines for simple
sanity and for buffer overflow conditions.

Signed-off-by: Kees Cook 
---
 include/configs/sandbox.h |5 +
 test/Makefile |1 +
 test/compression.c|  384 +
 3 files changed, 390 insertions(+)
 create mode 100644 test/compression.c

diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 98dd083..b7fe14d 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -125,4 +125,9 @@
"stdout=serial\0" \
"stderr=serial\0"
 
+#define CONFIG_GZIP_COMPRESSED
+#define CONFIG_BZIP2
+#define CONFIG_LZO
+#define CONFIG_LZMA
+
 #endif
diff --git a/test/Makefile b/test/Makefile
index 83594f3..ede113d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -25,6 +25,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)libtest.o
 
 COBJS-$(CONFIG_SANDBOX) += command_ut.o
+COBJS-$(CONFIG_SANDBOX) += compression.o
 
 COBJS  := $(sort $(COBJS-y))
 SRCS   := $(COBJS:.o=.c)
diff --git a/test/compression.c b/test/compression.c
new file mode 100644
index 000..c78c8e4
--- /dev/null
+++ b/test/compression.c
@@ -0,0 +1,384 @@
+/*
+ * Copyright (c) 2013, The Chromium Authors
+ *
+ * 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
+ */
+
+#define DEBUG
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#ifdef CONFIG_LZMA
+#include 
+#include 
+#include 
+#endif /* CONFIG_LZMA */
+
+#ifdef CONFIG_LZO
+#include 
+#endif /* CONFIG_LZO */
+
+static const char plain[] =
+   "I am a highly compressable bit of text.\n"
+   "I am a highly compressable bit of text.\n"
+   "I am a highly compressable bit of text.\n"
+   "There are many like me, but this one is mine.\n"
+   "If I were any shorter, there wouldn't be much sense in\n"
+   "compressing me in the first place. At least with lzo, anyway,\n"
+   "which appears to behave poorly in the face of short text\n"
+   "messages.\n";
+
+/* bzip2 -c /tmp/plain.txt > /tmp/plain.bz2 */
+static const char bzip2_compressed[] =
+   "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\xe5\x63\xdd\x09\x00\x00"
+   "\x28\x57\x80\x00\x10\x40\x85\x20\x20\x04\x00\x3f\xef\xdf\xf0\x30"
+   "\x00\xd6\xd0\x34\x91\x89\xa6\xf5\x4d\x19\x1a\x19\x0d\x02\x34\xd4"
+   "\xc9\x00\x34\x34\x00\x02\x48\x41\x35\x4f\xd4\xc6\x88\xd3\x50\x3d"
+   "\x4f\x51\x82\x4f\x88\xc3\x0d\x05\x62\x4f\x91\xa3\x52\x1b\xd0\x52"
+   "\x41\x4a\xa3\x98\xc2\x6b\xca\xa3\x82\xa5\xac\x8b\x15\x99\x68\xad"
+   "\xdf\x29\xd6\xf1\xf7\x5a\x10\xcd\x8c\x26\x61\x94\x95\xfe\x9e\x16"
+   "\x18\x28\x69\xd4\x23\x64\xcc\x2b\xe5\xe8\x5f\x00\xa4\x70\x26\x2c"
+   "\xee\xbd\x59\x6d\x6a\xec\xfc\x31\xda\x59\x0a\x14\x2a\x60\x1c\xf0"
+   "\x04\x86\x73\x9a\xc5\x5b\x87\x3f\x5b\x4c\x93\xe6\xb5\x35\x0d\xa6"
+   "\xb1\x2e\x62\x7b\xab\x67\xe7\x99\x2a\x14\x5e\x9f\x64\xcb\x96\xf4"
+   "\x0d\x65\xd4\x39\xe6\x8b\x7e\xea\x1c\x03\x69\x97\x83\x58\x91\x96"
+   "\xe1\xf0\x9d\xa4\x15\x8b\xb8\xc6\x93\xdc\x3d\xd9\x3c\x22\x55\xef"
+   "\xfb\xbb\x2a\xd3\x87\xa2\x8b\x04\xd9\x19\xf8\xe2\xfd\x4f\xdb\x1a"
+   "\x07\xc8\x60\xa3\x3f\xf8\xbb\x92\x29\xc2\x84\x87\x2b\x1e\xe8\x48";
+static const unsigned long bzip2_compressed_size = 240;
+
+/* lzma -z -c /tmp/plain.txt > /tmp/plain.lzma */
+static const char lzma_compressed[] =
+   "\x5d\x00\x00\x80\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x24\x88"
+   "\x08\x26\xd8\x41\xff\x99\xc8\xcf\x66\x3d\x80\xac\xba\x17\xf1\xc8"
+   "\xb9\xdf\x49\x37\xb1\x68\xa0\x2a\xdd\x63\xd1\xa7\xa3\x66\xf8\x15"
+   "\xef\xa6\x67\x8a\x14\x18\x80\xcb\xc7\xb1\xcb\x84\x6a\xb2\x51\x16"
+   "\xa1\x45\xa0\xd6\x3e\x55\x44\x8a\x5c\xa0\x7c\xe5\xa8\xbd\x04\x57"
+   "\x8f\x24\xfd\xb9\x34\x50\x83\x2f\xf3\x46\x3e\xb9\xb0\x00\x1a\xf5"
+   "\xd3\x86\x7e\x8f\x77\xd1\x5d\x0e\x7c\xe1\xac\xde\xf8\x65\x1f\x4d"
+   "\xce\x7f\xa7\x3d\xaa\xcf\x26\xa7\x58\x69\x1e\x4c\xea\x68\x8a\xe5"
+   "\x89\xd1\xdc\x4d\xc7\xe0\x07\x42\xbf\x0c\x9d\x06\xd7\x51\xa2\x0b"
+   "\x7c\x83\x35\xe1\x85\xdf\xee\xfb\xa3\xee\x2f\x47\x5f\x8b\x7

[U-Boot] [PATCH 3/3] powerpc/t4240: add QSGMII interface support

2013-08-12 Thread Shaohui Xie
Also some fix for QSGMII.
1. fix QSGMII configure of Serdes2.
2. fix PHY address of QSGMII MAC9 & MAC10 for each FMAN.
3. fix dtb for QSGMII interface.

Signed-off-by: Shaohui Xie 
---
 arch/powerpc/cpu/mpc85xx/t4240_serdes.c |   14 +++---
 board/freescale/t4qds/eth.c |   80 ++
 drivers/net/fm/eth.c|4 +-
 drivers/net/fm/memac.c  |1 +
 drivers/net/fm/t4240.c  |   40 +++-
 5 files changed, 108 insertions(+), 31 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/t4240_serdes.c 
b/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
index c001780..d0782f1 100644
--- a/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
@@ -122,25 +122,25 @@ static const struct serdes_config serdes2_cfg_tbl[] = {
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
{38, {NONE, NONE, QSGMII_FM2_B, NONE,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{40, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{46, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{48, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{50, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{52, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{54, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
-   NONE, NONE, QSGMII_FM1_A, NONE}},
+   NONE, NONE, QSGMII_FM2_A, NONE} },
{56, {XFI_FM1_MAC9, XFI_FM1_MAC10,
XFI_FM2_MAC10, XFI_FM2_MAC9,
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
diff --git a/board/freescale/t4qds/eth.c b/board/freescale/t4qds/eth.c
index 7103a0d..6575bfe 100644
--- a/board/freescale/t4qds/eth.c
+++ b/board/freescale/t4qds/eth.c
@@ -188,7 +188,10 @@ static int t4240qds_mdio_init(char *realbusname, u8 muxval)
 void board_ft_fman_fixup_port(void *blob, char * prop, phys_addr_t pa,
enum fm_port port, int offset)
 {
-   if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII) {
+   int interface = fm_info_get_enet_if(port);
+
+   if (interface == PHY_INTERFACE_MODE_SGMII ||
+   interface == PHY_INTERFACE_MODE_QSGMII) {
switch (port) {
case FM1_DTSEC1:
if (qsgmiiphy_fix[port])
@@ -288,6 +291,7 @@ void fdt_fixup_board_enet(void *fdt)
for (i = FM1_DTSEC1; i < NUM_FM_PORTS; i++) {
switch (fm_info_get_enet_if(i)) {
case PHY_INTERFACE_MODE_SGMII:
+   case PHY_INTERFACE_MODE_QSGMII:
switch (mdio_mux[i]) {
case EMI1_SLOT1:
fdt_status_okay_by_alias(fdt, "emi1_slot1");
@@ -409,7 +413,7 @@ static void initialize_qsgmiiphy_fix(void)
 int board_eth_init(bd_t *bis)
 {
 #if defined(CONFIG_FMAN_ENET)
-   int i, idx, lane, slot;
+   int i, idx, lane, slot, interface;
struct memac_mdio_info dtsec_mdio_info;
struct memac_mdio_info tgec_mdio_info;
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
@@ -486,9 +490,9 @@ int board_eth_init(bd_t *bis)
fm_info_set_phy_address(FM1_DTSEC6, slot_qsgmii_phyaddr[1][1]);
if ((srds_prtcl_s2 != 56) && (srds_prtcl_s2 != 57)) {
fm_info_set_phy_address(FM1_DTSEC9,
-   slot_qsgmii_phyaddr[1][3]);
-   fm_info_set_phy_address(FM1_DTSEC10,
slot_qsgmii_phyaddr[1][2]);
+   fm_info_set_phy_address(FM1_DTSEC10,
+   slot_qsgmii_phyaddr[1][3]);
}
break;
case 40:
@@ -498,9 +502,9 @@ int board_eth_init(bd_t *bis)
fm_info_set_phy_address(FM1_DTSEC6, slot_qsgmii_phyaddr[1][1]);
if ((srds_prtcl_s2 != 56) && (srds_prtcl_s2 != 57)) {
fm_info_set_phy_address(FM1_DTSEC10,
-   slot_qsgmii_phyaddr[1][3]);
-   fm_info_set_phy_address(FM1_DTSEC

[U-Boot] [PATCH 6/6] bootm: correctly bounds-check decompression

2013-08-12 Thread Kees Cook
This passes the actual memory allocation size for the destination to the
decompression routines, avoiding potential memory overflows.

Signed-off-by: Kees Cook 
---
 common/cmd_bootm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index ba0bcd4..ac4fad1 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -362,7 +362,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, 
int boot_progress)
 
const char *type_name = genimg_get_type_name(os.type);
 
-   load_buf = map_sysmem(load, image_len);
+   load_buf = map_sysmem(load, unc_len);
image_buf = map_sysmem(image_start, image_len);
switch (comp) {
case IH_COMP_NONE:
-- 
1.7.9.5

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


[U-Boot] [PATCH 2/6] documentation: add more compression configs

2013-08-12 Thread Kees Cook
This adds the missing compression config items to the README.

Signed-off-by: Kees Cook 
---
 README |9 +
 1 file changed, 9 insertions(+)

diff --git a/README b/README
index 5c343da..247b8f3 100644
--- a/README
+++ b/README
@@ -1669,6 +1669,10 @@ CBFS (Coreboot Filesystem) support
to compress the specified memory at its best effort.
 
 - Compression support:
+   CONFIG_GZIP
+
+   Enabled by default for gzip compressed images.
+
CONFIG_BZIP2
 
If this option is set, support for bzip2 compressed
@@ -1702,6 +1706,11 @@ CBFS (Coreboot Filesystem) support
then calculate the amount of needed dynamic memory (ensuring
the appropriate CONFIG_SYS_MALLOC_LEN value).
 
+   CONFIG_LZO
+
+   If this option is set, support for LZO compressed images
+   is included.
+
 - MII/PHY support:
CONFIG_PHY_ADDR
 
-- 
1.7.9.5

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


[U-Boot] [PATCH 4/6] lzma: correctly bounds-check output buffer

2013-08-12 Thread Kees Cook
The output buffer size must be correctly passed to the lzma decoder or
there is a risk of overflowing memory during decompression. Switching
to the LZMA_FINISH_END mode means nothing is left in an unknown state
once the buffer becomes full.

Signed-off-by: Kees Cook 
---
 lib/lzma/LzmaTools.c |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index 28a8aef..2459fbe 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -113,15 +113,19 @@ int lzmaBuffToBuffDecompress (unsigned char *outStream, 
SizeT *uncompressedSize,
 g_Alloc.Alloc = SzAlloc;
 g_Alloc.Free = SzFree;
 
+/* Short-circuit early if we know the buffer can't hold the results. */
+if (outSizeFull != (SizeT)-1 && *uncompressedSize < outSizeFull)
+return SZ_ERROR_OUTPUT_EOF;
+
 /* Decompress */
-outProcessed = outSizeFull;
+outProcessed = *uncompressedSize;
 
 WATCHDOG_RESET();
 
 res = LzmaDecode(
 outStream, &outProcessed,
 inStream + LZMA_DATA_OFFSET, &compressedSize,
-inStream, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &state, &g_Alloc);
+inStream, LZMA_PROPS_SIZE, LZMA_FINISH_END, &state, &g_Alloc);
 *uncompressedSize = outProcessed;
 if (res != SZ_OK)  {
 return res;
-- 
1.7.9.5

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


[U-Boot] [PATCH 5/6] lzo: correctly bounds-check output buffer

2013-08-12 Thread Kees Cook
This checks the size of the output buffer and fails if it was going to
overflow the buffer during lzo decompression.

Signed-off-by: Kees Cook 
---
 lib/lzo/lzo1x_decompress.c |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c
index e6ff708..35f3793 100644
--- a/lib/lzo/lzo1x_decompress.c
+++ b/lib/lzo/lzo1x_decompress.c
@@ -68,13 +68,14 @@ int lzop_decompress(const unsigned char *src, size_t 
src_len,
unsigned char *start = dst;
const unsigned char *send = src + src_len;
u32 slen, dlen;
-   size_t tmp;
+   size_t tmp, remaining;
int r;
 
src = parse_header(src);
if (!src)
return LZO_E_ERROR;
 
+   remaining = *dst_len;
while (src < send) {
/* read uncompressed block size */
dlen = get_unaligned_be32(src);
@@ -93,6 +94,10 @@ int lzop_decompress(const unsigned char *src, size_t src_len,
if (slen <= 0 || slen > dlen)
return LZO_E_ERROR;
 
+   /* abort if buffer ran out of room */
+   if (dlen > remaining)
+   return LZO_E_OUTPUT_OVERRUN;
+
/* decompress */
tmp = dlen;
r = lzo1x_decompress_safe((u8 *) src, slen, dst, &tmp);
@@ -105,6 +110,7 @@ int lzop_decompress(const unsigned char *src, size_t 
src_len,
 
src += slen;
dst += dlen;
+   remaining -= dlen;
}
 
return LZO_E_INPUT_OVERRUN;
-- 
1.7.9.5

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


[U-Boot] [PATCH 3/6] gzip: correctly bounds-check output buffer

2013-08-12 Thread Kees Cook
The output buffer size not be reset by the gzip decoder or there is a
risk of overflowing memory during decompression.

Signed-off-by: Kees Cook 
---
 lib/gunzip.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/gunzip.c b/lib/gunzip.c
index 99a8ab0..682a05f 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -105,13 +105,13 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
unsigned long *lenp,
s.avail_out = dstlen;
do {
r = inflate(&s, Z_FINISH);
-   if (r != Z_STREAM_END && r != Z_BUF_ERROR && stoponerr == 1) {
+   if (stoponerr == 1 && r != Z_STREAM_END &&
+   (s.avail_out == 0 || r != Z_BUF_ERROR)) {
printf("Error: inflate() returned %d\n", r);
inflateEnd(&s);
return -1;
}
s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
char*)dst);
-   s.avail_out = dstlen;
} while (r == Z_BUF_ERROR);
*lenp = s.next_out - (unsigned char *) dst;
inflateEnd(&s);
-- 
1.7.9.5

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


[U-Boot] [PATCH 0/6] handle compression buffer overflows

2013-08-12 Thread Kees Cook
This series fixes gzip, lzma, and lzo to not overflow when writing
to output buffers. Without this, it might be possible for untrusted
compressed input to overflow the buffers used to hold the decompressed
image.

To catch these conditions, I added a series of compression tests available
in the sandbox build. Without the fixes in patches 3, 4, and 5, the
overflows are visible.

Thanks,

-Kees

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


[U-Boot] U-Boot question

2013-08-12 Thread Steven Rosenberg
Hi,

I search the FAQs, but didn't quite find the right answer. I'm trying to 
understand how to load a binary from either U-Boot or directly from the 
bootstrapping that loads U-Boot (instead of U-Boot) and preferable multiple 
binaries at once (from the code automatically the way the bootstrapping loads 
into memory and launches uboot or the way uboot does the same to linux). If you 
can point me to a good link or where in the code it would save me some time.

Thank you for your help.

With Best Regards.

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


[U-Boot] [PATCH 2/3] powerpc/t4qds: fix lanes routing for QSGMII protocols

2013-08-12 Thread Shaohui Xie
When using QSGMII protocols, the first lane and third lane on each slot
need to be swapped.

Signed-off-by: Shaohui Xie 
---
 board/freescale/t4qds/t4qds.c | 39 +--
 1 file changed, 37 insertions(+), 2 deletions(-)

diff --git a/board/freescale/t4qds/t4qds.c b/board/freescale/t4qds/t4qds.c
index 2dade85..a082950 100644
--- a/board/freescale/t4qds/t4qds.c
+++ b/board/freescale/t4qds/t4qds.c
@@ -367,25 +367,60 @@ int config_frontside_crossbar_vsc3316(void)
srds_prtcl_s1 = in_be32(&gur->rcwsr[4]) &
FSL_CORENET2_RCWSR4_SRDS1_PRTCL;
srds_prtcl_s1 >>= FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT;
-   if (srds_prtcl_s1) {
+   switch (srds_prtcl_s1) {
+   case 38:
+   /* swap first lane and third lane on slot1 */
+   vsc3316_fsm1_tx[0][1] = 14;
+   vsc3316_fsm1_tx[6][1] = 0;
+   vsc3316_fsm1_rx[1][1] = 2;
+   vsc3316_fsm1_rx[6][1] = 13;
+   case 40:
+   case 46:
+   case 48:
+   /* swap first lane and third lane on slot2 */
+   vsc3316_fsm1_tx[2][1] = 8;
+   vsc3316_fsm1_tx[4][1] = 6;
+   vsc3316_fsm1_rx[2][1] = 10;
+   vsc3316_fsm1_rx[5][1] = 5;
+   default:
ret = vsc3316_config(VSC3316_FSM_TX_ADDR, vsc3316_fsm1_tx, 8);
if (ret)
return ret;
ret = vsc3316_config(VSC3316_FSM_RX_ADDR, vsc3316_fsm1_rx, 8);
if (ret)
return ret;
+   break;
}
 
srds_prtcl_s2 = in_be32(&gur->rcwsr[4]) &
FSL_CORENET2_RCWSR4_SRDS2_PRTCL;
srds_prtcl_s2 >>= FSL_CORENET2_RCWSR4_SRDS2_PRTCL_SHIFT;
-   if (srds_prtcl_s2) {
+   switch (srds_prtcl_s2) {
+   case 38:
+   /* swap first lane and third lane on slot3 */
+   vsc3316_fsm2_tx[2][1] = 11;
+   vsc3316_fsm2_tx[5][1] = 4;
+   vsc3316_fsm2_rx[2][1] = 9;
+   vsc3316_fsm2_rx[4][1] = 7;
+   case 40:
+   case 46:
+   case 48:
+   case 50:
+   case 52:
+   case 54:
+   /* swap first lane and third lane on slot4 */
+   vsc3316_fsm2_tx[6][1] = 3;
+   vsc3316_fsm2_tx[1][1] = 12;
+   vsc3316_fsm2_rx[0][1] = 1;
+   vsc3316_fsm2_rx[6][1] = 15;
+   default:
ret = vsc3316_config(VSC3316_FSM_TX_ADDR, vsc3316_fsm2_tx, 8);
if (ret)
return ret;
ret = vsc3316_config(VSC3316_FSM_RX_ADDR, vsc3316_fsm2_rx, 8);
if (ret)
return ret;
+   break;
}
 
return 0;
-- 
1.8.0


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


Re: [U-Boot] [PATCH v1 1/4] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform

2013-08-12 Thread Scott Wood
On Mon, 2013-08-12 at 13:31 +, Gupta, Pekon wrote:
> Hi,
> > 
> > On Tue, 2013-08-06 at 15:25 +0530, Pekon Gupta wrote:
> > > This patch
> > > - replaces CONFIG_AM33xx define with generic
> > CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW
> > >   so that all device families having required h/w capability can use ELM 
> > > for
> > >   error detection in ECC_BCHx schemes.
> > >
> > > - replaces CONFIG_NAND_OMAP_BCH8 with
> > CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
> > >   and separates out code for above mentioned BCH8_ECC implementations
> > so that
> > >   driver can be build independently using anyone of them.
> > 
> > Please document these CONFIG symbols in the README.
> > 
> [Pekon]: should I add them to doc/README.nand ? 

Yes.

> Also, in broad sense these define suggest which flavor of ECC scheme to use
> BCH8_HW, BCH8_SW, BCH4_HW, BCH4_SW, etc..
> So in-order to make them generic for use across all vendors I can rename
> them to CONFIG_SYS_NAND_ECC_xx (omitting OMAP in name).

I don't think this would be appropriate, especially with the "SYS" in
the name.  The generic approach is that this is configured at runtime.
Whether a specific controller driver uses CONFIG symbols or other
mechanisms to determine what sort of ECC to use is up to the controller
driver (most controller drivers probably only support one type for any
given type of NAND chip).

Plus, this way you only need to focus on the options that are relevant
to OMAP.

> > Is the choice of ECC mode dictated by the hardware, or is it software's
> > choice?  If the former, it should be CONFIG_SYS rather than just CONFIG.
> > 
> [Pekon] Some older OMAP device do not support ELM hardware. So in those
> CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW is default.
> In newer devices, supporting ELM hardware
> CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW is default.

What does "DETECTION_SW" mean?

> > > -#ifdef CONFIG_AM33XX
> > > +#if defined(CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW)
> > >  #include 
> > > +#elif
> > defined(CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW)
> > > +#include 
> > >  #endif
> > 
> > Normally includes don't get ifdeffed...  and what is the connection
> > between a particular ECC mode and asm/arch/elm.h?
> > 
> [Pekon] Both the Config do the same BCH8 ECC scheme, but implementation
> is different. One uses S/W library, while other uses ELM hardware engine.

Why can't you include both headers?  They don't appear to be exposing
the same interface...

> - CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
> Include API for S/W library (lib/bch.c) so included that here..
> But this ECC scheme should be used only for older OMAP platforms where
>  ELM is not present
> 
> - CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW
> Include declarations for ELM functions. So new OMAP platforms which have
> ELM hardware engine, need not include whole bch.c library in their code.

Maybe it should just be something like CONFIG_SYS_OMAP_ELM?

-Scott



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


[U-Boot] Pull request: u-boot-mpc85xx

2013-08-12 Thread York Sun
Tom,

The following changes since commit d05bfd0586ccebe96e31976459c8ef45ec65e109:

  Merge branch 'master' of git://git.denx.de/u-boot-i2c (2013-08-06
09:49:06 -0400)

are available in the git repository at:


  git://git.denx.de/u-boot-mpc85xx.git master

for you to fetch changes up to 3aab0cd852d7c9565c2559a7983cbb73852bac28:

  powerpc/mpc85xx: Cleanup license header in source files (2013-08-12
15:04:24 -0700)


Haijun.Zhang (1):
  p1020rdb-pd: platform support

James Yang (1):
  powerpc/mpc8xxx: Fix TIMING_CFG_3[EXT_ACTTOPRE]

Liu Gang (4):
  powerpc/srio: Update the SRIO LIODN registers and ID table macro
  powerpc/b4860: Correct LIODN assignment for SRIO
  powerpc/t4: Correct LIODN assignment for SRIO
  powerpc/srio-pcie-boot: Avoid the NOR_BOOT macro when boot from
SRIO/PCIE

Minghuan Lian (1):
  powerpc/rman: fix RMan support for t4240 and b4860

Mingkai Hu (2):
  powerpc/85xx: Add C29x SoC support
  powerpc/c29xpcie: add support for C29XPCIE board

Priyanka Jain (2):
  board/bsc9132qds: Add DSP side tlb and laws
  board/bsc9132qds: Configure DSP DDR controller

Roy Zang (1):
  83xx/pcie: fix build error for 83xx pcie

Shaveta Leekha (4):
  board/freescale/common: IDT8T49N222A configuration code
  powerpc/mpc85xx: Add defines for serdes RSTCTL register
  powerpc/asm: Move function declaration of 'serdes_get_prtcl' to
fsl_serdes.h
  board/b4860qds: Add support for configuring SerDes1 Refclks

Xie Xiaobo (1):
  powerpc/85xx: Add TWR-P10xx board support

York Sun (12):
  powerpc/corenet: Move CONFIG_FSL_CORENET out of board header file
  drivers/fm: Fix compiling error if FW location is not defined
  mpc85xx: Base emulator support
  powerpc/t4qds: cleanup board header file
  powerpc/corenet: Move RCW print to cpu.c
  powerpc/T4240EMU: Add T4240EMU target
  powerpc/mpc8xxx: Set inactive csn_bnds to 0x
  powerpc/t4240qds: Adjust DDR timing for RDIMM
  powerpc/mpc8xxx: Add x4 DDR device support
  powerpc/mpc8xxx: Add memory reset control
  powerpc/mpc85xx: Workaround for A-005812
  powerpc/mpc85xx: Cleanup license header in source files

Zang Roy-R61911 (2):
  powerpc/pcie: add PCIe version 3.x support
  powerpc/pcie: remove PCIe version 3.x define for B4860 and B4420

 MAINTAINERS  |8 +
 README   |   12 +
 arch/powerpc/cpu/mpc83xx/pcie.c  |2 +
 arch/powerpc/cpu/mpc85xx/Makefile|2 +
 arch/powerpc/cpu/mpc85xx/b4860_ids.c |   12 +-
 arch/powerpc/cpu/mpc85xx/c29x_serdes.c   |   62 +++
 arch/powerpc/cpu/mpc85xx/cmd_errata.c|3 +
 arch/powerpc/cpu/mpc85xx/cpu.c   |   23 +-
 arch/powerpc/cpu/mpc85xx/cpu_init.c  |   10 +
 arch/powerpc/cpu/mpc85xx/ddr-gen1.c  |2 +-
 arch/powerpc/cpu/mpc85xx/ddr-gen2.c  |2 +-
 arch/powerpc/cpu/mpc85xx/ddr-gen3.c  |   36 +-
 arch/powerpc/cpu/mpc85xx/fdt.c   |6 +-
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.h   |1 -
 arch/powerpc/cpu/mpc85xx/release.S   |   15 +
 arch/powerpc/cpu/mpc85xx/start.S |3 +-
 arch/powerpc/cpu/mpc85xx/t4240_ids.c |   12 +-
 arch/powerpc/cpu/mpc86xx/ddr-8641.c  |2 +-
 arch/powerpc/cpu/mpc8xxx/cpu.c   |3 +
 arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c |   15 +-
 arch/powerpc/cpu/mpc8xxx/ddr/ddr.h   |2 +-
 arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c  |1 +
 arch/powerpc/cpu/mpc8xxx/ddr/interactive.c   |4 +
 arch/powerpc/cpu/mpc8xxx/ddr/main.c  |   62 ++-
 arch/powerpc/cpu/mpc8xxx/ddr/options.c   |2 +
 arch/powerpc/include/asm/config_mpc85xx.h|   26 +
 arch/powerpc/include/asm/fsl_ddr_dimm_params.h   |1 +
 arch/powerpc/include/asm/fsl_ddr_sdram.h |   25 +-
 arch/powerpc/include/asm/fsl_law.h   |7 +-
 arch/powerpc/include/asm/fsl_liodn.h |7 +
 arch/powerpc/include/asm/fsl_pci.h   |   35 +-
 arch/powerpc/include/asm/fsl_serdes.h|1 +
 arch/powerpc/include/asm/immap_85xx.h|   49 +-
 arch/powerpc/include/asm/processor.h |3 +
 board/freescale/b4860qds/b4860qds.c  |  127 -
 board/freescale/b4860qds/eth_b4860qds.c  |2 -
 board/freescale/bsc9131rdb/ddr.c |2 +-
 board/freescale/bsc9132qds/bsc9132qds.c  |   22 +
 board/freescale/bsc9132qds/ddr.c |2 +-
 board/freescale/bsc9132qds/law.c |8 +
 board/freescale/bsc9132qds/tlb.c |5 +
 board/freescale/c29xpcie/Makefile|   30 ++
 board/freescale/c29xpcie/c29xpcie.c  |  148 ++
 board/freescale/c29xpci

[U-Boot] [PATCH v3 2/3] arm:samsung: Move common code from ./s5p-common to ./samsung-common/

2013-08-12 Thread Lukasz Majewski
Common Samsung code has been moved one level up - to ./samsung-common directory.
This would allow other - non S5P based targets to reuse this code base
Moreover duplicated header files were removed.

Signed-off-by: Lukasz Majewski 

---
Changes for v3:
- Comply with SPDX license format when moving files to new location

Changes for v2:
- Only compile in libsamsung-common for non arm9 boards
- Exclude common sromc controller code
- Adjust smdkc100 to work with common sromc.h header
- Adjust boards #includes for asm/samsung-common/sromc.h
---
 Makefile|7 +-
 arch/arm/cpu/armv7/exynos/pinmux.c  |2 +-
 arch/arm/cpu/armv7/s5p-common/Makefile  |   34 --
 arch/arm/cpu/armv7/s5p-common/cpu_info.c|   41 ---
 arch/arm/cpu/armv7/s5p-common/pwm.c |  171 --
 arch/arm/cpu/armv7/s5p-common/sromc.c   |   33 -
 arch/arm/cpu/armv7/s5p-common/timer.c   |  132 
 arch/arm/cpu/samsung-common/Makefile|   30 +
 arch/arm/cpu/samsung-common/cpu_info.c  |   40 +++
 arch/arm/cpu/samsung-common/pwm.c   |  172 +++
 arch/arm/cpu/samsung-common/sromc.c |   33 +
 arch/arm/cpu/samsung-common/timer.c |  131 
 arch/arm/include/asm/arch-exynos/pwm.h  |   55 -
 arch/arm/include/asm/arch-exynos/sromc.h|   55 -
 arch/arm/include/asm/arch-s5pc1xx/pwm.h |   55 -
 arch/arm/include/asm/arch-s5pc1xx/sromc.h   |   40 ---
 arch/arm/include/asm/samsung-common/pwm.h   |   55 +
 arch/arm/include/asm/samsung-common/sromc.h |   60 ++
 board/samsung/smdk5250/exynos5-dt.c |2 +-
 board/samsung/smdkc100/smdkc100.c   |   11 +-
 board/samsung/smdkv310/smdkv310.c   |2 +-
 spl/Makefile|2 +-
 22 files changed, 534 insertions(+), 629 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/Makefile
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/cpu_info.c
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/pwm.c
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/sromc.c
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/timer.c
 create mode 100644 arch/arm/cpu/samsung-common/Makefile
 create mode 100644 arch/arm/cpu/samsung-common/cpu_info.c
 create mode 100644 arch/arm/cpu/samsung-common/pwm.c
 create mode 100644 arch/arm/cpu/samsung-common/sromc.c
 create mode 100644 arch/arm/cpu/samsung-common/timer.c
 delete mode 100644 arch/arm/include/asm/arch-exynos/pwm.h
 delete mode 100644 arch/arm/include/asm/arch-exynos/sromc.h
 delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/pwm.h
 delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/sromc.h
 create mode 100644 arch/arm/include/asm/samsung-common/pwm.h
 create mode 100644 arch/arm/include/asm/samsung-common/sromc.h

diff --git a/Makefile b/Makefile
index d545d30..836c04d 100644
--- a/Makefile
+++ b/Makefile
@@ -330,11 +330,10 @@ ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs 
vf610))
 LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
 endif
 
-ifeq ($(SOC),s5pc1xx)
-LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o
+ifeq ($(VENDOR),samsung)
+ifneq ($(SOC), s3c24x0)
+LIBS-y += arch/$(ARCH)/cpu/samsung-common/libsamsung-common.o
 endif
-ifeq ($(SOC),exynos)
-LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o
 endif
 ifneq ($(CONFIG_TEGRA),)
 LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
b/arch/arm/cpu/armv7/exynos/pinmux.c
index 1b05ebf..ed662bb 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -9,7 +9,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 static void exynos5_uart_config(int peripheral)
 {
diff --git a/arch/arm/cpu/armv7/s5p-common/Makefile 
b/arch/arm/cpu/armv7/s5p-common/Makefile
deleted file mode 100644
index fd7290c..000
--- a/arch/arm/cpu/armv7/s5p-common/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (C) 2009 Samsung Electronics
-# Minkyu Kang 
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-include $(TOPDIR)/config.mk
-
-LIB= $(obj)libs5p-common.o
-
-COBJS-y+= cpu_info.o
-ifndef CONFIG_SPL_BUILD
-COBJS-y+= timer.o
-COBJS-y+= sromc.o
-COBJS-$(CONFIG_PWM)+= pwm.o
-endif
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS-y) $(SOBJS))
-
-all:$(obj).depend $(LIB)
-
-$(LIB):$(OBJS)
-   $(call cmd_link_o_target, $(OBJS))
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c 
b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
deleted file mode 100644
index a8d91e7..000
--- a/arch/arm/cpu/armv7/

[U-Boot] [Patch v2] powerpc/mpc85xx: Cleanup license header in source files

2013-08-12 Thread York Sun
Fix the license header introduced by the following patches

Add TWR-P10xx board support
Add T4240EMU target
IDT8T49N222A configuration code
Add C29x SoC support
Add support for C29XPCIE board

Signed-off-by: York Sun 
---
Change since v1: Fix typo.

 arch/powerpc/cpu/mpc85xx/c29x_serdes.c   |5 +
 board/freescale/c29xpcie/Makefile|6 +-
 board/freescale/c29xpcie/c29xpcie.c  |5 +
 board/freescale/c29xpcie/cpld.c  |5 +
 board/freescale/c29xpcie/cpld.h  |5 +
 board/freescale/c29xpcie/ddr.c   |5 +
 board/freescale/c29xpcie/law.c   |5 +
 board/freescale/c29xpcie/tlb.c   |5 +
 board/freescale/common/idt8t49n222a_serdes_clk.c |   15 +--
 board/freescale/common/idt8t49n222a_serdes_clk.h |   15 +--
 board/freescale/p1_twr/Makefile  |   19 +--
 board/freescale/p1_twr/ddr.c |4 +---
 board/freescale/p1_twr/law.c |   18 +-
 board/freescale/p1_twr/p1_twr.c  |   18 +-
 board/freescale/p1_twr/tlb.c |   18 +-
 board/freescale/t4qds/ddr.h  |   15 +--
 board/freescale/t4qds/t4240emu.c |   18 +-
 board/freescale/t4qds/t4240qds.c |   18 +-
 include/configs/C29XPCIE.h   |   18 +-
 include/configs/T4240EMU.h   |   18 +-
 include/configs/p1_twr.h |   18 +-
 21 files changed, 21 insertions(+), 232 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c 
b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
index 4b3214d..51972cb 100644
--- a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
@@ -1,10 +1,7 @@
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  */
 
 #include 
diff --git a/board/freescale/c29xpcie/Makefile 
b/board/freescale/c29xpcie/Makefile
index 15bef9a..ab8eb8f 100644
--- a/board/freescale/c29xpcie/Makefile
+++ b/board/freescale/c29xpcie/Makefile
@@ -1,11 +1,7 @@
 #
 # Copyright 2013 Freescale Semiconductor, Inc.
 #
-# 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.
-#
+# SPDX-License-Identifier: GPL-2.0+
 
 include $(TOPDIR)/config.mk
 
diff --git a/board/freescale/c29xpcie/c29xpcie.c 
b/board/freescale/c29xpcie/c29xpcie.c
index acc59d2..48c4b30 100644
--- a/board/freescale/c29xpcie/c29xpcie.c
+++ b/board/freescale/c29xpcie/c29xpcie.c
@@ -1,10 +1,7 @@
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  */
 
 #include 
diff --git a/board/freescale/c29xpcie/cpld.c b/board/freescale/c29xpcie/cpld.c
index b17a7ba..5cbccff 100644
--- a/board/freescale/c29xpcie/cpld.c
+++ b/board/freescale/c29xpcie/cpld.c
@@ -3,10 +3,7 @@
  * Author: Mingkai Hu 
  * Po Liu 
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  *
  * This file provides support for the board-specific CPLD used on some 
Freescale
  * reference boards.
diff --git a/board/freescale/c29xpcie/cpld.h b/board/freescale/c29xpcie/cpld.h
index 24093c4..20862a3 100644
--- a/board/freescale/c29xpcie/cpld.h
+++ b/board/freescale/c29xpcie/cpld.h
@@ -3,10 +3,7 @@
  * Author: Mingkai Hu 
  * Po Liu 
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  *
  * This file provides support for the ngPIXIS, a board-specific FPGA used on
  * some Freescale reference boards.
diff --git a/board/freescale/c29xpcie/ddr.c b/board/freescale/c29xpcie/ddr.c
index 62476ca..b017cfd 100644
--- a/

[U-Boot] [PATCH] powerpc/mpc85xx: Cleanup lincese header in source files

2013-08-12 Thread York Sun
Fix the lincese header introduced by the following patches

Add TWR-P10xx board support
Add T4240EMU target
IDT8T49N222A configuration code
Add C29x SoC support
Add support for C29XPCIE board

Signed-off-by: York Sun 
---
This patch fixes the lincense header for the patches pending while SPDX license
identifier was introduced.

 arch/powerpc/cpu/mpc85xx/c29x_serdes.c   |5 +
 board/freescale/c29xpcie/Makefile|6 +-
 board/freescale/c29xpcie/c29xpcie.c  |5 +
 board/freescale/c29xpcie/cpld.c  |5 +
 board/freescale/c29xpcie/cpld.h  |5 +
 board/freescale/c29xpcie/ddr.c   |5 +
 board/freescale/c29xpcie/law.c   |5 +
 board/freescale/c29xpcie/tlb.c   |5 +
 board/freescale/common/idt8t49n222a_serdes_clk.c |   15 +--
 board/freescale/common/idt8t49n222a_serdes_clk.h |   15 +--
 board/freescale/p1_twr/Makefile  |   19 +--
 board/freescale/p1_twr/ddr.c |4 +---
 board/freescale/p1_twr/law.c |   18 +-
 board/freescale/p1_twr/p1_twr.c  |   18 +-
 board/freescale/p1_twr/tlb.c |   18 +-
 board/freescale/t4qds/ddr.h  |   15 +--
 board/freescale/t4qds/t4240emu.c |   18 +-
 board/freescale/t4qds/t4240qds.c |   18 +-
 include/configs/C29XPCIE.h   |   18 +-
 include/configs/T4240EMU.h   |   18 +-
 include/configs/p1_twr.h |   18 +-
 21 files changed, 21 insertions(+), 232 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c 
b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
index 4b3214d..51972cb 100644
--- a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
@@ -1,10 +1,7 @@
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  */
 
 #include 
diff --git a/board/freescale/c29xpcie/Makefile 
b/board/freescale/c29xpcie/Makefile
index 15bef9a..ab8eb8f 100644
--- a/board/freescale/c29xpcie/Makefile
+++ b/board/freescale/c29xpcie/Makefile
@@ -1,11 +1,7 @@
 #
 # Copyright 2013 Freescale Semiconductor, Inc.
 #
-# 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.
-#
+# SPDX-License-Identifier: GPL-2.0+
 
 include $(TOPDIR)/config.mk
 
diff --git a/board/freescale/c29xpcie/c29xpcie.c 
b/board/freescale/c29xpcie/c29xpcie.c
index acc59d2..48c4b30 100644
--- a/board/freescale/c29xpcie/c29xpcie.c
+++ b/board/freescale/c29xpcie/c29xpcie.c
@@ -1,10 +1,7 @@
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  */
 
 #include 
diff --git a/board/freescale/c29xpcie/cpld.c b/board/freescale/c29xpcie/cpld.c
index b17a7ba..5cbccff 100644
--- a/board/freescale/c29xpcie/cpld.c
+++ b/board/freescale/c29xpcie/cpld.c
@@ -3,10 +3,7 @@
  * Author: Mingkai Hu 
  * Po Liu 
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  *
  * This file provides support for the board-specific CPLD used on some 
Freescale
  * reference boards.
diff --git a/board/freescale/c29xpcie/cpld.h b/board/freescale/c29xpcie/cpld.h
index 24093c4..20862a3 100644
--- a/board/freescale/c29xpcie/cpld.h
+++ b/board/freescale/c29xpcie/cpld.h
@@ -3,10 +3,7 @@
  * Author: Mingkai Hu 
  * Po Liu 
  *
- * 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.
+ * SPDX-License-Identifier:GPL-2.0+
  *
  * This file provides support for the ngPIXIS, a board-specific FPGA used on
  * some Freescale reference boards.
diff --git a/board/freescale/c29x

[U-Boot] [PATCH v3 3/3] arm:samsung:cpu_info: Rename s5p_* to samsung_*

2013-08-12 Thread Lukasz Majewski
Common CPU info code has been refactored to use more generic name - namely
samsung_* instead of s5p_*.
This change will prevent code duplication for non armv7a based SoCs (e.g.
s3c64xx).

Signed-off-by: Lukasz Majewski 

---
Changes for v3:
- New patch
---
 arch/arm/cpu/samsung-common/cpu_info.c  |   10 +-
 arch/arm/include/asm/arch-exynos/cpu.h  |   24 
 arch/arm/include/asm/arch-s5pc1xx/cpu.h |   12 ++--
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/arch/arm/cpu/samsung-common/cpu_info.c 
b/arch/arm/cpu/samsung-common/cpu_info.c
index e18c4f6..89dc80d 100644
--- a/arch/arm/cpu/samsung-common/cpu_info.c
+++ b/arch/arm/cpu/samsung-common/cpu_info.c
@@ -9,14 +9,14 @@
 #include 
 
 /* Default is s5pc100 */
-unsigned int s5p_cpu_id = 0xC100;
+unsigned int samsung_cpu_id = 0xC100;
 /* Default is EVT1 */
-unsigned int s5p_cpu_rev = 1;
+unsigned int samsung_cpu_rev = 1;
 
 #ifdef CONFIG_ARCH_CPU_INIT
 int arch_cpu_init(void)
 {
-   s5p_set_cpu_id();
+   samsung_set_cpu_id();
 
return 0;
 }
@@ -24,7 +24,7 @@ int arch_cpu_init(void)
 
 u32 get_device_type(void)
 {
-   return s5p_cpu_id;
+   return samsung_cpu_id;
 }
 
 #ifdef CONFIG_DISPLAY_CPUINFO
@@ -32,7 +32,7 @@ int print_cpuinfo(void)
 {
char buf[32];
 
-   printf("CPU:\t%s%X@%sMHz\n", s5p_get_cpu_name(), s5p_cpu_id,
+   printf("CPU:\t%s%X@%sMHz\n", samsung_get_cpu_name(), samsung_cpu_id,
   strmhz(buf, get_arm_clk()));
 
return 0;
diff --git a/arch/arm/include/asm/arch-exynos/cpu.h 
b/arch/arm/include/asm/arch-exynos/cpu.h
index cb924fb..17106df 100644
--- a/arch/arm/include/asm/arch-exynos/cpu.h
+++ b/arch/arm/include/asm/arch-exynos/cpu.h
@@ -124,40 +124,40 @@
 #ifndef __ASSEMBLY__
 #include 
 /* CPU detection macros */
-extern unsigned int s5p_cpu_id;
-extern unsigned int s5p_cpu_rev;
+extern unsigned int samsung_cpu_id;
+extern unsigned int samsung_cpu_rev;
 
 static inline int s5p_get_cpu_rev(void)
 {
-   return s5p_cpu_rev;
+   return samsung_cpu_rev;
 }
 
-static inline void s5p_set_cpu_id(void)
+static inline void samsung_set_cpu_id(void)
 {
unsigned int pro_id = (readl(EXYNOS4_PRO_ID) & 0x00FFF000) >> 12;
 
switch (pro_id) {
case 0x200:
/* Exynos4210 EVT0 */
-   s5p_cpu_id = 0x4210;
-   s5p_cpu_rev = 0;
+   samsung_cpu_id = 0x4210;
+   samsung_cpu_rev = 0;
break;
case 0x210:
/* Exynos4210 EVT1 */
-   s5p_cpu_id = 0x4210;
+   samsung_cpu_id = 0x4210;
break;
case 0x412:
/* Exynos4412 */
-   s5p_cpu_id = 0x4412;
+   samsung_cpu_id = 0x4412;
break;
case 0x520:
/* Exynos5250 */
-   s5p_cpu_id = 0x5250;
+   samsung_cpu_id = 0x5250;
break;
}
 }
 
-static inline char *s5p_get_cpu_name(void)
+static inline char *samsung_get_cpu_name(void)
 {
return EXYNOS_CPU_NAME;
 }
@@ -165,7 +165,7 @@ static inline char *s5p_get_cpu_name(void)
 #define IS_SAMSUNG_TYPE(type, id)  \
 static inline int __attribute__((no_instrument_function)) cpu_is_##type(void) \
 {  \
-   return (s5p_cpu_id >> 12) == id;\
+   return (samsung_cpu_id >> 12) == id;\
 }
 
 IS_SAMSUNG_TYPE(exynos4, 0x4)
@@ -175,7 +175,7 @@ IS_SAMSUNG_TYPE(exynos5, 0x5)
 static inline int __attribute__((no_instrument_function)) \
proid_is_##type(void)   \
 {  \
-   return s5p_cpu_id == id;\
+   return samsung_cpu_id == id;\
 }
 
 IS_EXYNOS_TYPE(exynos4210, 0x4210)
diff --git a/arch/arm/include/asm/arch-s5pc1xx/cpu.h 
b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
index 4fc5a0c..b3208ce 100644
--- a/arch/arm/include/asm/arch-s5pc1xx/cpu.h
+++ b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
@@ -50,15 +50,15 @@
 #ifndef __ASSEMBLY__
 #include 
 /* CPU detection macros */
-extern unsigned int s5p_cpu_id;
+extern unsigned int samsung_cpu_id;
 
-static inline void s5p_set_cpu_id(void)
+static inline void samsung_set_cpu_id(void)
 {
-   s5p_cpu_id = readl(S5PC100_PRO_ID);
-   s5p_cpu_id = 0xC000 | ((s5p_cpu_id & 0x00FFF000) >> 12);
+   samsung_cpu_id = readl(S5PC100_PRO_ID);
+   samsung_cpu_id = 0xC000 | ((samsung_cpu_id & 0x00FFF000) >> 12);
 }
 
-static inline char *s5p_get_cpu_name(void)
+static inline char *samsung_get_cpu_name(void)
 {
return S5P_CPU_NAME;
 }
@@ -66,7 +66,7 @@ static inline char *s5p_get_cpu_name(void)
 #define IS_SAMSUNG_TYPE(type, id)  \
 static inline int cpu_is_##type(void)  \
 {  \
-   return s5p_cpu_id == id ? 1 : 0;  

[U-Boot] Pull request: u-boot-video/master

2013-08-12 Thread Anatolij Gustschin
Hey Tom,

The following changes since commit a78dac79ede7fbb4c9e816abc879655540c3f076:

  nds32: fix the missing COBJS-y change (2013-08-09 01:51:24 +0800)

are available in the git repository at:

  git://git.denx.de/u-boot-video.git master

for you to fetch changes up to 1dc793dd2b8fb97dddf437547d86bd5bcfdb8b29:

  edid: rename struct member to fix two EDID_* macros (2013-08-12 23:32:20 
+0200)


Christian Gmeiner (1):
  edid: rename struct member to fix two EDID_* macros

Donghwa Lee (1):
  exynos: video: change mipi dsi write function parameters correctly

Heiko Schocher (6):
  video, da8xx: move da8xx-fb.h to drivers/video
  arm, am33xx: add clk_get prototype
  video, da8xx-fb: changes for am335x usage
  video, da8xx-fb: show fb addr in bdinfo
  tools, bmp_logo: fix index from uint16_t to int to allow bigger logos
  video: add an option to skip cfb console init

Hyungwon Hwang (1):
  video: add L5F31188 TFT-LCD panel driver

Marek Vasut (7):
  dma: apbh: Add special circular mode for LCD
  video: Allocate the MXSFB framebuffer aligned
  video: Add System-Mode configuration hook into mxsfb
  video: Implement continuous screen refresh for SmartLCD into mxsfb
  video: Fix cfb_console for 4-bit wide font
  video: Encapsulate font in video_font_data.h
  video: Add small 4x6 font from Linux

 arch/arm/include/asm/arch-am33xx/hardware.h|1 +
 arch/arm/include/asm/arch-exynos/mipi_dsim.h   |2 +-
 arch/arm/include/asm/imx-common/dma.h  |2 +
 arch/powerpc/cpu/mpc8xx/video.c|1 -
 board/davinci/ea20/ea20.c  |   28 +-
 common/lcd.c   |1 -
 drivers/dma/apbh_dma.c |   22 +
 drivers/video/Makefile |1 +
 drivers/video/cfb_console.c|   37 +-
 drivers/video/da8xx-fb.c   |  338 ++-
 .../asm/arch-davinci => drivers/video}/da8xx-fb.h  |7 +-
 drivers/video/exynos_mipi_dsi_common.c |   62 +-
 drivers/video/exynos_mipi_dsi_common.h |2 +-
 drivers/video/exynos_mipi_dsi_lowlevel.c   |2 +-
 drivers/video/exynos_mipi_dsi_lowlevel.h   |2 +-
 drivers/video/l5f31188.c   |  192 ++
 drivers/video/mxsfb.c  |   45 +-
 drivers/video/s6e8ax0.c|   59 +-
 drivers/video/sed156x.c|1 -
 include/edid.h |2 +-
 include/video_font.h   |9 +-
 include/video_font_4x6.h   | 2154 
 include/video_font_data.h  |7 +-
 tools/bmp_logo.c   |2 +-
 24 files changed, 2843 insertions(+), 136 deletions(-)
 rename {arch/arm/include/asm/arch-davinci => drivers/video}/da8xx-fb.h (94%)
 create mode 100644 drivers/video/l5f31188.c
 create mode 100644 include/video_font_4x6.h

Please pull. Thanks!

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


Re: [U-Boot] [PATCH] edid: rename struct member to fix two EDID_* macros

2013-08-12 Thread Anatolij Gustschin
On Wed,  7 Aug 2013 09:22:33 +0200
Christian Gmeiner  wrote:

> Without this change EDID_DETAILED_TIMING_VSYNC_OFFSET
> and EDID_DETAILED_TIMING_VSYNC_PULSE_WIDTH macros can
> not be used (compile error).
> The fix is quite trivial: rename struct member to the
> expected name.
> 
> Signed-off-by: Christian Gmeiner 
> ---
>  include/edid.h |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-video/master. Thanks!

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


[U-Boot] [PATCH v3 0/3] arm:exynos:cleanup: Extract common code

2013-08-12 Thread Lukasz Majewski
This series of commits attempts to clean-up the Exynos3/4 code. Common code
for Exynos3 (S5PV210) and Exynos4 has been extracted.

Moreover it will facilitate support for older Samsung targets - like venerable 
s3c6410 (arm1176) SoC.

Lukasz Majewski (3):
  arm:samsung:serial Extract common UART code
  arm:samsung: Move common code from ./s5p-common to ./samsung-common/
  arm:samsung:cpu_info: Rename s5p_* to samsung_*

 Makefile|7 +-
 arch/arm/cpu/armv7/exynos/pinmux.c  |2 +-
 arch/arm/cpu/armv7/s5p-common/Makefile  |   34 --
 arch/arm/cpu/armv7/s5p-common/cpu_info.c|   41 ---
 arch/arm/cpu/armv7/s5p-common/pwm.c |  171 --
 arch/arm/cpu/armv7/s5p-common/sromc.c   |   33 -
 arch/arm/cpu/armv7/s5p-common/timer.c   |  132 
 arch/arm/cpu/samsung-common/Makefile|   30 +
 arch/arm/cpu/samsung-common/cpu_info.c  |   40 +++
 arch/arm/cpu/samsung-common/pwm.c   |  172 +++
 arch/arm/cpu/samsung-common/sromc.c |   33 +
 arch/arm/cpu/samsung-common/timer.c |  131 
 arch/arm/include/asm/arch-exynos/cpu.h  |   24 ++--
 arch/arm/include/asm/arch-exynos/pwm.h  |   55 -
 arch/arm/include/asm/arch-exynos/sromc.h|   55 -
 arch/arm/include/asm/arch-exynos/uart.h |   44 ---
 arch/arm/include/asm/arch-s5pc1xx/cpu.h |   12 +-
 arch/arm/include/asm/arch-s5pc1xx/pwm.h |   55 -
 arch/arm/include/asm/arch-s5pc1xx/sromc.h   |   40 ---
 arch/arm/include/asm/arch-s5pc1xx/uart.h|   44 ---
 arch/arm/include/asm/samsung-common/pwm.h   |   55 +
 arch/arm/include/asm/samsung-common/sromc.h |   60 ++
 arch/arm/include/asm/samsung-common/uart.h  |   64 ++
 board/samsung/smdk5250/exynos5-dt.c |2 +-
 board/samsung/smdkc100/smdkc100.c   |   11 +-
 board/samsung/smdkv310/smdkv310.c   |2 +-
 drivers/serial/Makefile |2 +-
 drivers/serial/serial_s5p.c |   13 +-
 include/configs/exynos5250-dt.h |1 +
 include/configs/origen.h|1 +
 include/configs/s5p_goni.h  |1 +
 include/configs/s5pc210_universal.h |1 +
 include/configs/smdkc100.h  |1 +
 include/configs/smdkv310.h  |1 +
 include/configs/trats.h |1 +
 spl/Makefile|2 +-
 36 files changed, 626 insertions(+), 747 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/Makefile
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/cpu_info.c
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/pwm.c
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/sromc.c
 delete mode 100644 arch/arm/cpu/armv7/s5p-common/timer.c
 create mode 100644 arch/arm/cpu/samsung-common/Makefile
 create mode 100644 arch/arm/cpu/samsung-common/cpu_info.c
 create mode 100644 arch/arm/cpu/samsung-common/pwm.c
 create mode 100644 arch/arm/cpu/samsung-common/sromc.c
 create mode 100644 arch/arm/cpu/samsung-common/timer.c
 delete mode 100644 arch/arm/include/asm/arch-exynos/pwm.h
 delete mode 100644 arch/arm/include/asm/arch-exynos/sromc.h
 delete mode 100644 arch/arm/include/asm/arch-exynos/uart.h
 delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/pwm.h
 delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/sromc.h
 delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/uart.h
 create mode 100644 arch/arm/include/asm/samsung-common/pwm.h
 create mode 100644 arch/arm/include/asm/samsung-common/sromc.h
 create mode 100644 arch/arm/include/asm/samsung-common/uart.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 v3 1/3] arm:samsung:serial Extract common UART code

2013-08-12 Thread Lukasz Majewski
This commit brings removal of duplicated code for UART IP block embedded
at Samsung SoCs.
New include/asm/samsung-common directory has been created to store
common code for existing and future Samsung targets.

Moreover building of UART code now depends on more verbose CONFIG_S5P_SERIAL.
Thereof all relevant boards configs have been adjusted.

Signed-off-by: Lukasz Majewski 

---
Changes for v3:
- Comply with SPDX license format

Changes for v2:
- Remove S3C64XX define from the code
---
 arch/arm/include/asm/arch-exynos/uart.h|   44 ---
 arch/arm/include/asm/arch-s5pc1xx/uart.h   |   44 ---
 arch/arm/include/asm/samsung-common/uart.h |   64 
 drivers/serial/Makefile|2 +-
 drivers/serial/serial_s5p.c|   13 +-
 include/configs/exynos5250-dt.h|1 +
 include/configs/origen.h   |1 +
 include/configs/s5p_goni.h |1 +
 include/configs/s5pc210_universal.h|1 +
 include/configs/smdkc100.h |1 +
 include/configs/smdkv310.h |1 +
 include/configs/trats.h|1 +
 12 files changed, 74 insertions(+), 100 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-exynos/uart.h
 delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/uart.h
 create mode 100644 arch/arm/include/asm/samsung-common/uart.h

diff --git a/arch/arm/include/asm/arch-exynos/uart.h 
b/arch/arm/include/asm/arch-exynos/uart.h
deleted file mode 100644
index 33d6ba3..000
--- a/arch/arm/include/asm/arch-exynos/uart.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * (C) Copyright 2009 Samsung Electronics
- * Minkyu Kang 
- * Heungjun Kim 
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#ifndef __ASM_ARCH_UART_H_
-#define __ASM_ARCH_UART_H_
-
-#ifndef __ASSEMBLY__
-/* baudrate rest value */
-union br_rest {
-   unsigned short  slot;   /* udivslot */
-   unsigned char   value;  /* ufracval */
-};
-
-struct s5p_uart {
-   unsigned intulcon;
-   unsigned intucon;
-   unsigned intufcon;
-   unsigned intumcon;
-   unsigned intutrstat;
-   unsigned intuerstat;
-   unsigned intufstat;
-   unsigned intumstat;
-   unsigned char   utxh;
-   unsigned char   res1[3];
-   unsigned char   urxh;
-   unsigned char   res2[3];
-   unsigned intubrdiv;
-   union br_rest   rest;
-   unsigned char   res3[0xffd0];
-};
-
-static inline int s5p_uart_divslot(void)
-{
-   return 0;
-}
-
-#endif /* __ASSEMBLY__ */
-
-#endif
diff --git a/arch/arm/include/asm/arch-s5pc1xx/uart.h 
b/arch/arm/include/asm/arch-s5pc1xx/uart.h
deleted file mode 100644
index 26db098..000
--- a/arch/arm/include/asm/arch-s5pc1xx/uart.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * (C) Copyright 2009 Samsung Electronics
- * Minkyu Kang 
- * Heungjun Kim 
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#ifndef __ASM_ARCH_UART_H_
-#define __ASM_ARCH_UART_H_
-
-#ifndef __ASSEMBLY__
-/* baudrate rest value */
-union br_rest {
-   unsigned short  slot;   /* udivslot */
-   unsigned char   value;  /* ufracval */
-};
-
-struct s5p_uart {
-   unsigned intulcon;
-   unsigned intucon;
-   unsigned intufcon;
-   unsigned intumcon;
-   unsigned intutrstat;
-   unsigned intuerstat;
-   unsigned intufstat;
-   unsigned intumstat;
-   unsigned char   utxh;
-   unsigned char   res1[3];
-   unsigned char   urxh;
-   unsigned char   res2[3];
-   unsigned intubrdiv;
-   union br_rest   rest;
-   unsigned char   res3[0x3d0];
-};
-
-static inline int s5p_uart_divslot(void)
-{
-   return 1;
-}
-
-#endif /* __ASSEMBLY__ */
-
-#endif
diff --git a/arch/arm/include/asm/samsung-common/uart.h 
b/arch/arm/include/asm/samsung-common/uart.h
new file mode 100644
index 000..ce92399
--- /dev/null
+++ b/arch/arm/include/asm/samsung-common/uart.h
@@ -0,0 +1,64 @@
+/*
+ * (C) Copyright 2009 Samsung Electronics
+ * Minkyu Kang 
+ * Heungjun Kim 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __ASM_ARCH_UART_H_
+#define __ASM_ARCH_UART_H_
+
+#ifndef __ASSEMBLY__
+/* baudrate rest value */
+union br_rest {
+   unsigned short  slot;   /* udivslot */
+   unsigned char   value;  /* ufracval */
+};
+
+struct s5p_uart {
+   unsigned intulcon;
+   unsigned intucon;
+   unsigned intufcon;
+   unsigned intumcon;
+   unsigned intutrstat;
+   unsigned intuerstat;
+   unsigned intufstat;
+   unsigned intumstat;
+   unsigned char   utxh;
+   unsigned char   res1[3];
+   unsigned char   urxh;
+   unsigned char   res2[3];
+   unsigned intubrdiv;
+   union br_rest   rest;
+#if defined(CONFIG_S5PC100) || defined(CONFIG_S5PC110)
+   unsigned char   res3[0x3d0];

Re: [U-Boot] [PATCH RESEND] exynos: video: change mipi dsi write function parameters correctly

2013-08-12 Thread Anatolij Gustschin
On Mon, 05 Aug 2013 13:34:32 +0900
Donghwa Lee  wrote:

> This patch have changed mipi dsi write functions' parameters correctly
> so that type cast operations were removed. And mipi dsi payload is
> composed with array of panel commands to improve readability.
> 
> Signed-off-by: Donghwa Lee 
> ---
>  arch/arm/include/asm/arch-exynos/mipi_dsim.h |2 +-
>  drivers/video/exynos_mipi_dsi_common.c   |   62 
> --
>  drivers/video/exynos_mipi_dsi_common.h   |2 +-
>  drivers/video/exynos_mipi_dsi_lowlevel.c |2 +-
>  drivers/video/exynos_mipi_dsi_lowlevel.h |2 +-
>  drivers/video/s6e8ax0.c  |   59 +---
>  6 files changed, 66 insertions(+), 63 deletions(-)

Applied to u-boot-video/master. Thanks!

Anatolij

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


Re: [U-Boot] [PATCH 08/11] video: Add small 4x6 font from Linux

2013-08-12 Thread Anatolij Gustschin
On Tue, 30 Jul 2013 23:37:58 +0200
Marek Vasut  wrote:

> This font is based on Linux drivers/video/console/font_mini_4x6.c as of 
> commit:
> 
> commit bcfbeecea11c15e243f076d37d637c2598aff4fe
> Author: Bjarni Ingi Gislason 
> Date:   Sun Aug 12 15:05:10 2012 +
> 
> drivers: console: font_: Change a glyph from "broken bar" to "vertical 
> line"
> 
> I removed these lines as they are useless in U-Boot:
>   #include 
>   #define FONTDATAMAX 1536
>   Whole "const struct font_desc font_mini_4x6" block
> 
> This patch also adds a new configuration option to select this smaller font,
> CONFIG_VIDEO_FONT_4X6 , but this is disabled by default. The default setting
> is the regular "large" font.
> 
> Signed-off-by: Marek Vasut 
> Cc: Anatolij Gustschin 
> ---
>  include/video_font.h |4 +
>  include/video_font_4x6.h | 2154 
> ++
>  2 files changed, 2158 insertions(+)
>  create mode 100644 include/video_font_4x6.h

Applied to u-boot-video/master. Thanks!

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


Re: [U-Boot] [PATCH 07/11] video: Encapsulate font in video_font_data.h

2013-08-12 Thread Anatolij Gustschin
Hi,

On Tue, 30 Jul 2013 23:37:57 +0200
Marek Vasut  wrote:

> This patch moves all the font configuration values into video_font_data.h
> so they are all in the right place with the font. The video_font.h now only
> includes video_font_data.h and will allow us to select and include different
> font once more fonts are added.
> 
> Signed-off-by: Marek Vasut 
> Cc: Anatolij Gustschin 
> ---
>  arch/powerpc/cpu/mpc8xx/video.c |1 -
>  common/lcd.c|1 -
>  drivers/video/cfb_console.c |1 -
>  drivers/video/sed156x.c |1 -
>  include/video_font.h|5 +
>  include/video_font_data.h   |5 +
>  6 files changed, 6 insertions(+), 8 deletions(-)

Applied to u-boot-video/master after fixing warning.

Thanks,

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


Re: [U-Boot] Pull request: u-boot-mpc5xxx

2013-08-12 Thread Tom Rini
On Mon, Aug 12, 2013 at 09:14:19PM +0200, Wolfgang Denk wrote:

> Dear Tom,
> 
> The following changes since commit 0daa1f698593fface63eacae7897fabe42cfd28e:
> 
>   Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze (2013-08-12 
> 08:54:32 -0400)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-mpc5xxx master
> 
> for you to fetch changes up to d62a89bd5b5033649a90fa5bfe0f5b32013ca8f8:
> 
>   mpc5200: Misc updates to a3m071 config header (2013-08-12 21:11:24 +0200)
> 
> 
> Stefan Roese (1):
>   mpc5200: Misc updates to a3m071 config header
> 
>  board/a3m071/README  | 10 +-
>  include/configs/a3m071.h | 31 +++
>  2 files changed, 28 insertions(+), 13 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


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


[U-Boot] Pull request: u-boot-mpc5xxx

2013-08-12 Thread Wolfgang Denk
Dear Tom,

The following changes since commit 0daa1f698593fface63eacae7897fabe42cfd28e:

  Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze (2013-08-12 
08:54:32 -0400)

are available in the git repository at:


  git://git.denx.de/u-boot-mpc5xxx master

for you to fetch changes up to d62a89bd5b5033649a90fa5bfe0f5b32013ca8f8:

  mpc5200: Misc updates to a3m071 config header (2013-08-12 21:11:24 +0200)


Stefan Roese (1):
  mpc5200: Misc updates to a3m071 config header

 board/a3m071/README  | 10 +-
 include/configs/a3m071.h | 31 +++
 2 files changed, 28 insertions(+), 13 deletions(-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Children are natural mimics who act like their parents despite  every
effort to teach them good manners.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/4] arm, am33xx: add defines for gmii_sel_register bits

2013-08-12 Thread Mugunthan V N
On Monday 12 August 2013 07:52 PM, Tom Rini wrote:
 +#define GMII2_SEL_MII 0x0
 > >>+#define GMII2_SEL_RMII0x4
 > >>+#define GMII2_SEL_RGMII   0x8
 > >>+#define GMII2_SEL_NOTUSED 0xc
>>> > >NOTUSED not needed as it is not supposed to be used.
>> > 
>> > same here ...
> I think "Not Used" in the TRM here means "this port is not used" rather
> than "this combination of bits is not to be used", so the changes are
> correct.
But having this define is not useful as far as I can think of as there
is not abstraction API for this to check what user is passing. But I
leave it to Tom's decision to have this change or not.

Other than this the patch looks good to me.
Acked-by: Mugunthan V N 

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


Re: [U-Boot] Pull request: u-boot-fdt/master

2013-08-12 Thread Jerry Van Baren

On 08/12/2013 12:35 PM, Simon Glass wrote:

Hi Jerry,

On Sat, Aug 10, 2013 at 7:21 AM, Jerry Van Baren mailto:gvb.ub...@gmail.com>> wrote:


[snip]


I also discovered the u-boot libfdt/fdt_wip.c has fdt_find_regions()
from Simon that isn't in the upstream dtc version.  I slipped up on
that one, I'll be looking into reconciling u-boot-fdt with the
upstream dtc.


I did start the work of upstreaming this, and an fdtgrep too to go with
it - you will see I think two versions of the patches on the
device-tree-discuss mailing list. At the time it was felt that it should
not go into the next release as it was not a small change. That release
(1.4) has gone out now so it is probably time to try again with that. I
have a few comments back and some adjustments to make.


Ahh, yes, I have been watching unfolding saga of fdtgrep, forgot this 
was connected.


Thanks,
gvb

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


Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-08-12 Thread Michael Trimarchi
Hi

On Mon, Aug 12, 2013 at 6:57 PM, Axel Lin  wrote:
> 2013/7/1 Vipin Kumar :
>> On 7/1/2013 11:02 AM, Axel Lin wrote:


 The questions raised here are valid and it forced me to re-read the
 datasheet. For your convenience, I must tell you that the device is
 actually
 pl061 from ARM, so the driver can also be named so.

 The datasheet is here

 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0190b/I1002697.html

 Quoting from the datasheet
 "The GPIODATA register is the data register. In software control mode,
 values written in the GPIODATA register are transferred onto the GPOUT
 pins
 if the respective pins have been configured as outputs through the
 GPIODIR
 register.

 In order to write to GPIODATA, the corresponding bits in the mask,
 resulting
 from the address bus, PADDR[9:2], must be HIGH. Otherwise the bit values
 remain unchanged by the write.

 Similarly, the values read from this register are determined for each
 bit,
 by the mask bit derived from the address used to access the data
 register,
 PADDR[9:2]. Bits that are 1 in the address mask cause the corresponding
 bits
 in GPIODATA to be read, and bits that are 0 in the address mask cause the
 corresponding bits in GPIODATA to be read as 0, regardless of their
 value.

 A read from GPIODATA returns the last bit value written if the respective
 pins are configured as output, or it returns the value on the
 corresponding
 input GPIN bit when these are configured as inputs. All bits are cleared
 by
 a reset."

 After reading all this I am confused about numbering of the gpio's. I
 think
 the numbering should be from 1 to 8 for a device. And this would mean
 that
 we should write to *®s->datareg[1<<  (gpio - 1)]* instead of the
 present
 code which is _®s->datareg[1<<  (gpio + 2)]_
>>>
>>>
>>> Hi Vipin,
>>
>>
>> Hello Alex,
>>
>>
>>> Thanks for the review and providing the datasheet information.
>>> You mentioned that this is PL061.
>>> So... I just checked the gpio-pl061 driver in linux kernel.
>>> It's writing to _®s->datareg[1<<  (gpio + 2)]. and seems no bug
>>> report for this.
>>>
>>
>> Yes, I see it now. The difference is that we are using a writel and the
>> datareg is a u32 array.
>
> Hi,
> The merge window is going to close.
> I'm wondering if this patch is ok or not (I think it's a bug fix).
> I think the only issue is nobody has this hardware to test.
> [Sorry to back to this topic so late... just too busy recently.]
>

You are right. I read the documentation and it works

Michael

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


Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-08-12 Thread Axel Lin
2013/7/1 Vipin Kumar :
> On 7/1/2013 11:02 AM, Axel Lin wrote:
>>>
>>>
>>> The questions raised here are valid and it forced me to re-read the
>>> datasheet. For your convenience, I must tell you that the device is
>>> actually
>>> pl061 from ARM, so the driver can also be named so.
>>>
>>> The datasheet is here
>>>
>>> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0190b/I1002697.html
>>>
>>> Quoting from the datasheet
>>> "The GPIODATA register is the data register. In software control mode,
>>> values written in the GPIODATA register are transferred onto the GPOUT
>>> pins
>>> if the respective pins have been configured as outputs through the
>>> GPIODIR
>>> register.
>>>
>>> In order to write to GPIODATA, the corresponding bits in the mask,
>>> resulting
>>> from the address bus, PADDR[9:2], must be HIGH. Otherwise the bit values
>>> remain unchanged by the write.
>>>
>>> Similarly, the values read from this register are determined for each
>>> bit,
>>> by the mask bit derived from the address used to access the data
>>> register,
>>> PADDR[9:2]. Bits that are 1 in the address mask cause the corresponding
>>> bits
>>> in GPIODATA to be read, and bits that are 0 in the address mask cause the
>>> corresponding bits in GPIODATA to be read as 0, regardless of their
>>> value.
>>>
>>> A read from GPIODATA returns the last bit value written if the respective
>>> pins are configured as output, or it returns the value on the
>>> corresponding
>>> input GPIN bit when these are configured as inputs. All bits are cleared
>>> by
>>> a reset."
>>>
>>> After reading all this I am confused about numbering of the gpio's. I
>>> think
>>> the numbering should be from 1 to 8 for a device. And this would mean
>>> that
>>> we should write to *®s->datareg[1<<  (gpio - 1)]* instead of the
>>> present
>>> code which is _®s->datareg[1<<  (gpio + 2)]_
>>
>>
>> Hi Vipin,
>
>
> Hello Alex,
>
>
>> Thanks for the review and providing the datasheet information.
>> You mentioned that this is PL061.
>> So... I just checked the gpio-pl061 driver in linux kernel.
>> It's writing to _®s->datareg[1<<  (gpio + 2)]. and seems no bug
>> report for this.
>>
>
> Yes, I see it now. The difference is that we are using a writel and the
> datareg is a u32 array.

Hi,
The merge window is going to close.
I'm wondering if this patch is ok or not (I think it's a bug fix).
I think the only issue is nobody has this hardware to test.
[Sorry to back to this topic so late... just too busy recently.]

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


Re: [U-Boot] Pull request: u-boot-fdt/master

2013-08-12 Thread Simon Glass
Hi Jerry,

On Sat, Aug 10, 2013 at 7:21 AM, Jerry Van Baren wrote:

> Note: This is the license header change from Roger Meier (thanks), acked
> by Wolfgang.  While this will diverge our source a bit from the dtc
> upstream, I'm willing to live with that for now and indefinitely if
> necessary.
>
> I would like to start a dialog with David Gibson and Jon Loeliger to see
> if they are interested in adopting the compact license IDs. Unfortunately,
> I've been buried at work and am going on vacation, so that will have to
> wait a bit.
>
> I also discovered the u-boot libfdt/fdt_wip.c has fdt_find_regions() from
> Simon that isn't in the upstream dtc version.  I slipped up on that one,
> I'll be looking into reconciling u-boot-fdt with the upstream dtc.
>

I did start the work of upstreaming this, and an fdtgrep too to go with it
- you will see I think two versions of the patches on the
device-tree-discuss mailing list. At the time it was felt that it should
not go into the next release as it was not a small change. That release
(1.4) has gone out now so it is probably time to try again with that. I
have a few comments back and some adjustments to make.

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


Re: [U-Boot] Pull request: u-boot-fdt/master

2013-08-12 Thread Tom Rini
On Sat, Aug 10, 2013 at 09:21:10AM -0400, Jerry Van Baren wrote:

> Note: This is the license header change from Roger Meier (thanks),
> acked by Wolfgang.  While this will diverge our source a bit from
> the dtc upstream, I'm willing to live with that for now and
> indefinitely if necessary.
> 
> I would like to start a dialog with David Gibson and Jon Loeliger to
> see if they are interested in adopting the compact license IDs.
> Unfortunately, I've been buried at work and am going on vacation, so
> that will have to wait a bit.
> 
> I also discovered the u-boot libfdt/fdt_wip.c has fdt_find_regions()
> from Simon that isn't in the upstream dtc version.  I slipped up on
> that one, I'll be looking into reconciling u-boot-fdt with the
> upstream dtc.
> =
> commit 3e06cd1f97792b4bc3882de1ac99f031fb0eaa80
> Author: Simon Glass 
> Date:   Thu Jun 13 15:10:08 2013 -0700
> 
> libfdt: Add fdt_find_regions()
> 
> Add a function to find regions in device tree given a list of nodes to
> include and properties to exclude.
> 
> See the header file for full documentation.
> 
> Signed-off-by: Simon Glass 
> =
> 
> Best regards,
> gvb
> 
> 
> The following changes since commit a78dac79ede7fbb4c9e816abc879655540c3f076:
> 
>   nds32: fix the missing COBJS-y change (2013-08-09 01:51:24 +0800)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-fdt.git master
> 
> for you to fetch changes up to 35084760a9f492f29434020b64f1db339bf99a23:
> 
>   libfdt: SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause (2013-08-10
> 09:04:25 -0400)
> 
> 
> Roger Meier (1):
>   libfdt: SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause
> 
>  Licenses/README  |   13 ++--
>  Licenses/bsd-2-clause.txt|   25 ++
>  lib/libfdt/fdt.c |   47
> +-
>  lib/libfdt/fdt_empty_tree.c  |   47
> +-
>  lib/libfdt/fdt_ro.c  |   47
> +-
>  lib/libfdt/fdt_rw.c  |   47
> +-
>  lib/libfdt/fdt_strerror.c|   47
> +-
>  lib/libfdt/fdt_sw.c  |   47
> +-
>  lib/libfdt/fdt_wip.c |   47
> +-
>  lib/libfdt/libfdt_internal.h |   47
> +-
>  10 files changed, 40 insertions(+), 374 deletions(-)
>  create mode 100644 Licenses/bsd-2-clause.txt

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Pull request - fpga

2013-08-12 Thread Tom Rini
On Mon, Aug 12, 2013 at 08:59:01AM +0200, Michal Simek wrote:

> Hi Tom,
> 
> please pull these two patches to your tree.
> Both patches targets Zynq fpga code.
> 
> Thanks,
> Michal
> 
> 
> The following changes since commit a78dac79ede7fbb4c9e816abc879655540c3f076:
> 
>   nds32: fix the missing COBJS-y change (2013-08-09 01:51:24 +0800)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-microblaze.git fpga
> 
> for you to fetch changes up to 5f93227ce02d9cafa11704c807a80dcbde129f8c:
> 
>   fpga: zynqpl: Clear loopback mode during device init (2013-08-12 08:52:01 
> +0200)
> 
> 
> Michal Simek (1):
>   fpga: zynqpl: Add support for zc7100 device.
> 
> Soren Brinkmann (1):
>   fpga: zynqpl: Clear loopback mode during device init
> 
>  board/xilinx/zynq/board.c | 4 
>  drivers/fpga/zynqpl.c | 6 +-
>  include/zynqpl.h  | 5 +
>  3 files changed, 14 insertions(+), 1 deletion(-)

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Pull request: u-boot-spi/master

2013-08-12 Thread Tom Rini
On Sat, Aug 10, 2013 at 05:56:13PM +0530, Jagannadha Sutradharudu Teki wrote:

> Hi Tom,
> 
> Pull request has more likely a cleanup and one bug fixe.
> Please let me know for any issues/concerns.
> 
> Thanks,
> Jagan.
> 
> The following changes since commit d05bfd0586ccebe96e31976459c8ef45ec65e109:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot-i2c (2013-08-06 09:49:06 
> -0400)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-spi.git master
> 
> for you to fetch changes up to 07a16f2a9cb6cbb0fbce72e649c7be214d7f801a:
> 
>   microblaze: Call spi_init function (2013-08-08 18:58:11 +0530)
> 
> 
> Axel Lin (2):
>   spi: fsl_espi: Use DIV_ROUND_UP instead of open-coded
>   spi: mpc8xxx_spi: Use DIV_ROUND_UP instead of open-coded
> 
> Gerlando Falauto (1):
>   cmd_sf: let "sf update" erase last sector as a whole
> 
> Jagannadha Sutradharudu Teki (9):
>   sf: eon|spansion|ramtron: Fix code cleanup
>   sf: sst: Fix code cleanup
>   sf: stmicro: Fix code cleanup
>   sf: Fix code cleanup
>   cmd_sf|env_sf: Fix code cleanup
>   sf: Fix code cleanups
>   spi: Add zynq spi controller driver
>   sf: sst: Add support for SST25WF080
>   zynq: Enable CONFIG_ZYNQ_SPI
> 
> Michal Simek (1):
>   microblaze: Call spi_init function
> 
>  arch/arm/include/asm/arch-zynq/hardware.h |   2 +
>  arch/microblaze/lib/board.c   |   5 +
>  common/cmd_sf.c   |  30 ++--
>  common/env_sf.c   |   2 +-
>  drivers/mtd/spi/atmel.c   |  10 +-
>  drivers/mtd/spi/eon.c |   3 +-
>  drivers/mtd/spi/gigadevice.c  |   2 +-
>  drivers/mtd/spi/ramtron.c |   8 +-
>  drivers/mtd/spi/spansion.c|   5 +-
>  drivers/mtd/spi/spi_flash.c   |  11 +-
>  drivers/mtd/spi/spi_spl_load.c|   2 +-
>  drivers/mtd/spi/sst.c |  40 +++--
>  drivers/mtd/spi/stmicro.c |  12 +-
>  drivers/mtd/spi/winbond.c |   2 +-
>  drivers/spi/Makefile  |   1 +
>  drivers/spi/fsl_espi.c|   6 +-
>  drivers/spi/mpc8xxx_spi.c |   2 +-
>  drivers/spi/zynq_spi.c| 280 
> ++
>  include/configs/zynq.h|   9 +
>  19 files changed, 373 insertions(+), 59 deletions(-)
>  create mode 100644 drivers/spi/zynq_spi.c

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v8 RESEND 2/2] console: usb: kbd: To improve TFTP booting performance

2013-08-12 Thread Stephen Warren
On 08/11/2013 12:08 PM, Marek Vasut wrote:
> Dear Jim Lin,
> 
>> TFTP booting is slow when a USB keyboard is installed and
>> stdin has usbkbd added.
>> This fix is to change Ctrl-C polling for USB keyboard to every second
>> when NET transfer is running.

>> diff --git a/include/usb.h b/include/usb.h

>> +extern int __maybe_unused net_busy_flag;
> 
> I wonder what would happen if you declared it here as
> 
> static int __maybe_unused
> 
> Would it have some side-effects?

Then each file that includes this header will get a separate copy of the
variable.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] ARM: use r9 for gd

2013-08-12 Thread Wolfgang Denk
Dear Albert,

In message <20130812164406.5a6807e7@lilith> you wrote:
> 
> > IIRC, r9 is used as GOT pointer ?
> 
> No, it is not, well, not any more since GOT-based relocation was
> replaced by ELF relocation, which requires no reserved register.
> 
> > In any case, please also update the README section of register usage
> > on ARM.

I see, thanks for the explanation - so this is one more item thatneeds
to be fixed in the README.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Die Freiheit des Menschen liegt nicht darin, dass er tun kann, was er
will, sondern darin, dass er nicht tun muss, was er nicht will.
 -- Jean-Jacques Rousseau
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/7] The patchset fixes some issue in the generation of the imx image

2013-08-12 Thread Otavio Salvador
On Mon, Aug 12, 2013 at 11:39 AM, Stefano Babic  wrote:
...
> The patchset allows to add to the imx Header the CSF (command Sequence File)
> generated by the tools provided by Freescale. The CSF is then simply 
> concatenated
> to the u-boot image, making a signed bootloader, that the processor can verify
> if the fuses for the keys are burned. The processor (i.MX53 / i.MX6x) will not
> start a bootloader that cannot be verified - further infos how to configure
> the SOC to verify the bootloader can be found in the User Manual of the 
> specific
> SOC.
...

Couldn't a brief 'how-to' to be added to the README and also the
pointers to the documents where this is documented?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Add support for KSZ8895 switch

2013-08-12 Thread Christian Gmeiner
This patch adds a dump phy driver for the KSZ8895 switch from
Micrel. As the SoC MAC is directly connected to switch no
autonegotiation is needed as the link is always up.

Signed-off-by: Christian Gmeiner 
---
 drivers/net/phy/micrel.c |   31 +++
 1 file changed, 31 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index aa9cbcf..76d6846 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -36,6 +36,36 @@ static struct phy_driver KSZ804_driver = {
.shutdown = &genphy_shutdown,
 };
 
+/**
+ * KSZ8895
+ */
+
+int ksz8895_config(struct phy_device *phydev)
+{
+   /* we are connected directly to the switch without
+* dedicated PHY. SCONF1 == 001 */
+   phydev->link = 1;
+   phydev->duplex = DUPLEX_FULL;
+   phydev->speed = SPEED_100;
+
+   return 0;
+}
+
+static int ksz8895_startup(struct phy_device *phydev)
+{
+   return 0;
+}
+
+static struct phy_driver ksz8895_driver = {
+   .name = "Micrel KSZ8895/KSZ8864",
+   .uid  = 0x221450,
+   .mask = 0xe1,
+   .features = PHY_BASIC_FEATURES,
+   .config   = &ksz8895_config,
+   .startup  = &ksz8895_startup,
+   .shutdown = &genphy_shutdown,
+};
+
 #ifndef CONFIG_PHY_MICREL_KSZ9021
 /*
  * I can't believe Micrel used the exact same part number
@@ -204,5 +234,6 @@ int phy_micrel_init(void)
phy_register(&KS8721_driver);
 #endif
phy_register(&ksz9031_driver);
+   phy_register(&ksz8895_driver);
return 0;
 }
-- 
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 3/3] ARM: use r9 for gd

2013-08-12 Thread Albert ARIBAUD
Hi Wolfgang,

On Mon, 12 Aug 2013 07:53:15 +0200, Wolfgang Denk  wrote:

> Dear Jeroen Hofstee,
> 
> In message <1376254719-15594-4-git-send-email-jer...@myspectrum.nl> you wrote:
> > To be more EABI compliant and as a preparation for building
> > with clang, use the platform-specific r9 register for gd
> > instead of r8.
> > 
> > note: The FIQ is not updated since it is not used in u-boot,
> > and under discussion for the time being.
> > 
> > The following checkpatch warning is ignoredL
> > WARNING: Use of volatile is usually wrong: see
> > Documentation/volatile-considered-harmful.txt
> > 
> > Signed-off-by: Jeroen Hofstee 
> > ---
> >  arch/arm/config.mk |  2 +-
> >  arch/arm/include/asm/global_data.h |  2 +-
> >  arch/arm/lib/crt0.S| 16 
> >  3 files changed, 10 insertions(+), 10 deletions(-)
> 
> IIRC, r9 is used as GOT pointer ?

No, it is not, well, not any more since GOT-based relocation was
replaced by ELF relocation, which requires no reserved register.

> In any case, please also update the README section of register usage
> on ARM.
> 
> Best regards,
> 
> Wolfgang Denk
> 


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


[U-Boot] [PATCH v2 1/7] tools: imx_header should not include flash_offset

2013-08-12 Thread Stefano Babic
Doing a  make distclean; make mx6qsabresd_config; make
and  hexdump -C u-boot.imx | less

 ...
 0360  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||
 *
 03f0  00 00 00 00 00 00 00 00  00 00 00 00 00 04 00 00  ||
^^^
 0400  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||
 *
 1000  13 00 00 ea 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |...ê.ð.å.ð.å.ð.å|
 ...

shows the flash_offset value being written into the final
generated image, wich is not correct.

Instead create flash_offset as static variable such that the
generated image is "clean".

 0360  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||
 *
 1000  13 00 00 ea 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |...ê.ð.å.ð.å.ð.å|

Signed-off-by: Stefano Babic 

---
Changes in v2: None

 tools/imximage.c |   15 ---
 tools/imximage.h |1 -
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/imximage.c b/tools/imximage.c
index c8a9ad5..a347b9b 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -52,6 +52,7 @@ static table_entry_t imximage_versions[] = {
 
 static struct imx_header imximage_header;
 static uint32_t imximage_version;
+static uint32_t imximage_flash_offset;
 
 static set_dcd_val_t set_dcd_val;
 static set_dcd_rst_t set_dcd_rst;
@@ -327,9 +328,9 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, 
int32_t cmd, char *token,
set_hdr_func(imxhdr);
break;
case CMD_BOOT_FROM:
-   imxhdr->flash_offset = get_table_entry_id(imximage_bootops,
+   imximage_flash_offset = get_table_entry_id(imximage_bootops,
"imximage boot option", token);
-   if (imxhdr->flash_offset == -1) {
+   if (imximage_flash_offset == -1) {
fprintf(stderr, "Error: %s[%d] -Invalid boot device"
"(%s)\n", name, lineno, token);
exit(EXIT_FAILURE);
@@ -338,7 +339,7 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, 
int32_t cmd, char *token,
cmd_ver_first = 0;
break;
case CMD_BOOT_OFFSET:
-   imxhdr->flash_offset = get_cfg_value(token, name, lineno);
+   imximage_flash_offset = get_cfg_value(token, name, lineno);
if (unlikely(cmd_ver_first != 1))
cmd_ver_first = 0;
break;
@@ -439,7 +440,7 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, 
char *name)
fclose(fd);
 
/* Exit if there is no BOOT_FROM field specifying the flash_offset */
-   if (imxhdr->flash_offset == FLASH_OFFSET_UNDEFINED) {
+   if (imximage_flash_offset == FLASH_OFFSET_UNDEFINED) {
fprintf(stderr, "Error: No BOOT_FROM tag in %s\n", name);
exit(EXIT_FAILURE);
}
@@ -497,14 +498,14 @@ static void imximage_set_header(void *ptr, struct stat 
*sbuf, int ifd,
 */
imximage_version = IMXIMAGE_V1;
/* Be able to detect if the cfg file has no BOOT_FROM tag */
-   imxhdr->flash_offset = FLASH_OFFSET_UNDEFINED;
+   imximage_flash_offset = FLASH_OFFSET_UNDEFINED;
set_hdr_func(imxhdr);
 
/* Parse dcd configuration file */
dcd_len = parse_cfg_file(imxhdr, params->imagename);
 
/* Set the imx header */
-   (*set_imx_hdr)(imxhdr, dcd_len, params->ep, imxhdr->flash_offset);
+   (*set_imx_hdr)(imxhdr, dcd_len, params->ep, imximage_flash_offset);
 
/*
 * ROM bug alert
@@ -515,7 +516,7 @@ static void imximage_set_header(void *ptr, struct stat 
*sbuf, int ifd,
 *
 * The remaining fraction of a block bytes would not be loaded!
 */
-   *header_size_ptr = ROUND(sbuf->st_size + imxhdr->flash_offset, 4096);
+   *header_size_ptr = ROUND(sbuf->st_size + imximage_flash_offset, 4096);
 }
 
 int imximage_check_params(struct mkimage_params *params)
diff --git a/tools/imximage.h b/tools/imximage.h
index 214187b..ec629a5 100644
--- a/tools/imximage.h
+++ b/tools/imximage.h
@@ -147,7 +147,6 @@ struct imx_header {
imx_header_v1_t hdr_v1;
imx_header_v2_t hdr_v2;
} header;
-   uint32_t flash_offset;
 } __attribute__((aligned(4096)));
 
 typedef void (*set_dcd_val_t)(struct imx_header *imxhdr,
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 3/7] tools: dynamically allocate imx_header in imximage

2013-08-12 Thread Stefano Babic
Change to dynamically allocate the imx_header to correctly
allocate the IVT, Boot Data and DCD at correct locations
depending on the boot media.

Also check that the Image Vector Table Offset + IVT +
Boot Data + DCD <= Initial Load Region Size.

Previously struct imx_header was always 4096 bytes and was
not dealing correctly with the Image Vector Table Offset.

Now, the memory allocation looks for e.g. SD boot like this

 Storage   u-boot.imx RAM
 Device

  177ff000 <--
 |
 0400    d1 00 20 40 IVT.header   177ff400 <---  |
 0404  0004  00 00 80 17 IVT.entry177ff404 ---   |
 0408  0008  00 00 00 00 IVT.reserved1177ff408|  |   |
 040C  000C  2c f4 7f 17 IVT.dcd  177ff40C -- |  |   |
 0410  0010  20 f4 7f 17 IVT.boot 177ff410  | |  |   |
 0414  0014  00 f4 7f 17 IVT.self 177ff414   |   |
 0418  0018  00 00 00 00 IVT.csf  177ff418| ||   |
 041C  001C  00 00 00 00 IVT.reserved2177ff41C| ||   |
 0420  0020  00 f0 7f 17 BootData.start   177ff420 <--- || ---
 0424  0024  00 60 03 00 BootData.length  177ff424  ||
 0428  0028  00 00 00 00 BootData.plugin  177ff428  ||
 042C  002C  d2 03 30 40 DCD.header   177ff42C <-|
 ... |
 1000  0c00  13 00 00 ea U-Boot Start 1780 <--

While at it also remove the unused #define HEADER_OFFSET.

Signed-off-by: Stefano Babic 

---
Changes in v2:
- drop dead code (Marek Vasut)

 tools/imximage.c |   43 ---
 tools/imximage.h |   16 +---
 2 files changed, 49 insertions(+), 10 deletions(-)

diff --git a/tools/imximage.c b/tools/imximage.c
index 494446e..2b4909e 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -31,7 +31,7 @@ static table_entry_t imximage_cmds[] = {
  * Supported Boot options for configuration file
  * this is needed to set the correct flash offset
  */
-static table_entry_t imximage_bootops[] = {
+static table_entry_t imximage_boot_offset[] = {
{FLASH_OFFSET_ONENAND,  "onenand",  "OneNAND Flash",},
{FLASH_OFFSET_NAND, "nand", "NAND Flash",   },
{FLASH_OFFSET_NOR,  "nor",  "NOR Flash",},
@@ -42,6 +42,20 @@ static table_entry_t imximage_bootops[] = {
 };
 
 /*
+ * Supported Boot options for configuration file
+ * this is needed to determine the initial load size
+ */
+static table_entry_t imximage_boot_loadsize[] = {
+   {FLASH_LOADSIZE_ONENAND,"onenand",  "OneNAND Flash",},
+   {FLASH_LOADSIZE_NAND,   "nand", "NAND Flash",   },
+   {FLASH_LOADSIZE_NOR,"nor",  "NOR Flash",},
+   {FLASH_LOADSIZE_SATA,   "sata", "SATA Disk",},
+   {FLASH_LOADSIZE_SD, "sd",   "SD Card",  },
+   {FLASH_LOADSIZE_SPI,"spi",  "SPI Flash",},
+   {-1,"", "Invalid",  },
+};
+
+/*
  * IMXIMAGE version definition for i.MX chips
  */
 static table_entry_t imximage_versions[] = {
@@ -54,6 +68,8 @@ static struct imx_header imximage_header;
 static uint32_t imximage_version;
 /* Image Vector Table Offset */
 static uint32_t imximage_ivt_offset;
+/* Initial Load Region Size */
+static uint32_t imximage_init_loadsize;
 
 static set_dcd_val_t set_dcd_val;
 static set_dcd_rst_t set_dcd_rst;
@@ -195,7 +211,8 @@ static void set_imx_hdr_v1(struct imx_header *imxhdr, 
uint32_t dcd_len,
/* Set magic number */
fhdr_v1->app_code_barker = APP_CODE_BARKER;
 
-   hdr_base = entry_point - sizeof(struct imx_header);
+   /* TODO: check i.MX image V1 handling, for now use 'old' style */
+   hdr_base = entry_point - 4096;
fhdr_v1->app_dest_ptr = hdr_base - flash_offset;
fhdr_v1->app_code_jump_vector = entry_point;
 
@@ -222,12 +239,13 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, 
uint32_t dcd_len,
 
fhdr_v2->entry = entry_point;
fhdr_v2->reserved1 = fhdr_v2->reserved2 = 0;
-   fhdr_v2->self = hdr_base = entry_point - sizeof(struct imx_header);
-
+   hdr_base = entry_point - imximage_init_loadsize +
+   flash_offset;
+   fhdr_v2->self = hdr_base;
fhdr_v2->dcd_ptr = hdr_base + offsetof(imx_header_v2_t, dcd_table);
fhdr_v2->boot_data_ptr = hdr_base
+ offsetof(imx_header_v2_t, boot_data);
-   hdr_v2->boot_data.start = hdr_base - flash_offset;
+   hdr_v2->boot_data.start = entry_point - imximage_init_loadsize;
 
/* Security feature are not supported */
fhdr_v2->csf = 0;
@@ -329,13 +347,24 @@ 

[U-Boot] [PATCH v2 6/7] tools: add support for setting the CSF into imximage

2013-08-12 Thread Stefano Babic
Add support for setting the CSF (Command Sequence File) pointer
which is used for HAB (High Assurance Boot) in the imximage by
adding e.g.

CSF 0x2000

in the imximage.cfg file.

This will set the CSF pointer accordingly just after the padded
data image area. The boot_data.length is adjusted with the
value from the imximage.cfg config file.

The resulting u-boot.imx can be signed with the FSL HAB tooling.
The generated CSF block needs to be appended to the u-boot.imx.

Signed-off-by: Stefano Babic 

Series-changes : 2
- checkpatch warning
- do not output HAB values when csf values are not defined by cfg
---
Changes in v2: None

 doc/README.imximage |   18 +++---
 doc/README.mxc_hab  |   48 
 tools/imximage.c|   41 ++---
 tools/imximage.h|3 ++-
 4 files changed, 103 insertions(+), 7 deletions(-)
 create mode 100644 doc/README.mxc_hab

diff --git a/doc/README.imximage b/doc/README.imximage
index 802eb90..c10684f 100644
--- a/doc/README.imximage
+++ b/doc/README.imximage
@@ -15,9 +15,6 @@ Booting from NOR flash does not require to use this image 
type.
 For more details refer Chapter 2 - System Boot and section 2.14
 (flash header description) of the processor's manual.
 
-This implementation does not use at the moment the secure boot feature
-of the processor. The image is generated disabling all security fields.
-
 Command syntax:
 --
 ./tools/mkimage -l 
@@ -86,6 +83,21 @@ Configuration command line syntax:
Example:
BOOT_FROM spi
 
+   CSF value
+
+   Total size of CSF (Command Sequence File)
+   used for Secure Boot/ High Assurance Boot
+   (HAB).
+
+   Using this command will populate the IVT
+   (Initial Vector Table) CSF pointer and adjust
+   the length fields only. The CSF itself needs
+   to be generated with Freescale tools and
+   'manually' appended to the u-boot.imx file.
+
+   Example:
+   CSF 0x2000
+
DATAtype address value
 
type: word=4, halfword=2, byte=1
diff --git a/doc/README.mxc_hab b/doc/README.mxc_hab
new file mode 100644
index 000..97f8b7d
--- /dev/null
+++ b/doc/README.mxc_hab
@@ -0,0 +1,48 @@
+High Assurance Boot (HAB) for i.MX6 CPUs
+
+To authenticate U-Boot only by the CPU there is no code required in
+U-Boot itself. However, the U-Boot image to be programmed into the
+boot media needs to be properly constructed, i.e. it must contain a
+proper Command Sequence File (CSF).
+
+The Initial Vector Table contains a pointer to the CSF. Please see
+doc/README.imximage for how to prepare u-boot.imx.
+
+The CSF itself is being generated by Freescale HAB tools.
+
+mkimage will output additional information about "HAB Blocks"
+which can be used in the Freescale tooling to authenticate U-Boot
+(entries in the CSF file).
+
+Image Type:   Freescale IMX Boot Image
+Image Ver:2 (i.MX53/6 compatible)
+Data Size:327680 Bytes = 320.00 kB = 0.31 MB
+Load Address: 177ff420
+Entry Point:  1780
+HAB Blocks:   177ff400  0004dc00
+    
+   |   |  |
+   |   |   (1)
+   |   |
+   |   --- (2)
+   |
+   --- (3)
+
+(1)Size of area in file u-boot.imx to sign
+   This area should include the IVT, the Boot Data the DCD
+   and U-Boot itself.
+(2)Start of area in u-boot.imx to sign
+(3)Start of area in RAM to authenticate
+
+CONFIG_SECURE_BOOT currently enables only an additional command
+'hab_status' in U-Boot to retrieve the HAB status and events. This
+can be useful while developing and testing HAB.
+
+Commands to generate a signed U-Boot using Freescale HAB tools:
+cst --o U-Boot_CSF.bin < U-Boot.CSF
+objcopy -I binary -O binary --pad-to 0x2000 --gap-fill=0x00 \
+   U-Boot_CSF.bin U-Boot_CSF_pad.bin
+cat u-boot.imx U-Boot_CSF_pad.bin > u-boot-signed.imx
+
+NOTE: U-Boot_CSF.bin needs to be padded to the value specified in
+the imximage.cfg file.
diff --git a/tools/imximage.c b/tools/imximage.c
index 5981625..50fe22c 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -16,6 +16,8 @@
 #include 
 #include "imximage.h"
 
+#define UNDEFINED 0x
+
 /*
  * Supported commands for configuration file
  */
@@ -23,6 +25,7 @@ static table_entry_t imximage_cmds[] = {
{CMD_BOOT_FROM, "BOOT_FROM","boot command",   },
{CMD_BOOT_OFFSET,   "BOOT_OFFSET",  "Boot offset",},
{CMD_DATA,

[U-Boot] [PATCH v2 0/7] The patchset fixes some issue in the generation of the imx image

2013-08-12 Thread Stefano Babic
(header for Freescale's i.MX processors) to allow the usage of
Freescale's tools to sign the u-boot image and provide a secure boot.

This has nothing to do with the Secure Boot extensions implemented by
Simon Glass, that can be in any case used to boot later a secure image.
Freescale's secure boot ensures that a signed bootloader
is started only if it is verified with a key that is burned into the iMX fuses.
Documentation about the Freescale's secure process can be read from the
AN4591, available on the Freescale's Website.

The patchset allows to add to the imx Header the CSF (command Sequence File)
generated by the tools provided by Freescale. The CSF is then simply 
concatenated
to the u-boot image, making a signed bootloader, that the processor can verify
if the fuses for the keys are burned. The processor (i.MX53 / i.MX6x) will not
start a bootloader that cannot be verified - further infos how to configure
the SOC to verify the bootloader can be found in the User Manual of the specific
SOC.

Next step is to verify the kernel, that can be still done using Simon's patches 
for
verified boot (CONFIG_OF_CONTROL must be set in the board configuarion file).


Changes in v2:
- drop dead code (Marek Vasut)
- Fix errors when SECURE_BOOT is selected due to enum
- simplify display_event code (Marek Vasut)
- compile hab code only if SECURE_BOOT is set (Fabio Estevam)
- update licence with SPDX line according to new rules.

Stefano Babic (7):
  tools: imx_header should not include flash_offset
  tools: rename mximage_flash_offset to imximage_ivt_offset
  tools: dynamically allocate imx_header in imximage
  tools: add variable padding of data image in mkimage
  tools: add padding of data image file for imximage
  tools: add support for setting the CSF into imximage
  imx: add status reporting for HAB status

 arch/arm/cpu/armv7/mx6/Makefile  |7 +-
 arch/arm/cpu/armv7/mx6/hab.c |  104 ++
 arch/arm/include/asm/arch-mx6/hab.h  |   67 
 arch/arm/include/asm/arch-mx6/imx-regs.h |8 +-
 doc/README.imximage  |   18 +++-
 doc/README.mxc_hab   |   48 +
 tools/imximage.c |  174 +++---
 tools/imximage.h |   20 +++-
 tools/mkimage.c  |   24 -
 tools/mkimage.h  |5 +-
 10 files changed, 444 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/mx6/hab.c
 create mode 100644 arch/arm/include/asm/arch-mx6/hab.h
 create mode 100644 doc/README.mxc_hab

-- 
1.7.9.5

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


[U-Boot] [PATCH v2 2/7] tools: rename mximage_flash_offset to imximage_ivt_offset

2013-08-12 Thread Stefano Babic
This better reflects the naming from the Reference Manual
as well as fits better since "flash" is not really applicabe
for SATA.

Signed-off-by: Stefano Babic 
---
Changes in v2: None

 tools/imximage.c |   17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/imximage.c b/tools/imximage.c
index a347b9b..494446e 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -52,7 +52,8 @@ static table_entry_t imximage_versions[] = {
 
 static struct imx_header imximage_header;
 static uint32_t imximage_version;
-static uint32_t imximage_flash_offset;
+/* Image Vector Table Offset */
+static uint32_t imximage_ivt_offset;
 
 static set_dcd_val_t set_dcd_val;
 static set_dcd_rst_t set_dcd_rst;
@@ -328,9 +329,9 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, 
int32_t cmd, char *token,
set_hdr_func(imxhdr);
break;
case CMD_BOOT_FROM:
-   imximage_flash_offset = get_table_entry_id(imximage_bootops,
+   imximage_ivt_offset = get_table_entry_id(imximage_bootops,
"imximage boot option", token);
-   if (imximage_flash_offset == -1) {
+   if (imximage_ivt_offset == -1) {
fprintf(stderr, "Error: %s[%d] -Invalid boot device"
"(%s)\n", name, lineno, token);
exit(EXIT_FAILURE);
@@ -339,7 +340,7 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, 
int32_t cmd, char *token,
cmd_ver_first = 0;
break;
case CMD_BOOT_OFFSET:
-   imximage_flash_offset = get_cfg_value(token, name, lineno);
+   imximage_ivt_offset = get_cfg_value(token, name, lineno);
if (unlikely(cmd_ver_first != 1))
cmd_ver_first = 0;
break;
@@ -440,7 +441,7 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, 
char *name)
fclose(fd);
 
/* Exit if there is no BOOT_FROM field specifying the flash_offset */
-   if (imximage_flash_offset == FLASH_OFFSET_UNDEFINED) {
+   if (imximage_ivt_offset == FLASH_OFFSET_UNDEFINED) {
fprintf(stderr, "Error: No BOOT_FROM tag in %s\n", name);
exit(EXIT_FAILURE);
}
@@ -498,14 +499,14 @@ static void imximage_set_header(void *ptr, struct stat 
*sbuf, int ifd,
 */
imximage_version = IMXIMAGE_V1;
/* Be able to detect if the cfg file has no BOOT_FROM tag */
-   imximage_flash_offset = FLASH_OFFSET_UNDEFINED;
+   imximage_ivt_offset = FLASH_OFFSET_UNDEFINED;
set_hdr_func(imxhdr);
 
/* Parse dcd configuration file */
dcd_len = parse_cfg_file(imxhdr, params->imagename);
 
/* Set the imx header */
-   (*set_imx_hdr)(imxhdr, dcd_len, params->ep, imximage_flash_offset);
+   (*set_imx_hdr)(imxhdr, dcd_len, params->ep, imximage_ivt_offset);
 
/*
 * ROM bug alert
@@ -516,7 +517,7 @@ static void imximage_set_header(void *ptr, struct stat 
*sbuf, int ifd,
 *
 * The remaining fraction of a block bytes would not be loaded!
 */
-   *header_size_ptr = ROUND(sbuf->st_size + imximage_flash_offset, 4096);
+   *header_size_ptr = ROUND(sbuf->st_size + imximage_ivt_offset, 4096);
 }
 
 int imximage_check_params(struct mkimage_params *params)
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 5/7] tools: add padding of data image file for imximage

2013-08-12 Thread Stefano Babic
Implement function vrec_header to be able to pad the final
data image file according the what has been calculated for
boot_data.length.

Signed-off-by: Stefano Babic 
---
Changes in v2: None

 tools/imximage.c |   82 --
 1 file changed, 80 insertions(+), 2 deletions(-)

diff --git a/tools/imximage.c b/tools/imximage.c
index 2b4909e..5981625 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -571,18 +571,96 @@ int imximage_check_params(struct mkimage_params *params)
(params->xflag) || !(strlen(params->imagename));
 }
 
+static int imximage_generate(struct mkimage_params *params,
+   struct image_type_params *tparams)
+{
+   struct imx_header *imxhdr;
+   size_t alloc_len;
+   int dfd;
+   struct stat sbuf;
+   char *datafile = params->datafile;
+   uint32_t pad_len;
+
+   memset(&imximage_header, 0, sizeof(imximage_header));
+
+   /*
+* In order to not change the old imx cfg file
+* by adding VERSION command into it, here need
+* set up function ptr group to V1 by default.
+*/
+   imximage_version = IMXIMAGE_V1;
+   /* Be able to detect if the cfg file has no BOOT_FROM tag */
+   imximage_ivt_offset = FLASH_OFFSET_UNDEFINED;
+   imximage_csf_size = 0;
+   set_hdr_func(imxhdr);
+
+   /* Parse dcd configuration file */
+   parse_cfg_file(&imximage_header, params->imagename);
+
+   /* TODO: check i.MX image V1 handling, for now use 'old' style */
+   if (imximage_version == IMXIMAGE_V1)
+   alloc_len = 4096;
+   else
+   alloc_len = imximage_init_loadsize - imximage_ivt_offset;
+
+   if (alloc_len < sizeof(struct imx_header)) {
+   fprintf(stderr, "%s: header error\n",
+   params->cmdname);
+   exit(EXIT_FAILURE);
+   }
+
+   imxhdr = malloc(alloc_len);
+
+   if (!imxhdr) {
+   fprintf(stderr, "%s: malloc return failure: %s\n",
+   params->cmdname, strerror(errno));
+   exit(EXIT_FAILURE);
+   }
+
+   memset(imxhdr, 0, alloc_len);
+
+   tparams->header_size = alloc_len;
+   tparams->hdr = imxhdr;
+
+   /* determine data image file length */
+   dfd = open(datafile, O_RDONLY|O_BINARY);
+   if (dfd < 0) {
+   fprintf(stderr, "%s: Can't open %s: %s\n",
+   params->cmdname, datafile, strerror(errno));
+   exit(EXIT_FAILURE);
+   }
+
+   if (fstat(dfd, &sbuf) < 0) {
+   fprintf(stderr, "%s: Can't stat %s: %s\n",
+   params->cmdname, datafile, strerror(errno));
+   exit(EXIT_FAILURE);
+   }
+
+   pad_len = ROUND(sbuf.st_size, 4096) - sbuf.st_size;
+
+   close(dfd);
+
+   /* TODO: check i.MX image V1 handling, for now use 'old' style */
+   if (imximage_version == IMXIMAGE_V1)
+   return 0;
+   else
+   return pad_len;
+}
+
+
 /*
  * imximage parameters
  */
 static struct image_type_params imximage_params = {
.name   = "Freescale i.MX Boot Image support",
-   .header_size= sizeof(struct imx_header),
-   .hdr= (void *)&imximage_header,
+   .header_size= 0,
+   .hdr= NULL,
.check_image_type = imximage_check_image_types,
.verify_header  = imximage_verify_header,
.print_header   = imximage_print_header,
.set_header = imximage_set_header,
.check_params   = imximage_check_params,
+   .vrec_header= imximage_generate,
 };
 
 void init_imx_image_type(void)
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 7/7] imx: add status reporting for HAB status

2013-08-12 Thread Stefano Babic
Add functions to report the HAB (High Assurance Boot) status
of e.g. i.MX6 CPUs.

This is taken from

git://git.freescale.com/imx/uboot-imx.git branch imx_v2009.08_3.0.35_4.0.0
cpu/arm_cortexa8/mx6/generic.c
include/asm-arm/arch-mx6/mx6_secure.h

Signed-off-by: Stefano Babic 

---
Changes in v2:
- Fix errors when SECURE_BOOT is selected due to enum
- simplify display_event code (Marek Vasut)
- compile hab code only if SECURE_BOOT is set (Fabio Estevam)
- update licence with SPDX line according to new rules.

 arch/arm/cpu/armv7/mx6/Makefile  |7 +-
 arch/arm/cpu/armv7/mx6/hab.c |  104 ++
 arch/arm/include/asm/arch-mx6/hab.h  |   67 +++
 arch/arm/include/asm/arch-mx6/imx-regs.h |8 ++-
 4 files changed, 182 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/mx6/hab.c
 create mode 100644 arch/arm/include/asm/arch-mx6/hab.h

diff --git a/arch/arm/cpu/armv7/mx6/Makefile b/arch/arm/cpu/armv7/mx6/Makefile
index c5e9858..6d73617 100644
--- a/arch/arm/cpu/armv7/mx6/Makefile
+++ b/arch/arm/cpu/armv7/mx6/Makefile
@@ -11,10 +11,11 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).o
 
-COBJS  = soc.o clock.o
+COBJS-y= soc.o clock.o
+COBJS-$(CONFIG_SECURE_BOOT)+= hab.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
 
 all:   $(obj).depend $(LIB)
 
diff --git a/arch/arm/cpu/armv7/mx6/hab.c b/arch/arm/cpu/armv7/mx6/hab.c
new file mode 100644
index 000..5187775
--- /dev/null
+++ b/arch/arm/cpu/armv7/mx6/hab.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2010-2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+
+/*  start of HAB API updates */
+#define hab_rvt_report_event ((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT)
+#define hab_rvt_report_status ((hab_rvt_report_status_t 
*)HAB_RVT_REPORT_STATUS)
+#define hab_rvt_authenticate_image \
+   ((hab_rvt_authenticate_image_t *)HAB_RVT_AUTHENTICATE_IMAGE)
+#define hab_rvt_entry ((hab_rvt_entry_t *)HAB_RVT_ENTRY)
+#define hab_rvt_exit ((hab_rvt_exit_t *)HAB_RVT_EXIT)
+#define hab_rvt_clock_init HAB_RVT_CLOCK_INIT
+
+bool is_hab_enabled(void)
+{
+   struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
+   struct fuse_bank *bank = &ocotp->bank[0];
+   struct fuse_bank0_regs *fuse =
+   (struct fuse_bank0_regs *)bank->fuse_regs;
+   uint32_t reg = readl(&fuse->cfg5);
+
+   return (reg & 0x2) == 0x2;
+}
+
+void display_event(uint8_t *event_data, size_t bytes)
+{
+   uint32_t i;
+
+   if (!(event_data && bytes > 0))
+   return;
+
+   for (i = 0; i < bytes; i++) {
+   if (i == 0)
+   printf("\t0x%02x", event_data[i]);
+   else if ((i % 8) == 0)
+   printf("\n\t0x%02x", event_data[i]);
+   else
+   printf(" 0x%02x", event_data[i]);
+   }
+}
+
+int get_hab_status(void)
+{
+   uint32_t index = 0; /* Loop index */
+   uint8_t event_data[128]; /* Event data buffer */
+   size_t bytes = sizeof(event_data); /* Event size in bytes */
+   enum hab_config config = 0;
+   enum hab_state state = 0;
+
+   if (is_hab_enabled())
+   puts("\nSecure boot enabled\n");
+   else
+   puts("\nSecure boot disabled\n");
+
+   /* Check HAB status */
+   if (hab_rvt_report_status(&config, &state) != HAB_SUCCESS) {
+   printf("\nHAB Configuration: 0x%02x, HAB State: 0x%02x\n",
+  config, state);
+
+   /* Display HAB Error events */
+   while (hab_rvt_report_event(HAB_FAILURE, index, event_data,
+   &bytes) == HAB_SUCCESS) {
+   puts("\n");
+   printf("- HAB Event %d -\n",
+  index + 1);
+   puts("event data:\n");
+   display_event(event_data, bytes);
+   puts("\n");
+   bytes = sizeof(event_data);
+   index++;
+   }
+   }
+   /* Display message if no HAB events are found */
+   else {
+   printf("\nHAB Configuration: 0x%02x, HAB State: 0x%02x\n",
+  config, state);
+   puts("No HAB Events Found!\n\n");
+   }
+   return 0;
+}
+
+int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+   if ((argc != 1)) {
+   cmd_usage(cmdtp);
+   return 1;
+   }
+
+   get_hab_status();
+
+   return 0;
+}
+
+U_BOOT_CMD(
+   hab_status, CONFIG_SYS_MAXARGS, 1, do_hab_status,
+   "display HAB status",
+   ""
+  

[U-Boot] [PATCH v2 4/7] tools: add variable padding of data image in mkimage

2013-08-12 Thread Stefano Babic
Use previously unused return value of function vrec_header
to return a padding size to generic mkimage. This padding
size is used in copy_files to pad with zeros after copying
the data image.

Signed-off-by: Stefano Babic 
---
Changes in v2: None

 tools/mkimage.c |   24 +---
 tools/mkimage.h |5 -
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index b700b9e..58d25fa 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -137,6 +137,7 @@ main (int argc, char **argv)
char *ptr;
int retval = 0;
struct image_type_params *tparams = NULL;
+   int pad_len = 0;
 
/* Init Freescale PBL Boot image generation/list support */
init_pbl_image_type();
@@ -391,7 +392,7 @@ NXTARG: ;
 * allocate memory for the header itself.
 */
if (tparams->vrec_header)
-   tparams->vrec_header(¶ms, tparams);
+   pad_len = tparams->vrec_header(¶ms, tparams);
else
memset(tparams->hdr, 0, tparams->header_size);
 
@@ -463,7 +464,7 @@ NXTARG: ;
/* PBL has special Image format, implements its' own */
pbl_load_uboot(ifd, ¶ms);
} else {
-   copy_file (ifd, params.datafile, 0);
+   copy_file(ifd, params.datafile, pad_len);
}
}
 
@@ -537,10 +538,19 @@ copy_file (int ifd, const char *datafile, int pad)
unsigned char *ptr;
int tail;
int zero = 0;
+   uint8_t zeros[4096];
int offset = 0;
int size;
struct image_type_params *tparams = mkimage_get_type (params.type);
 
+   if (pad >= sizeof(zeros)) {
+   fprintf(stderr, "%s: Can't pad to %d\n",
+   params.cmdname, pad);
+   exit(EXIT_FAILURE);
+   }
+
+   memset(zeros, 0, sizeof(zeros));
+
if (params.vflag) {
fprintf (stderr, "Adding Image %s\n", datafile);
}
@@ -598,7 +608,8 @@ copy_file (int ifd, const char *datafile, int pad)
exit (EXIT_FAILURE);
}
 
-   if (pad && ((tail = size % 4) != 0)) {
+   tail = size % 4;
+   if ((pad == 1) && (tail != 0)) {
 
if (write(ifd, (char *)&zero, 4-tail) != 4-tail) {
fprintf (stderr, "%s: Write error on %s: %s\n",
@@ -606,6 +617,13 @@ copy_file (int ifd, const char *datafile, int pad)
strerror(errno));
exit (EXIT_FAILURE);
}
+   } else if (pad > 1) {
+   if (write(ifd, (char *)&zeros, pad) != pad) {
+   fprintf(stderr, "%s: Write error on %s: %s\n",
+   params.cmdname, params.imagefile,
+   strerror(errno));
+   exit(EXIT_FAILURE);
+   }
}
 
(void) munmap((void *)ptr, sbuf.st_size);
diff --git a/tools/mkimage.h b/tools/mkimage.h
index 950e190..ecb3032 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -132,7 +132,10 @@ struct image_type_params {
/*
 * This callback function will be executed for variable size record
 * It is expected to build this header in memory and return its length
-* and a pointer to it
+* and a pointer to it by using image_type_params.header_size and
+* image_type_params.hdr. The return value shall indicate if an
+* additional padding should be used when copying the data image
+* by returning the padding length.
 */
int (*vrec_header) (struct mkimage_params *,
struct image_type_params *);
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH] DFU: fix for raw data write

2013-08-12 Thread Lukasz Majewski
Hi Mateusz,


> When user attempted to perform a raw write using DFU (vide
> dfu_fill_entity_mmc) with MMC interface not initialized before,
> get_mmc_blk_size() reported invalid (zero) block size - it wasn't
> possible to write ie. a new u-boot image.
> 
> This commit fixes that by initializing device in get_mmc_blk_size()
> when needed.
> 
> Tested on Samsung Goni.
> 
> Signed-off-by: Mateusz Zalega 
> Signed-off-by: Kyungmin Park 
> Cc: Lukasz Majewski 
> Cc: Minkyu Kang 
> ---
>  drivers/dfu/dfu.c | 22 ++
>  drivers/dfu/dfu_mmc.c |  3 +++
>  include/dfu.h |  7 ++-
>  3 files changed, 27 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> index d73d510..6979112 100644
> --- a/drivers/dfu/dfu.c
> +++ b/drivers/dfu/dfu.c

The mmc (or any other medium) related code shall NOT be added to
generic dfu.c file.

> @@ -414,3 +414,25 @@ struct dfu_entity *dfu_get_entity(int alt)
>  
>   return NULL;
>  }
> +
> +int get_mmc_blk_size(int dev)
> +{
> + struct mmc *mmc = find_mmc_device(dev);
> +
> + if (mmc == NULL) {
> + error("Couldn't find MMC device no. %d.\n", dev);
> + return -ENODEV;
> + }
> + if (!mmc->has_init) {
> + if (!mmc_init(mmc)) {
> + if (!mmc->read_bl_len) {
> + error("invalid block length\n");
> + return -ENODEV;
> + }
> + } else {
> + error("Couldn't init MMC device.\n");
> + return -ENODEV;
> + }
> + }
> + return mmc->read_bl_len;
> +}

The above code fits better at dfu_mmc.c file. My proposition would be
to clean up the dfu_fill_entity_mmc() function and add the above code
there.


> diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
> index 0871a77..c776e26 100644
> --- a/drivers/dfu/dfu_mmc.c
> +++ b/drivers/dfu/dfu_mmc.c
> @@ -235,5 +235,8 @@ int dfu_fill_entity_mmc(struct dfu_entity *dfu,
> char *s) /* initial state */
>   dfu->inited = 0;
>  
> + /* better safe than sorry */
> + assert(dfu->data.mmc.lba_blk_size > 0);
> +
>   return 0;
>  }
> diff --git a/include/dfu.h b/include/dfu.h
> index 1d4006d..67ca711 100644
> --- a/include/dfu.h
> +++ b/include/dfu.h
> @@ -40,6 +40,8 @@ struct mmc_internal_data {
>   unsigned int part;
>  };
>  
> +int get_mmc_blk_size(int dev);
> +
>  struct nand_internal_data {
>   /* RAW programming */
>   u64 start;
> @@ -49,11 +51,6 @@ struct nand_internal_data {
>   unsigned int part;
>  };
>  
> -static inline unsigned int get_mmc_blk_size(int dev)
> -{
> - return find_mmc_device(dev)->read_bl_len;
> -}
> -
>  #define DFU_NAME_SIZE32
>  #define DFU_CMD_BUF_SIZE 128
>  #ifndef CONFIG_SYS_DFU_DATA_BUF_SIZE



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/4] arm, am33xx: add defines for gmii_sel_register bits

2013-08-12 Thread Tom Rini
On Wed, Jul 31, 2013 at 08:20:30AM +0200, Heiko Schocher wrote:
> Hello Mugunthan,
> 
> Am 30.07.2013 10:40, schrieb Mugunthan V N:
> >On 7/30/2013 1:23 PM, Heiko Schocher wrote:
> >>Signed-off-by: Heiko Schocher
> >>
> >>---
> >>- changes for v2:
> >>   defined all bits used in the gmii_sel register as
> >>   Tom Rini suggested
> >>- changes for v3:
> >>   rebased against u-boot-ti commit bb2a5d8f87fffb4fadfb205837decbd1b3e75f88
> >>---
> >>  arch/arm/include/asm/arch-am33xx/cpu.h | 21 +
> >>  board/isee/igep0033/board.c|  6 ++
> >>  board/phytec/pcm051/board.c|  2 --
> >>  board/ti/am335x/board.c|  6 +-
> >>  4 Dateien ge??ndert, 24 Zeilen hinzugef??gt(+), 11 Zeilen entfernt(-)
> >>
> >>diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h 
> >>b/arch/arm/include/asm/arch-am33xx/cpu.h
> >>index bcb4c50..945a09b 100644
> >>--- a/arch/arm/include/asm/arch-am33xx/cpu.h
> >>+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
> >>@@ -336,6 +336,27 @@ struct ctrl_dev {
> >>unsigned int resv4[4];
> >>unsigned int miisel;/* offset 0x50 */
> >>  };
> >>+
> >>+/* gmii_sel register defines */
> >>+#define GMII1_SEL_MII  0x0
> >>+#define GMII1_SEL_RMII 0x1
> >>+#define GMII1_SEL_RGMII0x2
> >>+#define GMII1_SEL_NOTUSED  0x3
> >NOTUSED not needed as it is not supposed to be used.
> 
> Maybe it is used to check, that is it not set?
> But I can remove it ...
> 
> >>+#define GMII2_SEL_MII  0x0
> >>+#define GMII2_SEL_RMII 0x4
> >>+#define GMII2_SEL_RGMII0x8
> >>+#define GMII2_SEL_NOTUSED  0xc
> >NOTUSED not needed as it is not supposed to be used.
> 
> same here ...

I think "Not Used" in the TRM here means "this port is not used" rather
than "this combination of bits is not to be used", so the changes are
correct.

-- 
Tom


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


Re: [U-Boot] Unified u-boot feature set for simpler distro support

2013-08-12 Thread Tom Rini
On Sat, Aug 10, 2013 at 04:07:08PM -0500, Dennis Gilmore wrote:
> On Fri, 09 Aug 2013 22:35:08 -0600
> Stephen Warren  wrote:
> 
> > On 08/09/2013 05:00 PM, Stephen Warren wrote:
> > > On 08/09/2013 04:49 PM, Wolfgang Denk wrote:
> > >> Dear Stephen Warren,
> > >>
> > >> In message <52056b16.7050...@wwwdotorg.org> you wrote:
> > >>>
> > >>> There's also the possibility of chain-loading e.g. Grub from
> > >>> U-Boot, which I think would satisfy at least some of your
> > >>> desires, although there would still be a need for U-Boot's
> > >>> bootcmd to know to modified to be able to load Grub, and also
> > >>> enable e.g. CONFIG_API, so still needs some U-Boot work.
> > >>
> > >> It appears boot time and increased complexity are no concern to
> > >> you?
> > > 
> > > I don't think this is any different than a BIOS booting grub on x86.
> > 
> > I suppose one way of addressing this might be for U-Boot to support
> > grub.cfg; either by integrating some code from the Grub project or a
> > re-implementation.
> > 
> > This ends up pretty similar to Dennis' original suggestion, but with
> > the advantage that that config file format is something already widely
> > generated by distros.
> 
> the extlinux.conf file is common and widely used, but just with
> syslinux and booting optical media.

This is why I'm suggesting that on the U-Boot side, we provide:
1) consistent variable names
2) Iterate over and load a file that the distro provides (and in the
process, ensure a few other consistent variables are named)

This means that whatever close-to-everything-else thing the distro uses
can be used again, be it GRUB2 or PXE/SYSLINUX or however-gummiboot
looks or whatever.  Distros aren't, and don't have to, agree on
one-bootloader-for-everyone so we can't provide one or the other or
both, because even if we provide both, we once again fall down when the
next next new thing comes out.

-- 
Tom


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


Re: [U-Boot] [PATCH] wandboard: add pxe support, set default boot command like highbank

2013-08-12 Thread Tom Rini
On Sat, Aug 10, 2013 at 03:50:45PM -0500, Dennis Gilmore wrote:
> On Thu, 8 Aug 2013 11:26:37 -0400
> Tom Rini  wrote:
> 
> > On Wed, Aug 07, 2013 at 06:04:23PM -0500, Dennis Gilmore wrote:
> > > On Wed, 7 Aug 2013 09:19:21 -0400
> > > Tom Rini  wrote:
> > > 
> > > > On Tue, Aug 06, 2013 at 06:11:25PM -0500, Dennis Gilmore wrote:
> > > > > On Tue, 6 Aug 2013 17:42:31 -0400
> > > > > Tom Rini  wrote:
> > > > > 
> > > > > > On Tue, Aug 06, 2013 at 11:22:22AM -0500, Dennis Gilmore
> > > > > > wrote:
> > [snip]
> > > > > > > kernel_addr_r
> > > > > > > ramdisk_addr_r
> > > > > > > pxefile_addr_r
> > > > > > > scr_addr_r
> > > > > > > uenv_addr_r
> > > > > > > 
> > > > > > > this should allow for for people to use boot.scr uEnv.txt or
> > > > > > > pxe/extlinux 
> > > > > > 
> > > > > > This is what I think we need to work towards.  A board opting
> > > > > > into this standard must set CONFIG_CMD_A/B/C (or maybe we add
> > > > > > a CONFIG_SUPPORT_GENERIC_LINUX_DISTRO that does this in one
> > > > > > of the fallback files, whatever) and provide the following
> > > > > > variables PLUS a, and this needs some thinking I think,
> > > > > > auto-boot tries to load said file from ... ?
> > > > > > 
> > > > > > We cannot provide a built-in environment that works for every
> > > > > > distro and case, we want the distro to tell us things it
> > > > > > knows, and we'll tell it what it can't easily know.
> > > > > 
> > > > > we absolutely can, I would like for u-boot to load a dtb before
> > > > > doing anything. u-boot should know what devices can be booted
> > > > > from and likely an order of preference. i.e. removable media
> > > > > through to fixed, and finally pxe. 
> > > > 
> > > > Looking at a couple of device trees, no, we can't.  I don't see
> > > > any useful information like "this is an SD controller" for
> > > > example (and all of the mmc bindings that might provide a
> > > > reliable clue are optional ones).  So, at the high level, if
> > > > U-Boot relied on DTs in every driver, we might be able to do what
> > > > you're talking about.  But we don't do that today, and probably
> > > > won't for a long time, if ever.
> > > > 
> > > > But we will know what devices are likely to exist and be
> > > > bootable, at build time.  What we can do is try and load a file
> > > > from everywhere we expect might be someplace with this file in
> > > > it.  We could even set some standard variables based on having
> > > > found and loaded this file, so it can assume that everything else
> > > > exists in this same place (or the file we have loaded knows
> > > > better).
> > > 
> > > I was thinking more along the lines of us knowing what is likely to
> > > be there than pulling it from the DT and basically doing something
> > > like you mentioned here.
> > 
> > Right.  For clarity, the problem is that DTs aren't useful like that.
> > They describe the hardware, but in non-generic terms.
> > 
> > > > > i would like for u-boot to first try to
> > > > > load /boot/extlinux/extlinux.conf then /extlinux/extlinux.conf 
> > > > > failing that try to load a /boot/uEnv.txt then /uEnv.txt and
> > > > > import that running with what is in it, then falling back to
> > > > > a /boot/boot.scr then /boot.scr then finally running dhcp, pxe
> > > > > get, and pxe boot.
> > > > 
> > > > I'd like to see most of that logic held in the file we load (so
> > > > that when something replaces extlinux.conf as the preferred
> > > > method, it just works still, or whatever) and run a command
> > > > from.  And fall back to dhcp+pxe for the install case.
> > > 
> > > where should the file we load come from? i would think when
> > > something comes along to replace extlinux.conf its likely going to
> > > need an updated u-boot to add some new functionality
> > 
> > I'd like to see the file come from the distro.  And given that another
> > option here is 'go'ing to a copy of GRUB, I think we've got at least a
> > good chance of future expansion being handled OK with this method.  We
> > try and load something from the distro that is generic, and make the
> > hand-off there.  (In the GRUB example, we just need to make sure we
> > have a standard name for the standalone app load address).
> 
> I really don't want to ship environment files. If we need to we need
> one of a few things. either u-boot needs to ship them and they are in
> a directory with a name matching the dtb, or we need to have a bunch of
> variables provided that enable us to load everything supported by the
> u-boot binaries.
> 
> We as distros have no business needing to deal with memory locations.
> it really is one of the biggest pain points with u-boot.

Don't think of them as environment files then.  Think of them like the
glue you need to spit out on x86 to get your stuff loaded, like with any
other loader.  And yes, I agree, we'll provide consistent variables that
you can rely on, well, like we do today for the whole PXE menu thing to
work.  But you're putting more of a con

[U-Boot] [PULL] : Please pull u-boot-imx

2013-08-12 Thread Stefano Babic
Hi Albert,

please pull from u-boot-imx, thanks.

The following changes since commit fdce7b633a1de24456226b18527cc7900c34282a:

  gpio: omap5-uevm: Configure the tca6424 gpio expander (2013-07-30
09:21:42 -0400)

are available in the git repository at:

  git://www.denx.de/git/u-boot-imx.git master

for you to fetch changes up to 326ea986ac150acdc7656d57fca647db80b50158:

  Merge git://git.denx.de/u-boot-arm (2013-07-31 11:30:38 +0200)



Dirk Behme (1):
  mxc_gpio: Correct the GPIO handling in gpio_direction_output()

Eric Nelson (1):
  mxc_ipuv3: fix memory alignment of framebuffer

Fabio Estevam (1):
  mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

Marek Vasut (1):
  ARM: mxs: Consolidate configuration options

Otavio Salvador (1):
  wandboard: Use splash image at screen center by default

Pardeep Kumar Singla (2):
  mx6: Factor out common HDMI setup code
  mx6qsabresd: Add splash screen support via HDMI

Robert Winkler (2):
  imx: Add documentation for imx specific commands
  imx: nitrogen6x: mx6qsabrelite: Add support for DVI monitors

Stefano Babic (1):
  Merge git://git.denx.de/u-boot-arm

 MAINTAINERS|2 +-
 README |   15 +
 arch/arm/cpu/armv7/mx6/clock.c |8 +
 arch/arm/cpu/armv7/mx6/soc.c   |   43 +
 arch/arm/imx-common/cmd_hdmidet.c  |3 +-
 arch/arm/include/asm/arch-mx6/clock.h  |2 +-
 arch/arm/include/asm/arch-mx6/mxc_hdmi.h   |8 +
 .../nitrogen6x/README.mx6qsabrelite}   |0
 board/boundary/nitrogen6x/nitrogen6x.c |   46 +-
 board/freescale/mx6qsabrelite/Makefile |   28 -
 board/freescale/mx6qsabrelite/mx6qsabrelite.c  |  832

 board/freescale/mx6sabresd/mx6sabresd.c|   64 +-
 board/wandboard/wandboard.c|   44 +-
 boards.cfg |2 +-
 drivers/gpio/mxc_gpio.c|4 +-
 drivers/video/mxc_ipuv3_fb.c   |5 +-
 include/configs/apx4devkit.h   |  120 +--
 include/configs/m28evk.h   |  192 +
 include/configs/mx23_olinuxino.h   |  142 +---
 include/configs/mx23evk.h  |  115 +--
 include/configs/mx28evk.h  |  173 +---
 include/configs/mx6qsabrelite.h|  284 ---
 include/configs/mx6sabre_common.h  |3 +-
 include/configs/mx6sabresd.h   |   19 +
 include/configs/mxs.h  |  191 +
 include/configs/nitrogen6x.h   |   81 +-
 include/configs/sc_sps_1.h |  139 +---
 include/configs/wandboard.h|2 +
 28 files changed, 601 insertions(+), 1966 deletions(-)
 rename board/{freescale/mx6qsabrelite/README =>
boundary/nitrogen6x/README.mx6qsabrelite} (100%)
 delete mode 100644 board/freescale/mx6qsabrelite/Makefile
 delete mode 100644 board/freescale/mx6qsabrelite/mx6qsabrelite.c
 delete mode 100644 include/configs/mx6qsabrelite.h
 create mode 100644 include/configs/mxs.h


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE

2013-08-12 Thread Tom Rini
On Sun, Aug 11, 2013 at 02:15:03PM +, Bo Shen wrote:

> when CONFIG_ENV_IS_NOWHERE is enabled, it is still need to define
> CONFIG_ENV_SIZE. So, add a default size (1024 Bytes) to avoid
> compile error if not define CONFIG_ENV_SIZE

The problem is that ENV_SIZE is also a limiting factor on how big the
run-time copy of the environment may be, not just how much space we use
when writing to a backing store, so NAK.

-- 
Tom


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


Re: [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE

2013-08-12 Thread Wolfgang Denk
Dear Bo Shen,

In message <5208de04.1000...@gmail.com> you wrote:
> 
> At first glance of CONFIG_ENV_IS_NOWHERE, I think no need to define the 
> CONFIG_ENV_SIZE, actually, it needs to define the CONFIG_ENV_SIZE. So, I 
> think add a default value will be better (Maybe another choice to add a 
> description in README file to specify how to use CONFIG_ENV_IS_NOWHERE).

I cannot see in which way the required environment size in this case
is different from all other cases.  To me, a default size makes little
sense - it is just a chance to miss setting a suitable value, so it
bites you later (at run time) instead of earlyin development.

> > In any cse, the needed environment seize if a pretty board specific
> > thing, and I think it makes sense to let the user define it.
> 
> Yes, the environment size is a pretty board specific thing. So, in this 
> patch, there is an option for user to define it.

I think the user should always set this to a useful (for him) value.
For example, you think 1 KiB is a useful size, I would think it is too
small. Ask two other people, and you will hear three other different
numbers.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Motto of the Electrical Engineer: Working computer hardware is a  lot
like an erect penis: it stays up as long as you don't fuck with it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE

2013-08-12 Thread Bo Shen

Hi Wolfgang Denk,

On 8/11/2013 10:50 PM, Wolfgang Denk wrote:

Dear Bo Shen,

In message <1376230503-25331-1-git-send-email-voice.s...@gmail.com> you wrote:

when CONFIG_ENV_IS_NOWHERE is enabled, it is still need to define
CONFIG_ENV_SIZE. So, add a default size (1024 Bytes) to avoid
compile error if not define CONFIG_ENV_SIZE


I don;t understand the rationale for this patch.  In which way is the
environment seize for the CONFIG_ENV_IS_NOWHERE case different from
any other cases?  For these, we do not define a default either, so why
should we handle this case differently?


In my opinion, there is a little different. The CONFIG_ENV_IS_NOWHERE 
case only store environment in volatile memory (e.g. DDR SDRAM) while 
not store in non-volatile device.


At first glance of CONFIG_ENV_IS_NOWHERE, I think no need to define the 
CONFIG_ENV_SIZE, actually, it needs to define the CONFIG_ENV_SIZE. So, I 
think add a default value will be better (Maybe another choice to add a 
description in README file to specify how to use CONFIG_ENV_IS_NOWHERE).



In any cse, the needed environment seize if a pretty board specific
thing, and I think it makes sense to let the user define it.


Yes, the environment size is a pretty board specific thing. So, in this 
patch, there is an option for user to define it.



Best regards,

Wolfgang Denk



Best Regards,
Bo Shen
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [ANN] v2013.10-rc1 _soon_

2013-08-12 Thread Tom Rini
Hey all,

As the merge window closed this past weekend, I would like to encourage
all Custodians to get pull requests together of what's out there now,
and clean and ready to go.  I would like to tag -rc1 on the 19th, then
another rc every other Monday, releasing on the 14th of October as
scheduled on http://www.denx.de/wiki/U-Boot/ReleaseCycle

Thanks in advance all!

-- 
Tom


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


[U-Boot] [U-boot] XCOBJS concept in common/Makefile

2013-08-12 Thread TigerLiu
Hi, experts:

I found XCOBJS/XCOBJS-y syntax in common/Makefile.

So why not use COBJS syntax?

Is there some tricky concept?

 

Best wishes,

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


[U-Boot] [PATCH] mii: dump: parameter choice

2013-08-12 Thread Stephan Bauroth
Hi all,

since no one commented on my prior mail, i just took the liberty to write 
a little patch that chooses regs 0-5 if none are specified for 'mii dump'. 
Also fixes some alignment issues, typos and introduces the 'Selector 
Field' to the register description of PHY regs 4 and 5. On top, 'mii dump' 
now prints the PHY address in front of a register dump.

this is my first patch, if anything is wrong, plese tell me :)

diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index d3dd6b1..1856c5b 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -78,9 +78,9 @@ static const MII_field_desc_t reg_3_desc_tbl[] = {
 
 static const MII_field_desc_t reg_4_desc_tbl[] = {
{ 15, 15, 0x01, "next page able"   },
-   { 14, 14, 0x01, "reserved" },
+   { 14, 14, 0x01, "(reserved)"   },
{ 13, 13, 0x01, "remote fault" },
-   { 12, 12, 0x01, "reserved" },
+   { 12, 12, 0x01, "(reserved)"   },
{ 11, 11, 0x01, "asymmetric pause" },
{ 10, 10, 0x01, "pause enable" },
{  9,  9, 0x01, "100BASE-T4 able"  },
@@ -88,7 +88,7 @@ static const MII_field_desc_t reg_4_desc_tbl[] = {
{  7,  7, 0x01, "100BASE-TX able"  },
{  6,  6, 0x01, "10BASE-T   full duplex able"  },
{  5,  5, 0x01, "10BASE-T   able"  },
-   {  4,  0, 0x1f, "xxx to do"},
+   {  4,  0, 0x1f, "Selector Field"   },
 };
 
 static const MII_field_desc_t reg_5_desc_tbl[] = {
@@ -103,7 +103,7 @@ static const MII_field_desc_t reg_5_desc_tbl[] = {
{  7,  7, 0x01, "100BASE-TX able"  },
{  6,  6, 0x01, "10BASE-T full duplex able"},
{  5,  5, 0x01, "10BASE-T able"},
-   {  4,  0, 0x1f, "xxx to do"},
+   {  4,  0, 0x1f, "Selctor Field"},
 };
 typedef struct _MII_field_desc_and_len_t {
const MII_field_desc_t *pdesc;
@@ -130,6 +130,7 @@ static int special_field(
ushort regval);
 
 static void MII_dump_0_to_5(
+   unsigned char addr,
ushort regvals[6],
uchar reglo,
uchar reghi)
@@ -138,6 +139,7 @@ static void MII_dump_0_to_5(
 
for (i = 0; i < 6; i++) {
if ((reglo <= i) && (i <= reghi))
+   printf("%02x.", addr);
dump_reg(regvals[i], ®_0_5_desc_tbl[i],
&desc_and_len_tbl[i]);
}
@@ -218,7 +220,7 @@ static int special_field(
 
else if ((regno == MII_ADVERTISE) && (pdesc->lo == 0)) {
ushort sel_bits = (regval >> pdesc->lo) & pdesc->mask;
-   printf("%2u-%2u = %5uselector = %s",
+   printf("%2u-%2u = %5uSelector Field = %s",
pdesc->hi, pdesc->lo, sel_bits,
sel_bits == PHY_ANLPAR_PSB_802_3 ?
"IEEE 802.3" :
@@ -230,7 +232,7 @@ static int special_field(
 
else if ((regno == MII_LPA) && (pdesc->lo == 0)) {
ushort sel_bits = (regval >> pdesc->lo) & pdesc->mask;
-   printf("%2u-%2u = %uselector = %s",
+   printf("%2u-%2u = %5uSelector Field = %s",
pdesc->hi, pdesc->lo, sel_bits,
sel_bits == PHY_ANLPAR_PSB_802_3 ?
"IEEE 802.3" :
@@ -384,6 +386,10 @@ static int do_mii(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[])
"standard MII registers, 0-5.\n");
return 1;
}
+   if (argc < 4){  /* no reg-range given -> dump 0 to 5 */
+   reglo = 0;
+   reghi = 5;
+   }
for (addr = addrlo; addr <= addrhi; addr++) {
for (reg = reglo; reg < reghi + 1; reg++) {
if (miiphy_read(devname, addr, reg, 
®s[reg]) != 0) {
@@ -394,8 +400,9 @@ static int do_mii(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[])
rcode = 1;
}
}
-   if (ok)
-   MII_dump_0_to_5(regs, reglo, reghi);
+   if (ok) {
+   MII_dump_0_to_5(addr, regs, reglo, reghi);
+   }
printf("\n");
}
} else if (strncmp(op, "de", 2) == 0) { ___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC 01/10] New board-specific USB initialization interface

2013-08-12 Thread Mateusz Zalega
On 08/11/13 20:04, Marek Vasut wrote:
>> +/* You can initialize platform's USB host, device or both
>> + * capabilities by passing this enum as an argument to
>> + * board_usb_init().
>> + */
> 
> The comment style is wrong, please fix. Did the patchset pass checkpatch ?
> 
> /*
>  * multi
>  * line
>  * comment
>  */

Yes, it did:

---8<---
$ ./tools/checkpatch.pl
0001-New-board-specific-USB-initialization-interface.patch
total: 0 errors, 0 warnings, 0 checks, 154 lines checked

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE
USLEEP_RANGE

0001-New-board-specific-USB-initialization-interface.patch has no
obvious style problems and is ready for submission.
--->8---

NETWORKING_BLOCK_COMMENT_STYLE - ...and, in our case, this option is the
culprit. Will fix.

Thanks,

-- 
Mateusz Zalega
Samsung R&D Institute Poland (SRPOL) | Kernel and System Framework group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] Add NanoBone board support

2013-08-12 Thread Mark Jackson
On 11/08/13 19:34, Tom Rini wrote:
> On Sun, Aug 11, 2013 at 09:31:00AM +0100, Mark Jackson wrote:
> 
>> On 22/04/13 13:46, Mark Jackson wrote:
>>> NanoBone Specification:
>>> ---
>>> CPU:
>>>   TI AM335x
>>>
>>> Memory:
>>>   256MB DDR3
>>>   64MB NOR flash
>>>   256MB NAND flash
>>>   128KB FRAM
>>>
>>> Ethernet:
>>>   2 x 10/100 connected to SMSC LAN8710 PHY
>>>
>>> USB:
>>>   1 x USB2.0 Type A
>>>
>>> I2C:
>>>   2Kbit EEPROM (Microchip 24AA02)
>>>   RTC (Maxim DS1338)
>>>   GPIO Expander (Microchip MCP23017)
>>>
>>> Expansion connector:
>>>   6 x UART
>>>   1 x MMC/SD
>>>   1 x USB2.0
>>>
>>> Signed-off-by: Mark Jackson 
>>> ---
>>> Changes in v2:
>>> - Tweaked after comments from Tom Rini
>>>
>>>  MAINTAINERS |4 +
>>>  board/newflow/nanobone/Makefile |   46 ++
>>>  board/newflow/nanobone/board.c  |  304
>>> +++
>>>  board/newflow/nanobone/board.h  |   24 
>>>  board/newflow/nanobone/mux.c|  203 ++
>>>  boards.cfg  |1 +
>>>  include/configs/nanobone.h  |  285 
>>>  7 files changed, 867 insertions(+)
>>>  create mode 100644 board/newflow/nanobone/Makefile
>>>  create mode 100644 board/newflow/nanobone/board.c
>>>  create mode 100644 board/newflow/nanobone/board.h
>>>  create mode 100644 board/newflow/nanobone/mux.c
>>>  create mode 100644 include/configs/nanobone.h
>>
>> Any chance this board can be added ?
> 
> I guess the email asking for you to re-send got lost, the copy in
> patchwork appears to be whitespace corrupted.  Since you need to re-send
> anyhow (sorry) please update to use the SPDX tags now, thanks.

Hmmm ... nope, never got that one !!

I'll repost an updated patch.

Cheers

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


Re: [U-Boot] [RESEND PATCH v2 00/20] sf: Add common probe support

2013-08-12 Thread Jagan Teki

Hi Sascha,

Thanks for testing master-test branch.

On 11-08-2013 20:20, Sascha Silbe wrote:

Hello Jagan,

Jagan Teki  writes:


Please find the test branch for this patch series, here.
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/master-test

Request to test these changes on your boards.
Let me know for any issues.


Thanks for setting up a branch for easier testing. I've rebased the
CuBox support patch series [1] on top of your branch and tested the
result. SPI flash support worked before on CuBox, but fails with your
branch.

At build time, the following warnings are issued (found using
DBGFLAGS="-g -Werror"):

make[1]: Entering directory `/lhome/sascha.silbe/src/u-boot/common'
arm-linux-gnueabi-gcc  -g -Werror -Os   -ffunction-sections -fdata-sections 
-fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ 
-DCONFIG_SYS_TEXT_BASE=0x0060 -I/lhome/sascha.silbe/src/u-boot/include 
-fno-builtin -ffreestanding -nostdinc -isystem 
/usr/lib/gcc/arm-linux-gnueabi/4.7/include -pipe  -DCONFIG_ARM -D__ARM__ -marm 
-mno-thumb-interwork -mabi=aapcs-linux -march=armv7-a -Wall -Wstrict-prototypes 
-fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage  
   -o cmd_sf.o cmd_sf.c -c
In file included from cmd_sf.c:11:0:
/lhome/sascha.silbe/src/u-boot/include/spi_flash.h:37:12: error: 
‘spi_write_cmds_array’ defined but not used [-Werror=unused-variable]
/lhome/sascha.silbe/src/u-boot/include/spi_flash.h:56:12: error: 
‘spi_read_cmds_array’ defined but not used [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[1]: *** [cmd_sf.o] Error 1


Yes, i will fix this, please use -Wunused-variable as of now for testing
to make build successful.




At run time, automatically reading the environment from SPI flash
fails. "sf probe" and "sf read" both appear to work, but "sf probe"
reports 64KiB page size and "sf read" only yields 0xff rather than the
U-Boot binary that's at the start of SPI flash:

=== Begin ===
U-Boot 2013.07-00163-g753bc19 (Aug 11 2013 - 12:13:01)SolidRun CuBox

SoC:   Dove 88AP510 (A1)
CPU:   Marvell Sheeva (rev 5)
DRAM:  2 GiB
MMC:   Dove SDHCI0: 0
*** Warning - spi_flash_probe() failed, using default environment

Why this is got failed while env reading and again succeeded in below
u-boot prompt?



In:serial
Out:   serial
Err:   serial
Net:   egiga0 Waiting for PHY auto negotiation to complete done
egiga0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
CuBox> sf probe
SF: Detected W25Q32BV with page size 64 KiB, total 4 MiB
CuBox> sf read ${loadaddr} 0 0x2
SF: 131072 bytes @ 0x0 Read: OK
CuBox> md.b ${loadaddr}
0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0210: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0220: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0230: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
=== End ===


Do you have any changes on ur controller driver w.r.t to working
scenario in below log on master.?

I will work directly, as no changes of spi_flash_ops.
Can you try to write some thing and read it back.

--
Thanks,
Jagan.





For comparison, this is what it looks like on top of current master:

=== Begin ===
U-Boot 2013.07-00123-gde877d3 (Aug 11 2013 - 13:39:44)SolidRun CuBox

SoC:   Dove 88AP510 (A1)
CPU:   Marvell Sheeva (rev 5)
DRAM:  2 GiB
MMC:   Dove SDHCI0: 0
SF: Detected W25Q32BV/W25Q32FV_SPI with page size 4 KiB, total 4 MiB
In:serial
Out:   serial
Err:   serial
Net:   egiga0 Waiting for PHY auto negotiation to complete... done
egiga0
Hit any key to stop autoboot:  0
CuBox> sf probe
SF: Detected W25Q32BV/W25Q32FV_SPI with page size 4 KiB, total 4 MiB
CuBox> sf read ${loadaddr} 0 0x2
SF: 131072 bytes @ 0x0 Read: OK
CuBox> md.b ${loadaddr}
0200: 5a 00 00 00 54 67 04 00 00 00 00 00 00 02 00 00Z...Tg..
0210: 00 00 60 00 00 00 60 00 00 00 00 00 00 00 01 dc..`...`.
0220: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00@...
0230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CuBox>
=== End ===


Is there something that needs to be done differently now? Some
additional function to call in board setup code or defines to set in the
board configuration?

Sascha

[1] mid:1372195668-25496-1-git-send-email-t-ub...@infra-silbe.de
 http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/148412/focus=164287




--
Thanks,
Jagan.


This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx

[U-Boot] Pull request - arm/zynq v2

2013-08-12 Thread Michal Simek
Hi Albert,

please pull these 3 zynq patches to your arm tree.

There is still pending the arm: lds: Remove libgcc eabi exception handling 
tables
patch. Have you considered to also add it?

v2:
- Changed email address,
- There was incorrect rebase which I have fixed - correct sha1 now

Thanks.
Michal


The following changes since commit a78dac79ede7fbb4c9e816abc879655540c3f076:

  nds32: fix the missing COBJS-y change (2013-08-09 01:51:24 +0800)

are available in the git repository at:

  git://www.denx.de/git/u-boot-microblaze.git zynq

for you to fetch changes up to 2d83d33a51926d6471eb9282d03d83783850d565:

  zynq: Enable axi ethernet and emaclite driver initialization (2013-08-12 
08:59:56 +0200)


Michal Simek (3):
  zynq: Add new ddrc driver for ECC support
  zynq: slcr: Wait 100ms till clk is properly setup
  zynq: Enable axi ethernet and emaclite driver initialization

 arch/arm/cpu/armv7/zynq/Makefile   |  1 +
 arch/arm/cpu/armv7/zynq/ddrc.c | 50 ++
 arch/arm/cpu/armv7/zynq/slcr.c |  2 +-
 arch/arm/include/asm/arch-zynq/hardware.h  |  8 +
 arch/arm/include/asm/arch-zynq/sys_proto.h |  1 +
 board/xilinx/zynq/board.c  | 19 
 6 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/zynq/ddrc.c

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Pull request - arm/zynq

2013-08-12 Thread Michal Simek
Hi Albert,

please pull these 3 zynq patches to your arm tree.

There is still pending the arm: lds: Remove libgcc eabi exception handling 
tables
patch. Have you considered to also add it?

Thanks.
Michal

The following changes since commit c85c7faf476a3f77389f71d898ced6a326a8c691:

  nds32: fix the missing COBJS-y change (2013-08-12 07:55:48 +0200)

are available in the git repository at:

  git://www.denx.de/git/u-boot-microblaze.git zynq

for you to fetch changes up to 7264e506bdc529c142b4377e4e7c8f8fdc1b1230:

  zynq: Enable axi ethernet and emaclite driver initialization (2013-08-12 
07:56:23 +0200)


Michal Simek (3):
  zynq: Add new ddrc driver for ECC support
  zynq: slcr: Wait 100ms till clk is properly setup
  zynq: Enable axi ethernet and emaclite driver initialization

 arch/arm/cpu/armv7/zynq/Makefile   |  1 +
 arch/arm/cpu/armv7/zynq/ddrc.c | 50 ++
 arch/arm/cpu/armv7/zynq/slcr.c |  2 +-
 arch/arm/include/asm/arch-zynq/hardware.h  |  8 +
 arch/arm/include/asm/arch-zynq/sys_proto.h |  1 +
 board/xilinx/zynq/board.c  | 19 
 6 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/zynq/ddrc.c


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


[U-Boot] [U-boot] DFU and android fast boot

2013-08-12 Thread TigerLiu
Hi, experts:

DFU tool is for updating U-boot firmware.

So, Android fast boot protocol also includes this functionality.

So, when to use DFU tool?

(User usually uses android fast boot functionality to update U-boot
firmware)

 

Best wishes,

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