Re: [U-Boot] [PATCH 2/3] configs: zynq: Add config support for ZYBO

2014-08-29 Thread Peter Crosthwaite
On Fri, Aug 29, 2014 at 4:41 PM, Steve Wang  wrote:
> Hi, Peter,
>
> In ZYBO, there is an on-board eeprom that contains a unique MAC address for
> each board.
> In FSBL (before u-boot), the MAC address is read out from EEPROM and write
> to the corresponding registers in ETH controller.
> So, in u-boot env, mac-skip should be defined so that it will not over-write
> the unique MAC address.
>

Is this condition auto-detectable? If an earlier boot stage has set
the MAC address that should be visible to the driver. Then the env is
given the concept of a "weak" mac address - one that is set if the
hardware is not initialised already.

This EEPROM MAC pre-init concept is also applicable to other Zynq
boards that contain EEPROM such as 70x so I think its more general
than ZYBO.

> So, I wonder if it should be done in dts file or there is other ways to do
> that.
>

DTS might work, is it a "chosen" perhaps? If the value is absent, then
u-boot will do nothing and assume other boot stages will do MAC addr
init.

Regards,
Peter

> Thanks indeed!
> Regards,
> Steve
>
>
> -Peter Crosthwaite  wrote: -
> To: u-boot@lists.denx.de
> From: Peter Crosthwaite 
> Date: 08/28/2014 04:16AM
> Cc: mich...@xilinx.com, steven.w...@digilentinc.com
> Subject: [PATCH 2/3] configs: zynq: Add config support for ZYBO
>
>
> From: Tinghui Wang 
>
> This patch adds config support needed for ZYBO target and has
> been tested on Rev. B ZYBO hardware.
>
> Signed-off-by: Tinghui Wang 
> [PC changes:
>  * Dropped boards.cfg change (rebase conflict)
>  * Dropped custom u-boot env
>  * Added DTS
>  * Misc forward-porting changes
> ]
> Signed-off-by: Peter Crosthwiate 
>
> ---
> I have dropped the custom u-boot env from the original patch,
> as I'm not sure what the purpose was and I didn't need it for ZYBO SPL.
> ---
>  include/configs/zynq_zybo.h | 31 +++
>  1 file changed, 31 insertions(+)
>  create mode 100644 include/configs/zynq_zybo.h
>
> diff --git a/include/configs/zynq_zybo.h b/include/configs/zynq_zybo.h
> new file mode 100644
> index 000..c167207
> --- /dev/null
> +++ b/include/configs/zynq_zybo.h
> @@ -0,0 +1,31 @@
> +/*
> + * (C) Copyright 2012 Xilinx
> + * (C) Copyright 2014 Digilent Inc.
> + *
> + * Configuration for Zynq Development Board - ZYBO
> + * See zynq_common.h for Zynq common configs
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#ifndef __CONFIG_ZYNQ_ZYBO_H
> +#define __CONFIG_ZYNQ_ZYBO_H
> +
> +#define CONFIG_SYS_SDRAM_SIZE (512 * 1024 * 1024)
> +
> +#define CONFIG_ZYNQ_SERIAL_UART1
> +#define CONFIG_ZYNQ_GEM0
> +#define CONFIG_ZYNQ_GEM_PHY_ADDR0 0
> +
> +#define CONFIG_SYS_NO_FLASH
> +
> +#define CONFIG_ZYNQ_SDHCI0
> +#define CONFIG_ZYNQ_BOOT_FREEBSD
> +#define CONFIG_DEFAULT_DEVICE_TREE zynq-zybo
> +
> +/* Define ZYBO PS Clock Frequency to 50MHz */
> +#define CONFIG_ZYNQ_PS_CLK_FREQ 5000UL
> +
> +#include 
> +
> +#endif /* __CONFIG_ZYNQ_ZYBO_H */
> --
> 1.9.1
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/3] ARM: Zynq: Add ZYBO board

2014-08-29 Thread Peter Crosthwaite
On Fri, Aug 29, 2014 at 9:07 PM, Michal Simek  wrote:
> On 08/28/2014 01:16 PM, Peter Crosthwaite wrote:
>> Hi Michal, Steven,
>>
>> This series adds the ZYBO board to u-boot. Some components were originally
>> contributed to the digilent u-boot tree (P2). Thanks to Steven Wang. The
>> original code had a custom u-boot env specific for Zybo but I have dropped
>> that. I have added DTS support - which in general seems to have appeared in
>> u-boot since the original digilent work (P1). The new configury is P3.
>>
>> Regards,
>> Peter
>>
>> Peter Crosthwaite (2):
>>   arm: dts: zynq: Add digilent ZYBO board dts
>>   kconfig: zynq: Add ZYBO board
>>
>> Tinghui Wang (1):
>>   configs: zynq: Add config support for ZYBO
>>
>>  arch/arm/Kconfig|  3 +++
>>  arch/arm/dts/Makefile   |  1 +
>>  arch/arm/dts/zynq-zybo.dts  | 23 +++
>>  board/xilinx/zynq/Kconfig   | 24 
>>  configs/zynq_zybo_defconfig |  3 +++
>>  include/configs/zynq_zybo.h | 31 +++
>>  6 files changed, 85 insertions(+)
>>  create mode 100644 arch/arm/dts/zynq-zybo.dts
>>  create mode 100644 configs/zynq_zybo_defconfig
>>  create mode 100644 include/configs/zynq_zybo.h
>>
>
> Applied all with that small fix in 2/3 reported by Jagan.

Thanks,

Regards,
Peter

> I have also tested it on real HW.
>
> Thanks,
> Michal
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/3] stv0991 : Add basic stv0991 architecture support.

2014-08-29 Thread Vikas Manocha
stv0991 architecture support added. It contains the support for
following blocks
- Timer
- uart

Signed-off-by: Vikas Manocha 
---

Changes in v2:
- corrected files license to GPL-2.0+
- replaced printf() usage with puts() for string print
- sorted sourcing of board Kconfig

 arch/arm/Kconfig   |4 +
 arch/arm/cpu/armv7/stv0991/Makefile|9 ++
 arch/arm/cpu/armv7/stv0991/clock.c |   27 +
 arch/arm/cpu/armv7/stv0991/lowlevel.S  |   12 +++
 arch/arm/cpu/armv7/stv0991/pinmux.c|   48 +
 arch/arm/cpu/armv7/stv0991/reset.c |   26 +
 arch/arm/cpu/armv7/stv0991/timer.c |  114 
 arch/arm/include/asm/arch-stv0991/hardware.h   |   73 +
 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h|   80 ++
 arch/arm/include/asm/arch-stv0991/stv0991_creg.h   |   82 ++
 arch/arm/include/asm/arch-stv0991/stv0991_defs.h   |   16 +++
 arch/arm/include/asm/arch-stv0991/stv0991_gpt.h|   43 
 arch/arm/include/asm/arch-stv0991/stv0991_periph.h |   43 
 arch/arm/include/asm/arch-stv0991/stv0991_wdru.h   |   28 +
 board/st/stv0991/Kconfig   |   23 
 board/st/stv0991/Makefile  |8 ++
 board/st/stv0991/stv0991.c |   54 ++
 configs/stv0991_defconfig  |3 +
 include/configs/stv0991.h  |   58 ++
 19 files changed, 751 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/stv0991/Makefile
 create mode 100644 arch/arm/cpu/armv7/stv0991/clock.c
 create mode 100644 arch/arm/cpu/armv7/stv0991/lowlevel.S
 create mode 100644 arch/arm/cpu/armv7/stv0991/pinmux.c
 create mode 100644 arch/arm/cpu/armv7/stv0991/reset.c
 create mode 100644 arch/arm/cpu/armv7/stv0991/timer.c
 create mode 100644 arch/arm/include/asm/arch-stv0991/hardware.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_creg.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_defs.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_periph.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
 create mode 100644 board/st/stv0991/Kconfig
 create mode 100644 board/st/stv0991/Makefile
 create mode 100644 board/st/stv0991/stv0991.c
 create mode 100644 configs/stv0991_defconfig
 create mode 100644 include/configs/stv0991.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e385eda..81656c3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -305,6 +305,9 @@ config TARGET_SPEAR310
 config TARGET_SPEAR320
bool "Support spear320"
 
+config TARGET_STV0991
+   bool "Support stv0991"
+
 config TARGET_SPEAR600
bool "Support spear600"
 
@@ -963,6 +966,7 @@ source "board/spear/x600/Kconfig"
 source "board/st-ericsson/snowball/Kconfig"
 source "board/st-ericsson/u8500/Kconfig"
 source "board/st/nhk8815/Kconfig"
+source "board/st/stv0991/Kconfig"
 source "board/sunxi/Kconfig"
 source "board/syteco/jadecpu/Kconfig"
 source "board/syteco/zmx25/Kconfig"
diff --git a/arch/arm/cpu/armv7/stv0991/Makefile 
b/arch/arm/cpu/armv7/stv0991/Makefile
new file mode 100644
index 000..95641d3
--- /dev/null
+++ b/arch/arm/cpu/armv7/stv0991/Makefile
@@ -0,0 +1,9 @@
+#
+# (C) Copyright 2014
+# Vikas Manocha, ST Microelectronics, vikas.manocha@stcom
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := timer.o clock.o pinmux.o reset.o
+obj-y  += lowlevel.o
diff --git a/arch/arm/cpu/armv7/stv0991/clock.c 
b/arch/arm/cpu/armv7/stv0991/clock.c
new file mode 100644
index 000..aca6aba
--- /dev/null
+++ b/arch/arm/cpu/armv7/stv0991/clock.c
@@ -0,0 +1,27 @@
+/*
+ * (C) Copyright 2014
+ * Vikas Manocha, ST Micoelectronics, vikas.mano...@st.com.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include
+
+static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
+   (struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
+
+void clock_setup(int peripheral)
+{
+   switch (peripheral) {
+   case UART_CLOCK_CFG:
+   writel(UART_CLK_CFG, &stv0991_cgu_regs->uart_freq);
+   break;
+   case ETH_CLOCK_CFG:
+   break;
+   default:
+   break;
+   }
+}
diff --git a/arch/arm/cpu/armv7/stv0991/lowlevel.S 
b/arch/arm/cpu/armv7/stv0991/lowlevel.S
new file mode 100644
index 000..6dafba3
--- /dev/null
+++ b/arch/arm/cpu/armv7/stv0991/lowlevel.S
@@ -0,0 +1,12 @@
+/*
+ * (C) Copyright 2014 stmicroelectronics
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+
+ENTRY(lowlevel_init)
+   mov pc, lr
+ENDPROC(lowlevel_init)
diff --git a/arch/arm/cpu/armv7/stv0991/pinmux.c 
b/arch/arm/cpu/armv7/stv0991/pinmux

[U-Boot] [PATCH v2 3/3] stv0991: default + misc command configs enabled.

2014-08-29 Thread Vikas Manocha
Signed-off-by: Vikas Manocha 
---

Changes in v2: None

 include/configs/stv0991.h |   21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/include/configs/stv0991.h b/include/configs/stv0991.h
index a7181b1..d6ff243 100644
--- a/include/configs/stv0991.h
+++ b/include/configs/stv0991.h
@@ -8,7 +8,6 @@
 #ifndef __CONFIG_STV0991_H
 #define __CONFIG_STV0991_H
 #define CONFIG_SYS_DCACHE_OFF
-#define CONFIG_SYS_ICACHE_OFF
 #define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
 #define CONFIG_BOARD_EARLY_INIT_F
 
@@ -40,7 +39,7 @@
 
 /* user interface */
 #define CONFIG_SYS_PROMPT  "STV0991> "
-#define CONFIG_SYS_CBSIZE  256/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE  1024
 #define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE \
+sizeof(CONFIG_SYS_PROMPT) + 16)
 
@@ -68,4 +67,22 @@
 #define CONFIG_CMD_PING
 #define CONFIG_PHY_RESET_DELAY 1   /* in usec */
 
+#include "config_cmd_default.h"
+#undef CONFIG_CMD_SAVEENV
+
+#define CONFIG_SYS_MEMTEST_START   0x
+#define CONFIG_SYS_MEMTEST_END 1024*1024
+#define CONFIG_CMD_MEMTEST
+
+/* Misc configuration */
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_CMDLINE_EDITING
+
+#define CONFIG_BOOTDELAY   3
+#define CONFIG_BOOTCOMMAND "go 0x4004"
+#define CONFIG_AUTOBOOT_KEYED
+#define CONFIG_AUTOBOOT_STOP_STR   " "
+#define CONFIG_AUTOBOOT_PROMPT \
+   "Hit SPACE in %d seconds to stop autoboot.\n", bootdelay
+
 #endif /* __CONFIG_H */
-- 
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/3] stv0991 : enable ethernet support.

2014-08-29 Thread Vikas Manocha
Signed-off-by: Vikas Manocha 
---

Changes in v2: None

 arch/arm/cpu/armv7/stv0991/clock.c |   14 
 arch/arm/cpu/armv7/stv0991/pinmux.c|   14 
 arch/arm/include/asm/arch-stv0991/gpio.h   |   22 
 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h|   36 +++
 arch/arm/include/asm/arch-stv0991/stv0991_creg.h   |   13 +++
 arch/arm/include/asm/arch-stv0991/stv0991_periph.h |1 +
 board/st/stv0991/stv0991.c |   37 
 include/configs/stv0991.h  |   15 +++-
 8 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/arch-stv0991/gpio.h

diff --git a/arch/arm/cpu/armv7/stv0991/clock.c 
b/arch/arm/cpu/armv7/stv0991/clock.c
index aca6aba..70b8a8d 100644
--- a/arch/arm/cpu/armv7/stv0991/clock.c
+++ b/arch/arm/cpu/armv7/stv0991/clock.c
@@ -13,6 +13,13 @@
 static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
 
+void enable_pll1(void)
+{
+   /* pll1 already configured for 1000Mhz, just need to enable it */
+   writel(readl(&stv0991_cgu_regs->pll1_ctrl) & ~(0x01),
+   &stv0991_cgu_regs->pll1_ctrl);
+}
+
 void clock_setup(int peripheral)
 {
switch (peripheral) {
@@ -20,6 +27,13 @@ void clock_setup(int peripheral)
writel(UART_CLK_CFG, &stv0991_cgu_regs->uart_freq);
break;
case ETH_CLOCK_CFG:
+   enable_pll1();
+   writel(ETH_CLK_CFG, &stv0991_cgu_regs->eth_freq);
+
+   /* Clock selection for ethernet tx_clk & rx_clk*/
+   writel((readl(&stv0991_cgu_regs->eth_ctrl) & ETH_CLK_MASK)
+   | ETH_CLK_CTRL, &stv0991_cgu_regs->eth_ctrl);
+
break;
default:
break;
diff --git a/arch/arm/cpu/armv7/stv0991/pinmux.c 
b/arch/arm/cpu/armv7/stv0991/pinmux.c
index 6d4414a..1d086a2 100644
--- a/arch/arm/cpu/armv7/stv0991/pinmux.c
+++ b/arch/arm/cpu/armv7/stv0991/pinmux.c
@@ -41,6 +41,20 @@ int stv0991_pinmux_config(int peripheral)
CFG_GPIOB_16_UART_TX,
&stv0991_creg->mux7);
break;
+   case ETH_GPIOB_10_31_C_0_4:
+   writel(readl(&stv0991_creg->mux6) & 0x00FF,
+   &stv0991_creg->mux6);
+   writel(0x, &stv0991_creg->mux7);
+   writel(0x, &stv0991_creg->mux8);
+   writel(readl(&stv0991_creg->mux9) & 0xFFF0,
+   &stv0991_creg->mux9);
+   /* Ethernet Voltage configuration to 1.8V*/
+   writel((readl(&stv0991_creg->vdd_pad1) & VDD_ETH_PS_MASK) |
+   ETH_VDD_CFG, &stv0991_creg->vdd_pad1);
+   writel((readl(&stv0991_creg->vdd_pad1) & VDD_ETH_PS_MASK) |
+   ETH_M_VDD_CFG, &stv0991_creg->vdd_pad1);
+
+   break;
default:
break;
}
diff --git a/arch/arm/include/asm/arch-stv0991/gpio.h 
b/arch/arm/include/asm/arch-stv0991/gpio.h
new file mode 100644
index 000..9131ded
--- /dev/null
+++ b/arch/arm/include/asm/arch-stv0991/gpio.h
@@ -0,0 +1,22 @@
+/*
+ * (C) Copyright 2014
+ * Vikas Manocha, ST Micoelectronics, vikas.mano...@st.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __ASM_ARCH_STV0991_GPIO_H
+#define __ASM_ARCH_STV0991_GPIO_H
+
+enum gpio_direction {
+   GPIO_DIRECTION_IN,
+   GPIO_DIRECTION_OUT,
+};
+
+struct gpio_regs {
+   u32 data;   /* offset 0x0 */
+   u32 reserved[0xff]; /* 0x4--0x3fc */
+   u32 dir;/* offset 0x400 */
+};
+
+#endif /* __ASM_ARCH_STV0991_GPIO_H */
diff --git a/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h 
b/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
index 4926395..ddcbb57 100644
--- a/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
+++ b/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
@@ -77,4 +77,40 @@ struct stv0991_cgu_regs {
 #define UART_CLK_CFG   (4 << DIV_SHIFT_UART \
| 1 << MDIV_SHIFT_UART | CLK_UART_MCLK)
 
+/* CGU Ethernet clock config */
+#define CLK_ETH_MCLK   0
+#define CLK_ETH_PLL1   1
+#define CLK_ETH_PLL2   2
+
+#define MDIV_SHIFT_ETH 3
+#define DIV_SHIFT_ETH  6
+#define DIV_ETH_1259
+#define DIV_ETH_50 12
+#define DIV_ETH_P2P15
+
+#define ETH_CLK_CFG(4 << DIV_ETH_P2P | 4 << DIV_ETH_50 \
+   | 1 << DIV_ETH_125 \
+   | 0 << DIV_SHIFT_ETH \
+   | 3 << MDIV_SHIFT_ETH | CLK_ETH_PLL1)
+ /* CGU Ethernet control */
+

[U-Boot] [PATCH v2 0/3] add support for new arch stv0991

2014-08-29 Thread Vikas Manocha
This patchset add support for new arch stv0991.

Changes in v2: 
- corrected files license to GPL-2.0+
- replaced printf() usage with puts() for string print
- sorted sourcing of board Kconfig

Vikas Manocha (3):
  stv0991 : Add basic stv0991 architecture support.
  stv0991 : enable ethernet support.
  stv0991: default + misc command configs enabled.

 arch/arm/Kconfig   |4 +
 arch/arm/cpu/armv7/stv0991/Makefile|9 ++
 arch/arm/cpu/armv7/stv0991/clock.c |   41 +++
 arch/arm/cpu/armv7/stv0991/lowlevel.S  |   12 ++
 arch/arm/cpu/armv7/stv0991/pinmux.c|   62 +++
 arch/arm/cpu/armv7/stv0991/reset.c |   26 +
 arch/arm/cpu/armv7/stv0991/timer.c |  114 +++
 arch/arm/include/asm/arch-stv0991/gpio.h   |   22 
 arch/arm/include/asm/arch-stv0991/hardware.h   |   73 
 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h|  116 
 arch/arm/include/asm/arch-stv0991/stv0991_creg.h   |   95 
 arch/arm/include/asm/arch-stv0991/stv0991_defs.h   |   16 +++
 arch/arm/include/asm/arch-stv0991/stv0991_gpt.h|   43 
 arch/arm/include/asm/arch-stv0991/stv0991_periph.h |   44 
 arch/arm/include/asm/arch-stv0991/stv0991_wdru.h   |   28 +
 board/st/stv0991/Kconfig   |   23 
 board/st/stv0991/Makefile  |8 ++
 board/st/stv0991/stv0991.c |   91 +++
 configs/stv0991_defconfig  |3 +
 include/configs/stv0991.h  |   88 +++
 20 files changed, 918 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/stv0991/Makefile
 create mode 100644 arch/arm/cpu/armv7/stv0991/clock.c
 create mode 100644 arch/arm/cpu/armv7/stv0991/lowlevel.S
 create mode 100644 arch/arm/cpu/armv7/stv0991/pinmux.c
 create mode 100644 arch/arm/cpu/armv7/stv0991/reset.c
 create mode 100644 arch/arm/cpu/armv7/stv0991/timer.c
 create mode 100644 arch/arm/include/asm/arch-stv0991/gpio.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/hardware.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_creg.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_defs.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_periph.h
 create mode 100644 arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
 create mode 100644 board/st/stv0991/Kconfig
 create mode 100644 board/st/stv0991/Makefile
 create mode 100644 board/st/stv0991/stv0991.c
 create mode 100644 configs/stv0991_defconfig
 create mode 100644 include/configs/stv0991.h

-- 
1.7.9.5

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


Re: [U-Boot] tools-only build broken

2014-08-29 Thread Ian Campbell
On Fri, 2014-08-29 at 21:07 +0100, Ian Campbell wrote:
> The tools-only target is currently broken:
> $ make CROSS_COMPILE=arm-linux-gnueabihf- tools-only 
>   CHK include/config/uboot.release
> /bin/sh: 1: cannot open include/config/auto.conf: No such file
> Makefile:1052: recipe for target 'include/config/uboot.release' failed
> make: *** [include/config/uboot.release] Error 2
> 
> This is because tools-only depends on $(version_h), depends on
> include/config/uboot.release, depends include/config/auto.conf. I think
> this is all due to the support for LOCALVERSION(_AUTO).
> 
> I'm not sure how to reconcile this, since the version stuff
> fundamentally needs the .config. Perhaps sandbox could be used?

In the meantime "touch include/config/auto.conf" lets it build (hardly
ideal though!)

Ian.

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


Re: [U-Boot] [PATCH 06/25] dm: spi: Add a uclass for SPI

2014-08-29 Thread Simon Glass
Hi Jagan,

On 28 August 2014 02:58, Jagan Teki  wrote:
> On 15 July 2014 06:26, Simon Glass  wrote:
>> Add a uclass which provides access to SPI buses and includes operations
>> required by SPI.
>>
>> For a time driver model will need to co-exist with the legacy SPI interface
>> so some parts of the header file are changed depending on which is in use.
>> The exports are adjusted also since some functions are not available with
>> driver model.
>>
>> Boards must define CONFIG_DM_SPI to use driver model for SPI.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>>  common/exports.c |   4 +-
>>  drivers/spi/Makefile |   4 +
>>  drivers/spi/spi-uclass.c | 253 
>> +++
>>  include/dm/uclass-id.h   |   1 +
>>  include/spi.h| 140 ++
>>  5 files changed, 401 insertions(+), 1 deletion(-)
>>  create mode 100644 drivers/spi/spi-uclass.c
>>
>> diff --git a/common/exports.c b/common/exports.c
>> index b97ca48..88fcfc8 100644
>> --- a/common/exports.c
>> +++ b/common/exports.c
>> @@ -27,10 +27,12 @@ unsigned long get_version(void)
>>  # define i2c_write dummy
>>  # define i2c_read  dummy
>>  #endif
>> -#ifndef CONFIG_CMD_SPI
>> +#if !defined(CONFIG_CMD_SPI) || defined(CONFIG_DM_SPI)
>>  # define spi_init  dummy
>>  # define spi_setup_slave   dummy
>>  # define spi_free_slavedummy
>> +#endif
>> +#ifndef CONFIG_CMD_SPI
>>  # define spi_claim_bus dummy
>>  # define spi_release_bus   dummy
>>  # define spi_xfer  dummy
>> diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
>> index f02c35a..d1f1dd0 100644
>> --- a/drivers/spi/Makefile
>> +++ b/drivers/spi/Makefile
>> @@ -6,7 +6,11 @@
>>  #
>>
>>  # There are many options which enable SPI, so make this library available
>> +ifdef CONFIG_DM_SPI
>> +obj-y += spi-uclass.o
>> +else
>>  obj-y += spi.o
>> +endif
>>
>>  obj-$(CONFIG_EP93XX_SPI) += ep93xx_spi.o
>>  obj-$(CONFIG_ALTERA_SPI) += altera_spi.o
>> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
>> new file mode 100644
>> index 000..4057bce
>> --- /dev/null
>> +++ b/drivers/spi/spi-uclass.c
>> @@ -0,0 +1,253 @@
>> +/*
>> + * Copyright (c) 2014 Google, Inc
>> + *
>> + * SPDX-License-Identifier:GPL-2.0+
>> + */
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> +static int spi_set_speed_mode(struct udevice *bus, int speed, int mode)
>> +{
>> +   struct dm_spi_ops *ops;
>> +   int ret;
>> +
>> +   ops = spi_get_ops(bus);
>> +   if (ops->set_speed)
>> +   ret = (*ops->set_speed)(bus, speed);
>> +   else
>> +   ret = -EINVAL;
>> +   if (ret) {
>> +   printf("Cannot set speed (err=%d)\n", ret);
>> +   return ret;
>> +   }
>> +
>> +   ops = spi_get_ops(bus);
>> +   if (ops->set_mode)
>> +   ret = (*ops->set_mode)(bus, mode);
>> +   else
>> +   ret = -EINVAL;
>> +   if (ret) {
>> +   printf("Cannot set mode (err=%d)\n", ret);
>> +   return ret;
>> +   }
>> +
>> +   return 0;
>> +}
>> +
>> +int spi_claim_bus(struct spi_slave *slave)
>> +{
>> +   struct udevice *dev = slave->dev;
>> +   struct udevice *bus = dev->parent;
>> +   struct dm_spi_ops *ops = spi_get_ops(bus);
>> +   struct dm_spi_bus *spi = bus->uclass_priv;
>> +   int speed;
>> +   int ret;
>> +
>> +   speed = slave->max_hz;
>> +   if (spi->max_hz) {
>> +   if (speed)
>> +   speed = min(speed, spi->max_hz);
>> +   else
>> +   speed = spi->max_hz;
>> +   }
>> +   if (!speed)
>> +   speed = 10;
>> +   ret = spi_set_speed_mode(bus, speed, slave->mode);
>> +   if (ret)
>> +   return ret;
>> +
>> +   return ops->claim_bus ? ops->claim_bus(bus) : 0;
>> +}
>> +
>> +void spi_release_bus(struct spi_slave *slave)
>> +{
>> +   struct udevice *dev = slave->dev;
>> +   struct udevice *bus = dev->parent;
>> +   struct dm_spi_ops *ops = spi_get_ops(bus);
>> +
>> +   if (ops->release_bus)
>> +   spi_get_ops(bus)->release_bus(bus);
>> +}
>> +
>> +int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
>> +const void *dout, void *din, unsigned long flags)
>> +{
>> +   struct udevice *dev = slave->dev;
>> +   struct udevice *bus = dev->parent;
>> +
>> +   if (bus->uclass->uc_drv->id != UCLASS_SPI)
>> +   return -EOPNOTSUPP;
>> +
>> +   return spi_get_ops(bus)->xfer(bus, dev, bitlen, dout, din, flags);
>> +}
>
> Cleared all these calls, as individual drivers/spi* will setup their
> ops and fills
> the priv data. So this uclass will call accordingly - correct? add if
> I'm missing anything.

Yes so far as I understand you, that is correct.

>
>> +
>> +int spi_post

Re: [U-Boot] [PATCH v2 1/4] add code to handle Android sparse image format

2014-08-29 Thread Steve Rae



On 14-08-29 01:54 PM, Marek Vasut wrote:

On Friday, August 29, 2014 at 07:38:39 PM, Steve Rae wrote:

On 14-08-29 08:11 AM, Tom Rini wrote:

On Thu, Aug 28, 2014 at 02:52:40PM -0700, Steve Rae wrote:

On 14-08-28 02:31 PM, Steve Rae wrote:

On 14-08-28 02:16 PM, Tom Rini wrote:

On Thu, Aug 28, 2014 at 10:53:51AM -0700, Steve Rae wrote:

Add original file (pristine) from :

https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/abo
ot.c?h=master

[3b5092d20bd15a7a2879c13e9f64acc48d04af2d]

Signed-off-by: Steve Rae 


OK, let us back the truck up, so to speak.  This particular version of
the file has an odd license.  Looking at
https://android.googlesource.com/kernel/lk/+/master/app/aboot/aboot.c
[54963a727d3e4ed1e945c7ec012b5cc5de168ac5] and it has the normal
BSD-3-Clause text.  Lets grab and adapt that so we can drop the
license issue.


OK -- "v3" coming soon!


OOPS! -- this "aboot.c" does not contain the support for the "sparse
image format" -- I cannot use this file!


Can you poke around more for a version of aboot.c that has sparse image
support and comes more directly from google.com and thus hopefully
someone caught the rather strange license text changes?


I have previously spent hours looking for:
(1) sparse_format.h -- which we now have (thanks to Colin Cross)
(2) any implementation of the "while()" loop which parses this "sparse
format"
This implementation, in aboot.c (also recommended by Colin Cross), is
also available from "Code Aurora" -- but it has the same wording as the
"Linux Foundation" file; I have not found it anywhere else.
I cannot spend any more time on this license issue
Please keep me informed of the outcome!


... and, this is how it ends. Again, legal crap proved to be a death sentence
for a patch and carried with it an excessive amount of wasted effort.

Best regards,
Marek Vasut



I certainly hope not 100% dead
If U-Boot would accept (the currently one-off) BSD-3L-Clause, then this 
could live!

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


Re: [U-Boot] [PATCH v3 3/3] mx6sxsabresd: Add PCI support

2014-08-29 Thread Fabio Estevam
On Fri, Aug 29, 2014 at 7:29 PM, Marek Vasut  wrote:

> A proper commit message describing the change would be very useful. Thank you!

Sorry, but I don't understand your suggestion.

The Subject says that I am adding PCI support to the mx6sxsabresd board.

Then I say that I tested it with a PCI card and put the log showing
that the card was detected.

I really don't know how I can be clearer in the description of this
simple patch.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/3] mx6sxsabresd: Add PCI support

2014-08-29 Thread Marek Vasut
On Friday, August 29, 2014 at 10:19:11 PM, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Mon, Aug 25, 2014 at 5:11 PM, Fabio Estevam  wrote:
> > On Mon, Aug 25, 2014 at 4:50 PM, Marek Vasut  wrote:
> >> On Monday, August 25, 2014 at 07:26:46 PM, Fabio Estevam wrote:
> >>> Tested with an Intel Wireless PCI 7260HMW card:
> >>> 
> >>> U-Boot 2014.10-rc1-16576-g4a8a8a8-dirty (Aug 23 2014 - 16:05:11)
> >>> 
> >>> CPU:   Freescale i.MX6SX rev1.0 at 792 MHz
> >>> Reset cause: WDOG
> >>> Board: MX6SX SABRE SDB
> >>> I2C:   ready
> >>> DRAM:  1 GiB
> >>> MMC:   FSL_SDHC: 0
> >>> 
> >>>   00:01.0 - 16c3:abcd - Bridge device
> >>>   
> >>>01:00.0- 8086:08b1 - Network controller
> >>> 
> >>> Signed-off-by: Fabio Estevam 
> >> 
> >> Should this output be really part of the commit message?
> > 
> > Personally I don't see any problem with it, but if Stefano prefers I
> > can remove it and send a v4.
> 
> Please let me know if you want me to resend this series or if you are
> fine with it.

A proper commit message describing the change would be very useful. Thank you!

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 1/4] add code to handle Android sparse image format

2014-08-29 Thread Marek Vasut
On Friday, August 29, 2014 at 07:38:39 PM, Steve Rae wrote:
> On 14-08-29 08:11 AM, Tom Rini wrote:
> > On Thu, Aug 28, 2014 at 02:52:40PM -0700, Steve Rae wrote:
> >> On 14-08-28 02:31 PM, Steve Rae wrote:
> >>> On 14-08-28 02:16 PM, Tom Rini wrote:
>  On Thu, Aug 28, 2014 at 10:53:51AM -0700, Steve Rae wrote:
> > Add original file (pristine) from :
> > 
> > https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/abo
> > ot.c?h=master
> > 
> > [3b5092d20bd15a7a2879c13e9f64acc48d04af2d]
> > 
> > Signed-off-by: Steve Rae 
>  
>  OK, let us back the truck up, so to speak.  This particular version of
>  the file has an odd license.  Looking at
>  https://android.googlesource.com/kernel/lk/+/master/app/aboot/aboot.c
>  [54963a727d3e4ed1e945c7ec012b5cc5de168ac5] and it has the normal
>  BSD-3-Clause text.  Lets grab and adapt that so we can drop the
>  license issue.
> >>> 
> >>> OK -- "v3" coming soon!
> >> 
> >> OOPS! -- this "aboot.c" does not contain the support for the "sparse
> >> image format" -- I cannot use this file!
> > 
> > Can you poke around more for a version of aboot.c that has sparse image
> > support and comes more directly from google.com and thus hopefully
> > someone caught the rather strange license text changes?
> 
> I have previously spent hours looking for:
> (1) sparse_format.h -- which we now have (thanks to Colin Cross)
> (2) any implementation of the "while()" loop which parses this "sparse
> format"
> This implementation, in aboot.c (also recommended by Colin Cross), is
> also available from "Code Aurora" -- but it has the same wording as the
> "Linux Foundation" file; I have not found it anywhere else.
> I cannot spend any more time on this license issue
> Please keep me informed of the outcome!

... and, this is how it ends. Again, legal crap proved to be a death sentence 
for a patch and carried with it an excessive amount of wasted effort.

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 v3 3/3] mx6sxsabresd: Add PCI support

2014-08-29 Thread Fabio Estevam
Hi Stefano,

On Mon, Aug 25, 2014 at 5:11 PM, Fabio Estevam  wrote:
> On Mon, Aug 25, 2014 at 4:50 PM, Marek Vasut  wrote:
>> On Monday, August 25, 2014 at 07:26:46 PM, Fabio Estevam wrote:
>>> Tested with an Intel Wireless PCI 7260HMW card:
>>>
>>> U-Boot 2014.10-rc1-16576-g4a8a8a8-dirty (Aug 23 2014 - 16:05:11)
>>>
>>> CPU:   Freescale i.MX6SX rev1.0 at 792 MHz
>>> Reset cause: WDOG
>>> Board: MX6SX SABRE SDB
>>> I2C:   ready
>>> DRAM:  1 GiB
>>> MMC:   FSL_SDHC: 0
>>>   00:01.0 - 16c3:abcd - Bridge device
>>>01:00.0- 8086:08b1 - Network controller
>>>
>>> Signed-off-by: Fabio Estevam 
>>
>> Should this output be really part of the commit message?
>
> Personally I don't see any problem with it, but if Stefano prefers I
> can remove it and send a v4.

Please let me know if you want me to resend this series or if you are
fine with it.

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


[U-Boot] tools-only build broken

2014-08-29 Thread Ian Campbell
The tools-only target is currently broken:
$ make CROSS_COMPILE=arm-linux-gnueabihf- tools-only 
  CHK include/config/uboot.release
/bin/sh: 1: cannot open include/config/auto.conf: No such file
Makefile:1052: recipe for target 'include/config/uboot.release' failed
make: *** [include/config/uboot.release] Error 2

This is because tools-only depends on $(version_h), depends on
include/config/uboot.release, depends include/config/auto.conf. I think
this is all due to the support for LOCALVERSION(_AUTO).

I'm not sure how to reconcile this, since the version stuff
fundamentally needs the .config. Perhaps sandbox could be used?

Ian.

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


[U-Boot] uboot env in mmc partition

2014-08-29 Thread Naitik Amin
HI there,

I recently made changes to my system, where I created a new partition on 
my mmc. (mmcblk0p4)

Then i dd'd a uboot env image into this partition, updated the 
fw_env.config to point to /dev/mmcblk0p4. At this point, my fw_printenv 
and fw_setenv work good. So as a next step, I am tried to modify uboot to 
make it point to my env image in my new partition.

I made below changes to my config header and rebuilt the uboot. On doing 
printenv from uboot, I dont see the same env that I pushed it from linux, 
infact I see it as its defined in the config header.

Can some one help ?

/* environment setting for MMC */
#ifdef CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV  0   /* device 0 */
#define CONFIG_SYS_MMC_ENV_PART 4
#define CONFIG_ENV_OFFSET   0   /* just after the MBR */
#endif


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


Re: [U-Boot] Please pull u-boot-ti/master

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 03:18:00PM -0400, Tom Rini wrote:
> Hey,
> 
> The following changes since commit 1899fac925eda817e12234aef3d01d354788662e:
> 
>   Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master' (2014-08-09 
> 16:48:34 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-ti.git master
> 
> for you to fetch changes up to 6302ea5409b8cc0abf667a94d22ef81543e04fd4:
> 
>   common: cmd_nand: add nand ecclayout command (2014-08-25 14:23:52 -0400)
> 
> 
> Dmitry Lifshitz (3):
>   cm-t54: fix EEPROM read return value check
>   cm-t54: fix eMMC boot mode check
>   cm-t54: convert to generic board
> 
> Jeroen Hofstee (1):
>   SOM: tam3517: convert to generic board
> 
> Lokesh Vutla (1):
>   ARM: DRA: Enable VTT regulator
> 
> Matwey V. Kornilov (1):
>   pcm051: use ti_am335x_common.h config
> 
> Sricharan R (1):
>   ARM: DRA7: Enable software leveling for dra7
> 
> Tom Rini (6):
>   am335x_evm: Move SPL network defines
>   TI:armv7: Change CONFIG_SPL_STACK to not be CONFIG_SYS_INIT_SP_ADDR
>   tseries: Set CONFIG_ENV_IS_NOWHERE for SPL+NAND
>   common/Makefile: Consolidate SPL ENV options, correct inclusion
>   am335x_evm: Enable CONFIG_SPL_ENV_SUPPORT on EMMC_BOOT
>   am335x_evm: Convert CONFIG_CONS_INDEX into a menu choice
> 
> Vitaly Andrianov (1):
>   keystone2: use EFUSE_BOOTROM information to configure PLLs
> 
> WingMan Kwok (2):
>   mtd: nand: davinci: allow to change ecclayout by ecclayout command
>   common: cmd_nand: add nand ecclayout command
> 
> pekon gupta (6):
>   board/ti/am335x: update configs for parallel NAND
>   board/ti/am335x: add support for beaglebone NAND cape
>   board/ti/am335x: add support for beaglebone NOR Cape
>   board/ti/am43xx: add support for parallel NAND
>   board/ti/dra7xx: add support for parallel NAND
>   board/ti/dra7xx: add support for parallel NOR
> 
>  arch/arm/cpu/armv7/keystone/clock-k2e.c |   16 +++
>  arch/arm/cpu/armv7/keystone/clock-k2hk.c|   32 +
>  arch/arm/cpu/armv7/keystone/clock.c |   43 +++
>  arch/arm/cpu/armv7/omap-common/emif-common.c|   38 +-
>  arch/arm/cpu/armv7/omap-common/hwinit-common.c  |3 +
>  arch/arm/cpu/armv7/omap5/hw_data.c  |2 +-
>  arch/arm/cpu/armv7/omap5/sdram.c|   60 -
>  arch/arm/include/asm/arch-keystone/clock-k2e.h  |   16 +++
>  arch/arm/include/asm/arch-keystone/clock-k2hk.h |   14 ++
>  arch/arm/include/asm/arch-keystone/clock.h  |4 +
>  arch/arm/include/asm/arch-keystone/hardware.h   |4 +
>  arch/arm/include/asm/arch-omap5/mem.h   |   12 +-
>  arch/arm/include/asm/ti-common/davinci_nand.h   |4 +
>  board/compulab/cm_t54/cm_t54.c  |6 +-
>  board/ti/am335x/Kconfig |9 ++
>  board/ti/am335x/board.c |   19 +--
>  board/ti/am335x/mux.c   |  156 
> +++
>  board/ti/am43xx/board.c |1 +
>  board/ti/am43xx/mux.c   |   43 ++-
>  board/ti/dra7xx/evm.c   |   31 +
>  board/ti/dra7xx/mux_data.h  |   61 +
>  board/ti/ks2_evm/board_k2e.c|   23 +++-
>  board/ti/ks2_evm/board_k2hk.c   |   29 -
>  common/Makefile |   12 +-
>  common/cmd_nand.c   |   91 +
>  configs/am335x_evm_defconfig|3 +-
>  configs/am335x_evm_nor_defconfig|3 +-
>  configs/am335x_evm_norboot_defconfig|3 +-
>  configs/am335x_evm_spiboot_defconfig|3 +-
>  configs/am335x_evm_uart1_defconfig  |4 -
>  configs/am335x_evm_uart2_defconfig  |4 -
>  configs/am335x_evm_uart3_defconfig  |4 -
>  configs/am335x_evm_uart4_defconfig  |4 -
>  configs/am335x_evm_uart5_defconfig  |4 -
>  configs/am335x_evm_usbspl_defconfig |3 +-
>  doc/README.cfi  |   13 ++
>  doc/README.nand |   12 ++
>  drivers/mtd/nand/davinci_nand.c |   94 ++
>  include/configs/am335x_evm.h|   67 +-
>  include/configs/am43xx_evm.h|   64 ++
>  include/configs/cm_t54.h|3 +
>  include/configs/dra7xx_evm.h|   89 +
>  include/configs/pcm051.h|  140 +---
>  include/configs/tam3517-common.h|1 +
>  include/configs/ti_armv7_common.h   |   19 +--
>  include/configs/tseries.h   |6 +-
>  include/nand.h  |

Re: [U-Boot] [PULL] u-boot/master

2014-08-29 Thread Tom Rini
On Fri, Aug 29, 2014 at 11:28:42AM +0200, Marek Vasut wrote:

> The following changes since commit 124c5998755ef6778ca43acab27372fc470b8366:
> 
>   samsung: s5p_goni: fix: Add missing definitions for G_DNL_UMS gadget 
> (2014-08-28 13:47:34 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-usb.git HEAD
> 
> for you to fetch changes up to 74c0d756dea14855bec47f380b6ccb557be5db7c:
> 
>   usb: hub: don't check CONNECTION in hub_port_reset() (2014-08-29 11:27:43 
> +0200)
> 
> 
> Marek Vasut (1):
>   usb: Handle -ENODEV from usb_lowlevel_init()
> 
> Stephen Warren (1):
>   usb: hub: don't check CONNECTION in hub_port_reset()
> 
>  common/usb.c | 11 +--
>  common/usb_hub.c | 19 ---
>  2 files changed, 25 insertions(+), 5 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


Re: [U-Boot] pull request for u-boot-tegra/master into ARM/master

2014-08-29 Thread Tom Rini
On Wed, Aug 20, 2014 at 09:12:48AM -0700, Tom Warren wrote:

> Albert,
> 
> Please pull u-boot-tegra/master into ARM/master. Thanks!
> 
> ./MAKEALL -s tegra AOK, checkpatch.pl is OK, and ./MAKEALL -a arm only
> shows failures that were already present in ARM/master.
> 
> The following changes since commit 1899fac925eda817e12234aef3d01d354788662e:
> 
>   Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master' (2014-08-09
> 16:48:34 +0200)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-tegra.git master
> 
> for you to fetch changes up to a78cf41e79f64fe90f573b07ee3c88be533b97ca:
> 
>   ARM: tegra: remove custom define for Jetson TK1 (2014-08-19 08:44:03
> -0700)
> 
> 
> Bryan Wu (1):
>   ARM: tegra: Disable VPR
> 
> Stefan Agner (1):
>   ARM: tegra: add Colibri T30 board support
> 
> Stephen Warren (3):
>   ARM: tegra: enable DFU too
>   ARM: tegra: Use mem size from MC rather than ODMDATA
>   ARM: tegra: remove custom define for Jetson TK1
> 
>  arch/arm/Kconfig   |   4 +
>  arch/arm/cpu/tegra-common/Makefile |   1 +
>  arch/arm/cpu/tegra-common/ap.c |   3 +
>  arch/arm/cpu/tegra-common/board.c  |  18 +-
>  arch/arm/cpu/tegra-common/vpr.c|  35 ++
>  arch/arm/dts/Makefile  |   1 +
>  arch/arm/dts/tegra30-colibri.dts   |  85 +
>  arch/arm/include/asm/arch-tegra/ap.h   |   9 +
>  arch/arm/include/asm/arch-tegra124/mc.h|  49 +++
>  arch/arm/include/asm/mach-types.h  |  13 +
>  board/nvidia/venice2/as3722_init.h |   2 +-
>  board/toradex/colibri_t30/Kconfig  |  24 ++
>  board/toradex/colibri_t30/MAINTAINERS  |   7 +
>  board/toradex/colibri_t30/Makefile |   6 +
>  board/toradex/colibri_t30/colibri_t30.c|  42 +++
>  .../colibri_t30/pinmux-config-colibri_t30.h| 360
> +
>  configs/colibri_t30_defconfig  |   3 +
>  configs/jetson-tk1_defconfig   |   1 -
>  include/configs/beaver.h   |   2 +-
>  include/configs/colibri_t30.h  |  67 
>  include/configs/jetson-tk1.h   |   2 +-
>  ...egra-common-ums.h => tegra-common-usb-gadget.h} |  19 +-
>  include/configs/venice2.h  |   2 +-
>  23 files changed, 745 insertions(+), 10 deletions(-)
>  create mode 100644 arch/arm/cpu/tegra-common/vpr.c
>  create mode 100644 arch/arm/dts/tegra30-colibri.dts
>  create mode 100644 arch/arm/include/asm/arch-tegra124/mc.h
>  create mode 100644 board/toradex/colibri_t30/Kconfig
>  create mode 100644 board/toradex/colibri_t30/MAINTAINERS
>  create mode 100644 board/toradex/colibri_t30/Makefile
>  create mode 100644 board/toradex/colibri_t30/colibri_t30.c
>  create mode 100644 board/toradex/colibri_t30/pinmux-config-colibri_t30.h
>  create mode 100644 configs/colibri_t30_defconfig
>  create mode 100644 include/configs/colibri_t30.h
>  rename include/configs/{tegra-common-ums.h => tegra-common-usb-gadget.h}
> (57%)

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] Please pull u-boot-sunxi.git/master

2014-08-29 Thread Tom Rini
On Tue, Aug 12, 2014 at 10:36:16AM +0200, Hans de Goede wrote:

> Hi Albert,
> 
> Please pull from u-boot-sunxi.git/master for a set of patches adding
> generic boot command support + a series of DRAM cleanups and fixes.
> 
> Note the generic boot command support depends on
> "config: introduce a generic $bootcmd" which has been merged into
> u-boot/master, but not yet into u-boot-arm/master. So I've cherry
> picked that patch into u-boot-sunxi/master. It should "disappear"
> on merge.
> 
> The following changes since commit 1899fac925eda817e12234aef3d01d354788662e:
> 
>   Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master' (2014-08-09 
> 16:48:34 +0200)
> 
> are available in the git repository at:
> 
>   http://git.denx.de/u-boot-sunxi.git master
> 
> for you to fetch changes up to bf4ca384ad991c09cad7dd7838c1da6756c101b9:
> 
>   sunxi: dram: Autodetect DDR3 bus width and density (2014-08-12 08:42:34 
> +0200)
> 
> 
> Dennis Gilmore (1):
>   config: introduce a generic $bootcmd
> 
> Hans de Goede (7):
>   sunxi-common.h: Remove CONFIG_SYS_BOOT_GET_CMDLINE
>   sunxi-common.h: Remove dead #ifdef CONFIG_CMD_NET code block
>   sunxi-common.h: Don't undefine CONFIG_CMD_NFS
>   sunxi-common.h: Don't undef CONFIG_CMD_NET only to redefine it again 
> later
>   sunxi: Kconfig: move common settings into a shared code block
>   sunxi-common.h: Use new generic $bootcmd
>   sunxi: Add environment settings to make extlinux.conf booting work
> 
> Siarhei Siamashka (16):
>   sunxi: dram: Remove useless 'dramc_scan_dll_para()' function
>   sunxi: dram: Remove broken super-standby remnants
>   sunxi: dram: Respect the DDR3 reset timing requirements
>   sunxi: dram: Fix CKE delay handling for sun4i/sun5i
>   sunxi: dram: Remove broken impedance and ODT configuration code
>   sunxi: dram: Do DDR3 reset in the same way on sun4i/sun5i/sun7i
>   sunxi: dram: Add 'await_bits_clear'/'await_bits_set' helper functions
>   sunxi: dram: Re-introduce the impedance calibration ond ODT
>   sunxi: dram: Configurable MBUS clock speed (use PLL5 or PLL6)
>   sunxi: dram: Use divisor P=1 for PLL5
>   sunxi: dram: Improve DQS gate data training error handling
>   sunxi: dram: Add a helper function 'mctl_get_number_of_lanes'
>   sunxi: dram: Configurable DQS gating window mode and delay
>   sunxi: dram: Drop DDR2 support and assume only single rank DDR3 memory
>   sunxi: dram: Derive write recovery delay from DRAM clock speed
>   sunxi: dram: Autodetect DDR3 bus width and density
> 
>  arch/arm/cpu/armv7/sunxi/dram.c| 621 
> ++---
>  arch/arm/include/asm/arch-sunxi/dram.h |  14 +-
>  board/sunxi/Kconfig|  33 +-
>  configs/A10-OLinuXino-Lime_defconfig   |   1 +
>  configs/A10s-OLinuXino-M_defconfig |   1 +
>  configs/A13-OLinuXinoM_defconfig   |   1 +
>  configs/A13-OLinuXino_defconfig|   1 +
>  configs/A20-OLinuXino_MICRO_defconfig  |   1 +
>  configs/Auxtek-T004_defconfig  |   1 +
>  configs/Bananapi_defconfig |   1 +
>  configs/Cubieboard2_FEL_defconfig  |   1 +
>  configs/Cubieboard2_defconfig  |   1 +
>  configs/Cubieboard_defconfig   |   1 +
>  configs/Cubietruck_FEL_defconfig   |   1 +
>  configs/Cubietruck_defconfig   |   1 +
>  configs/Linksprite_pcDuino3_defconfig  |   1 +
>  configs/Mele_A1000G_defconfig  |   1 +
>  configs/Mele_A1000_defconfig   |   1 +
>  configs/Mini-X-1Gb_defconfig   |   1 +
>  configs/Mini-X_defconfig   |   1 +
>  configs/ba10_tv_box_defconfig  |   1 +
>  configs/i12-tvbox_defconfig|   1 +
>  configs/qt840a_defconfig   |   1 +
>  configs/r7-tv-dongle_defconfig |   1 +
>  include/config_distro_bootcmd.h| 197 +++
>  include/configs/sunxi-common.h |  56 ++-
>  26 files changed, 614 insertions(+), 328 deletions(-)
>  create mode 100644 include/config_distro_bootcmd.h

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] [U-Boot,GIT,PULL] Zynq patches

2014-08-29 Thread Tom Rini
On Tue, Aug 19, 2014 at 09:57:11AM +0200, Michal Simek wrote:

> Hi Albert,
> 
> please pull these 3 patches to your tree.
> 
> Thanks,
> Michal
> 
> Summary of 4 commits for 6 boards (6 threads, 2 jobs per thread)
> 01: patman: Only use git's --no-decorate when available
> 02: zynq: spl: Add vectors section to linker script
>arm: (for 6/6 boards)  all -966.0  bss -10.0  data -46.7  rodata 
> -124.0  spl/u-boot-spl:all +96.0  spl/u-boot-spl:text +96.0  text -785.3
> zynq_zc770_xm013:  all -592  bss -4  data -4  rodata -12  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -572
> zynq_zc770_xm012:  all -596  bss -8  data -4  rodata -12  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -572
> zynq_zc770_xm010:  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> zynq_zed   :  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> zynq_zc70x :  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> zynq_microzed  :  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> 03: ARM: zynq: Move ps7_init() out of spl.h
> 04: ARM: zynq: Remove spl.h
> 
> 
> The following changes since commit e76b933e02e1b38e48754c435e9dba1c0deeb3c6:
> 
>   Prepare v2014.10-rc1 (2014-08-06 09:12:58 -0400)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-microblaze.git zynq
> 
> for you to fetch changes up to ae2ee77f982d83a9aca06973e39bebb224b5201c:
> 
>   ARM: zynq: Remove spl.h (2014-08-19 08:48:18 +0200)
> 
> 
> Michal Simek (2):
>   ARM: zynq: Move ps7_init() out of spl.h
>   ARM: zynq: Remove spl.h
> 
> Peter Crosthwaite (1):
>   zynq: spl: Add vectors section to linker script
> 
>  arch/arm/cpu/armv7/zynq/spl.c  |  2 +-
>  arch/arm/cpu/armv7/zynq/u-boot-spl.lds |  1 +
>  arch/arm/include/asm/arch-zynq/spl.h   | 18 --
>  arch/arm/include/asm/arch-zynq/sys_proto.h |  2 ++
>  arch/arm/include/asm/spl.h |  2 +-
>  5 files changed, 5 insertions(+), 20 deletions(-)
>  delete mode 100644 arch/arm/include/asm/arch-zynq/spl.h

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] [U-Boot,PULL] Please pull u-boot-imx

2014-08-29 Thread Tom Rini
On Wed, Aug 20, 2014 at 04:13:34PM +0200, Stefano Babic wrote:

> Hi Albert,
> 
> please pull from u-boot-imx, thanks !
> 
> The following changes since commit 1899fac925eda817e12234aef3d01d354788662e:
> 
>   Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'
> (2014-08-09 16:48:34 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://www.denx.de/git/u-boot-imx.git master
> 
> for you to fetch changes up to d145878d59c80a44d8c6e6d606b898ab87d205ee:
> 
>   mx6sxsabresd: Add Ethernet support (2014-08-20 13:15:23 +0200)
> 
> 
> Fabio Estevam (18):
>   mx6: Add support for the mx6solox variant
>   mx6sx: Add pin definitions
>   mx6: clock: Do not enable sata and ipu clocks
>   mx6sx: Add initial support for mx6sxsabresd board
>   mx6: soc: Do not apply the PFD erratum for mx6solox
>   mx6sxsabresd: Add PFUZE100 PMIC support
>   mx6: Remove duplication of iomuxc structure
>   mx6: Adjust the GPR offset for mx6solox
>   mx6: imx-regs: Remove unused 'omux' field from iomux struct
>   mx6: crm_regs: Fix CDCDR_SPDIF0_CLK_PODF mask and offset
>   mx6: crm_regs: Fix MXC_CCM_CLPCR_WB_PER_AT_LPM definition
>   mx6: crm_regs: Fix MXC_CCM_CIMR_MASK_PERIPH2_CLK_SEL_LOADED
>   pmic: pmic_pfuze100: Use a shorter name for PMIC name
>   mx31pdk: Change maintainer
>   mx6sxsabresd: Update DDR initialization
>   mx6sxsabresd: Convert to the new Kconfig style
>   mx6sx: Adjust enable_fec_anatop_clock() for mx6solox
>   mx6sxsabresd: Add Ethernet support
> 
> Gabriel Huau (1):
>   mx6: add support of multi-processor command
> 
> Heiko Schocher (6):
>   imx6: add gpr2 usb_otg_id iomux select control define
>   i.MX6: define struct pwm_regs and PWMCR_* defines
>   pwm, imx6: add support for pwm modul on imx6
>   i.MX6: add enable_spi_clk()
>   spi: add config option to enable the WP pin function on st micron
> flashes
>   arm, imx6: add aristainetos board
> 
> Iain Paton (2):
>   embestmx6boards: convert to generic board
>   embest/mx6boards: only toggle eMMC usdhc3 RST line on MarSboard
> 
> Magnus Lilja (1):
>   i.MX31 PDK: Enable generic board for i.MX31 PDK
> 
> Marek Vasut (6):
>   arm: mxs: Scrub useless ifdef
>   arm: m53evk: Fix RTC bus number
>   ARM: mx5: Fix CHSCCDR name
>   ARM: mx6: Prevent overflow in DRAM size detection
>   ARM: mx6: Handle the MMDCx_MDCTL COL field caprices
>   ARM: mx6: Enable Thumb build for SPL
> 
> Markus Niebel (1):
>   Add TQ Systems TQMa6 board support
> 
> Stefano Babic (4):
>   Merge branch 'master' of git://git.denx.de/u-boot
>   Merge branch 'master' of git://git.denx.de/u-boot-arm
>   Merge branch 'master' of git://git.denx.de/u-boot-arm
>   Update aristainetos board to Kconfig
> 
> Tim Harvey (11):
>   pci: mx6: fix occasional link failures
>   imx: ventana: set dynamic env var for flash layout
>   imx: ventana: remove caam disable per eeprom bit
>   imx: ventana: add appropriate delay following GSC i2c write
>   imx: ventana: add video enable gpio pinmux for GW54xx
>   imx: ventana: add missing crlf to print
>   imx: ventana: configure i2c_dis# pin properly for gw53xx
>   imx: ventana: enable SION bit on gpio outputs
>   imx: ventana: add iomux for PCISKT_WDIS# gpio
>   imx: ventana: leave PCI reset de-asserted if PCI enabled
>   imx: ventana: add econfig command
> 
>  README  |   15 +
>  arch/arm/Kconfig|8 +
>  arch/arm/cpu/armv7/mx6/Makefile |1 +
>  arch/arm/cpu/armv7/mx6/clock.c  |   51 ++-
>  arch/arm/cpu/armv7/mx6/ddr.c|8 +-
>  arch/arm/cpu/armv7/mx6/mp.c |   87 ++
>  arch/arm/cpu/armv7/mx6/soc.c|   36 +++
>  arch/arm/imx-common/cpu.c   |7 +
>  arch/arm/imx-common/sata.c  |3 +-
>  arch/arm/include/asm/arch-imx/cpu.h |3 +-
>  arch/arm/include/asm/arch-mx5/crm_regs.h|2 +-
>  arch/arm/include/asm/arch-mx6/clock.h   |1 +
>  arch/arm/include/asm/arch-mx6/crm_regs.h|  179 ++-
>  arch/arm/include/asm/arch-mx6/imx-regs.h|  168 +-
>  arch/arm/include/asm/arch-mx6/iomux.h   |   10 +
>  arch/arm/include/asm/arch-mx6/mx6-ddr.h |4 +
>  arch/arm/include/asm/arch-mx6/mx6-pins.h|2 +
>  arch/arm/include/asm/arch-mx6/mx6sx-ddr.h   |   45 +++
>  arch/arm/include/asm/arch-mx6/mx6sx_pins.h  | 1675
> ++
>  arch/arm/include/asm/arch-mx6/sys_proto.h   |1 +
>  board/aristainetos/Kconfig  |   19 ++
>  board/aristainetos/MAINTAINERS  |6 +
>  board/aristainetos/Makefile |9 +
>  board/aristainetos/aristainetos.c

Re: [U-Boot] [PATCH v5 09/15] tools: add genboardscfg.py

2014-08-29 Thread Gerhard Sittig
[ yes, old thread, but might be worth to have in archives ]

On Mon, 2014-07-28 at 04:14 +0100, Simon Glass wrote:
> 
> Hi Masahiro,
> 
> On 27 July 2014 10:05, Masahiro Yamada  wrote:
> > Hi Simon,
> >
> > On Sat, 26 Jul 2014 01:17:02 +0100
> > Simon Glass  wrote:
> >
> >> > +
> >> > +import sys
> >> > +import os
> >> > +import errno
> >> > +import shutil
> >> > +import time
> >> > +import subprocess
> >> > +import fnmatch
> >> > +import glob
> >> > +import re
> >> > +import optparse
> >>
> >> You can sort the imports.
> >
> >
> > Sorted alphabetially in v6.
> >
> > Pardon my ignorance, but is there any coding style guide
> > about sorting imports?
> 
> Not really. I have been following PEP8 (which I don't think mentions
> this), but in general in U-Boot we try to sort include files.

There are good reasons.  You immediately will spot duplicates,
you can check for items very quickly and without doubt, and
sorted lists reduce merge conflicts, or dramatically ease their
resolution.  It helps authors, and reviewers, and maintainers all
alike.

Since headers, as well as imports, all should be self contained
and not depend on a specific order, there is no downside either
in the alphasort order.  You might even spot where previously
undetected dependencies are.  One more advantage. :)


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


[U-Boot] uboot env in mmc partition

2014-08-29 Thread Naitik Amin
HI there,

I recently made changes to my system, where I created a new partition on 
my mmc. (mmcblk0p4)

Then i dd'd a uboot env image into this partition, updated the 
fw_env.config to point to /dev/mmcblk0p4. At this point, my fw_printenv 
and fw_setenv work good. So as a next step, I am tried to modify uboot to 
make it point to my env image in my new partition.

I made below changes to my config header and rebuilt the uboot. On doing 
printenv from uboot, I dont see the same env that I pushed it from linux, 
infact I see it as its defined in the config header.

Can some one help ?

/* environment setting for MMC */
#ifdef CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV  0   /* device 0 */
#define CONFIG_SYS_MMC_ENV_PART 4
#define CONFIG_ENV_OFFSET   0   /* just after the MBR */
#endif



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


Re: [U-Boot] [PATCH v2 1/4] add code to handle Android sparse image format

2014-08-29 Thread Steve Rae



On 14-08-29 08:11 AM, Tom Rini wrote:

On Thu, Aug 28, 2014 at 02:52:40PM -0700, Steve Rae wrote:


On 14-08-28 02:31 PM, Steve Rae wrote:


On 14-08-28 02:16 PM, Tom Rini wrote:

On Thu, Aug 28, 2014 at 10:53:51AM -0700, Steve Rae wrote:


Add original file (pristine) from :

https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master

[3b5092d20bd15a7a2879c13e9f64acc48d04af2d]

Signed-off-by: Steve Rae 


OK, let us back the truck up, so to speak.  This particular version of
the file has an odd license.  Looking at
https://android.googlesource.com/kernel/lk/+/master/app/aboot/aboot.c
[54963a727d3e4ed1e945c7ec012b5cc5de168ac5] and it has the normal
BSD-3-Clause text.  Lets grab and adapt that so we can drop the license
issue.



OK -- "v3" coming soon!


OOPS! -- this "aboot.c" does not contain the support for the "sparse
image format" -- I cannot use this file!


Can you poke around more for a version of aboot.c that has sparse image
support and comes more directly from google.com and thus hopefully
someone caught the rather strange license text changes?


I have previously spent hours looking for:
(1) sparse_format.h -- which we now have (thanks to Colin Cross)
(2) any implementation of the "while()" loop which parses this "sparse 
format"
This implementation, in aboot.c (also recommended by Colin Cross), is 
also available from "Code Aurora" -- but it has the same wording as the 
"Linux Foundation" file; I have not found it anywhere else.

I cannot spend any more time on this license issue
Please keep me informed of the outcome!
Thanks, Steve
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: mx6: Add support for Kosagi Novena

2014-08-29 Thread Fabio Estevam
On Fri, Aug 29, 2014 at 6:30 AM, Marek Vasut  wrote:

> +int board_mmc_init(bd_t *bis)
> +{
> +   s32 status = 0;
> +   int index;
> +
> +   usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
> +   usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
> +
> +   for (index = 0; index < ARRAY_SIZE(usdhc_cfg); index++)
> +   status |= fsl_esdhc_initialize(bis, &usdhc_cfg[index]);
> +
> +   return status;

Instead of ORing the errors you should better just return 'status'
immediately in the case of failure.

> +/* setup board specific PMIC */
> +int power_init_board(void)
> +{
> +   struct pmic *p;
> +   u32 reg;
> +   int ret;
> +
> +   power_pfuze100_init(1);
> +   p = pmic_get("PFUZE100_PMIC");

In Stefano's tree there is no more PFUZE100_PMIC. It is called PFUZE100 now.

> +/* Extra U-Boot environment. */
> +#define CONFIG_EXTRA_ENV_SETTINGS  \
> +   "fdt_high=0x\0" \
> +   "initrd_high=0x\0"  \
> +   "consdev=ttymxc1\0" \
> +   "baudrate=115200\0" \
> +   "bootdev=/dev/mmcblk0p1\0"  \
> +   "rootdev=/dev/mmcblk0p2\0"  \
> +   "netdev=eth0\0" \
> +   "rootpath=/opt/eldk-5.5/armv7a-hf/rootfs-qte-sdk\0" \

This seems to be a too specific rootpath name. Not everyone will use
this same rootpath.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] buildman: suspect issue with patman tags

2014-08-29 Thread Steve Rae



On 14-08-28 05:59 PM, Simon Glass wrote:

Hi Steve,


On 28 August 2014 10:21, Steve Rae  wrote:




On 14-08-28 07:45 AM, Simon Glass wrote:


Hi Steve,

On 27 August 2014 15:22, Steve Rae  wrote:



[... snip ...]




*From:*Steve Rae
*Sent:* Monday, August 25, 2014 09:06
*To:* Simon Glass
*Subject:* buildman: issue with patman tags

Simon,

When I combine multiple patch-series, each with their own patman tags in the
commit messages, into a single branch...

Then:

$ tools/buildman/buildman -b combined bcm28155_ap
No section: 'make-flags'
Traceback (most recent call last):
 File "tools/buildman/buildman", line 139, in 
   control.DoBuildman(options, args)
 File "/home/srae/work/to_denx/tools/buildman/control.py", line 161,
in DoBuildman
   options.git_dir, count)
 File
"/home/srae/work/to_denx/tools/buildman/../patman/patchstream.py", line
387, in GetMetaDataForList
   ps.ProcessLine(line)
 File
"/home/srae/work/to_denx/tools/buildman/../patman/patchstream.py", line
248, in ProcessLine
   self.AddToSeries(line, name, value)
 File
"/home/srae/work/to_denx/tools/buildman/../patman/patchstream.py", line
94, in AddToSeries
   self.series.AddTag(self.commit, line, name, value)
 File "/home/srae/work/to_denx/tools/buildman/../patman/series.py",
line 67, in AddTag
   (commit.hash, line, values, self[name]))
ValueError: In 442a87cd: line 'Series-version: 1': Cannot add another
value '['1']' to series '4'
$

Note:  each patch-series individually build successfully with buildman,
it is only after I combine that there are issues



This is because buildman doesn't need these tags. For patman you need
to work with one series at a time. If you have multiple series, then
some might be at one version and some at another, and it wouldn't know
what version to put on the patch. Also there might be multiple cover
letters, etc.

If you want to keep several series in a branch, you need to use -s and
-c to control what portion of the branch represents each series.



Yes, I am successfully using these flags in patman; but I want to be able to 
build all the combined patches...



I have thought about adding support for multiple series in a branch -
e.g. a marker on the bottom commit, giving each series a name. But I
haven't convinced myself it is desirable.



That might be too complicated...
Maybe just add a flag (in buildman) to simply ignore all of the commit messages 
(or ignore the patman tags in the commit messages) just so that the build would 
execute.
Actually, the only think that I really need is to be able to build the last one (but I 
think that "--step=0" is close enough)


You can build just the top commit by leaving off the -b argument.


OK, awesome!



Re ignoring duplicate tags, there is logic in there but it doesn't go
far enough for all cases. Please try this patch on top of what I sent
earlier today (branch buildman6 at u-boot-x86.git)



By the time I fetched "buildman6" this morning, it seems that you 
already added this patch

So with this:
commit 6aa2c7fa621d888dd0d225af2be5dfe46409f942
Author: Simon Glass 
Date:   Thu Aug 28 17:54:40 2014 -0700

buildman: Ignore conflicting tags
running:
/tools/buildman/buildman bcm28155_ap
it now builds successfully!

Thanks, Steve


diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index c473ab9..3628ac1 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -168,6 +168,10 @@ def DoBuildman(options, args, toolchains=None,
make_func=None, boards=None,
  # upstream/master~..branch but that isn't possible if upstream/master is
  # a merge commit (it will list all the commits that form part of the
  # merge)
+# Conflicting tags are not a problem for buildman, since it does not use
+# them. For example, Series-version is not useful for buildman. On the
+# other hand conflicting tags will cause an error. So allow later tags
+# to overwrite earlier ones by setting allow_overwrite=True
  if options.branch:
  if count == -1:
  range_expr = gitutil.GetRangeInBranch(options.git_dir,
@@ -175,19 +179,14 @@ def DoBuildman(options, args, toolchains=None,
make_func=None, boards=None,
  upstream_commit = gitutil.GetUpstream(options.git_dir,
options.branch)
  series = patchstream.GetMetaDataForList(upstream_commit,
-options.git_dir, 1)
+options.git_dir, 1, series=None, allow_overwrite=True)

-# Conflicting tags are not a problem for buildman, since it does
-# not use them. For example, Series-version is not useful for
-# buildman. On the other hand conflicting tags will cause an
-# error. So allow later tags to overwrite earlier ones.
-series.allow_overwrite = True
  series = patchstream.GetMetaDataForList(range_expr,

Re: [U-Boot] [PATCH] ARM: mx6: Add support for Kosagi Novena

2014-08-29 Thread Marek Vasut
On Friday, August 29, 2014 at 06:46:32 PM, Nikolay Dimitrov wrote:
> Hi Marek,
> 
> On 8/29/2014 12:30 PM, Marek Vasut wrote:
> > +static struct mx6_mmdc_calibration novena_mmdc_calib = {
> > +   /* write leveling calibration determine */
> > +   .p0_mpwldectrl0 = 0x00420048,
> > +   .p0_mpwldectrl1 = 0x006f0059,
> > +   .p1_mpwldectrl0 = 0x005a0104,
> > +   .p1_mpwldectrl1 = 0x01070113,
> > +   /* Read DQS Gating calibration */
> > +   .p0_mpdgctrl0   = 0x437c040b,
> > +   .p0_mpdgctrl1   = 0x0413040e,
> > +   .p1_mpdgctrl0   = 0x444f0446,
> > +   .p1_mpdgctrl1   = 0x044d0422,
> > +   /* Read Calibration: DQS delay relative to DQ read access */
> > +   .p0_mprddlctl   = 0x4c424249,
> > +   .p1_mprddlctl   = 0x4e48414f,
> > +   /* Write Calibration: DQ/DM delay relative to DQS write access */
> > +   .p0_mpwrdlctl   = 0x42414641,
> > +   .p1_mpwrdlctl   = 0x46374b43,
> > +};
> 
> I think these values should be result of MMDC calibration. If they're
> hardcoded, some SO-DIMM modules will work, some won't.

Yes, that is true. I discussed this with Sean and we decided to add the SPD 
stuff in a subsequent patch. These settings are for the SODIMM DRAM that is 
available in the current batch of Novena boards (the 4GiB module with ELPIDA 
chips).

> > +static struct mx6_ddr_sysinfo novena_ddr_info = {
> > +   /* Width of data bus: 0=16, 1=32, 2=64 */
> > +   .dsize  = 2,
> > +   /* Config for full 4GB range so that get_mem_size() works */
> > +   .cs_density = 32,   /* 32Gb per CS */
> > +   /* Single chip select */
> > +   .ncs= 1,
> > +   .cs1_mirror = 0,
> > +   .rtt_wr = 1,/* RTT_Wr = RZQ/4 */
> > +   .rtt_nom= 2,/* RTT_Nom = RZQ/2 */
> > +   .walat  = 3,/* Write additional latency */
> > +   .ralat  = 7,/* Read additional latency */
> > +   .mif3_mode  = 3,/* Command prediction working mode */
> > +   .bi_on  = 1,/* Bank interleaving enabled */
> > +   .sde_to_rst = 0x10, /* 14 cycles, 200us (JEDEC default) */
> > +   .rst_to_cke = 0x23, /* 33 cycles, 500us (JEDEC default) */
> > +};
> 
> ncs is hard-coded to 1, while there are available SO-DIMMS on the market
> which have 2 ranks. Novena is supposed to handle memory modules up to
> 4GiB, which means that there's a high chance to have 2-rank module
> installed.

Agreed. Again, the one coming with the board is a Rank1 one, so this is OK 
until 
the SPD readout code lands later.

> > +static struct mx6_ddr3_cfg elpida_4gib_1600 = {
> > +   .mem_speed  = 1600,
> > +   .density= 4,
> > +   .width  = 64,
> > +   .banks  = 8,
> > +   .rowaddr= 16,
> > +   .coladdr= 10,
> > +   .pagesz = 2,
> > +   .trcd   = 1300,
> > +   .trcmin = 4900,
> > +   .trasmin= 3590,
> > +};
> 
> Again, this should be read from SPD mem, not hard-coded.

Again, ACK. But this will come later on.

[...]

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


Re: [U-Boot] [PATCH] ARM: mx6: Add support for Kosagi Novena

2014-08-29 Thread Nikolay Dimitrov

Hi Marek,

On 8/29/2014 12:30 PM, Marek Vasut wrote:

+static struct mx6_mmdc_calibration novena_mmdc_calib = {
+   /* write leveling calibration determine */
+   .p0_mpwldectrl0 = 0x00420048,
+   .p0_mpwldectrl1 = 0x006f0059,
+   .p1_mpwldectrl0 = 0x005a0104,
+   .p1_mpwldectrl1 = 0x01070113,
+   /* Read DQS Gating calibration */
+   .p0_mpdgctrl0   = 0x437c040b,
+   .p0_mpdgctrl1   = 0x0413040e,
+   .p1_mpdgctrl0   = 0x444f0446,
+   .p1_mpdgctrl1   = 0x044d0422,
+   /* Read Calibration: DQS delay relative to DQ read access */
+   .p0_mprddlctl   = 0x4c424249,
+   .p1_mprddlctl   = 0x4e48414f,
+   /* Write Calibration: DQ/DM delay relative to DQS write access */
+   .p0_mpwrdlctl   = 0x42414641,
+   .p1_mpwrdlctl   = 0x46374b43,
+};
I think these values should be result of MMDC calibration. If they're 
hardcoded, some SO-DIMM modules will work, some won't.



+static struct mx6_ddr_sysinfo novena_ddr_info = {
+   /* Width of data bus: 0=16, 1=32, 2=64 */
+   .dsize  = 2,
+   /* Config for full 4GB range so that get_mem_size() works */
+   .cs_density = 32,   /* 32Gb per CS */
+   /* Single chip select */
+   .ncs= 1,
+   .cs1_mirror = 0,
+   .rtt_wr = 1,/* RTT_Wr = RZQ/4 */
+   .rtt_nom= 2,/* RTT_Nom = RZQ/2 */
+   .walat  = 3,/* Write additional latency */
+   .ralat  = 7,/* Read additional latency */
+   .mif3_mode  = 3,/* Command prediction working mode */
+   .bi_on  = 1,/* Bank interleaving enabled */
+   .sde_to_rst = 0x10, /* 14 cycles, 200us (JEDEC default) */
+   .rst_to_cke = 0x23, /* 33 cycles, 500us (JEDEC default) */
+};
ncs is hard-coded to 1, while there are available SO-DIMMS on the market 
which have 2 ranks. Novena is supposed to handle memory modules up to 
4GiB, which means that there's a high chance to have 2-rank module 
installed.



+
+static struct mx6_ddr3_cfg elpida_4gib_1600 = {
+   .mem_speed  = 1600,
+   .density= 4,
+   .width  = 64,
+   .banks  = 8,
+   .rowaddr= 16,
+   .coladdr= 10,
+   .pagesz = 2,
+   .trcd   = 1300,
+   .trcmin = 4900,
+   .trasmin= 3590,
+};

Again, this should be read from SPD mem, not hard-coded.

And finally - thank you so much for putting the efforts to add support 
for the Novena open-source board!


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


Re: [U-Boot] [PATCH] ARM: mx6: Add support for Kosagi Novena

2014-08-29 Thread Marek Vasut
On Friday, August 29, 2014 at 05:58:41 PM, Stephen Warren wrote:
> On 08/29/2014 03:30 AM, Marek Vasut wrote:
> > Add support for the Kosagi Novena board. Currently supported are:
> > - I2C busses
> > - FEC Ethernet
> > - MMC0, MMC1, Booting from MMC
> > - SATA
> > - USB ports
> > - USB Ethernet
> > 
> > diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
> > 
> > +int drv_keyboard_init(void)
> > 
> > +   /* Register the device. init_tegra_keyboard() will be called soon */
> > +   error = input_stdio_register(&dev);
> 
> I doubt "tegra" is correct in that comment...

Thanks :-)

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] ARM: mx6: Add support for Kosagi Novena

2014-08-29 Thread Stephen Warren

On 08/29/2014 03:30 AM, Marek Vasut wrote:

Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB Ethernet



diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c



+int drv_keyboard_init(void)



+   /* Register the device. init_tegra_keyboard() will be called soon */
+   error = input_stdio_register(&dev);


I doubt "tegra" is correct in that comment...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/4] add code to handle Android sparse image format

2014-08-29 Thread Tom Rini
On Thu, Aug 28, 2014 at 02:52:40PM -0700, Steve Rae wrote:
> 
> On 14-08-28 02:31 PM, Steve Rae wrote:
> >
> >On 14-08-28 02:16 PM, Tom Rini wrote:
> >>On Thu, Aug 28, 2014 at 10:53:51AM -0700, Steve Rae wrote:
> >>
> >>>Add original file (pristine) from :
> >>>
> >>>https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master
> >>>
> >>>[3b5092d20bd15a7a2879c13e9f64acc48d04af2d]
> >>>
> >>>Signed-off-by: Steve Rae 
> >>
> >>OK, let us back the truck up, so to speak.  This particular version of
> >>the file has an odd license.  Looking at
> >>https://android.googlesource.com/kernel/lk/+/master/app/aboot/aboot.c
> >>[54963a727d3e4ed1e945c7ec012b5cc5de168ac5] and it has the normal
> >>BSD-3-Clause text.  Lets grab and adapt that so we can drop the license
> >>issue.
> >>
> >
> >OK -- "v3" coming soon!
> 
> OOPS! -- this "aboot.c" does not contain the support for the "sparse
> image format" -- I cannot use this file!

Can you poke around more for a version of aboot.c that has sparse image
support and comes more directly from google.com and thus hopefully
someone caught the rather strange license text changes?

-- 
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] [U-Boot, 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 07:42:27PM +0900, Masahiro Yamada wrote:

> Copy Kconfig options from "init/Kconfig" of Linux v3.16 tag
> and adjust some parts of the help document.
> 
> Move CONFIG_SPL, CONFIG_TPL, ... etc. to "Boot images" menu.
> 
> Signed-off-by: Masahiro Yamada 

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] [U-Boot, v3, 1/7] tools/genboardscfg.py: ignore defconfigs starting with a dot

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:42PM +0900, Masahiro Yamada wrote:

> Kconfig in U-Boot creates a temporary file configs/.tmp_defconfig
> during processing "make _defconfig".  The temporary file
> might be left over for some reasons.
> 
> Just in case, tools/genboardscfg.py should make sure to
> not read such garbage files.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, 1/2] MAKEALL: run genboardscfg.py all the time

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 02:33:40PM +0900, Masahiro Yamada wrote:

> This commit makes sure boards.cfg is up to date before starting
> the build tests.  tools/genboardscfg.py exits immediately printing
> "boards.cfg is up to date. Nothing to do." when boards.cfg is
> already new.
> 
> Signed-off-by: Masahiro Yamada 

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] [U-Boot, 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 07:42:28PM +0900, Masahiro Yamada wrote:

> Now we have CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
> in Kconfig so we can use scripts/setlocalversion without
> any adjustment.  Copy it from Linux 3.16 as is.
> 
> Signed-off-by: Masahiro Yamada 

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] [U-Boot, 2/2] buildman: run genboardscfg.py all the time

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 02:33:41PM +0900, Masahiro Yamada wrote:

> This commit makes sure boards.cfg is up to date before starting
> the build tests.  tools/genboardscfg.py exits immediately printing
> "boards.cfg is up to date. Nothing to do." when boards.cfg is
> already new.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] tools/genboardscfg.py: change shebang into /usr/bin/env python2

2014-08-29 Thread Tom Rini
On Wed, Aug 27, 2014 at 02:05:51PM +0900, Masahiro Yamada wrote:

> This tool only works on python 2 (python 2.6 or lator).
> 
> Change the shebang to make sure the script is run by python 2
> and clearly say the supported version in the comment block.
> 
> Signed-off-by: Masahiro Yamada 

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] [U-Boot, v3, 5/7] tools/genboardscfg.py: fix minor problems on termination

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:46PM +0900, Masahiro Yamada wrote:

> This tool deletes the incomplete boards.cfg
> if it encounters an error or is is terminated by the user.
> 
> I notice some problems even though they rarely happen.
> 
> [1] The boards.cfg is removed if the program is terminated
> during __gen_boards_cfg() function but before boards.cfg
> is actually touched.  In this case, the previous boards.cfg
> should be kept as it is.
> 
> [2] If an error occurs while deleting the incomplete boards.cfg,
> the program throws another exception.  This hides the privious
> exception and we will not be able to know the real cause.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, v3, 6/7] tools/genboardscfg.py: check if the boards.cfg is up to date

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:47PM +0900, Masahiro Yamada wrote:

> It looks silly to regenerate the boards.cfg even when it is
> already up to date.
> 
> The tool should exit with doing nothing if the boards.cfg is newer
> than any of defconfig, Kconfig and MAINTAINERS files.
> 
> Specify -f (--force) option to get the boards.cfg regenerated
> regardless its time stamp.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, v3, 7/7] tools/genboardscfg.py: improve performance

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:48PM +0900, Masahiro Yamada wrote:

> I guess some developers are already getting sick of this tool
> because it generally takes a few minites to generate the boards.cfg
> on a reasonable computer.
> 
> The idea popped up on my mind was to skip Makefiles and
> to run script/kconfig/conf directly.
> This tool should become about 4 times faster.
> You might still not be satisfied, but better than doing nothing.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, v2] README.kconfig: document backward compatibility "make *_config"

2014-08-29 Thread Tom Rini
On Thu, Aug 28, 2014 at 10:56:55AM +0900, Masahiro Yamada wrote:

> Commit 3ff291f371fa9858426774f3732924bacb61ed1c
> (kconfig: convert Kconfig helper script into a shell script)
> restored "_config" target for backward compatibility.
> It should be documented.
> 
> Signed-off-by: Masahiro Yamada 
> Reviewed-by: Stephen Warren 

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] net: cpsw: am335x: Drop constant link checking from rx/tx path's

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 11:26:19AM +0200, Stefan Roese wrote:

> We noticed on the DXR2 platform (AM335x with a SMSC LAN9303 switch connected
> to the CPSW MAC) that the network performance in U-Boot is quite poor. Only
> when the transfer is started without a cable connected, and the cable is
> plugged after the first timeout "T" occured, an increased in performance
> can be seen. Debugging has revealed, that the cpsw driver has constant
> link checking builtin into the rx and tx functions. This results in the
> bad performance and seems to be unnecessary. The link has already been
> checked in the init function, before the transfer is started. This usually
> is sufficient.
> 
> BTW: I have seen no other network driver in U-Boot so far, that constantly
> checks for link in the rx / tx functions.
> 
> The performance numbers on the DXR2 board are:
> 
> 0.56 MiB/scpsw_check_link() in rx and tx path
> 0.87 MiB/scpsw_check_link() only in tx path
> 1.0  MiB/scpsw_check_link() only in rx path
> 2.7  MiB/sno cpsw_check_link() in rx and tx path
> 
> So with this patch the network performance on DXR2 increases from 0.56
> to 2.7 MiB/s (nearly 5 times as fast).
> 
> Signed-off-by: Stefan Roese 
> Tested-by: Samuel Egli 
> Tested-by: Heiko Schocher 
> Cc: Vladimir Koutny 
> Cc: Mugunthan V N 
> Cc: Joe Hershberger 
> Cc: Tom Rini 

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] [U-Boot, v3, 3/7] tools/genboardscfg.py: be tolerant of insane Kconfig

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:44PM +0900, Masahiro Yamada wrote:

> The tools/genboardscfg.py expects all the Kconfig and defconfig are
> written correctly.  Imagine someone accidentally has broken a board.
> Error-out just for one broken board is annoying for the other
> developers.  Let the tool skip insane boards and continue processing.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, 2/2] Correct sandbox filesystem commands in FIT image test

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 02:26:44PM -0600, Simon Glass wrote:

> The host filesystem name has changed, so update the tests. The tests now
> run again correctly:
> 
> $ make O=b/sandbox sandbox_defconfig all
> ...
> $ test/image/test-fit.py -u b/sandbox/u-boot
> FIT Tests
> 
> =
> Kernel load
> Kernel + FDT load
> Kernel + FDT + Ramdisk load
> 
> Tests passed
> Caveat: this is only a sanity check - test coverage is poor
> 
> Signed-off-by: Simon Glass 

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] [U-Boot, v3, 4/7] tools/genboardscfg.py: wait for unfinished subprocesses before error-out

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:45PM +0900, Masahiro Yamada wrote:

> When an error occurs or the program is terminated by the user
> on the way, the destructer __del__ of class Slot is invoked and
> the work directories are removed.
> 
> We have to make sure there are no subprocesses (in this case,
> "make O= ...") using the work directories before
> removing them.  Otherwise the subprocess spits a bunch of error
> messages possibly causing more problems.  Perhaps some users
> may get upset to see too many error messages.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, v3, 2/7] tools/genboardscfg.py: be tolerant of missing MAINTAINERS

2014-08-29 Thread Tom Rini
On Mon, Aug 25, 2014 at 12:39:43PM +0900, Masahiro Yamada wrote:

> tools/genboardscfg.py expects all the boards have MAINTAINERS.
> If someone adds a new board but misses to add its MAINTAINERS file,
> tools/genboardscfg.py fails to generate the boards.cfg file.
> It is annoying for the other developers.
> 
> This commit allows tools/genboardscfg.py to display warning messages
> and continue processing even if some MAINTAINERS files are missing
> or have broken formats.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

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] [U-Boot, 1/2] Fix test failure caused by bad handling of ramdisk

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 02:26:43PM -0600, Simon Glass wrote:

> Commit e3a5bbce broke the FIT image tests by not loading a ramdisk even if
> a load address is provided in the FIT. The rationale was that a load address
> of 0 should be considered to mean 'do not load'.
> 
> Add a new load operation which supports this feature, so that the ramdisk
> will be loaded if a non-zero load address is provided.
> 
> 
> Signed-off-by: Simon Glass 

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] [U-Boot,3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 07:42:29PM +0900, Masahiro Yamada wrote:

> Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag
> and adjust the help document.
> 
> Signed-off-by: Masahiro Yamada 

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] tools/genboardscfg.py: fix a bug of MAINTAINERS handling

2014-08-29 Thread Tom Rini
On Fri, Aug 22, 2014 at 02:10:43PM +0900, Masahiro Yamada wrote:

> This patch fixes a minor problem:
> If a block without "F:   configs/*_defconfig" is followed by another
> block with "F:   configs/*_defconfig", the maintainers from the
> former block are squashed into the latter.
> 
> Signed-off-by: Masahiro Yamada 

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 v2 07/15] exynos: kconfig: move board select menu and common settings

2014-08-29 Thread Tom Rini
On Fri, Aug 29, 2014 at 11:57:57AM +0900, Masahiro Yamada wrote:
> Hi Tom,
> 
> 
> On Thu, 28 Aug 2014 15:53:28 -0400
> Tom Rini  wrote:
> 
> > > > > Thanks,
> > > > > Minkyu Kang.
> > > > 
> > > > Is there any chance that this patch set will be pulled to mainline in a
> > > > near future?
> > > > 
> > > > Some urgent work depends on it :-)
> > > > 
> > > 
> > > I am also worried about this.
> > > Already new boards here and there, which lead to big conflicts.
> > > 
> > > 
> > > Tom? Albert?
> > 
> > With my latest push to master can you please re-generate this series and
> > I'll pick it up quickly after?  Thanks!
> > 
> 
> 
> I see some pull-reqs which had already been sent to Albert.
> 
> At least, I notice Tegra one (http://patchwork.ozlabs.org/patch/381725/)
> should be merged in advance because it is trying to add
> a new board "Colibri T30 board" and would cause a big conflict with my series.
> 
> 
> So, would you clear up as many ARM pull-reqs as possible soon?
> 
> I will regenerate my series based on it quickly.

OK, agreed.

-- 
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 6/8] ARMv8: PSCI: Fixup the device tree for PSCI v0.2

2014-08-29 Thread Arnab Basu

Hi Mark

On 08/28/2014 06:14 PM, Mark Rutland wrote:

Hi,

On Wed, Aug 27, 2014 at 09:29:59PM +0100, Arnab Basu wrote:

Set the enable-method in the cpu node to psci, create the psci
device tree node and also add a reserve section for the psci code
that lives in in normal RAM, so that the kernel leaves it alone

Signed-off-by: Arnab Basu 
Reviewed-by: Bhupesh Sharma 
Cc: Marc Zyngier 
---
  arch/arm/cpu/armv8/cpu-dt.c   |   67 +
  arch/arm/include/asm/system.h |4 ++
  2 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c
index 9792bc0..c2c8fe7 100644
--- a/arch/arm/cpu/armv8/cpu-dt.c
+++ b/arch/arm/cpu/armv8/cpu-dt.c
@@ -9,7 +9,69 @@
  #include 

  #ifdef CONFIG_MP
+#ifdef CONFIG_ARMV8_PSCI

+static void psci_reserve_mem(void *fdt)
+{
+#ifndef CONFIG_ARMV8_SECURE_BASE
+   /* secure code lives in RAM, keep it alive */
+   fdt_add_mem_rsv(fdt, (unsigned long)__secure_start,
+   __secure_end - __secure_start);
+#endif
+}


With PSCI I'd be worried about telling the OS about this memory at all.

If the OS maps the memory we could encounter issues with mismatched
aliases and/or unexpected hits in the D-cache, which can result in a
loss of ordering and/or visbility guarantees, which could break the PSCI
implementation.

With the KVM or trusted firmware PSCI implementations the (guest) OS
cannot map the implementation's memory, preventing such problems. The
arm64 Linux boot-wrapper is dodgy in this regard currently.



The idea here is that if there is no PSCI specific (most likely secure) 
memory allocated in the system, the macro "CONFIG_ARMV8_SECURE_BASE" 
will not be defined. In this case the PSCI vector table and its support 
code will be in DDR and will be protected from Linux using memreserve.


If this macro is defined the assumption is that it points to some 
non-ddr location, say secure OCRAM. In this case U-Boot will copy the 
PSCI vector table and its support code to that region and we are hoping 
that this address space is not visible to the OS in the first place.


This is my understanding of the code, maybe Marc would like to comment 
on if this was the thinking in ARMv7.


I realise that this probably needs to be documented.


+static int cpu_update_dt_psci(void *fdt)
+{
+   int nodeoff;
+   int tmp;
+
+   psci_reserve_mem(fdt);
+
+   nodeoff = fdt_path_offset(fdt, "/cpus");
+   if (nodeoff < 0) {
+   printf("couldn't find /cpus\n");
+   return nodeoff;
+   }
+
+   /* add 'enable-method = "psci"' to each cpu node */
+   for (tmp = fdt_first_subnode(fdt, nodeoff);
+tmp >= 0;
+tmp = fdt_next_subnode(fdt, tmp)) {
+   const struct fdt_property *prop;
+   int len;
+
+   prop = fdt_get_property(fdt, tmp, "device_type", &len);
+   if (!prop)
+   continue;
+   if (len < 4)
+   continue;
+   if (strcmp(prop->data, "cpu"))
+   continue;
+
+   fdt_setprop_string(fdt, tmp, "enable-method", "psci");


Do we need to check the return code here, as we do when setting up the
psci node?



Probably, I'll add it.


+   }
+
+   nodeoff = fdt_path_offset(fdt, "/psci");


We might need to search by compatible string. All psci nodes so far have
been called /psci, but that's not guaranteed. Linux looks for nodes
compatible with "arm,psci" and/or "arm,psci-0.2".



I see that it is called "Main node" in the kernel documentation. Any 
reason it's name has not been fixed to "psci"? Is it too late to do that 
and save myself some work here? :)



+   if (nodeoff < 0) {
+   nodeoff = fdt_path_offset(fdt, "/");
+   if (nodeoff < 0)
+   return nodeoff;
+
+   nodeoff = fdt_add_subnode(fdt, nodeoff, "psci");
+   if (nodeoff < 0)
+   return nodeoff;
+   }
+
+   tmp = fdt_setprop_string(fdt, nodeoff, "compatible", "arm,psci-0.2");
+   if (tmp)
+   return tmp;
+   tmp = fdt_setprop_string(fdt, nodeoff, "method", "smc");
+   if (tmp)
+   return tmp;
+
+   return 0;
+}


Otherwise this looks fine.


Thanks



Mark.



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


Re: [U-Boot] [PATCH 0/8] U-Boot port to Xtensa architecture

2014-08-29 Thread Michal Simek
On 08/29/2014 02:25 PM, Max Filippov wrote:
> Hi Michal,
> 
> On Fri, Aug 29, 2014 at 3:50 PM, Michal Simek  wrote:
>> On 08/20/2014 07:42 PM, Max Filippov wrote:
>>> this series adds U-Boot port to Xtensa, configurable processor architecture
>>> from Tensilica, Inc., now Cadence Design Systems Inc.
>>>
>>> Preparation patches clean up OpenCores 10/100 MBit driver, enable it to be
>>> used with dedicated packet memory and with gigabit PHY. Two patches add
>>> proper xtensa bits: changes to shares files and contents of arch/xtensa.
>>> One more patch adds sample xtensa CPU configuration -- Diamond 232.
>>> One more patch adds xtfpga board family that consists of Avnet LX60, LX110
>>> and LX200 and Xilinx ML605 and KC705 FPGA boards configured with xtensa
>>> bitstream.
>>
>> Any link to bitstreams? I have ml605 and kc705 here and will be nice to test 
>> it.
> 
> The board alone is not enough to boot xtensa software, as the JTAG connector
> capable of loading code into CPU goes on a separate daughterboard that plugs
> into FMC connectors. I will check if I can share a bitstream and if it may be
> somehow used with the FPGA board alone.

Any link to that FMC connector and connections there?

> However you should be able to test with qemu, as it simulates all necessary
> hardware. Some examples are listed here:
> http://wiki.linux-xtensa.org/index.php/Xtensa_on_QEMU

I am more interested to see this work on real HW than on qemu.

Thanks,
Michal



-- 
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] [PATCH v2 15/16] buildman: Add additional functional tests

2014-08-29 Thread Simon Glass
This adds coverage of core features of the builder, including the
command-line options which affect building.

Signed-off-by: Simon Glass 
---

Changes in v2: None

 tools/buildman/func_test.py | 324 +---
 1 file changed, 306 insertions(+), 18 deletions(-)

diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 237a80b..2cb5cf0 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -43,6 +43,125 @@ boards = [
 ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', 
''],
 ]
 
+commit_shortlog = """4aca821 patman: Avoid changing the order of tags
+39403bb patman: Use --no-pager' to stop git from forking a pager
+db6e6f2 patman: Remove the -a option
+f2ccf03 patman: Correct unit tests to run correctly
+1d097f9 patman: Fix indentation in terminal.py
+d073747 patman: Support the 'reverse' option for 'git log
+"""
+
+commit_log = ["""commit 7f6b8315d18f683c5181d0c3694818c1b2a20dcd
+Author: Masahiro Yamada 
+Date:   Fri Aug 22 19:12:41 2014 +0900
+
+buildman: refactor help message
+
+"buildman [options]" is displayed by default.
+
+Append the rest of help messages to parser.usage
+instead of replacing it.
+
+Besides, "-b " is not mandatory since commit fea5858e.
+Drop it from the usage.
+
+Signed-off-by: Masahiro Yamada 
+""",
+"""commit d0737479be6baf4db5e2cdbee123e96bc5ed0ba8
+Author: Simon Glass 
+Date:   Thu Aug 14 16:48:25 2014 -0600
+
+patman: Support the 'reverse' option for 'git log'
+
+This option is currently not supported, but needs to be, for buildman to
+operate as expected.
+
+Series-changes: 7
+- Add new patch to fix the 'reverse' bug
+
+
+Change-Id: I79078f792e8b390b8a1272a8023537821d45feda
+Reported-by: York Sun 
+Signed-off-by: Simon Glass 
+
+""",
+"""commit 1d097f9ab487c5019152fd47bda126839f3bf9fc
+Author: Simon Glass 
+Date:   Sat Aug 9 11:44:32 2014 -0600
+
+patman: Fix indentation in terminal.py
+
+This code came from a different project with 2-character indentation. Fix
+it for U-Boot.
+
+Series-changes: 6
+- Add new patch to fix indentation in teminal.py
+
+Change-Id: I5a74d2ebbb3cc12a665f5c725064009ac96e8a34
+Signed-off-by: Simon Glass 
+
+""",
+"""commit f2ccf03869d1e152c836515a3ceb83cdfe04a105
+Author: Simon Glass 
+Date:   Sat Aug 9 11:08:24 2014 -0600
+
+patman: Correct unit tests to run correctly
+
+It seems that doctest behaves differently now, and some of the unit tests
+do not run. Adjust the tests to work correctly.
+
+ ./tools/patman/patman --test
+
+
+Series-changes: 6
+- Add new patch to fix patman unit tests
+
+Change-Id: I3d2ca588f4933e1f9d6b1665a00e4ae58269ff3b
+
+""",
+"""commit db6e6f2f9331c5a37647d6668768d4a40b8b0d1c
+Author: Simon Glass 
+Date:   Sat Aug 9 12:06:02 2014 -0600
+
+patman: Remove the -a option
+
+It seems that this is no longer needed, since checkpatch.pl will catch
+whitespace problems in patches. Also the option is not widely used, so
+it seems safe to just remove it.
+
+Series-changes: 6
+- Add new patch to remove patman's -a option
+
+Suggested-by: Masahiro Yamada 
+Change-Id: I5821a1c75154e532c46513486ca40b808de7e2cc
+
+""",
+"""commit 39403bb4f838153028a6f21ca30bf100f3791133
+Author: Simon Glass 
+Date:   Thu Aug 14 21:50:52 2014 -0600
+
+patman: Use --no-pager' to stop git from forking a pager
+
+""",
+"""commit 4aca821e27e97925c039e69fd37375b09c6f129c
+Author: Simon Glass 
+Date:   Fri Aug 22 15:57:39 2014 -0600
+
+patman: Avoid changing the order of tags
+
+patman collects tags that it sees in the commit and places them nicely
+sorted at the end of the patch. However, this is not really necessary and
+in fact is apparently not desirable.
+
+Series-changes: 9
+- Add new patch to avoid changing the order of tags
+
+Suggested-by: Masahiro Yamada 
+Change-Id: Ib1518588c1a189ad5c3198aae76f8654aed8d0db
+"""]
+
+TEST_BRANCH = '__testbranch'
+
 class TestFunctional(unittest.TestCase):
 """Functional test for buildman.
 
@@ -60,26 +179,49 @@ class TestFunctional(unittest.TestCase):
 self._buildman_pathname = sys.argv[0]
 self._buildman_dir = os.path.dirname(sys.argv[0])
 command.test_result = self._HandleCommand
-self._toolchains = toolchain.Toolchains()
-self._toolchains.Add('gcc', test=False)
+self.setupToolchains()
+self._toolchains.Add('arm-gcc', test=False)
+self._toolchains.Add('powerpc-gcc', test=False)
 bsettings.Setup(None)
 bsettings.AddFile(settings_data)
 self._boards = board.Boards()
 for brd in boards:
 self._boards.AddBoard(board.Board(*brd))
 
+# Directories where the source been cloned
+self._clone_dirs = []
+self._commits = len(commit_shortlog.splitlines()) + 1
+self._total_builds = self._commits * len(boa

[U-Boot] [PATCH v2 01/16] patman: Add a way of recording terminal output for testing

2014-08-29 Thread Simon Glass
When running unit tests we don't want output to go to the terminal.
Provide a way of collecting it so that it can be examined by test code
later.

Signed-off-by: Simon Glass 
---

Changes in v2:
- Add a function to print out the terminal output recorded

 tools/patman/terminal.py | 72 
 1 file changed, 72 insertions(+)

diff --git a/tools/patman/terminal.py b/tools/patman/terminal.py
index 963f2f8..e78a7c1 100644
--- a/tools/patman/terminal.py
+++ b/tools/patman/terminal.py
@@ -14,6 +14,78 @@ import sys
 # Selection of when we want our output to be colored
 COLOR_IF_TERMINAL, COLOR_ALWAYS, COLOR_NEVER = range(3)
 
+# Initially, we are set up to print to the terminal
+print_test_mode = False
+print_test_list = []
+
+class PrintLine:
+"""A line of text output
+
+Members:
+text: Text line that was printed
+newline: True to output a newline after the text
+colour: Text colour to use
+"""
+def __init__(self, text, newline, colour):
+self.text = text
+self.newline = newline
+self.colour = colour
+
+def __str__(self):
+return 'newline=%s, colour=%s, text=%s' % (self.newline, self.colour,
+self.text)
+
+def Print(text='', newline=True, colour=None):
+"""Handle a line of output to the terminal.
+
+In test mode this is recorded in a list. Otherwise it is output to the
+terminal.
+
+Args:
+text: Text to print
+newline: True to add a new line at the end of the text
+colour: Colour to use for the text
+"""
+if print_test_mode:
+print_test_list.append(PrintLine(text, newline, colour))
+else:
+if colour:
+col = Color()
+text = col.Color(colour, text)
+print text,
+if newline:
+print
+
+def SetPrintTestMode():
+"""Go into test mode, where all printing is recorded"""
+global print_test_mode
+
+print_test_mode = True
+
+def GetPrintTestLines():
+"""Get a list of all lines output through Print()
+
+Returns:
+A list of PrintLine objects
+"""
+global print_test_list
+
+ret = print_test_list
+print_test_list = []
+return ret
+
+def EchoPrintTestLines():
+"""Print out the text lines collected"""
+for line in print_test_list:
+if line.colour:
+col = Color()
+print col.Color(line.colour, line.text),
+else:
+print line.text,
+if line.newline:
+print
+
+
 class Color(object):
 """Conditionally wraps text in ANSI color escape sequences."""
 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
-- 
2.1.0.rc2.206.gedb03e5

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


[U-Boot] [PATCH v2 05/16] buildman: Move the command line code into its own file

2014-08-29 Thread Simon Glass
We want to be able to issue parser commands from within buildman for test
purposes. Move the parser code into its own file so we don't end up needing
the buildman and test modules to reference each other.

Signed-off-by: Simon Glass 
---

Changes in v2: None

 tools/buildman/buildman.py | 73 ++-
 tools/buildman/cmdline.py  | 85 ++
 2 files changed, 87 insertions(+), 71 deletions(-)
 create mode 100644 tools/buildman/cmdline.py

diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py
index 1258b76..c4de857 100755
--- a/tools/buildman/buildman.py
+++ b/tools/buildman/buildman.py
@@ -8,7 +8,6 @@
 """See README for more information"""
 
 import multiprocessing
-from optparse import OptionParser
 import os
 import re
 import sys
@@ -22,7 +21,7 @@ sys.path.append(os.path.join(our_path, '../patman'))
 import board
 import builder
 import checkpatch
-import command
+import cmdline
 import control
 import doctest
 import gitutil
@@ -59,75 +58,7 @@ def RunTests():
 print err
 
 
-parser = OptionParser()
-parser.add_option('-b', '--branch', type='string',
-   help='Branch name to build')
-parser.add_option('-B', '--bloat', dest='show_bloat',
-   action='store_true', default=False,
-   help='Show changes in function code size for each board')
-parser.add_option('-c', '--count', dest='count', type='int',
-   default=-1, help='Run build on the top n commits')
-parser.add_option('-C', '--force-reconfig', dest='force_reconfig',
-   action='store_true', default=False,
-   help='Reconfigure for every commit (disable incremental build)')
-parser.add_option('-d', '--detail', dest='show_detail',
-   action='store_true', default=False,
-   help='Show detailed information for each board in summary')
-parser.add_option('-e', '--show_errors', action='store_true',
-   default=False, help='Show errors and warnings')
-parser.add_option('-f', '--force-build', dest='force_build',
-   action='store_true', default=False,
-   help='Force build of boards even if already built')
-parser.add_option('-F', '--force-build-failures', dest='force_build_failures',
-   action='store_true', default=False,
-   help='Force build of previously-failed build')
-parser.add_option('-g', '--git', type='string',
-   help='Git repo containing branch to build', default='.')
-parser.add_option('-G', '--config-file', type='string',
-   help='Path to buildman config file', default='')
-parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
-   default=False, help='Display the README file')
-parser.add_option('-i', '--in-tree', dest='in_tree',
-   action='store_true', default=False,
-   help='Build in the source tree instead of a separate directory')
-parser.add_option('-j', '--jobs', dest='jobs', type='int',
-   default=None, help='Number of jobs to run at once (passed to make)')
-parser.add_option('-k', '--keep-outputs', action='store_true',
-   default=False, help='Keep all build output files (e.g. binaries)')
-parser.add_option('-l', '--list-error-boards', action='store_true',
-   default=False, help='Show a list of boards next to each error/warning')
-parser.add_option('--list-tool-chains', action='store_true', default=False,
-   help='List available tool chains')
-parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run',
-   default=False, help="Do a try run (describe actions, but no nothing)")
-parser.add_option('-o', '--output-dir', type='string',
-   dest='output_dir', default='..',
-   help='Directory where all builds happen and buildman has its workspace 
(default is ../)')
-parser.add_option('-Q', '--quick', action='store_true',
-   default=False, help='Do a rough build, with limited warning resolution')
-parser.add_option('-s', '--summary', action='store_true',
-   default=False, help='Show a build summary')
-parser.add_option('-S', '--show-sizes', action='store_true',
-   default=False, help='Show image size variation in summary')
-parser.add_option('--step', type='int',
-   default=1, help='Only build every n commits (0=just first and last)')
-parser.add_option('-t', '--test', action='store_true', dest='test',
-  default=False, help='run tests')
-parser.add_option('-T', '--threads', type='int',
-   default=None, help='Number of builder threads to use')
-parser.add_option('-u', '--show_unknown', action='store_true',
-   default=False, help='Show boards with unknown build result')
-parser.add_option('-v', '--verbose', action='store_true',
-   default=False, help='Show build results while the build progresses')
-parser.add_option('-x', '--exclude', dest='exclude',
-  type='string', action='append',
-  help='Specify a list of boards to exclude, separated by comma')
-
-parser.usage += """
-
-Build U-Boot for all commits in a branch. Use -n to do a dry run"""
-
-(optio

[U-Boot] [PATCH v2 13/16] buildman: Provide an internal option to clean the outpur dir

2014-08-29 Thread Simon Glass
For testing it is useful to clean the output directory before running a
test. This avoids a test interfering with the results of a subsequent
test by leaving data around.

Add this feature as an optional parameter to the control logic.

Signed-off-by: Simon Glass 
---

Changes in v2: None

 tools/buildman/control.py | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 3f3cce8..c473ab9 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -5,6 +5,7 @@
 
 import multiprocessing
 import os
+import shutil
 import sys
 
 import board
@@ -78,7 +79,8 @@ def ShowActions(series, why_selected, boards_selected, 
builder, options):
 print ('Total boards to build for each commit: %d\n' %
 why_selected['all'])
 
-def DoBuildman(options, args, toolchains=None, make_func=None, boards=None):
+def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
+   clean_dir=False):
 """The main control code for buildman
 
 Args:
@@ -93,6 +95,8 @@ def DoBuildman(options, args, toolchains=None, 
make_func=None, boards=None):
 board: Boards() object to use, containing a list of available
 boards. If this is None it will be created and scanned.
 """
+global builder
+
 if options.full_help:
 pager = os.getenv('PAGER')
 if not pager:
@@ -211,6 +215,8 @@ def DoBuildman(options, args, toolchains=None, 
make_func=None, boards=None):
 else:
 dirname = 'current'
 output_dir = os.path.join(options.output_dir, dirname)
+if clean_dir:
+shutil.rmtree(output_dir)
 builder = Builder(toolchains, output_dir, options.git_dir,
 options.threads, options.jobs, gnu_make=gnu_make, checkout=True,
 show_unknown=options.show_unknown, step=options.step)
@@ -232,6 +238,9 @@ def DoBuildman(options, args, toolchains=None, 
make_func=None, boards=None):
 
 if series:
 commits = series.commits
+# Number the commits for test purposes
+for commit in range(len(commits)):
+commits[commit].sequence = commit
 else:
 commits = None
 
-- 
2.1.0.rc2.206.gedb03e5

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


[U-Boot] [PATCH v2 12/16] buildman: Correct counting of build failures on retry

2014-08-29 Thread Simon Glass
When a build is to be performed, buildman checks to see if it has already
been done. In most cases it will not bother trying again. However, it was
not reading the return code from the 'done' file, so if the result was a
failure, it would not be counted. This depresses the 'failure' count stats
that buildman prints in this case.

Fix this bug by always reading the return code.

Signed-off-by: Simon Glass 
---

Changes in v2: None

 tools/buildman/builderthread.py | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 0246375..261919f 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -138,16 +138,17 @@ class BuilderThread(threading.Thread):
 result.already_done = os.path.exists(done_file)
 will_build = (force_build or force_build_failures or
 not result.already_done)
-if result.already_done and will_build:
+if result.already_done:
 # Get the return code from that build and use it
 with open(done_file, 'r') as fd:
 result.return_code = int(fd.readline())
-err_file = self.builder.GetErrFile(commit_upto, brd.target)
-if os.path.exists(err_file) and os.stat(err_file).st_size:
-result.stderr = 'bad'
-elif not force_build:
-# The build passed, so no need to build it again
-will_build = False
+if will_build:
+err_file = self.builder.GetErrFile(commit_upto, brd.target)
+if os.path.exists(err_file) and os.stat(err_file).st_size:
+result.stderr = 'bad'
+elif not force_build:
+# The build passed, so no need to build it again
+will_build = False
 
 if will_build:
 # We are going to have to build it. First, get a toolchain
-- 
2.1.0.rc2.206.gedb03e5

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


[U-Boot] [PATCH 2/2] doc: Use KBUILD_OUTPUT instead of BUILD_DIR

2014-08-29 Thread Jagannadha Sutradharudu Teki
Now saving output files in a separate directory through
KBUILD_OUTPUT not with BUILD_DIR, so updated the documentation
accordingly.

Signed-off-by: Jagannadha Sutradharudu Teki 
---
 MAKEALL | 12 ++--
 README  | 10 +-
 doc/README.kwbimage |  4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 392ea8d..42f09e8 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -42,7 +42,7 @@ usage()
   architecture "ARCH".  Substitute "ARCH" for any
   supported architecture (default: "")
  MAKEALL_LOGDIR   output all logs to here (default: ./LOG/)
- BUILD_DIRoutput build directory (default: ./)
+ KBUILD_OUTPUToutput build directory (default: ./)
  BUILD_NBUILDSnumber of parallel targets (default: 1)
 
Examples:
@@ -223,14 +223,14 @@ BUILD_MANY=0
 
 if [ "${BUILD_NBUILDS}" -gt 1 ] ; then
BUILD_MANY=1
-   : ${BUILD_DIR:=./build}
-   mkdir -p "${BUILD_DIR}/ERR"
-   find "${BUILD_DIR}/ERR/" -type f -exec rm -f {} +
+   : ${KBUILD_OUTPUT:=./build}
+   mkdir -p "${KBUILD_OUTPUT}/ERR"
+   find "${KBUILD_OUTPUT}/ERR/" -type f -exec rm -f {} +
 fi
 
-: ${BUILD_DIR:=.}
+: ${KBUILD_OUTPUT:=.}
 
-OUTPUT_PREFIX="${BUILD_DIR}"
+OUTPUT_PREFIX="${KBUILD_OUTPUT}"
 
 [ -d ${LOG_DIR} ] || mkdir "${LOG_DIR}" || exit 1
 if [ "$CONTINUE" != 'y' -a "$REBUILD_ERRORS" != 'y' ] ; then
diff --git a/README b/README
index e88184b..8e05f69 100644
--- a/README
+++ b/README
@@ -4969,14 +4969,14 @@ this behavior and build U-Boot to some external 
directory:
make O=/tmp/build NAME_defconfig
make O=/tmp/build all
 
-2. Set environment variable BUILD_DIR to point to the desired location:
+2. Set environment variable KBUILD_OUTPUT to point to the desired location:
 
-   export BUILD_DIR=/tmp/build
+   export KBUILD_OUTPUT=/tmp/build
make distclean
make NAME_defconfig
make all
 
-Note that the command line "O=" setting overrides the BUILD_DIR environment
+Note that the command line "O=" setting overrides the KBUILD_OUTPUT environment
 variable.
 
 
@@ -5032,13 +5032,13 @@ or to build on a native PowerPC system you can type
 
 When using the MAKEALL script, the default behaviour is to build
 U-Boot in the source directory. This location can be changed by
-setting the BUILD_DIR environment variable. Also, for each target
+setting the KBUILD_OUTPUT environment variable. Also, for each target
 built, the MAKEALL script saves two log files (.ERR and
 .MAKEALL) in the /LOG directory. This default
 location can be changed by setting the MAKEALL_LOGDIR environment
 variable. For example:
 
-   export BUILD_DIR=/tmp/build
+   export KBUILD_OUTPUT=/tmp/build
export MAKEALL_LOGDIR=/tmp/log
CROSS_COMPILE=ppc_8xx- MAKEALL
 
diff --git a/doc/README.kwbimage b/doc/README.kwbimage
index 13f6f92..8c02298 100644
--- a/doc/README.kwbimage
+++ b/doc/README.kwbimage
@@ -30,10 +30,10 @@ kwbimage support available with mkimage utility will 
generate kirkwood boot
 image that can be flashed on the board NAND/SPI flash.  The make target
 which uses mkimage to produce such an image is "u-boot.kwb".  For example:
 
-  export BUILD_DIR=/tmp/build
+  export KBUILD_OUTPUT=/tmp/build
   make distclean
   make yourboard_config
-  make $BUILD_DIR/u-boot.kwb
+  make $KBUILD_OUTPUT/u-boot.kwb
 
 
 Board specific configuration file specifications:
-- 
2.0.0.rc1.4.gd8779e1

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


[U-Boot] [PATCH 1/2] sandbox: Update minor documentation changes

2014-08-29 Thread Jagannadha Sutradharudu Teki
From: Jagannadha Sutradharudu Teki 

- Use _defconfig instead of _config, but _config is still working.
- Corrected README.sandbox path in ./README

Signed-off-by: Jagannadha Sutradharudu Teki 
---
 README   | 2 +-
 board/sandbox/README.sandbox | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 1e63f04..e88184b 100644
--- a/README
+++ b/README
@@ -272,7 +272,7 @@ board. This allows feature development which is not board- 
or architecture-
 specific to be undertaken on a native platform. The sandbox is also used to
 run some of U-Boot's tests.
 
-See board/sandbox/sandbox/README.sandbox for more details.
+See board/sandbox/README.sandbox for more details.
 
 
 Configuration Options:
diff --git a/board/sandbox/README.sandbox b/board/sandbox/README.sandbox
index 529c447..2613c46 100644
--- a/board/sandbox/README.sandbox
+++ b/board/sandbox/README.sandbox
@@ -32,7 +32,7 @@ Basic Operation
 
 To run sandbox U-Boot use something like:
 
-   make sandbox_config all
+   make sandbox_defconfig all
./u-boot
 
 Note:
@@ -41,7 +41,7 @@ Note:
build sandbox without SDL (i.e. no display/keyboard support) by removing
the CONFIG_SANDBOX_SDL line in include/configs/sandbox.h or using:
 
-  make sandbox_config all NO_SDL=1
+  make sandbox_defconfig all NO_SDL=1
   ./u-boot
 
 
-- 
2.0.0.rc1.4.gd8779e1

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


Re: [U-Boot] [PATCH v4 1/2] blackfin: convert blackfin board_f and board_r to use generic board init functions

2014-08-29 Thread Michal Simek
Hi Sonic

On 08/07/2014 09:08 AM, Sonic Zhang wrote:
> From: Sonic Zhang 
> 
> - move blackfin specific cpu init code from blackfin board.c to cpu.c
> - remove blackfin specific board init code and invoke generic board_f fron 
> cpu init entry
> - rename section name bss_vma to bss_start in order to match the generic 
> board init code
> - add a fake relocate_code function to set up the new stack only

I would like get more information about this change.
I have spent some time on Microblaze to move to generic board
and I need to use sort of the same approach.
I will play with full reloc but as I see there will be a lot of additional
code generated which increase u-boot footprint and brings nothing.

That's why I would like to know why you have decided to use fake relocate_code
function and what setup you are using before and "after" relocation (location 
of stack, gd, malloc
areas, etc).

Thanks,
Michal

-- 
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


Re: [U-Boot] [PATCH 0/8] U-Boot port to Xtensa architecture

2014-08-29 Thread Max Filippov
Hi Michal,

On Fri, Aug 29, 2014 at 3:50 PM, Michal Simek  wrote:
> On 08/20/2014 07:42 PM, Max Filippov wrote:
>> this series adds U-Boot port to Xtensa, configurable processor architecture
>> from Tensilica, Inc., now Cadence Design Systems Inc.
>>
>> Preparation patches clean up OpenCores 10/100 MBit driver, enable it to be
>> used with dedicated packet memory and with gigabit PHY. Two patches add
>> proper xtensa bits: changes to shares files and contents of arch/xtensa.
>> One more patch adds sample xtensa CPU configuration -- Diamond 232.
>> One more patch adds xtfpga board family that consists of Avnet LX60, LX110
>> and LX200 and Xilinx ML605 and KC705 FPGA boards configured with xtensa
>> bitstream.
>
> Any link to bitstreams? I have ml605 and kc705 here and will be nice to test 
> it.

The board alone is not enough to boot xtensa software, as the JTAG connector
capable of loading code into CPU goes on a separate daughterboard that plugs
into FMC connectors. I will check if I can share a bitstream and if it may be
somehow used with the FPGA board alone.

However you should be able to test with qemu, as it simulates all necessary
hardware. Some examples are listed here:
http://wiki.linux-xtensa.org/index.php/Xtensa_on_QEMU

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


Re: [U-Boot] [PATCH 0/8] U-Boot port to Xtensa architecture

2014-08-29 Thread Michal Simek
Hi Max,

On 08/20/2014 07:42 PM, Max Filippov wrote:
> Hi Tom,
> 
> this series adds U-Boot port to Xtensa, configurable processor architecture
> from Tensilica, Inc., now Cadence Design Systems Inc.
> 
> Preparation patches clean up OpenCores 10/100 MBit driver, enable it to be
> used with dedicated packet memory and with gigabit PHY. Two patches add
> proper xtensa bits: changes to shares files and contents of arch/xtensa.
> One more patch adds sample xtensa CPU configuration -- Diamond 232.
> One more patch adds xtfpga board family that consists of Avnet LX60, LX110
> and LX200 and Xilinx ML605 and KC705 FPGA boards configured with xtensa
> bitstream.

Any link to bitstreams? I have ml605 and kc705 here and will be nice to test it.

Thanks,
Michal




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


Re: [U-Boot] [PATCH v2] arm: Add missing .vectors section to linker scripts

2014-08-29 Thread Michal Simek
On 08/21/2014 03:43 PM, Benoît Thébaudeau wrote:
> Commit 41623c9 'arm: move exception handling out of start.S files' missed some
> linker scripts. Hence, some boards no longer had exception handling linked 
> since
> this commit. Restore the original behavior by adding the .vectors section to
> these linker scripts.
> 
> Signed-off-by: Benoît Thébaudeau 
> Cc: Albert ARIBAUD 
> 
> ---
> 
> Changes in v2:
>  - Reword the patch subject from 'arm: fix missing exception handling' to 
> 'arm:
>Add missing .vectors section to linker scripts'.
> ---
>  arch/arm/cpu/arm1136/u-boot-spl.lds| 1 +
>  arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds  | 1 +
>  arch/arm/cpu/armv7/am33xx/u-boot-spl.lds   | 1 +
>  arch/arm/cpu/armv7/omap-common/u-boot-spl.lds  | 1 +
>  arch/arm/cpu/armv7/socfpga/u-boot-spl.lds  | 1 +
>  arch/arm/cpu/armv7/zynq/u-boot-spl.lds | 1 +
>  arch/arm/cpu/at91-common/u-boot-spl.lds| 1 +
>  board/Barix/ipam390/u-boot-spl-ipam390.lds | 1 +
>  board/ait/cam_enc_4xx/u-boot-spl.lds   | 1 +
>  board/cirrus/edb93xx/u-boot.lds| 1 +
>  board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 1 +
>  board/davinci/da8xxevm/u-boot-spl-hawk.lds | 1 +
>  board/samsung/common/exynos-uboot-spl.lds  | 1 +
>  board/vpac270/u-boot-spl.lds   | 1 +
>  14 files changed, 14 insertions(+)
> 
> diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds 
> b/arch/arm/cpu/arm1136/u-boot-spl.lds
> index 0299902..97e4a8b 100644
> --- a/arch/arm/cpu/arm1136/u-boot-spl.lds
> +++ b/arch/arm/cpu/arm1136/u-boot-spl.lds
> @@ -22,6 +22,7 @@ SECTIONS
>   .text  :
>   {
>   __start = .;
> +   *(.vectors)
> arch/arm/cpu/arm1136/start.o  (.text*)
> *(.text*)
>   } >.sram
> diff --git a/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds 
> b/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
> index f4bf8ac..bf2ac13 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
> +++ b/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
> @@ -21,6 +21,7 @@ SECTIONS
>   . = ALIGN(4);
>   .text   :
>   {
> + *(.vectors)
>   arch/arm/cpu/arm926ejs/mxs/start.o  (.text*)
>   *(.text*)
>   }
> diff --git a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds 
> b/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
> index b1c28c9..07cf267 100644
> --- a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
> +++ b/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
> @@ -22,6 +22,7 @@ SECTIONS
>   .text  :
>   {
>   __start = .;
> + *(.vectors)
>   arch/arm/cpu/armv7/start.o  (.text)
>   *(.text*)
>   } >.sram
> diff --git a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds 
> b/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
> index 745603d..ccd0c83 100644
> --- a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
> +++ b/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
> @@ -22,6 +22,7 @@ SECTIONS
>   .text  :
>   {
>   __start = .;
> + *(.vectors)
>   arch/arm/cpu/armv7/start.o  (.text*)
>   *(.text*)
>   } >.sram
> diff --git a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds 
> b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
> index 4282beb..db9bdad 100644
> --- a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
> +++ b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
> @@ -16,6 +16,7 @@ SECTIONS
>   . = ALIGN(4);
>   .text   :
>   {
> + *(.vectors)
>   arch/arm/cpu/armv7/start.o  (.text*)
>   *(.text*)
>   } >.sdram
> diff --git a/arch/arm/cpu/armv7/zynq/u-boot-spl.lds 
> b/arch/arm/cpu/armv7/zynq/u-boot-spl.lds
> index 0c4501e..0f2f756 100644
> --- a/arch/arm/cpu/armv7/zynq/u-boot-spl.lds
> +++ b/arch/arm/cpu/armv7/zynq/u-boot-spl.lds
> @@ -22,6 +22,7 @@ SECTIONS
>   .text :
>   {
>   __image_copy_start = .;
> + *(.vectors)
>   CPUDIR/start.o (.text*)
>   *(.text*)
>   } > .sram


I have this patch for zynq in my private branch. It means when Albert or Tom
applies my zynq changes please ensure that vectors are not added twice.

Thanks,
Michal

-- 
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] [NAND Question] How should NAND_CMD_LOCK_TIGHT be handled ?

2014-08-29 Thread Masahiro Yamada
Hi, Scott and other MTD developers,



Commit ff94bc40af3481d47546595ba73c136de6af6929
(mtd, ubi, ubifs: resync with Linux-3.14)
moved the definition of NAND_CMD_LOCK_TIGHT and NAND_CMD_LOCK_STATUS
from include/mtd/nand/ to drivers/mtd/nand/nand_util.c

(These two macros looks like U-Boot specific extentions.)

Since that commit, Denali driver cannot build
http://patchwork.ozlabs.org/patch/381305/


  CC  drivers/mtd/nand/denali.o
drivers/mtd/nand/denali.c: In function 'denali_cmdfunc':
drivers/mtd/nand/denali.c:1107:7: error: 'NAND_CMD_LOCK_TIGHT' undeclared 
(first use in this function)
drivers/mtd/nand/denali.c:1107:7: note: each undeclared identifier is reported 
only once for each function it appears in
make[1]: *** [drivers/mtd/nand/denali.o] Error 1
make: *** [drivers/mtd/nand] Error 2



My question is:

  - What is this macro?   Why was it added to U-Boot?

  - If this macro is still necessary, shouldn't it be defined globally?



Best Regards
Masahiro Yamada

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


Re: [U-Boot] [PATCH 0/3] ARM: Zynq: Add ZYBO board

2014-08-29 Thread Michal Simek
On 08/28/2014 01:16 PM, Peter Crosthwaite wrote:
> Hi Michal, Steven,
> 
> This series adds the ZYBO board to u-boot. Some components were originally
> contributed to the digilent u-boot tree (P2). Thanks to Steven Wang. The
> original code had a custom u-boot env specific for Zybo but I have dropped
> that. I have added DTS support - which in general seems to have appeared in
> u-boot since the original digilent work (P1). The new configury is P3.
> 
> Regards,
> Peter
> 
> Peter Crosthwaite (2):
>   arm: dts: zynq: Add digilent ZYBO board dts
>   kconfig: zynq: Add ZYBO board
> 
> Tinghui Wang (1):
>   configs: zynq: Add config support for ZYBO
> 
>  arch/arm/Kconfig|  3 +++
>  arch/arm/dts/Makefile   |  1 +
>  arch/arm/dts/zynq-zybo.dts  | 23 +++
>  board/xilinx/zynq/Kconfig   | 24 
>  configs/zynq_zybo_defconfig |  3 +++
>  include/configs/zynq_zybo.h | 31 +++
>  6 files changed, 85 insertions(+)
>  create mode 100644 arch/arm/dts/zynq-zybo.dts
>  create mode 100644 configs/zynq_zybo_defconfig
>  create mode 100644 include/configs/zynq_zybo.h
> 

Applied all with that small fix in 2/3 reported by Jagan.
I have also tested it on real HW.

Thanks,
Michal



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


Re: [U-Boot] [GIT PULL] Zynq patches

2014-08-29 Thread Michal Simek
Hi Tom,

based on your post some days ago. Can you please add these fixes to directly
to your master branch?

Thanks,
Michal

On 08/19/2014 09:57 AM, Michal Simek wrote:
> Hi Albert,
> 
> please pull these 3 patches to your tree.
> 
> Thanks,
> Michal
> 
> Summary of 4 commits for 6 boards (6 threads, 2 jobs per thread)
> 01: patman: Only use git's --no-decorate when available
> 02: zynq: spl: Add vectors section to linker script
>arm: (for 6/6 boards)  all -966.0  bss -10.0  data -46.7  rodata 
> -124.0  spl/u-boot-spl:all +96.0  spl/u-boot-spl:text +96.0  text -785.3
> zynq_zc770_xm013:  all -592  bss -4  data -4  rodata -12  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -572
> zynq_zc770_xm012:  all -596  bss -8  data -4  rodata -12  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -572
> zynq_zc770_xm010:  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> zynq_zed   :  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> zynq_zc70x :  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> zynq_microzed  :  all -1152  bss -12  data -68  rodata -180  
> spl/u-boot-spl:all +96  spl/u-boot-spl:text +96  text -892
> 03: ARM: zynq: Move ps7_init() out of spl.h
> 04: ARM: zynq: Remove spl.h
> 
> 
> The following changes since commit e76b933e02e1b38e48754c435e9dba1c0deeb3c6:
> 
>   Prepare v2014.10-rc1 (2014-08-06 09:12:58 -0400)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-microblaze.git zynq
> 
> for you to fetch changes up to ae2ee77f982d83a9aca06973e39bebb224b5201c:
> 
>   ARM: zynq: Remove spl.h (2014-08-19 08:48:18 +0200)
> 
> 
> Michal Simek (2):
>   ARM: zynq: Move ps7_init() out of spl.h
>   ARM: zynq: Remove spl.h
> 
> Peter Crosthwaite (1):
>   zynq: spl: Add vectors section to linker script
> 
>  arch/arm/cpu/armv7/zynq/spl.c  |  2 +-
>  arch/arm/cpu/armv7/zynq/u-boot-spl.lds |  1 +
>  arch/arm/include/asm/arch-zynq/spl.h   | 18 --
>  arch/arm/include/asm/arch-zynq/sys_proto.h |  2 ++
>  arch/arm/include/asm/spl.h |  2 +-
>  5 files changed, 5 insertions(+), 20 deletions(-)
>  delete mode 100644 arch/arm/include/asm/arch-zynq/spl.h
> 


-- 
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


Re: [U-Boot] [PATCH 2/3] configs: zynq: Add config support for ZYBO

2014-08-29 Thread Michal Simek
Hi,

On 08/29/2014 08:41 AM, Steve Wang wrote:
> Hi, Peter,
> 
> In ZYBO, there is an on-board eeprom that contains a unique MAC address for 
> each 
> board.
> In FSBL (before u-boot), the MAC address is read out from EEPROM and write to 
> the corresponding registers in ETH controller.
> So, in u-boot env, mac-skip should be defined so that it will not over-write 
> the 
> unique MAC address.
> 
> So, I wonder if it should be done in dts file or there is other ways to do 
> that.

It can be done in as follow up patch.
U-Boot also supports SPL. It means if you want to read this address from EEPROM 
you
should solve it just in u-boot. There should be some ways how to do it.

Thanks,
Michal






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


Re: [U-Boot] [PATCH] usb: hub: don't check CONNECTION in hub_port_reset()

2014-08-29 Thread Marek Vasut
On Friday, August 08, 2014 at 01:07:59 AM, Stephen Warren wrote:
> From: Stephen Warren 
> 
> One specific USB 3.0 device behaves strangely when reset by
> usb_new_device()'s call to hub_port_reset(). For some reason, the device
> appears to briefly drop off the bus when this second bus reset is
> executed, yet if we retry this loop, it'll eventually come back after
> another two resets.
> 
> If USB bus reset is executed over and over within usb_new_device()'s call
> to hub_port_reset(), I see the following sequence of results, which
> repeats as long as you want:
> 
> 1) STAT_C_CONNECTION = 1 STAT_CONNECTION = 0  USB_PORT_STAT_ENABLE 0
> 2) STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0
> 3) STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 1
> 
> The device in question is a SanDisk Ultra USB 3.0 16GB memory stick with
> USB VID/PID 0x0781/0x5581.
> 
> In order to allow this device to work with U-Boot, ignore the
> {C_,}CONNECTION bits in the status/change registers, and only use the
> ENABLE bit to determine if the reset was successful.
> 
> To be honest, extensive investigation has failed to determine why this
> problem occurs. I'd love to know! I don't know if it's caused by:
> * A HW bug in the device
> * A HW bug in the Tegra USB controller
> * A SW bug in the U-Boot Tegra USB driver
> * A SW bug in the U-Boot USB core
> 
> This issue only occurs when the device's USB3 pins are attached to the
> host; if only the USB2 pins are connected the issue does not occur. The
> USB3 controller on Tegra is in reset, so is not actively communicating
> with the device at all - a USB3 analyzer confirms this. Slightly
> unplugging the device (so the USB3 pins don't contact) or using a USB2
> cable or hub as an intermediary avoids the problem. For some reason,
> the Linux kernel (either on the same Tegra board, or on an x86 host)
> has no issue with the device, and I observe no disconnections during
> reset.
> 
> This change won't affect any USB device that already works, since such
> devices could not currently be triggering the error return this patch
> removes, or they wouldn't be working currently.
> 
> However, this patch is quite reliable in practice, hence I hope it's
> acceptable to solve the problem.
> 
> The only potential fallout I can see from this patch is:
> 
> * A broken device that triggers C_CONNECTION/!CONNECTION now causes the
>   loop in hub_port_reset() to run multiple times. If it never succeeds,
>   this will cause "usb start" to take roughly 1s extra to execute.
> 
> * If the user unplugs a device while hub_port_reset() is executing, and
>   very quickly swaps in a new device, hub_port_reset() might succeed on
>   the new device. This would mean that any information cached about the
>   original device (from the descriptor read in usb_new_device(), which
>   simply caches the max packet size) might be invalid, which would cause
>   problems talking to the new device. However, without this change, the
>   new device wouldn't work anyway, so this is probably not much of a
>   loss.
> 
> Signed-off-by: Stephen Warren 
> ---

I'll apply this and see if we get any breakage. I don't expect any though.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] USB: gadget: s3c: get rid of debug compile warning

2014-08-29 Thread Marek Vasut
On Wednesday, August 27, 2014 at 11:28:18 AM, Bo Shen wrote:
> When enable debug option to compile, it will give the following
> warning, this patch is used to get rid of it.
> --->8---
> warning: 'flags' is used uninitialized in this function [-Wuninitialized]
> ---8<---
> 
> Signed-off-by: Bo Shen 

Are those two still relevant with u-boot/master please ?

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


[U-Boot] [PULL] u-boot/master

2014-08-29 Thread Marek Vasut
The following changes since commit 124c5998755ef6778ca43acab27372fc470b8366:

  samsung: s5p_goni: fix: Add missing definitions for G_DNL_UMS gadget 
(2014-08-28 13:47:34 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-usb.git HEAD

for you to fetch changes up to 74c0d756dea14855bec47f380b6ccb557be5db7c:

  usb: hub: don't check CONNECTION in hub_port_reset() (2014-08-29 11:27:43 
+0200)


Marek Vasut (1):
  usb: Handle -ENODEV from usb_lowlevel_init()

Stephen Warren (1):
  usb: hub: don't check CONNECTION in hub_port_reset()

 common/usb.c | 11 +--
 common/usb_hub.c | 19 ---
 2 files changed, 25 insertions(+), 5 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sf: Add support for flag status register on Micron chips

2014-08-29 Thread Jagan Teki
On 29 August 2014 12:24, Hou Zhiqiang  wrote:
> Add clear flag status register operation that some Micron SPI flash
> chips required after reading the flag status register to check some
> operations completion.
>
> Signed-off-by: Hou Zhiqiang 
> ---
> Based on git://git.denx.de/u-boot.git.
> It also can be applied to git://www.denx.de/git/u-boot-mpc85xx.git.
> Tested on board T2080QDS and T2080RDB.

Flag status register support is been added for stmicro flashes which
are >= 512MB
sizes.

#ifdef CONFIG_SPI_FLASH_STMICRO
if (params->flags & E_FSR)
flash->poll_cmd = CMD_FLAG_STATUS;
#endif

Please check the condition on current tree bases, and let me know for
any questions.

>
>  drivers/mtd/spi/sf_internal.h |  9 +
>  drivers/mtd/spi/sf_ops.c  | 36 
>  2 files changed, 37 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
> index 6bcd522..162dd87 100644
> --- a/drivers/mtd/spi/sf_internal.h
> +++ b/drivers/mtd/spi/sf_internal.h
> @@ -36,6 +36,7 @@
>  #define CMD_WRITE_ENABLE   0x06
>  #define CMD_READ_CONFIG0x35
>  #define CMD_FLAG_STATUS0x70
> +#define CMD_CLEAR_FLAG_STATUS  0x50
>
>  /* Read commands */
>  #define CMD_READ_ARRAY_SLOW0x03
> @@ -59,6 +60,8 @@
>  #define STATUS_QEB_WINSPAN (1 << 1)
>  #define STATUS_QEB_MXIC(1 << 6)
>  #define STATUS_PEC (1 << 7)
> +#define STATUS_PROT(1 << 1)
> +#define STATUS_ERASE   (1 << 5)
>
>  /* Flash timeout values */
>  #define SPI_FLASH_PROG_TIMEOUT (2 * CONFIG_SYS_HZ)
> @@ -120,6 +123,12 @@ static inline int spi_flash_cmd_write_disable(struct 
> spi_flash *flash)
> return spi_flash_cmd(flash->spi, CMD_WRITE_DISABLE, NULL, 0);
>  }
>
> +/* Clear flag status register */
> +static inline int spi_flash_cmd_clear_flag_status(struct spi_flash *flash)
> +{
> +   return spi_flash_cmd(flash->spi, CMD_CLEAR_FLAG_STATUS, NULL, 0);
> +}
> +
>  /*
>   * Send the read status command to the device and wait for the wip
>   * (write-in-progress) bit to clear itself.
> diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
> index 85cf22d..08ff1df 100644
> --- a/drivers/mtd/spi/sf_ops.c
> +++ b/drivers/mtd/spi/sf_ops.c
> @@ -160,6 +160,7 @@ int spi_flash_cmd_wait_ready(struct spi_flash *flash, 
> unsigned long timeout)
> unsigned long timebase;
> unsigned long flags = SPI_XFER_BEGIN;
> int ret;
> +   int out_of_time = 1;
> u8 status;
> u8 check_status = 0x0;
> u8 poll_bit = STATUS_WIP;
> @@ -186,22 +187,41 @@ int spi_flash_cmd_wait_ready(struct spi_flash *flash, 
> unsigned long timeout)
> WATCHDOG_RESET();
>
> ret = spi_xfer(spi, 8, NULL, &status, 0);
> -   if (ret)
> +   if (ret) {
> +   spi_xfer(spi, 0, NULL, NULL, SPI_XFER_END);
> return -1;
> +   }
>
> -   if ((status & poll_bit) == check_status)
> +   if ((status & poll_bit) == check_status) {
> +   out_of_time = 0;
> break;
> +   }
>
> } while (get_timer(timebase) < timeout);
>
> spi_xfer(spi, 0, NULL, NULL, SPI_XFER_END);
>
> -   if ((status & poll_bit) == check_status)
> -   return 0;
> +   if (out_of_time) {
> +   /* Timed out */
> +   debug("SF: time out!\n");
> +   ret = -1;
> +   }
> +#ifdef CONFIG_SPI_FLASH_STMICRO
> +   else if (cmd == CMD_FLAG_STATUS) {
> +   if (!(status & (STATUS_PROT | STATUS_ERASE))) {
> +   ret = 0;
> +   } else {
> +   debug("SF: flag status error");
> +   ret = -1;
> +   }
>
> -   /* Timed out */
> -   debug("SF: time out!\n");
> -   return -1;
> +   if (spi_flash_cmd_clear_flag_status(flash) < 0) {
> +   debug("SF: clear flag status failed\n");
> +   ret = -1;
> +   }
> +   }
> +#endif
> +   return ret;
>  }
>
>  int spi_flash_write_common(struct spi_flash *flash, const u8 *cmd,
> @@ -234,7 +254,7 @@ int spi_flash_write_common(struct spi_flash *flash, const 
> u8 *cmd,
>
> ret = spi_flash_cmd_wait_ready(flash, timeout);
> if (ret < 0) {
> -   debug("SF: write %s timed out\n",
> +   debug("SF: write %s failed\n",
>   timeout == SPI_FLASH_PROG_TIMEOUT ?
> "program" : "page erase");
> return ret;
> --
> 1.8.5

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


[U-Boot] [PATCH] ARM: mx6: Add support for Kosagi Novena

2014-08-29 Thread Marek Vasut
Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB Ethernet

Signed-off-by: Marek Vasut 
---
 arch/arm/Kconfig |   4 +
 board/kosagi/novena/Kconfig  |  23 ++
 board/kosagi/novena/Makefile |  11 +
 board/kosagi/novena/novena.c | 346 +
 board/kosagi/novena/novena_spl.c | 529 +++
 board/kosagi/novena/setup.cfg|  47 
 configs/novena_defconfig |   4 +
 drivers/video/ipu_common.c   |   2 +-
 include/configs/imx6_spl.h   |   2 +-
 include/configs/novena.h | 306 ++
 10 files changed, 1272 insertions(+), 2 deletions(-)
 create mode 100644 board/kosagi/novena/Kconfig
 create mode 100644 board/kosagi/novena/Makefile
 create mode 100644 board/kosagi/novena/novena.c
 create mode 100644 board/kosagi/novena/novena_spl.c
 create mode 100644 board/kosagi/novena/setup.cfg
 create mode 100644 configs/novena_defconfig
 create mode 100644 include/configs/novena.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f01ff8f..56f29a3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -536,6 +536,9 @@ config TARGET_GW_VENTANA
 config TARGET_HUMMINGBOARD
bool "Support hummingboard"
 
+config TARGET_KOSAGI_NOVENA
+   bool "Support Kosagi Novena"
+
 config TARGET_OMAP3_OVERO
bool "Support omap3_overo"
 
@@ -907,6 +910,7 @@ source "board/karo/tk71/Kconfig"
 source "board/karo/tx25/Kconfig"
 source "board/keymile/km_arm/Kconfig"
 source "board/kmc/kzm9g/Kconfig"
+source "board/kosagi/novena/Kconfig"
 source "board/logicpd/am3517evm/Kconfig"
 source "board/logicpd/imx27lite/Kconfig"
 source "board/logicpd/imx31_litekit/Kconfig"
diff --git a/board/kosagi/novena/Kconfig b/board/kosagi/novena/Kconfig
new file mode 100644
index 000..4e52be9
--- /dev/null
+++ b/board/kosagi/novena/Kconfig
@@ -0,0 +1,23 @@
+if TARGET_KOSAGI_NOVENA
+
+config SYS_CPU
+   string
+   default "armv7"
+
+config SYS_BOARD
+   string
+   default "novena"
+
+config SYS_VENDOR
+   string
+   default "kosagi"
+
+config SYS_SOC
+   string
+   default "mx6"
+
+config SYS_CONFIG_NAME
+   string
+   default "novena"
+
+endif
diff --git a/board/kosagi/novena/Makefile b/board/kosagi/novena/Makefile
new file mode 100644
index 000..f67bbc9
--- /dev/null
+++ b/board/kosagi/novena/Makefile
@@ -0,0 +1,11 @@
+#
+# Copyright (C) 2014 Marek Vasut 
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-y  := novena.o
+else
+obj-y  := novena_spl.o
+endif
diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
new file mode 100644
index 000..727ce1c
--- /dev/null
+++ b/board/kosagi/novena/novena.c
@@ -0,0 +1,346 @@
+/*
+ * Novena board support
+ *
+ * Copyright (C) 2014 Marek Vasut 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define NOVENA_BUTTON_GPIO IMX_GPIO_NR(4, 14)
+#define NOVENA_SD_CD   IMX_GPIO_NR(1, 4)
+#define NOVENA_USB_HUB_RESET   IMX_GPIO_NR(7, 12)
+
+/*
+ * GPIO button
+ */
+#ifdef CONFIG_KEYBOARD
+static struct input_config button_input;
+
+static int novena_gpio_button_read_keys(struct input_config *input)
+{
+   int key = KEY_ENTER;
+   if (gpio_get_value(NOVENA_BUTTON_GPIO))
+   return 0;
+   input_send_keycodes(&button_input, &key, 1);
+   return 1;
+}
+
+static int novena_gpio_button_getc(struct stdio_dev *dev)
+{
+   return input_getc(&button_input);
+}
+static int novena_gpio_button_tstc(struct stdio_dev *dev)
+{
+   return input_tstc(&button_input);
+}
+
+static int novena_gpio_button_init(struct stdio_dev *dev)
+{
+   gpio_direction_input(NOVENA_BUTTON_GPIO);
+   input_set_delays(&button_input, 250, 250);
+   return 0;
+}
+
+int drv_keyboard_init(void)
+{
+   int error;
+   struct stdio_dev dev = {
+   .name   = "button",
+   .flags  = DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM,
+   .start  = novena_gpio_button_init,
+   .getc   = novena_gpio_button_getc,
+   .tstc   = novena_gpio_button_tstc,
+   };
+
+   error = input_init(&button_input, 0);
+   if (error) {
+   debug("%s: Cannot set up input\n", __func__);
+   return -1;
+   }
+   button_input.read_keys = novena_gpio_button_read_keys;
+
+   /* Register the device. init_tegra_keyboard() will be called soon */
+   error = input_stdio_register(&dev);
+   if (error)
+   return error;
+
+   return 0;
+}
+#endif
+
+/*
+ *

Re: [U-Boot] [PATCH v2 1/4] add code to handle Android sparse image format

2014-08-29 Thread Marek Vasut
On Thursday, August 28, 2014 at 11:52:40 PM, Steve Rae wrote:
> On 14-08-28 02:31 PM, Steve Rae wrote:
> > On 14-08-28 02:16 PM, Tom Rini wrote:
> >> On Thu, Aug 28, 2014 at 10:53:51AM -0700, Steve Rae wrote:
> >>> Add original file (pristine) from :
> >>> 
> >>> https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot
> >>> .c?h=master
> >>> 
> >>> [3b5092d20bd15a7a2879c13e9f64acc48d04af2d]
> >>> 
> >>> Signed-off-by: Steve Rae 
> >> 
> >> OK, let us back the truck up, so to speak.  This particular version of
> >> the file has an odd license.  Looking at
> >> https://android.googlesource.com/kernel/lk/+/master/app/aboot/aboot.c
> >> [54963a727d3e4ed1e945c7ec012b5cc5de168ac5] and it has the normal
> >> BSD-3-Clause text.  Lets grab and adapt that so we can drop the license
> >> issue.
> > 
> > OK -- "v3" coming soon!
> 
> OOPS! -- this "aboot.c" does not contain the support for the "sparse
> image format" -- I cannot use this file!
> Sorry

Oh, but you can implement that part into the file with a subsequent patch, no ?

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


[U-Boot] [PATCH] sf: Add support for flag status register on Micron chips

2014-08-29 Thread Hou Zhiqiang
Add clear flag status register operation that some Micron SPI flash
chips required after reading the flag status register to check some
operations completion.

Signed-off-by: Hou Zhiqiang 
---
Based on git://git.denx.de/u-boot.git.
It also can be applied to git://www.denx.de/git/u-boot-mpc85xx.git.
Tested on board T2080QDS and T2080RDB.

 drivers/mtd/spi/sf_internal.h |  9 +
 drivers/mtd/spi/sf_ops.c  | 36 
 2 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 6bcd522..162dd87 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -36,6 +36,7 @@
 #define CMD_WRITE_ENABLE   0x06
 #define CMD_READ_CONFIG0x35
 #define CMD_FLAG_STATUS0x70
+#define CMD_CLEAR_FLAG_STATUS  0x50
 
 /* Read commands */
 #define CMD_READ_ARRAY_SLOW0x03
@@ -59,6 +60,8 @@
 #define STATUS_QEB_WINSPAN (1 << 1)
 #define STATUS_QEB_MXIC(1 << 6)
 #define STATUS_PEC (1 << 7)
+#define STATUS_PROT(1 << 1)
+#define STATUS_ERASE   (1 << 5)
 
 /* Flash timeout values */
 #define SPI_FLASH_PROG_TIMEOUT (2 * CONFIG_SYS_HZ)
@@ -120,6 +123,12 @@ static inline int spi_flash_cmd_write_disable(struct 
spi_flash *flash)
return spi_flash_cmd(flash->spi, CMD_WRITE_DISABLE, NULL, 0);
 }
 
+/* Clear flag status register */
+static inline int spi_flash_cmd_clear_flag_status(struct spi_flash *flash)
+{
+   return spi_flash_cmd(flash->spi, CMD_CLEAR_FLAG_STATUS, NULL, 0);
+}
+
 /*
  * Send the read status command to the device and wait for the wip
  * (write-in-progress) bit to clear itself.
diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
index 85cf22d..08ff1df 100644
--- a/drivers/mtd/spi/sf_ops.c
+++ b/drivers/mtd/spi/sf_ops.c
@@ -160,6 +160,7 @@ int spi_flash_cmd_wait_ready(struct spi_flash *flash, 
unsigned long timeout)
unsigned long timebase;
unsigned long flags = SPI_XFER_BEGIN;
int ret;
+   int out_of_time = 1;
u8 status;
u8 check_status = 0x0;
u8 poll_bit = STATUS_WIP;
@@ -186,22 +187,41 @@ int spi_flash_cmd_wait_ready(struct spi_flash *flash, 
unsigned long timeout)
WATCHDOG_RESET();
 
ret = spi_xfer(spi, 8, NULL, &status, 0);
-   if (ret)
+   if (ret) {
+   spi_xfer(spi, 0, NULL, NULL, SPI_XFER_END);
return -1;
+   }
 
-   if ((status & poll_bit) == check_status)
+   if ((status & poll_bit) == check_status) {
+   out_of_time = 0;
break;
+   }
 
} while (get_timer(timebase) < timeout);
 
spi_xfer(spi, 0, NULL, NULL, SPI_XFER_END);
 
-   if ((status & poll_bit) == check_status)
-   return 0;
+   if (out_of_time) {
+   /* Timed out */
+   debug("SF: time out!\n");
+   ret = -1;
+   }
+#ifdef CONFIG_SPI_FLASH_STMICRO
+   else if (cmd == CMD_FLAG_STATUS) {
+   if (!(status & (STATUS_PROT | STATUS_ERASE))) {
+   ret = 0;
+   } else {
+   debug("SF: flag status error");
+   ret = -1;
+   }
 
-   /* Timed out */
-   debug("SF: time out!\n");
-   return -1;
+   if (spi_flash_cmd_clear_flag_status(flash) < 0) {
+   debug("SF: clear flag status failed\n");
+   ret = -1;
+   }
+   }
+#endif
+   return ret;
 }
 
 int spi_flash_write_common(struct spi_flash *flash, const u8 *cmd,
@@ -234,7 +254,7 @@ int spi_flash_write_common(struct spi_flash *flash, const 
u8 *cmd,
 
ret = spi_flash_cmd_wait_ready(flash, timeout);
if (ret < 0) {
-   debug("SF: write %s timed out\n",
+   debug("SF: write %s failed\n",
  timeout == SPI_FLASH_PROG_TIMEOUT ?
"program" : "page erase");
return ret;
-- 
1.8.5

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