Re: [U-Boot] [PATCH v2 06/55] x86: ivybridge: Move lpc_early_init() to probe()

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:14 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> Move this code to the LPC's probe() method so that it will happen
>> automatically when the LPC is probed before relocation.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Drop unused 'gen-dec' device tree property
>>
>>  arch/x86/cpu/ivybridge/cpu.c  |  9 -
>>  arch/x86/cpu/ivybridge/lpc.c  | 32 
>> ---
>>  arch/x86/dts/chromebook_link.dts  |  3 +--
>>  arch/x86/include/asm/arch-ivybridge/pch.h | 10 --
>>  4 files changed, 26 insertions(+), 28 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 07/55] x86: ivybridge: Move more init to the probe() function

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Move SPI and port80 init to lpc_early_init(), called from the LPC's probe()
> method.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/cpu.c | 43 ---
>  arch/x86/cpu/ivybridge/lpc.c | 43 +++
>  2 files changed, 43 insertions(+), 43 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/55] x86: ivybridge: Add a driver for the bd82x6x northbridge

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Add a driver with an empty probe function where we can move init code in
> follow-on patches.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/early_init.c | 18 ++
>  arch/x86/dts/chromebook_link.dts|  7 +++
>  2 files changed, 25 insertions(+)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 08/55] x86: ivybridge: Rename bd82x6x_init()

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:18 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> Rename the existing bd82x6x_init() to bd82x6x_init_extra(). We will remove
>> this in a later patch.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Drop the init() method in the PCH
>> - Rename this commit from 'x86: ivybridge: Set up the PCH init'
>>
>>  arch/x86/cpu/ivybridge/bd82x6x.c  | 2 +-
>>  arch/x86/cpu/ivybridge/cpu.c  | 8 
>>  arch/x86/cpu/ivybridge/pci.c  | 2 +-
>>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h | 2 +-
>>  4 files changed, 11 insertions(+), 3 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 09/55] dm: x86: Add a northbridge uclass

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Add a uclass for the northbridge / SDRAM controller found on some older
> Intel chipsets.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Drop unnecessary DECLARE_GLOBAL_DATA_PTR
>
>  arch/x86/lib/Makefile |  1 +
>  arch/x86/lib/northbridge-uclass.c | 15 +++
>  include/dm/uclass-id.h|  1 +
>  3 files changed, 17 insertions(+)
>  create mode 100644 arch/x86/lib/northbridge-uclass.c
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 11/55] x86: ivybridge: Move northbridge init into the probe() method

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Now that we have a proper driver for the nortbridge, set it up in by probing
> it, and move the early init code into the probe() method.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/cpu.c|  2 ++
>  arch/x86/cpu/ivybridge/early_init.c | 33 +++--
>  2 files changed, 21 insertions(+), 14 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 13/55] x86: ivybridge: Rename lpc_init() to lpc_init_extra()

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:23 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> In preparation for adding an init() method to the LPC uclass, rename this
>> existing function so that it will not conflict.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2: None
>>
>>  arch/x86/cpu/ivybridge/bd82x6x.c  | 2 +-
>>  arch/x86/cpu/ivybridge/lpc.c  | 2 +-
>>  arch/x86/include/asm/arch-ivybridge/pch.h | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 12/55] x86: ivybridge: Move LPC and PCH init into northbridge probe()

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Move more code into the northbridge probe() function.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/early_init.c | 47 
> +++--
>  1 file changed, 24 insertions(+), 23 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 1/3] armv8/ls1043aqds: Select lpuart pins of various muxes

2016-01-21 Thread Wenbin Song
From: Shaohui Xie 

Set Board Configuration Register to select the lpuart pins of various
muxes.

Signed-off-by: Shaohui Xie 
Signed-off-by: Mingkai Hu 
---
 board/freescale/ls1043aqds/ls1043aqds.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/board/freescale/ls1043aqds/ls1043aqds.c 
b/board/freescale/ls1043aqds/ls1043aqds.c
index d6696ca..67f4c4b 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -40,6 +40,9 @@ enum {
 #define CFG_SD_MUX3_MUX4   0x1 /* MUX4 */
 #define CFG_SD_MUX4_SLOT3  0x0 /* SLOT3 TX/RX1 */
 #define CFG_SD_MUX4_SLOT1  0x1 /* SLOT1 TX/RX3 */
+#define CFG_UART_MUX_MASK  0x6
+#define CFG_UART_MUX_SHIFT 1
+#define CFG_LPUART_EN  0x1
 
 int checkboard(void)
 {
@@ -218,7 +221,19 @@ void board_retimer_init(void)
 
 int board_early_init_f(void)
 {
+#ifdef CONFIG_LPUART
+   u8 uart;
+#endif
fsl_lsch2_early_init_f();
+#ifdef CONFIG_LPUART
+
+/* We use lpuart1 as system console. */
+
+   uart = QIXIS_READ(brdcfg[14]);
+   uart &= ~CFG_UART_MUX_MASK;
+   uart |= CFG_LPUART_EN << CFG_UART_MUX_SHIFT;
+   QIXIS_WRITE(brdcfg[14], uart);
+#endif
 
return 0;
 }
-- 
2.1.0.27.g96db324

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


[U-Boot] Patch dependency

2016-01-21 Thread Wenbin Song
The below patches depend on the series 
patches(http://patchwork.ozlabs.org/patch/567250/).
 
[PATCH v3 1/3] armv8/ls1043aqds: Select lpuart pins of various muxes
[PATCH v3 2/3] armv8/ls1043aqds: Spilt off board device tree
[PATCH v3 3/3] armv8/ls1043aqds: Add lpuart support
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 3/3] armv8/ls1043aqds: Add lpuart support

2016-01-21 Thread Wenbin Song
Add lpuart support using the driver model.

Signed-off-by: Wenbin Song 
---
 arch/arm/dts/Makefile   |  1 +
 arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 16 ++
 arch/arm/dts/fsl-ls1043a-qds.dtsi   |  4 +++
 arch/arm/dts/fsl-ls1043a.dtsi   | 54 +
 configs/ls1043aqds_lpuart_defconfig | 10 ++
 include/configs/ls1043aqds.h|  7 +
 6 files changed, 92 insertions(+)
 create mode 100644 arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
 create mode 100644 configs/ls1043aqds_lpuart_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 302456c..a51275c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -97,6 +97,7 @@ dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
fsl-ls2080a-rdb.dtb
 dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
+   fsl-ls1043a-qds-lpuart.dtb \
fsl-ls1043a-rdb.dtb
 
 dtb-$(CONFIG_MACH_SUN4I) += \
diff --git a/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts 
b/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
new file mode 100644
index 000..18adb97
--- /dev/null
+++ b/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
@@ -0,0 +1,16 @@
+/*
+ * Device Tree file for Freescale Layerscape-1043A family SoC.
+ *
+ * Copyright (C) 2015, Freescale Semiconductor
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+#include "fsl-ls1043a-qds.dtsi"
+
+/ {
+   chosen {
+   stdout-path = &lpuart0;
+   };
+};
diff --git a/arch/arm/dts/fsl-ls1043a-qds.dtsi 
b/arch/arm/dts/fsl-ls1043a-qds.dtsi
index 6fa16b8..b9dad72 100644
--- a/arch/arm/dts/fsl-ls1043a-qds.dtsi
+++ b/arch/arm/dts/fsl-ls1043a-qds.dtsi
@@ -121,3 +121,7 @@
 &duart1 {
status = "okay";
 };
+
+&lpuart0 {
+   status = "okay";
+};
diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
index 85ea81e..12ea0ab 100644
--- a/arch/arm/dts/fsl-ls1043a.dtsi
+++ b/arch/arm/dts/fsl-ls1043a.dtsi
@@ -182,5 +182,59 @@
interrupts = <0 55 0x4>;
clocks = <&clockgen 4 0>;
};
+
+   lpuart0: serial@295 {
+   compatible = "fsl,ls1021a-lpuart";
+   reg = <0x0 0x295 0x0 0x1000>;
+   interrupts = <0 48 0x4>;
+   clocks = <&sysclk>;
+   clock-names = "ipg";
+   status = "disabled";
+   };
+
+   lpuart1: serial@296 {
+   compatible = "fsl,ls1021a-lpuart";
+   reg = <0x0 0x296 0x0 0x1000>;
+   interrupts = <0 49 0x4>;
+   clocks = <&sysclk>;
+   clock-names = "ipg";
+   status = "disabled";
+   };
+
+   lpuart2: serial@297 {
+   compatible = "fsl,ls1021a-lpuart";
+   reg = <0x0 0x297 0x0 0x1000>;
+   interrupts = <0 50 0x4>;
+   clock-names = "ipg";
+   clocks = <&sysclk>;
+   status = "disabled";
+   };
+
+   lpuart3: serial@298 {
+   compatible = "fsl,ls1021a-lpuart";
+   reg = <0x0 0x298 0x0 0x1000>;
+   interrupts = <0 51 0x4>;
+   clocks = <&sysclk>;
+   clock-names = "ipg";
+   status = "disabled";
+   };
+
+   lpuart4: serial@299 {
+   compatible = "fsl,ls1021a-lpuart";
+   reg = <0x0 0x299 0x0 0x1000>;
+   interrupts = <0 52 0x4>;
+   clocks = <&sysclk>;
+   clock-names = "ipg";
+   status = "disabled";
+   };
+
+   lpuart5: serial@29a {
+   compatible = "fsl,ls1021a-lpuart";
+   reg = <0x0 0x29a 0x0 0x1000>;
+   interrupts = <0 53 0x4>;
+   clocks = <&sysclk>;
+   clock-names = "ipg";
+   status = "disabled";
+   };
};
 };
diff --git a/configs/ls1043aqds_lpuart_defconfig 
b/configs/ls1043aqds_lpuart_defconfig
new file mode 100644
index 000..21d6407
--- /dev/null
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -0,0 +1,10 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1043AQDS=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_SPI=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-lpuart"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,LPUART"
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_SPI_FLASH=y
+CONFIG_FSL_LPUART=y
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index 398f1c3..e5c77cb 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -88,6 +88,13 @@ unsigned long get_board

Re: [U-Boot] [PATCH v2 15/55] x86: ivybridge: Move graphics init much later

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> We don't need to init the graphics controller so early. Move it alongside
> the other graphics setup, just before we run the ROM.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/cpu.c|  1 -
>  arch/x86/cpu/ivybridge/early_init.c | 80 
> ++---
>  arch/x86/cpu/ivybridge/gma.c| 73 +
>  3 files changed, 76 insertions(+), 78 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/3] armv8/ls1043aqds: Spilt off board device tree

2016-01-21 Thread Wenbin Song
Move new /chosen node out of the board device tree.

Signed-off-by: Wenbin Song 
---
 arch/arm/dts/Makefile|  2 +-
 arch/arm/dts/fsl-ls1043a-qds-duart.dts   | 16 
 .../dts/{fsl-ls1043a-qds.dts => fsl-ls1043a-qds.dtsi}|  1 -
 configs/ls1043aqds_defconfig |  2 +-
 4 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/dts/fsl-ls1043a-qds-duart.dts
 rename arch/arm/dts/{fsl-ls1043a-qds.dts => fsl-ls1043a-qds.dtsi} (99%)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7706b41..302456c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -96,7 +96,7 @@ dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
fsl-ls2080a-rdb.dtb
-dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds.dtb \
+dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
fsl-ls1043a-rdb.dtb
 
 dtb-$(CONFIG_MACH_SUN4I) += \
diff --git a/arch/arm/dts/fsl-ls1043a-qds-duart.dts 
b/arch/arm/dts/fsl-ls1043a-qds-duart.dts
new file mode 100644
index 000..2124e38
--- /dev/null
+++ b/arch/arm/dts/fsl-ls1043a-qds-duart.dts
@@ -0,0 +1,16 @@
+/*
+ * Device Tree file for Freescale Layerscape-1043A family SoC.
+ *
+ * Copyright (C) 2015, Freescale Semiconductor
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+#include "fsl-ls1043a-qds.dtsi"
+
+/ {
+   chosen {
+   stdout-path = &duart0;
+   };
+};
diff --git a/arch/arm/dts/fsl-ls1043a-qds.dts 
b/arch/arm/dts/fsl-ls1043a-qds.dtsi
similarity index 99%
rename from arch/arm/dts/fsl-ls1043a-qds.dts
rename to arch/arm/dts/fsl-ls1043a-qds.dtsi
index 7435222..6fa16b8 100644
--- a/arch/arm/dts/fsl-ls1043a-qds.dts
+++ b/arch/arm/dts/fsl-ls1043a-qds.dtsi
@@ -10,7 +10,6 @@
  * warranty of any kind, whether express or implied.
  */
 
-/dts-v1/;
 /include/ "fsl-ls1043a.dtsi"
 
 / {
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index 60fb0ad..1fd530d 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -2,5 +2,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
 CONFIG_ARM=y
 CONFIG_TARGET_LS1043AQDS=y
 CONFIG_SYS_NS16550=y
-CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds"
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_OF_CONTROL=y
-- 
2.1.0.27.g96db324

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


Re: [U-Boot] [PATCH v2 14/55] x86: ivybridge: Probe the LPC in CPU init

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:25 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> We can drop the explicit probe of the PCH since the LPC is a child device
>> and this will happen automatically.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Drop explicit PCH probe
>> - Drop LPC init method
>> - Rename patch from 'Add an init() method for the bd82x6x LPC'
>>
>>  arch/x86/cpu/ivybridge/cpu.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 16/55] x86: ivybridge: Move sandybridge init to the lpc probe() method

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> The watchdog can be reset later when probing the LPC after relocation.
> Move it.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Update to drop LPC init method and use probe() instead
>
>  arch/x86/cpu/ivybridge/early_init.c | 16 
>  arch/x86/cpu/ivybridge/lpc.c| 19 ++-
>  2 files changed, 18 insertions(+), 17 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 17/55] x86: ivybridge: Move GPIO init to the LPC init() method

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This init can happen in the driver also. Move it.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/cpu.c | 4 
>  arch/x86/cpu/ivybridge/lpc.c | 3 +++
>  2 files changed, 3 insertions(+), 4 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 18/55] x86: ivybridge: Use common CPU init code

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> The existing ivybridge code predates the normal multi-core CPU init, and
> it is not used. Remove it and add CPU nodes to the device tree so that all
> four CPUs are set up. Also enable the 'cpu' command.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/model_206ax.c | 94 
> 
>  arch/x86/dts/chromebook_link.dts | 34 +
>  configs/chromebook_link_defconfig|  3 ++
>  3 files changed, 79 insertions(+), 52 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 19/55] x86: ivybridge: Move CPU init code into the driver

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Use the CPU driver's probe() method to perform the CPU init. This will happen
> automatically when the first CPU is probed.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/bd82x6x.c  |  6 --
>  arch/x86/cpu/ivybridge/model_206ax.c  |  5 -
>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h | 15 ---
>  3 files changed, 4 insertions(+), 22 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 20/55] x86: ivybridge: Set up the thermal target correctly

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This uses a non-existent node at present. It should use the first CPU node.
> The referenced property does not exist (the correct value is the default of
> 0), but this allows the follow-on init to complete.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/model_206ax.c | 21 ++---
>  1 file changed, 10 insertions(+), 11 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 22/55] x86: ivybridge: Move early init code into northbridge.c

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This code is now part of the northbridge driver, so move it into the same
> place.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/Makefile  |  1 -
>  arch/x86/cpu/ivybridge/early_init.c  | 81 
> 
>  arch/x86/cpu/ivybridge/northbridge.c | 67 +
>  3 files changed, 67 insertions(+), 82 deletions(-)
>  delete mode 100644 arch/x86/cpu/ivybridge/early_init.c
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 21/55] x86: ivybridge: Drop the dead MTRR code

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This is not used and MTRRs are set up elsewhere now. Drop it.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/model_206ax.c | 10 --
>  1 file changed, 10 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 25/55] x86: Bring up northbridge, pch and lpc after the CPUs

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:48 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> These devices currently need to be inited early in boot. Once we have the
>> init in the right places (with each device doing its own init and no
>> problems with ordering) we should be able to remove this. For now it is
>> needed to keep things working.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Add a comment as to why we are initing the devices again
>>
>>  arch/x86/cpu/cpu.c | 20 ++--
>>  1 file changed, 18 insertions(+), 2 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 27/55] x86: ivybridge: Use driver model PCI API in bd82x6x.c

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Adjust most of the remaining functions in this file to use the driver model
> PCI API. The one remaining function is bridge_silicon_revision() which will
> need a little more work.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Drop northbridge_enable()
>
>  arch/x86/cpu/ivybridge/northbridge.c  | 20 +++-
>  arch/x86/include/asm/arch-ivybridge/sandybridge.h |  3 ---
>  2 files changed, 7 insertions(+), 16 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 24/55] x86: Don't show an error when the MRC cache is up to date

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> When the final MRC cache record is the same as the one we want to write, we
> skip writing since there is no point. This is normal behaviour.
>
> Avoiding printing an error when this happens.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/lib/mrccache.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 23/55] x86: Make x86_init_cpus() static

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> There are no other implementations of this function, and boards that need it
> can implement a CPU driver.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Fix 'baords' typo in the commit message
>
>  arch/x86/cpu/cpu.c| 2 +-
>  arch/x86/include/asm/u-boot-x86.h | 2 --
>  2 files changed, 1 insertion(+), 3 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 26/55] x86: ivybridge: Move northbridge and PCH init into drivers

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:54 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> Instead of calling the northbridge and PCH init from bd82x6x_init_extra()
>> when the PCI bus is probed, call it from the respective drivers. Also drop
>> the Northbridge init as it has no effect. The registers it touches appear to
>> be read-only.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2: None
>>
>>  arch/x86/cpu/ivybridge/bd82x6x.c  | 42 
>> ---
>>  arch/x86/cpu/ivybridge/northbridge.c  | 16 +++---
>>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  1 -
>>  board/google/chromebook_link/link.c   |  8 -
>>  4 files changed, 12 insertions(+), 55 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 28/55] x86: ivybridge: Drop unnecessary northbridge setup

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:57 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> This is done by default with PCI auto-config. Drop it.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Rename from 'Move northbridge setup to the northbridge driver'
>> - Drop this unnecessary init
>>
>>  arch/x86/cpu/ivybridge/pci.c | 20 
>>  1 file changed, 20 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 29/55] ahci: Add a disk-controller uclass

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:08 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> Add a uclass ID for a disk controller. This can be used by AHCI/SATA or
>> other controller types. There are no operations and no interface so far,
>> but it is possible to probe a SATA device.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Rename the AHCI uclass to DISK
>>
>>  drivers/block/Kconfig   |  9 +
>>  drivers/block/Makefile  |  1 +
>>  drivers/block/disk-uclass.c | 14 ++
>>  include/dm/uclass-id.h  |  1 +
>>  4 files changed, 25 insertions(+)
>>  create mode 100644 drivers/block/disk-uclass.c
>>
>> diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
>> index e69de29..989b21d 100644
>> --- a/drivers/block/Kconfig
>> +++ b/drivers/block/Kconfig
>> @@ -0,0 +1,9 @@
>> +config DISK
>> +   bool "Support disk controllers with driver model"
>> +   depends on DM
>> +   default y if DM
>> +   help
>> + This enables a uclass for disk controllers  in U-Boot. Various 
>> driver
>
> nits: one more space before "in U-Boot"
>
> I can fix this when applying.

Fixed nits, and

>
>> + types can use this, such as AHCI/SATA. It does not provide any 
>> standard
>> + operations at present. The block device interface has not been 
>> converted
>> + to driver model.
>> diff --git a/drivers/block/Makefile b/drivers/block/Makefile
>> index eb8bda9..5eb87e0 100644
>> --- a/drivers/block/Makefile
>> +++ b/drivers/block/Makefile
>> @@ -5,6 +5,7 @@
>>  # SPDX-License-Identifier: GPL-2.0+
>>  #
>>
>> +obj-$(CONFIG_DISK) += disk-uclass.o
>>  obj-$(CONFIG_SCSI_AHCI) += ahci.o
>>  obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
>>  obj-$(CONFIG_FSL_SATA) += fsl_sata.o
>> diff --git a/drivers/block/disk-uclass.c b/drivers/block/disk-uclass.c
>> new file mode 100644
>> index 000..d665b35
>> --- /dev/null
>> +++ b/drivers/block/disk-uclass.c
>> @@ -0,0 +1,14 @@
>> +/*
>> + * Copyright (c) 2015 Google, Inc
>> + * Written by Simon Glass 
>> + *
>> + * SPDX-License-Identifier:GPL-2.0+
>> + */
>> +
>> +#include 
>> +#include 
>> +
>> +UCLASS_DRIVER(disk) = {
>> +   .id = UCLASS_DISK,
>> +   .name   = "disk",
>> +};
>> diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h
>> index 4a6827b..2e10953 100644
>> --- a/include/dm/uclass-id.h
>> +++ b/include/dm/uclass-id.h
>> @@ -29,6 +29,7 @@ enum uclass_id {
>> UCLASS_CLK, /* Clock source, e.g. used by peripherals */
>> UCLASS_CPU, /* CPU, typically part of an SoC */
>> UCLASS_CROS_EC, /* Chrome OS EC */
>> +   UCLASS_DISK,/* Disk controller, e.g. SATA */
>> UCLASS_DISPLAY_PORT,/* Display port video */
>> UCLASS_RAM, /* RAM controller */
>> UCLASS_ETH, /* Ethernet device */
>> --
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 30/55] x86: ivybridge: Do the SATA init before relocation

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:10 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> The SATA device needs to set itself up so that it appears correctly on the
>> PCI bus. The easiest way to do this is to set it up to probe before
>> relocation. This can do the early setup.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Update to use the disk uclass
>>
>>  arch/x86/cpu/ivybridge/bd82x6x.c  |  2 --
>>  arch/x86/cpu/ivybridge/cpu.c  |  3 +++
>>  arch/x86/cpu/ivybridge/sata.c | 25 -
>>  arch/x86/dts/chromebook_link.dts  | 16 +---
>>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  1 -
>>  5 files changed, 36 insertions(+), 11 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 31/55] x86: ivybridge: Drop the unused bd82x6x_init_extra()

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This function does nothing now so can be dropped.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/bd82x6x.c  | 16 
>  arch/x86/cpu/ivybridge/pci.c  |  1 -
>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  1 -
>  3 files changed, 18 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 32/55] x86: ivybridge: Use the SATA driver to do the init

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:16 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> Instead of manually initing the device, probe the SATA device and move the
>> init there.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Update to use the disk uclass
>>
>>  arch/x86/cpu/ivybridge/bd82x6x.c  | 13 +
>>  arch/x86/cpu/ivybridge/sata.c |  4 +++-
>>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  1 -
>>  3 files changed, 8 insertions(+), 10 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 35/55] x86: ivybridge: Move LPC init into the LPC probe() method

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Drop the lpc_init_extra() function and just use the post-relocation LPC
> probe() instead.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Update to use LPC probe() method instead of init()
>
>  arch/x86/cpu/ivybridge/bd82x6x.c  |  4 
>  arch/x86/cpu/ivybridge/lpc.c  | 17 +
>  arch/x86/include/asm/arch-ivybridge/pch.h |  2 --
>  3 files changed, 9 insertions(+), 14 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 34/55] x86: ivybridge: Move lpc_enable() into gma.c

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This graphics init code is best placed in the gma init code. Move the code
> and drop the function.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/bd82x6x.c  | 1 -
>  arch/x86/cpu/ivybridge/gma.c  | 4 
>  arch/x86/cpu/ivybridge/lpc.c  | 7 ---
>  arch/x86/include/asm/arch-ivybridge/pch.h | 1 -
>  4 files changed, 4 insertions(+), 9 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 33/55] x86: ivybridge: Use driver model PCI API in sata.c

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:19 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> Adjust the functions in this file to use the driver model PCI API.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Drop unnecessary IRQ and command register init
>>
>>  arch/x86/cpu/ivybridge/sata.c | 94 
>> +--
>>  1 file changed, 45 insertions(+), 49 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 37/55] x86: ivybridge: Convert lpc init code to DM PCI API

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Adjust this code to use the driver model PCI API. This is all called through
> lpc_init_extra().
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/lpc.c | 129 
> ++-
>  1 file changed, 66 insertions(+), 63 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 36/55] x86: ivybridge: Drop the special PCI driver

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:22 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> There is nothing special about the ivybridge pci driver now, so just use
>> the generic one.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Drop the special compatible string in chromebook_link.dts
>>
>>  arch/x86/cpu/ivybridge/Makefile  |  1 -
>>  arch/x86/cpu/ivybridge/pci.c | 46 
>> 
>>  arch/x86/dts/chromebook_link.dts |  2 +-
>>  3 files changed, 1 insertion(+), 48 deletions(-)
>>  delete mode 100644 arch/x86/cpu/ivybridge/pci.c
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 39/55] x86: i2c: Add a stub driver for Intel I2C/SMbus

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This is used on most Intel platforms. We don't have a driver for it yet, but
> add a stub to handle the init. For now this targets ivybridge so we may want
> to add a device tree binding and generalise it when other platforms are
> supported.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Heiko Schocher 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Expand the Kconfig help a little
>
>  drivers/i2c/Kconfig |  9 +
>  drivers/i2c/Makefile|  1 +
>  drivers/i2c/intel_i2c.c | 51 
> +
>  3 files changed, 61 insertions(+)
>  create mode 100644 drivers/i2c/intel_i2c.c
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 38/55] x86: Enable DM_USB for link and panther

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Move these two boards to use driver model for USB.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  configs/chromebook_link_defconfig   | 2 ++
>  configs/chromebox_panther_defconfig | 2 ++
>  2 files changed, 4 insertions(+)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 40/55] x86: ivybridge: Use the I2C driver to perform SMbus init

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Move the init code into the I2C driver.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Heiko Schocher 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/cpu.c  | 39 
> +++
>  arch/x86/dts/chromebook_link.dts  |  6 ++
>  configs/chromebook_link_defconfig |  2 ++
>  drivers/i2c/intel_i2c.c   | 24 
>  4 files changed, 35 insertions(+), 36 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 41/55] x86: ivybridge: Convert enable_usb_bar() to use DM PCI API

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Convert this function over to use the driver model PCI API. In this case
> we want to avoid using the real PCI devices since they have not yet been
> probed. Instead, write directly to their PCI configuration address.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Avoid needing the pch device to set up the USB bar
>
>  arch/x86/cpu/ivybridge/cpu.c | 34 +-
>  1 file changed, 17 insertions(+), 17 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 42/55] x86: ivybridge: Convert dram_init() to use DM PCI API

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Convert the top part of the DRAM init to use the driver model PCI API.
> Further work will complete the transformation.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/sdram.c | 39 +--
>  1 file changed, 25 insertions(+), 14 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 45/55] x86: ivybridge: Convert SDRAM init to use driver model

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> SDRAM init needs access to the Northbridge controller and the Intel
> Management Engine device. Add the latter to the device tree and convert all
> of this code to driver model.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/early_me.c| 68 
> 
>  arch/x86/cpu/ivybridge/sdram.c   | 20 ++
>  arch/x86/dts/chromebook_link.dts |  6 +++
>  arch/x86/include/asm/arch-ivybridge/me.h | 45 ++---
>  4 files changed, 101 insertions(+), 38 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 43/55] x86: ivybridge: Convert sdram_initialise() to use DM PCI API

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Convert this function to use the the driver model PCI API. We just need
> to pass in the northbridge device.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/sdram.c | 19 ++-
>  1 file changed, 10 insertions(+), 9 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 49/55] x86: ivybridge: Sort out the calls to bridge_silicon_revision()

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:35 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> This function is called all over the place. Convert it use the driver model
>> PCI API, and rationalise the calls.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Fix incorrect bits in bridge_silicon_revision() comment
>>
>>  arch/x86/cpu/ivybridge/gma.c  | 33 
>>  arch/x86/cpu/ivybridge/northbridge.c  | 47 
>> +++
>>  arch/x86/include/asm/arch-ivybridge/sandybridge.h |  8 +++-
>>  3 files changed, 46 insertions(+), 42 deletions(-)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 44/55] x86: chromebook_link: Enable the syscon uclass

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> We will use a system controller to model the Intel Management Engine. Enable
> this for link.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  configs/chromebook_link_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 47/55] x86: ivybridge: Convert pch.c to use DM PCI API

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Convert this file to use the driver model PCI API.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/lpc.c  | 10 
>  arch/x86/cpu/ivybridge/pch.c  | 35 ++
>  arch/x86/cpu/ivybridge/sata.c | 21 +++-
>  arch/x86/include/asm/arch-ivybridge/pch.h | 42 
> +++
>  4 files changed, 76 insertions(+), 32 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 48/55] x86: ivybridge: Move code from pch.c to bd82x6x.c

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This code relates to the PCH, so we should move it into the same file.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/Makefile   |   1 -
>  arch/x86/cpu/ivybridge/bd82x6x.c  | 129 
> ++
>  arch/x86/cpu/ivybridge/pch.c  | 126 -
>  arch/x86/include/asm/arch-ivybridge/pch.h |  18 -
>  4 files changed, 129 insertions(+), 145 deletions(-)
>  delete mode 100644 arch/x86/cpu/ivybridge/pch.c
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 46/55] x86: ivybridge: Convert report_platform to DM PCI API

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Convert these functions to use the driver model PCI API.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/report_platform.c  | 11 ++-
>  arch/x86/cpu/ivybridge/sdram.c|  2 +-
>  arch/x86/include/asm/arch-ivybridge/sandybridge.h |  2 +-
>  3 files changed, 8 insertions(+), 7 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 52/55] x86: ivybridge: Drop the SMM-locking code

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> U-Boot does not support SMM yet, so we can drop this code. It is easy to
> bring back when needed.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/lpc.c | 57 
> 
>  1 file changed, 57 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 50/55] x86: ivybridge: Drop special EHCI init

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 3:39 PM, Bin Meng  wrote:
> On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
>> This is not needed. On reset wake-on-disconnect is already set. It may a
>> problem during a soft reset or resume, but for now it does not seem
>> important. Also drop the command register update since PCI auto-config
>> does it for us.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v2:
>> - Rename from 'Convert EHCI init to use the DM PCI API'
>> - Drop this init
>> - Fix the USB PCI address in the device tree
>>
>>  arch/x86/cpu/ivybridge/Makefile   |  1 -
>>  arch/x86/cpu/ivybridge/bd82x6x.c  |  3 ---
>>  arch/x86/cpu/ivybridge/usb_ehci.c | 29 
>> ---
>>  arch/x86/dts/chromebook_link.dts  | 12 +++
>>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  1 -
>>  5 files changed, 12 insertions(+), 34 deletions(-)
>>  delete mode 100644 arch/x86/cpu/ivybridge/usb_ehci.c
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 53/55] x86: Set up a shared syscon numbering schema

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Each system controller can have a number to identify it. It can then be
> accessed using syscon_get_by_driver_data(). Put this in a shared header
> file and update the only current user.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Enable SYSCON and REGMAP for panther to avoid a build error
>
>  arch/x86/cpu/ivybridge/early_me.c   | 3 ++-
>  arch/x86/cpu/ivybridge/sdram.c  | 6 +++---
>  arch/x86/include/asm/cpu.h  | 9 +
>  configs/chromebox_panther_defconfig | 2 ++
>  4 files changed, 16 insertions(+), 4 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 51/55] x86: ivybridge: Drop XHCI support

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> This is not used on link which is the only ivybridge board. Drop this code.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/Makefile   |  1 -
>  arch/x86/cpu/ivybridge/usb_xhci.c | 32 
> ---
>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  1 -
>  3 files changed, 34 deletions(-)
>  delete mode 100644 arch/x86/cpu/ivybridge/usb_xhci.c
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 55/55] x86: fdt: Drop the unused compatible strings in fdtdec

2016-01-21 Thread Bin Meng
Hi Simon,

On Mon, Jan 18, 2016 at 7:12 AM, Simon Glass  wrote:
> We have drivers for several more devices now, so drop the strings which are
> no-longer used.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2:
> - Drop bd82x6x_pci_init() function and associated DM-conversion patch
> - Drop LPC init method an 'Add an init() method to the LPC uclass' patch
>
>  arch/x86/cpu/ivybridge/lpc.c | 6 --
>  include/fdtdec.h | 5 -
>  lib/fdtdec.c | 5 -
>  3 files changed, 16 deletions(-)
>

This patch does not apply on existing u-boot-x86/master. I tried to
rebase u-boot-x86/master on top of latest u-boot/master, but it still
does not apply. Please rebase this patch on top of current
u-boot-x86/master and submit a new version. Thanks!

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


Re: [U-Boot] [PATCH v2 54/55] x86: ivybridge: Use syscon for the GMA device

2016-01-21 Thread Bin Meng
On Mon, Jan 18, 2016 at 7:11 AM, Simon Glass  wrote:
> Until we have a proper video uclass we can use syscon to handle the GMA
> device, and avoid the special device tree and PCI searching. Update the code
> to work this way.
>
> Reviewed-by: Bin Meng 
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/ivybridge/bd82x6x.c  | 14 +-
>  arch/x86/cpu/ivybridge/early_me.c |  1 +
>  arch/x86/cpu/ivybridge/gma.c  |  8 +---
>  arch/x86/dts/chromebook_link.dts  |  3 ++-
>  arch/x86/include/asm/arch-ivybridge/bd82x6x.h |  2 +-
>  arch/x86/include/asm/cpu.h|  4 +++-
>  6 files changed, 17 insertions(+), 15 deletions(-)
>

applied to u-boot-x86/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/3] armv8/ls1043aqds: Select lpuart pins of various muxes

2016-01-21 Thread Bin Meng
Hi Wenbin,

On Thu, Jan 21, 2016 at 2:32 PM, Wenbin Song  wrote:
> From: Shaohui Xie 
>
> Set Board Configuration Register to select the lpuart pins of various
> muxes.
>
> Signed-off-by: Shaohui Xie 
> Signed-off-by: Mingkai Hu 
> ---

Please always include a changelog when you do new version so that
other people know what's changed.

>  board/freescale/ls1043aqds/ls1043aqds.c | 15 +++
>  1 file changed, 15 insertions(+)
>
> diff --git a/board/freescale/ls1043aqds/ls1043aqds.c 
> b/board/freescale/ls1043aqds/ls1043aqds.c
> index d6696ca..67f4c4b 100644
> --- a/board/freescale/ls1043aqds/ls1043aqds.c
> +++ b/board/freescale/ls1043aqds/ls1043aqds.c
> @@ -40,6 +40,9 @@ enum {
>  #define CFG_SD_MUX3_MUX4   0x1 /* MUX4 */
>  #define CFG_SD_MUX4_SLOT3  0x0 /* SLOT3 TX/RX1 */
>  #define CFG_SD_MUX4_SLOT1  0x1 /* SLOT1 TX/RX3 */
> +#define CFG_UART_MUX_MASK  0x6
> +#define CFG_UART_MUX_SHIFT 1
> +#define CFG_LPUART_EN  0x1
>
>  int checkboard(void)
>  {
> @@ -218,7 +221,19 @@ void board_retimer_init(void)
>
>  int board_early_init_f(void)
>  {
> +#ifdef CONFIG_LPUART
> +   u8 uart;
> +#endif
> fsl_lsch2_early_init_f();
> +#ifdef CONFIG_LPUART
> +

nits: this blank line is not needed

> +/* We use lpuart1 as system console. */

nits: ending period is not needed

> +
> +   uart = QIXIS_READ(brdcfg[14]);
> +   uart &= ~CFG_UART_MUX_MASK;
> +   uart |= CFG_LPUART_EN << CFG_UART_MUX_SHIFT;
> +   QIXIS_WRITE(brdcfg[14], uart);
> +#endif
>
> return 0;
>  }
> --

Other than that,
Reviewed-by: Bin Meng 

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


Re: [U-Boot] [PATCH v3 2/3] armv8/ls1043aqds: Spilt off board device tree

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 2:32 PM, Wenbin Song  wrote:
> Move new /chosen node out of the board device tree.
>
> Signed-off-by: Wenbin Song 
> ---
>  arch/arm/dts/Makefile|  2 +-
>  arch/arm/dts/fsl-ls1043a-qds-duart.dts   | 16 
> 
>  .../dts/{fsl-ls1043a-qds.dts => fsl-ls1043a-qds.dtsi}|  1 -
>  configs/ls1043aqds_defconfig |  2 +-
>  4 files changed, 18 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/dts/fsl-ls1043a-qds-duart.dts
>  rename arch/arm/dts/{fsl-ls1043a-qds.dts => fsl-ls1043a-qds.dtsi} (99%)
>

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


Re: [U-Boot] [PATCH v3 1/3] armv8/ls1043aqds: Select lpuart pins of various muxes

2016-01-21 Thread Bin Meng
Hi Wenbin,

On Thu, Jan 21, 2016 at 4:35 PM, Bin Meng  wrote:
> Hi Wenbin,
>
> On Thu, Jan 21, 2016 at 2:32 PM, Wenbin Song  wrote:
>> From: Shaohui Xie 
>>
>> Set Board Configuration Register to select the lpuart pins of various
>> muxes.
>>
>> Signed-off-by: Shaohui Xie 
>> Signed-off-by: Mingkai Hu 
>> ---
>
> Please always include a changelog when you do new version so that
> other people know what's changed.
>
>>  board/freescale/ls1043aqds/ls1043aqds.c | 15 +++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/board/freescale/ls1043aqds/ls1043aqds.c 
>> b/board/freescale/ls1043aqds/ls1043aqds.c
>> index d6696ca..67f4c4b 100644
>> --- a/board/freescale/ls1043aqds/ls1043aqds.c
>> +++ b/board/freescale/ls1043aqds/ls1043aqds.c
>> @@ -40,6 +40,9 @@ enum {
>>  #define CFG_SD_MUX3_MUX4   0x1 /* MUX4 */
>>  #define CFG_SD_MUX4_SLOT3  0x0 /* SLOT3 TX/RX1 */
>>  #define CFG_SD_MUX4_SLOT1  0x1 /* SLOT1 TX/RX3 */
>> +#define CFG_UART_MUX_MASK  0x6
>> +#define CFG_UART_MUX_SHIFT 1
>> +#define CFG_LPUART_EN  0x1
>>
>>  int checkboard(void)
>>  {
>> @@ -218,7 +221,19 @@ void board_retimer_init(void)
>>
>>  int board_early_init_f(void)
>>  {
>> +#ifdef CONFIG_LPUART
>> +   u8 uart;
>> +#endif
>> fsl_lsch2_early_init_f();
>> +#ifdef CONFIG_LPUART
>> +
>
> nits: this blank line is not needed
>
>> +/* We use lpuart1 as system console. */

One more question: in your patch 3, you listed lpuart0 as the /chosen
node, but here the comments says lpuart1. Which one is correct?

>
> nits: ending period is not needed
>
>> +
>> +   uart = QIXIS_READ(brdcfg[14]);
>> +   uart &= ~CFG_UART_MUX_MASK;
>> +   uart |= CFG_LPUART_EN << CFG_UART_MUX_SHIFT;
>> +   QIXIS_WRITE(brdcfg[14], uart);
>> +#endif
>>
>> return 0;
>>  }
>> --
>
> Other than that,
> Reviewed-by: Bin Meng 
>
> Regards,
> Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/3] armv8/ls1043aqds: Add lpuart support

2016-01-21 Thread Bin Meng
Hi Wenbin,

On Thu, Jan 21, 2016 at 2:32 PM, Wenbin Song  wrote:
> Add lpuart support using the driver model.
>
> Signed-off-by: Wenbin Song 
> ---
>  arch/arm/dts/Makefile   |  1 +
>  arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 16 ++
>  arch/arm/dts/fsl-ls1043a-qds.dtsi   |  4 +++
>  arch/arm/dts/fsl-ls1043a.dtsi   | 54 
> +
>  configs/ls1043aqds_lpuart_defconfig | 10 ++
>  include/configs/ls1043aqds.h|  7 +
>  6 files changed, 92 insertions(+)
>  create mode 100644 arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
>  create mode 100644 configs/ls1043aqds_lpuart_defconfig
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 302456c..a51275c 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -97,6 +97,7 @@ dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
>  dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
> fsl-ls2080a-rdb.dtb
>  dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
> +   fsl-ls1043a-qds-lpuart.dtb \
> fsl-ls1043a-rdb.dtb
>
>  dtb-$(CONFIG_MACH_SUN4I) += \
> diff --git a/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts 
> b/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
> new file mode 100644
> index 000..18adb97
> --- /dev/null
> +++ b/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
> @@ -0,0 +1,16 @@
> +/*
> + * Device Tree file for Freescale Layerscape-1043A family SoC.
> + *
> + * Copyright (C) 2015, Freescale Semiconductor
> + *
> + * SPDX-License-Identifier:GPL-2.0+
> + */
> +
> +/dts-v1/;
> +#include "fsl-ls1043a-qds.dtsi"
> +
> +/ {
> +   chosen {
> +   stdout-path = &lpuart0;
> +   };
> +};
> diff --git a/arch/arm/dts/fsl-ls1043a-qds.dtsi 
> b/arch/arm/dts/fsl-ls1043a-qds.dtsi
> index 6fa16b8..b9dad72 100644
> --- a/arch/arm/dts/fsl-ls1043a-qds.dtsi
> +++ b/arch/arm/dts/fsl-ls1043a-qds.dtsi
> @@ -121,3 +121,7 @@
>  &duart1 {
> status = "okay";
>  };
> +
> +&lpuart0 {
> +   status = "okay";
> +};
> diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
> index 85ea81e..12ea0ab 100644
> --- a/arch/arm/dts/fsl-ls1043a.dtsi
> +++ b/arch/arm/dts/fsl-ls1043a.dtsi
> @@ -182,5 +182,59 @@
> interrupts = <0 55 0x4>;
> clocks = <&clockgen 4 0>;
> };
> +
> +   lpuart0: serial@295 {
> +   compatible = "fsl,ls1021a-lpuart";
> +   reg = <0x0 0x295 0x0 0x1000>;
> +   interrupts = <0 48 0x4>;
> +   clocks = <&sysclk>;
> +   clock-names = "ipg";
> +   status = "disabled";
> +   };
> +
> +   lpuart1: serial@296 {
> +   compatible = "fsl,ls1021a-lpuart";
> +   reg = <0x0 0x296 0x0 0x1000>;
> +   interrupts = <0 49 0x4>;
> +   clocks = <&sysclk>;
> +   clock-names = "ipg";
> +   status = "disabled";
> +   };
> +
> +   lpuart2: serial@297 {
> +   compatible = "fsl,ls1021a-lpuart";
> +   reg = <0x0 0x297 0x0 0x1000>;
> +   interrupts = <0 50 0x4>;
> +   clock-names = "ipg";
> +   clocks = <&sysclk>;
> +   status = "disabled";
> +   };
> +
> +   lpuart3: serial@298 {
> +   compatible = "fsl,ls1021a-lpuart";
> +   reg = <0x0 0x298 0x0 0x1000>;
> +   interrupts = <0 51 0x4>;
> +   clocks = <&sysclk>;
> +   clock-names = "ipg";
> +   status = "disabled";
> +   };
> +
> +   lpuart4: serial@299 {
> +   compatible = "fsl,ls1021a-lpuart";
> +   reg = <0x0 0x299 0x0 0x1000>;
> +   interrupts = <0 52 0x4>;
> +   clocks = <&sysclk>;
> +   clock-names = "ipg";
> +   status = "disabled";
> +   };
> +
> +   lpuart5: serial@29a {
> +   compatible = "fsl,ls1021a-lpuart";
> +   reg = <0x0 0x29a 0x0 0x1000>;
> +   interrupts = <0 53 0x4>;
> +   clocks = <&sysclk>;
> +   clock-names = "ipg";
> +   status = "disabled";
> +   };
> };
>  };
> diff --git a/configs/ls1043aqds_lpuart_defconfig 
> b/configs/ls1043aqds_lpuart_defconfig
> new file mode 100644
> index 000..21d6407
> --- /dev/null
> +++ b/configs/ls1043aqds_lpuart_defconfig
> @@ -0,0 +1,10 @@
> +CONFIG_ARM=y
> +CONFIG_TARGET_LS1043AQDS=y
> +CONFIG_DM_SERIAL=y
> +CONFIG_DM_SPI=y
> +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-lpuart

[U-Boot] [PATCH v2] board/t4240rdb: VID support

2016-01-21 Thread ying.zhang
From: Ying Zhang 

The fuse status register provides the values from on-chip
voltage ID efuses programmed at the factory.
These values define the voltage requirements for
the chip. u-boot reads FUSESR and translates the values
into the appropriate commands to set the voltage output
value of an external voltage regulator.

Signed-off-by: Ying Zhang 
---
Changed from v1:
- Not support IR chip is used in AMD mode
---
 board/freescale/common/vid.c | 19 +--
 board/freescale/common/vid.h |  4 
 board/freescale/t4rdb/t4240rdb.c |  7 +++
 include/configs/T4240RDB.h   | 10 ++
 4 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index f1bed51..1bd65a8 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -42,7 +42,7 @@ int __weak board_vdd_drop_compensation(void)
  * The IR chip can show up under the following addresses:
  * 0x08 (Verified on T1040RDB-PA,T4240RDB-PB,X-T4240RDB-16GPA)
  * 0x09 (Verified on T1040RDB-PA)
- * 0x38 (Verified on T2080QDS, T2081QDS)
+ * 0x38 (Verified on T2080QDS, T2081QDS, T4240RDB)
  */
 static int find_ir_chip_on_i2c(void)
 {
@@ -292,7 +292,7 @@ int adjust_vdd(ulong vdd_override)
(void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 #endif
u32 fusesr;
-   u8 vid;
+   u8 vid, buf;
int vdd_target, vdd_current, vdd_last;
int ret, i2caddress;
unsigned long vdd_string_override;
@@ -346,6 +346,21 @@ int adjust_vdd(ulong vdd_override)
debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress);
}
 
+   /* check IR chip work on Intel mode*/
+   ret = i2c_read(i2caddress,
+  IR36021_INTEL_MODE_OOFSET,
+  1, (void *)&buf, 1);
+   if (ret) {
+   printf("VID: failed to read IR chip mode.\n");
+   ret = -1;
+   goto exit;
+   }
+   if ((buf & IR36021_MODE_MASK) != IR36021_INTEL_MODE) {
+   printf("VID: IR Chip is not used in Intel mode.\n");
+   ret = -1;
+   goto exit;
+   }
+
/* get the voltage ID from fuse status register */
fusesr = in_be32(&gur->dcfg_fusesr);
/*
diff --git a/board/freescale/common/vid.h b/board/freescale/common/vid.h
index a9c7bb4..9182c20 100644
--- a/board/freescale/common/vid.h
+++ b/board/freescale/common/vid.h
@@ -11,6 +11,10 @@
 #define IR36021_LOOP1_VOUT_OFFSET  0x9A
 #define IR36021_MFR_ID_OFFSET  0x92
 #define IR36021_MFR_ID 0x43
+#define IR36021_INTEL_MODE_OOFSET  0x14
+#define IR36021_MODE_MASK  0x20
+#define IR36021_INTEL_MODE 0x00
+#define IR36021_AMD_MODE   0x20
 
 /* step the IR regulator in 5mV increments */
 #define IR_VDD_STEP_DOWN   5
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index fac442b..99a8730 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -21,6 +21,7 @@
 
 #include "t4rdb.h"
 #include "cpld.h"
+#include "../common/vid.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -79,6 +80,12 @@ int board_early_init_r(void)
 #ifdef CONFIG_SYS_DPAA_QBMAN
setup_portals();
 #endif
+   /*
+* Adjust core voltage according to voltage ID
+* This function changes I2C mux to channel 2.
+   */
+   if (adjust_vdd(0))
+   printf("Warning: Adjusting core voltage failed.\n");
 
return 0;
 }
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 73279c8..4a17f41 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -606,6 +606,16 @@ unsigned long get_board_ddr_clk(void);
 #define I2C_VOL_MONITOR_BUS_V_OVF  0x1
 #define I2C_VOL_MONITOR_BUS_V_SHIFT3
 
+#define CONFIG_VID_FLS_ENV "t4240rdb_vdd_mv"
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_VID
+#endif
+#define CONFIG_VOL_MONITOR_IR36021_SET
+#define CONFIG_VOL_MONITOR_IR36021_READ
+/* The lowest and highest voltage allowed for T4240RDB */
+#define VDD_MV_MIN 819
+#define VDD_MV_MAX 1212
+
 /*
  * eSPI - Enhanced SPI
  */
-- 
1.8.4.1

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


Re: [U-Boot] [PATCH v7 0/7] add support for atheros ath79 based SOCs

2016-01-21 Thread Wills Wang



On Thursday, January 21, 2016 01:35 PM, Marek Vasut wrote:

On Thursday, January 21, 2016 at 03:58:44 AM, Wills Wang wrote:

On Thursday, January 21, 2016 09:32 AM, Marek Vasut wrote:

On Sunday, January 17, 2016 at 01:21:29 PM, Wills Wang wrote:

On 01/17/2016 06:24 PM, Daniel Schwierzeck wrote:

2016-01-17 6:49 GMT+01:00 Wills Wang :

On 01/17/2016 03:05 AM, Marek Vasut wrote:

On Saturday, January 16, 2016 at 07:13:46 PM, Wills Wang wrote:

These series of patch add support for atheros ath79 based SOCs in
u-boot, at the present moment it's just available for ar933x and
qca953x chip.

This patch serises is based on mips_io_v4 branch on u-boot-mips
repository
[1] and tested on ar933x and qca953x board.

[1]

http://git.denx.de/?p=u-boot/u-boot-mips.git;a=shortlog;h=refs/heads
/m ips_ io_v4

So if I didn't complain about this being sent as separate emails this
morning.
Please, do send your patches as a series, not as separate emails.

How to send a patch series by patman?

If your git-sendmail config is correctly set up, patman automatically
sends the cover letter and then all patches as response to that cover
letter.

You have to enable mail threading in git-sendmail. Check that with:

$ git config --get sendemail.thread

To enable it globally:

$ git config --global sendemail.thread true

Thanks, i will try it for the coming v8.

I got as far as booting my ar9330 rev 1 machine, though it did take
considerably amount of hackery. I also had to use locked cachelines for
stack, because it is far faster than using the SRAM on ar9331 . You can
find my hacks in the attachment, most of the stuff there is because
arduino yun is repugnant crappy piece of hardware and needs some extra
treatment.

My board is also ar9330 rev 1, but i can boot well without any change for
start.s and cache, is it possible about hardware?

No clue.


My board work fine when i use DDR or SRAM for stack.

I remember you weren't able to boot if you used SRAM for stack.
Did something change ?

What i mean is that my board can't boot if drop the whole lowlevel_init.S
when use SRAM for stack. we need lowlevel_init.S to handle RTC, PLL and
some chip issues.


You should mostly care about the hacks in start.S , in particular the one
setting bit 3 in CP0 in setup_c0_status seems important on mips 24kc
core. Daniel seems to have some ideas on this too I think, he helped me
finding out there's a problem.

Also, mips_cache_lock_24k does the job for locking the cachelines, but
(!) it is clearly a dirty hack. The start.S needs to be modularized in
some way for this to be properly integrat(ed|able).

In case I select SYS_MIPS_CACHE_INIT_RAM_LOAD , the machine hangs. No
idea why, but I suspect it makes no sense on a machine which has no
running DRAM anyway, so I removed this option.

My hardware can work no matter if i select SYS_MIPS_CACHE_INIT_RAM_LOAD.
I doubt whether there are same exceptions for your memory subsystem, or
some DDR parameters are not for your DDR chip.

DDR is not started at the point where INIT_RAM_LOAD comes into play, so
it has nothing to do with it. Instead, refilling the cache from DDR makes
no sense if DDR is not running, therefore this should be disabled to make
sure we don't run into problems.


Change to ddr.c seems correct, the values for DDR1 and DDR2 were swapped,
but I suggest you double-check it.

Did your board use DDR1?

DDR2


I check the original u-boot code again, this value 0xa33 is for DDR2,
0x33 for DDR1. The 0 value for WR filed in DDR2 MRS is reserved.

That's correct, so I suspect there's something swapped somewhere, since my
register ends up configured with 0x33 and not 0xa33 . That's why I hacked
this change for now.


Ignore my AHB hack in lowlevel_init.S , it's necessary to keep my SPI NOR
running at low speed, since I am using an FPGA instead of real SPI NOR
and the FPGA implementation of the SPI NOR emulator cannot run at tens
of MHz.

I am now looking into implementing ethernet and USB support for ar9331,
did you look into it at all or not ? I'd like to avoid duplicating
efforts.

At present, i have no plan to involve ethernet and USB, i want to work
done first for this patch.

OK, I am looking into the ethernet part now, no luck so far. I cannot even
read the PHY ID yet, probably missing some register bit somewhere.


--
Best Regards
Wills

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


Re: [U-Boot] [PATCH v4 2/3] armv8/ls1043aqds: Spilt off board device tree

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 5:14 PM, Wenbin Song  wrote:
> Move new /chosen node out of the board device tree.
>
> Signed-off-by: Wenbin Song 
> ---
> Changes in v4:
> - No change
> ---
>  arch/arm/dts/Makefile|  2 +-
>  arch/arm/dts/fsl-ls1043a-qds-duart.dts   | 16 
> 
>  .../dts/{fsl-ls1043a-qds.dts => fsl-ls1043a-qds.dtsi}|  1 -
>  configs/ls1043aqds_defconfig |  2 +-
>  4 files changed, 18 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/dts/fsl-ls1043a-qds-duart.dts
>  rename arch/arm/dts/{fsl-ls1043a-qds.dts => fsl-ls1043a-qds.dtsi} (99%)
>

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


Re: [U-Boot] [PATCH v4 1/3] armv8/ls1043aqds: Select lpuart pins of various muxes

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 5:14 PM, Wenbin Song  wrote:
> From: Shaohui Xie 
>
> Set Board Configuration Register to select the lpuart pins of various
> muxes.
>
> Signed-off-by: Shaohui Xie 
> Signed-off-by: Mingkai Hu 
> ---
> Changes in v4:
> - remove the blank line and ending period
> - modify the suffix of lpuart to 0 on the comment
> ---
>  board/freescale/ls1043aqds/ls1043aqds.c | 13 +
>  1 file changed, 13 insertions(+)
>

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


Re: [U-Boot] [PATCH v4 3/3] armv8/ls1043aqds: Add lpuart support

2016-01-21 Thread Bin Meng
On Thu, Jan 21, 2016 at 5:14 PM, Wenbin Song  wrote:
> Add lpuart support using the driver model.
>
> Signed-off-by: Wenbin Song 
> ---
> Changes in v4:
> - No change
> ---
>  arch/arm/dts/Makefile   |  1 +
>  arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 16 ++
>  arch/arm/dts/fsl-ls1043a-qds.dtsi   |  4 +++
>  arch/arm/dts/fsl-ls1043a.dtsi   | 54 
> +
>  configs/ls1043aqds_lpuart_defconfig | 10 ++
>  include/configs/ls1043aqds.h|  5 +++
>  6 files changed, 90 insertions(+)
>  create mode 100644 arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
>  create mode 100644 configs/ls1043aqds_lpuart_defconfig
>

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


Re: [U-Boot] [PATCH 1/8] test/py: fix timeout to be absolute

2016-01-21 Thread Lukasz Majewski
Hi Stephen,

> From: Stephen Warren 
> 
> Currently, Spawn.expect() imposes its timeout solely upon receipt of
> new data, not on its overall operation. In theory, this could cause
> the timeout not to fire if U-Boot continually generated output that
> did not match the expected patterns.
> 
> Fix the code to additionally impose a timeout on overall operation,
> which is the intended mode of operation.
> 
> Signed-off-by: Stephen Warren 
> ---
>  test/py/u_boot_spawn.py | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py
> index 1baee63df25c..df4c67597cab 100644
> --- a/test/py/u_boot_spawn.py
> +++ b/test/py/u_boot_spawn.py
> @@ -122,6 +122,7 @@ class Spawn(object):
>  if type(patterns[pi]) == type(''):
>  patterns[pi] = re.compile(patterns[pi])
>  
> +tstart_s = time.time()
>  try:
>  while True:
>  earliest_m = None
> @@ -142,7 +143,11 @@ class Spawn(object):
>  self.after = self.buf[pos:posafter]
>  self.buf = self.buf[posafter:]
>  return earliest_pi
> -events = self.poll.poll(self.timeout)
> +tnow_s = time.time()
> +tdelta_ms = (tnow_s - tstart_s) * 1000
> +if tdelta_ms > self.timeout:
> +raise Timeout()
> +events = self.poll.poll(self.timeout - tdelta_ms)
>  if not events:
>  raise Timeout()
>  c = os.read(self.fd, 1024)

Reviewed-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

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


Re: [U-Boot] [PATCH v5 2/2] usb: eth: add Realtek RTL8152B/RTL8153 DRIVER

2016-01-21 Thread Marek Vasut
On Thursday, January 21, 2016 at 09:55:59 AM, Anand Moon wrote:
> Hi Marek,
> 
> On 21 January 2016 at 02:04, Marek Vasut  wrote:
> > On Wednesday, January 20, 2016 at 09:10:07 PM, Anand Moon wrote:
> >> Hi Ted / Marek / Stephen,
> >> 
> >> On 20 January 2016 at 22:22, Stephen Warren  wrote:
> >> > On 01/19/2016 11:24 PM, Ted Chen wrote:
> >> >> This patch adds driver support for the Realtek RTL8152B/RTL8153 USB
> >> >> network adapters.
> >> > 
> >> > This looks fine to me, although I didn't take a detailed enough look
> >> > to actually give and an ack/reviewed-by.
> >> 
> >> What about the other patch: usb xhci Fix vendor command error if the
> >> request.patch
> > 
> > Please repost it , make sure to CC everyone . If there is agreement that
> > it fixes real issue, I'll pick it.
> > 
> >> After setting the usbether mac address my odroid xu4 board shop booting.
> >> even after reset of environment it dose not boot.
> >> 
> >> --- -- U-Boot 2016.01-00406-g048c61d-dirty
> >> (Jan 21 2016 - 06:27:09 +1030) for ODROID-XU3
> >> 
> >> CPU:   Exynos5422 @ 800 MHz
> >> Model: Odroid XU3 based on EXYNOS5422
> >> Board: Odroid XU3 based on EXYNOS5422
> >> Type:  xu4
> >> DRAM:  2 GiB
> >> MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
> >> *** Warning - bad CRC, using default environment
> >> 
> >> In:serial
> >> Out:   serial
> >> Err:   serial
> >> Net:   No ethernet found.
> >> Hit any key to stop autoboot:  0
> >> ODROID-XU3 #
> >> ODROID-XU3 #
> >> ODROID-XU3 #
> >> ODROID-XU3 # setenv usbethaddr 00:1e:06:31:06:b3
> >> ODROID-XU3 # saveenv
> > 
> > You ran saveenv, so usbethaddr is now in permanent storage. That's why
> > 'reset' won't help you.
> 
> But I need to set common mac address so that I will get single IP.
> I don't need random mac address.
> 
> Any way thanks for your input.

That was just a comment /wrt your observation that the board stops booting
and reset doesn't fix it ;-)

> >> Saving Environment to MMC...
> >> Writing to MMC(0)... done
> >> ODROID-XU3 # usb info
> >> USB is stopped. Please issue 'usb start' first.
> >> ODROID-XU3 # usb start
> >> starting USB...
> >> USB0:   USB EHCI 1.00
> >> USB1:   Register 2000140 NbrPorts 2
> >> Starting the controller
> >> USB XHCI 1.00
> >> USB2:   Register 2000140 NbrPorts 2
> >> Starting the controller
> >> USB XHCI 1.00
> >> scanning bus 0 for devices... 1 USB Device(s) found
> >> scanning bus 1 for devices... Device not responding to set address.
> >> 
> >>   USB device not accepting new address (error=8000)
> > 
> > This error looks suspicious.
> 
> I had another wireless mouse and USB to Ethernet adapter connected to the
> board may be it's not getting recognized at that moment.
> 
> Any way thanks for you input.

Looks like something might be afoot with the controller itself ?

> >> 2 USB Device(s) found
> >> scanning bus 2 for devices... 2 USB Device(s) found
> >> 
> >>scanning usb for ethernet devices... 1 Ethernet Device(s) found
> > 
> > [...]
> 
> Well I have tested the TFTP booting functionality of the board and it
> was success.
> Fell free to add my tested by for this version.
> 
> Tested-by: Anand Moon 

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


Re: [U-Boot] [PATCH v7 0/7] add support for atheros ath79 based SOCs

2016-01-21 Thread Marek Vasut
On Thursday, January 21, 2016 at 10:31:50 AM, Wills Wang wrote:
> On Thursday, January 21, 2016 01:35 PM, Marek Vasut wrote:
> > On Thursday, January 21, 2016 at 03:58:44 AM, Wills Wang wrote:
> >> On Thursday, January 21, 2016 09:32 AM, Marek Vasut wrote:
> >>> On Sunday, January 17, 2016 at 01:21:29 PM, Wills Wang wrote:
>  On 01/17/2016 06:24 PM, Daniel Schwierzeck wrote:
> > 2016-01-17 6:49 GMT+01:00 Wills Wang :
> >> On 01/17/2016 03:05 AM, Marek Vasut wrote:
> >>> On Saturday, January 16, 2016 at 07:13:46 PM, Wills Wang wrote:
>  These series of patch add support for atheros ath79 based SOCs in
>  u-boot, at the present moment it's just available for ar933x and
>  qca953x chip.
>  
>  This patch serises is based on mips_io_v4 branch on u-boot-mips
>  repository
>  [1] and tested on ar933x and qca953x board.
>  
>  [1]
>  
>  http://git.denx.de/?p=u-boot/u-boot-mips.git;a=shortlog;h=refs/hea
>  ds /m ips_ io_v4
> >>> 
> >>> So if I didn't complain about this being sent as separate emails
> >>> this morning.
> >>> Please, do send your patches as a series, not as separate emails.
> >> 
> >> How to send a patch series by patman?
> > 
> > If your git-sendmail config is correctly set up, patman automatically
> > sends the cover letter and then all patches as response to that cover
> > letter.
> > 
> > You have to enable mail threading in git-sendmail. Check that with:
> > 
> > $ git config --get sendemail.thread
> > 
> > To enable it globally:
> > 
> > $ git config --global sendemail.thread true
>  
>  Thanks, i will try it for the coming v8.
> >>> 
> >>> I got as far as booting my ar9330 rev 1 machine, though it did take
> >>> considerably amount of hackery. I also had to use locked cachelines for
> >>> stack, because it is far faster than using the SRAM on ar9331 . You can
> >>> find my hacks in the attachment, most of the stuff there is because
> >>> arduino yun is repugnant crappy piece of hardware and needs some extra
> >>> treatment.
> >> 
> >> My board is also ar9330 rev 1, but i can boot well without any change
> >> for start.s and cache, is it possible about hardware?
> > 
> > No clue.
> > 
> >> My board work fine when i use DDR or SRAM for stack.
> > 
> > I remember you weren't able to boot if you used SRAM for stack.
> > Did something change ?
> 
> What i mean is that my board can't boot if drop the whole lowlevel_init.S
> when use SRAM for stack. we need lowlevel_init.S to handle RTC, PLL and
> some chip issues.

Aha , okay. That's unfortunate indeed.

> >>> You should mostly care about the hacks in start.S , in particular the
> >>> one setting bit 3 in CP0 in setup_c0_status seems important on mips
> >>> 24kc core. Daniel seems to have some ideas on this too I think, he
> >>> helped me finding out there's a problem.
> >>> 
> >>> Also, mips_cache_lock_24k does the job for locking the cachelines, but
> >>> (!) it is clearly a dirty hack. The start.S needs to be modularized in
> >>> some way for this to be properly integrat(ed|able).
> >>> 
> >>> In case I select SYS_MIPS_CACHE_INIT_RAM_LOAD , the machine hangs. No
> >>> idea why, but I suspect it makes no sense on a machine which has no
> >>> running DRAM anyway, so I removed this option.
> >> 
> >> My hardware can work no matter if i select SYS_MIPS_CACHE_INIT_RAM_LOAD.
> >> I doubt whether there are same exceptions for your memory subsystem, or
> >> some DDR parameters are not for your DDR chip.
> > 
> > DDR is not started at the point where INIT_RAM_LOAD comes into play, so
> > it has nothing to do with it. Instead, refilling the cache from DDR makes
> > no sense if DDR is not running, therefore this should be disabled to make
> > sure we don't run into problems.
> > 
> >>> Change to ddr.c seems correct, the values for DDR1 and DDR2 were
> >>> swapped, but I suggest you double-check it.
> >> 
> >> Did your board use DDR1?
> > 
> > DDR2
> > 
> >> I check the original u-boot code again, this value 0xa33 is for DDR2,
> >> 0x33 for DDR1. The 0 value for WR filed in DDR2 MRS is reserved.
> > 
> > That's correct, so I suspect there's something swapped somewhere, since
> > my register ends up configured with 0x33 and not 0xa33 . That's why I
> > hacked this change for now.
> > 
> >>> Ignore my AHB hack in lowlevel_init.S , it's necessary to keep my SPI
> >>> NOR running at low speed, since I am using an FPGA instead of real SPI
> >>> NOR and the FPGA implementation of the SPI NOR emulator cannot run at
> >>> tens of MHz.
> >>> 
> >>> I am now looking into implementing ethernet and USB support for ar9331,
> >>> did you look into it at all or not ? I'd like to avoid duplicating
> >>> efforts.
> >> 
> >> At present, i have no plan to involve ethernet and USB, i want to work
> >> done first for this patch.
> > 
> > OK, I am looking into the ethernet part now, no lu

[U-Boot] [PATCH] igep00x0: enable CONFIG_CMD_SETEXPR

2016-01-21 Thread Ladislav Michl
Enable CONFIG_CMD_SETEXPR, useful when passing initramfs end address:
$ fatload mmc 0:1 $rdaddr root.cpio.gz
$ setexpr rdendaddr $rdaddr + $filesize
$ fdt chosen $rdaddr $rdendaddr
$ bootz $loadaddr - $fdtaddr

Signed-off-by: Ladislav Michl 
---
 configs/igep0020_defconfig  | 2 +-
 configs/igep0020_nand_defconfig | 2 +-
 configs/igep0030_defconfig  | 2 +-
 configs/igep0030_nand_defconfig | 2 +-
 configs/igep0032_defconfig  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configs/igep0020_defconfig b/configs/igep0020_defconfig
index a96c130..d4b5746 100644
--- a/configs/igep0020_defconfig
+++ b/configs/igep0020_defconfig
@@ -6,6 +6,6 @@ 
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_SETEXPR=y
 CONFIG_SYS_NS16550=y
 CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/igep0020_nand_defconfig b/configs/igep0020_nand_defconfig
index cf3ee79..57a3e78 100644
--- a/configs/igep0020_nand_defconfig
+++ b/configs/igep0020_nand_defconfig
@@ -6,6 +6,6 @@ 
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_SETEXPR=y
 CONFIG_SYS_NS16550=y
 CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/igep0030_defconfig b/configs/igep0030_defconfig
index 63ce633..1a1f548 100644
--- a/configs/igep0030_defconfig
+++ b/configs/igep0030_defconfig
@@ -6,5 +6,5 @@ 
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_SETEXPR=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/igep0030_nand_defconfig b/configs/igep0030_nand_defconfig
index dce7e06..c59b988 100644
--- a/configs/igep0030_nand_defconfig
+++ b/configs/igep0030_nand_defconfig
@@ -6,5 +6,5 @@ 
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_SETEXPR=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index b7f1d61..27a763f 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -6,6 +6,6 @@ 
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0032,BOOT_ONENAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_SETEXPR=y
 CONFIG_SYS_NS16550=y
 CONFIG_NET_RANDOM_ETHADDR=y
-- 
2.1.4

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


[U-Boot] [PATCH] igep00x0: remove #undef CONFIG_BOOTDELAY

2016-01-21 Thread Ladislav Michl
Do not undefine CONFIG_BOOTDELAY, so board can boot without user
intervention.

Signed-off-by: Ladislav Michl 
---
 include/configs/omap3_igep00x0.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index 5da6cfd..5e33845 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -19,8 +19,6 @@
 #include 
 #include 
 
-#undef CONFIG_BOOTDELAY
-
 /*
  * Display CPU and Board information
  */
-- 
2.1.4

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


Re: [U-Boot] [PATCH 8/8] test/py: add DFU test

2016-01-21 Thread Lukasz Majewski
Hi Stephen,

> From: Stephen Warren 
> 
> Add a test of DFU functionality to the Python test suite. The test
> starts DFU in U-Boot, waits for USB device enumeration on the host,
> executes dfu-util multiple times to test various transfer sizes, many
> of which trigger USB driver edge cases, and finally aborts the DFU
> command in U-Boot.
> 
> This test mirrors the functionality previously available via the shell
> scripts in test/dfu, and hence those are removed too.
> 
> Cc: Lukasz Majewski 
> Signed-off-by: Stephen Warren 
> ---
>  test/dfu/README  |  44 ---
>  test/dfu/dfu_gadget_test.sh  | 108 
>  test/dfu/dfu_gadget_test_init.sh |  45 ---
>  test/py/tests/test_dfu.py| 257
> +++ 4 files changed, 257
> insertions(+), 197 deletions(-) delete mode 100644 test/dfu/README
>  delete mode 100755 test/dfu/dfu_gadget_test.sh
>  delete mode 100755 test/dfu/dfu_gadget_test_init.sh
>  create mode 100644 test/py/tests/test_dfu.py
> 
> diff --git a/test/dfu/README b/test/dfu/README
> deleted file mode 100644
> index 408d5594219a..
> --- a/test/dfu/README
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -DFU TEST CASE DESCRIPTION:
> -
> -The prerequisites for running this script are assured by
> -dfu_gadget_test_init.sh, which is automatically invoked by
> dfu_gadget_test.sh. -In this file user is able to generate their own
> set of test files by altering -the default set of TEST_FILES_SIZES
> variable. -The dfu_gadget_test_init.sh would generate test images
> only if they are not -already generated.
> -
> -On the target device, environment variable "dfu_alt_info" must
> contain at -least:
> -
> -dfu_test.bin fat 0 6;dfudummy.bin fat 0 6
> -
> -Depending on your device, you may need to replace "fat" with
> -"ext4", and "6" with the relevant partition number. For reference
> please -consult the config file for TRATS/TRATS2 devices
> -(../../include/configs/trats{2}.h)
> -
> -One can use fat, ext4 or any other supported file system supported
> by U-Boot. -These can be created by exporting storage devices via UMS
> (ums 0 mmc 0) and -using standard tools on host (like mkfs.ext4).
> -
> -Example usage:
> -1. On the target:
> -   setenv dfu_alt_info dfu_test.bin fat 0 6\;dfudummy.bin fat 0 6
> -   dfu 0 mmc 0
> -2. On the host:
> -   test/dfu/dfu_gadget_test.sh X Y [test file name] [usb device
> vendor:product]
> -   e.g. test/dfu/dfu_gadget_test.sh 0 1
> -   or
> -   e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img
> -   or
> -   e.g. test/dfu/dfu_gadget_test.sh 0 1 0451:d022
> -   or
> -   e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img 0451:d022
> -
> -... where X and Y are dfu_test.bin's and dfudummy.bin's alt setting
> numbers. -They can be obtained from dfu-util -l or $dfu_alt_info.
> -It is also possible to pass optional [test file name] to force the
> script to -test one particular file.
> -If many DFU devices are connected, it may be useful to filter on USB
> -vendor/product ID (0451:d022).
> -One can get them by running "lsusb" command on a host PC.
> diff --git a/test/dfu/dfu_gadget_test.sh b/test/dfu/dfu_gadget_test.sh
> deleted file mode 100755
> index 9c7942257b44..
> --- a/test/dfu/dfu_gadget_test.sh
> +++ /dev/null
> @@ -1,108 +0,0 @@
> -#! /bin/bash
> -
> -# Copyright (C) 2014 Samsung Electronics
> -# Lukasz Majewski 
> -#
> -# Script fixes, enhancements and testing:
> -# Stephen Warren 
> -#
> -# DFU operation test script
> -#
> -# SPDX-License-Identifier:   GPL-2.0+
> -
> -set -e # any command return if not equal to zero
> -clear
> -
> -COLOUR_RED="\33[31m"
> -COLOUR_GREEN="\33[32m"
> -COLOUR_DEFAULT="\33[0m"
> -
> -DIR=./
> -SUFFIX=img
> -RCV_DIR=rcv/
> -LOG_FILE=./log/log-`date +%d-%m-%Y_%H-%M-%S`
> -
> -cd `dirname $0`
> -./dfu_gadget_test_init.sh
> -
> -cleanup () {
> -rm -rf $DIR$RCV_DIR
> -}
> -
> -die () {
> - printf "   $COLOUR_RED FAILED $COLOUR_DEFAULT \n"
> - cleanup
> - exit 1
> -}
> -
> -calculate_md5sum () {
> -MD5SUM=`md5sum $1`
> -MD5SUM=`echo $MD5SUM | cut -d ' ' -f1`
> -echo "md5sum:"$MD5SUM
> -}
> -
> -dfu_test_file () {
> -printf "$COLOUR_GREEN
> =
> $COLOUR_DEFAULT\n"
> -printf "File:$COLOUR_GREEN %s $COLOUR_DEFAULT\n" $1
> -
> -dfu-util $USB_DEV -D $1 -a $TARGET_ALT_SETTING >> $LOG_FILE 2>&1
> || die $? -
> -echo -n "TX: "
> -calculate_md5sum $1
> -
> -MD5_TX=$MD5SUM
> -
> -dfu-util $USB_DEV -D ${DIR}/dfudummy.bin -a
> $TARGET_ALT_SETTING_B >> $LOG_FILE 2>&1 || die $? -
> -N_FILE=$DIR$RCV_DIR${1:2}"_rcv"
> -
> -dfu-util $USB_DEV -U $N_FILE -a $TARGET_ALT_SETTING >> $LOG_FILE
> 2>&1 || die $? -
> -echo -n "RX: "
> -calculate_md5sum $N_FILE
> -MD5_RX=$MD5SUM
> -
> -if [ "$MD5_TX" == "$MD5_RX" ]; then
> - printf "   $COLOUR_GREEN ---> OK $COLOUR_DEFAULT \n"
> -else
> - printf "   $COLOUR_RED 

Re: [U-Boot] [PATCH V4 7/8] test/py: test the ums command

2016-01-21 Thread Lukasz Majewski
Hi Stephen,

> From: Stephen Warren 
> 
> This test invokes the "ums" command in U-Boot, and validates that a
> USB storage device is enumerated on the test host system, and can be
> read from.
> 
> Signed-off-by: Stephen Warren 
> Acked-by: Simon Glass 
> ---
> v4:
> - No changes.
> 
> v3:
> - Move test scripts into a sub-directory.
>   Suggested by Michal Simek.
> - s/uboot/u[-_]boot/g. Suggested by Simon Glass.
> - s/"/'/g. Suggested by Simon Glass.
> - Add more documentation. Suggested by Simon Glass.
> - Rename boardenv USB device node variable to avoid naming conflicts
> if we add support for other types of USB device later (e.g. CDC ACM,
> CDC Ethernet, DFU).
> ---
>  test/py/tests/test_ums.py | 94
> +++ 1 file changed, 94
> insertions(+) create mode 100644 test/py/tests/test_ums.py
> 
> diff --git a/test/py/tests/test_ums.py b/test/py/tests/test_ums.py
> new file mode 100644
> index ..a137221c7a5b
> --- /dev/null
> +++ b/test/py/tests/test_ums.py
> @@ -0,0 +1,94 @@
> +# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
> +#
> +# SPDX-License-Identifier: GPL-2.0
> +
> +# Test U-Boot's "ums" command. At present, this test only ensures
> that a UMS +# device can be enumerated by the host/test machine. In
> the future, this test +# should be enhanced to validate disk IO.
> +
> +import os
> +import pytest
> +import time
> +
> +'''
> +Note: This test relies on:
> +
> +a) boardenv_* to contain configuration values to define which USB
> ports are +available for testing. Without this, this test will be
> automatically skipped. +For example:
> +
> +env__usb_dev_ports = (
> +{'tgt_usb_ctlr': '0', 'host_ums_dev_node':
> '/dev/disk/by-path/pci-:00:14.0-usb-0:13:1.0-scsi-0:0:0:0'}, +)
> +
> +env__block_devs = (
> +{'type': 'mmc', 'id': '0'}, # eMMC; always present
> +{'type': 'mmc', 'id': '1'}, # SD card; present since I plugged
> one in +)
> +
> +b) udev rules to set permissions on devices nodes, so that sudo is
> not +required. For example:
> +
> +ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb",
> KERNELS=="3-13", MODE:="666" +
> +(You may wish to change the group ID instead of setting the
> permissions wide +open. All that matters is that the user ID running
> the test can access the +device.)
> +'''
> +
> +def open_ums_device(host_ums_dev_node):
> +'''Attempt to open a device node, returning either the opened
> file handle,
> +or None on any error.'''
> +
> +try:
> +return open(host_ums_dev_node, 'rb')
> +except:
> +return None
> +
> +def wait_for_ums_device(host_ums_dev_node):
> +'''Continually attempt to open the device node exported by the
> "ums"
> +command, and either return the opened file handle, or raise an
> exception
> +after a timeout.'''
> +
> +for i in xrange(100):
> +fh = open_ums_device(host_ums_dev_node)
> +if fh:
> +return fh
> +time.sleep(0.1)
> +raise Exception('UMS device did not appear')
> +
> +def wait_for_ums_device_gone(host_ums_dev_node):
> +'''Continually attempt to open the device node exported by the
> "ums"
> +command, and either return once the device has disappeared, or
> raise an
> +exception if it does not before a timeout occurs.'''
> +
> +for i in xrange(100):
> +fh = open_ums_device(host_ums_dev_node)
> +if not fh:
> +return
> +fh.close()
> +time.sleep(0.1)
> +raise Exception('UMS device did not disappear')
> +
> +@pytest.mark.buildconfigspec('cmd_usb_mass_storage')
> +def test_ums(u_boot_console, env__usb_dev_port, env__block_devs):
> +'''Test the "ums" command; the host system must be able to
> enumerate a UMS
> +device when "ums" is running, and this device must disappear
> when "ums" is
> +aborted.'''
> +
> +tgt_usb_ctlr = env__usb_dev_port['tgt_usb_ctlr']
> +host_ums_dev_node = env__usb_dev_port['host_ums_dev_node']
> +
> +# We're interested in testing USB device mode on each port, not
> the cross-
> +# product of that with each device. So, just pick the first
> entry in the
> +# device list here. We'll test each block device somewhere else.
> +tgt_dev_type = env__block_devs[0]['type']
> +tgt_dev_id = env__block_devs[0]['id']
> +
> +cmd = 'ums %s %s %s' % (tgt_usb_ctlr, tgt_dev_type, tgt_dev_id)
> +u_boot_console.run_command('ums 0 mmc 0', wait_for_prompt=False)
> +fh = wait_for_ums_device(host_ums_dev_node)
> +fh.read(4096)
> +fh.close()
> +u_boot_console.ctrlc()
> +wait_for_ums_device_gone(host_ums_dev_node)

Reviewed-by: Stephen Warren 

-- 
Best regards,

Lukasz Majewski

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


Re: [U-Boot] [PATCH v3] ARM: Add Support for the VInCo platform

2016-01-21 Thread Gregory CLEMENT
Hello all,
 
 On mer., déc. 16 2015, Gregory CLEMENT  
wrote:

> The Versatile Industrial Communication platform is a community oriented
> board from Landis + Gyr. It comes with:
> - an RS-485 port
> - 2 Ethernet ports
> - a wireless M-BUS
> - a 4G modem
> - a 4MB SPI flash
> - a 4GB eMMC
>
> Signed-off-by: Gregory CLEMENT 
> Acked-by: Nicolas Ferre 

I sent this patch one month ago and it seems that it didn't get applied.

What is the status of this patch?

Do you have any remark about it?

Thanks,

Gregory

> ---
> Hi again,
>
> Some of my fixes were not commit in my previous version.
>
> This version should be the correct one, I also added the acked-by from
> Nicolas.
>
> Sorry for not having seen it before.
>
> Thanks,
>
> Gregory
>
>
> arch/arm/mach-at91/Kconfig |   6 ++
>  board/l+g/vinco/Kconfig|  12 +++
>  board/l+g/vinco/Makefile   |   1 +
>  board/l+g/vinco/vinco.c| 212 
> +
>  configs/vinco_defconfig|  13 +++
>  include/configs/vinco.h| 169 
>  6 files changed, 413 insertions(+)
>  create mode 100644 board/l+g/vinco/Kconfig
>  create mode 100644 board/l+g/vinco/Makefile
>  create mode 100644 board/l+g/vinco/vinco.c
>  create mode 100644 configs/vinco_defconfig
>  create mode 100644 include/configs/vinco.h
>
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index c333647..3dfbb5f 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -114,6 +114,11 @@ config TARGET_SMARTWEB
>   select CPU_ARM926EJS
>   select SUPPORT_SPL
>  
> +config TARGET_VINCO
> + bool "Support VINCO"
> + select CPU_V7
> + select SUPPORT_SPL
> +
>  endchoice
>  
>  config SYS_SOC
> @@ -136,6 +141,7 @@ source "board/bluewater/snapper9260/Kconfig"
>  source "board/calao/usb_a9263/Kconfig"
>  source "board/egnite/ethernut5/Kconfig"
>  source "board/esd/meesc/Kconfig"
> +source "board/l+g/vinco/Kconfig"
>  source "board/mini-box/picosam9g45/Kconfig"
>  source "board/ronetix/pm9261/Kconfig"
>  source "board/ronetix/pm9263/Kconfig"
> diff --git a/board/l+g/vinco/Kconfig b/board/l+g/vinco/Kconfig
> new file mode 100644
> index 000..229b5ea
> --- /dev/null
> +++ b/board/l+g/vinco/Kconfig
> @@ -0,0 +1,12 @@
> +if TARGET_VINCO
> +
> +config SYS_BOARD
> + default "vinco"
> +
> +config SYS_VENDOR
> + default "l+g"
> +
> +config SYS_CONFIG_NAME
> + default "vinco"
> +
> +endif
> diff --git a/board/l+g/vinco/Makefile b/board/l+g/vinco/Makefile
> new file mode 100644
> index 000..a2b8a2b
> --- /dev/null
> +++ b/board/l+g/vinco/Makefile
> @@ -0,0 +1 @@
> +obj-y += vinco.o
> diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c
> new file mode 100644
> index 000..3d7af09
> --- /dev/null
> +++ b/board/l+g/vinco/vinco.c
> @@ -0,0 +1,212 @@
> +/*
> + * Board file for the VInCo platform
> + * Based on the the SAMA5-EK board file
> + * Configuration settings for the VInCo platform.
> + * Copyright (C) 2014 Atmel
> + * Bo Shen 
> + * Copyright (C) 2015 Free Electrons
> + * Gregory CLEMENT 
> + *
> + * 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 
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#ifdef CONFIG_ATMEL_SPI
> +int spi_cs_is_valid(unsigned int bus, unsigned int cs)
> +{
> + return bus == 0 && cs == 0;
> +}
> +
> +void spi_cs_activate(struct spi_slave *slave)
> +{
> + at91_set_pio_output(AT91_PIO_PORTC, 3, 0);
> +}
> +
> +void spi_cs_deactivate(struct spi_slave *slave)
> +{
> + at91_set_pio_output(AT91_PIO_PORTC, 3, 1);
> +}
> +
> +static void vinco_spi0_hw_init(void)
> +{
> + at91_set_a_periph(AT91_PIO_PORTC, 0, 0);/* SPI0_MISO */
> + at91_set_a_periph(AT91_PIO_PORTC, 1, 0);/* SPI0_MOSI */
> + at91_set_a_periph(AT91_PIO_PORTC, 2, 0);/* SPI0_SPCK */
> +
> + at91_set_pio_output(AT91_PIO_PORTC, 3, 1);  /* SPI0_CS0 */
> +
> + /* Enable clock */
> + at91_periph_clk_enable(ATMEL_ID_SPI0);
> +}
> +#endif /* CONFIG_ATMEL_SPI */
> +
> +
> +#ifdef CONFIG_CMD_USB
> +static void vinco_usb_hw_init(void)
> +{
> + at91_set_pio_output(AT91_PIO_PORTE, 11, 0);
> + at91_set_pio_output(AT91_PIO_PORTE, 12, 0);
> + at91_set_pio_output(AT91_PIO_PORTE, 10, 0);
> +}
> +#endif
> +
> +
> +#ifdef CONFIG_GENERIC_ATMEL_MCI
> +void vinco_mci0_hw_init(void)
> +{
> + at91_set_b_periph(AT91_PIO_PORTC, 5, 1);/* MCI0 CDA */
> + at91_set_b_periph(AT91_PIO_PORTC, 6, 1);/* MCI0 DA0 */
> + at91_set_b_periph(AT91_PIO_PORTC, 7, 1);/* MCI0 DA1 */
> + at91_set_b_periph(AT91_PIO_PORTC, 8, 1);/* MCI0 DA2 */
> + at91_set_b_periph(AT91_PIO_PORTC, 9, 1);/* MCI0 DA3 */
> + at91_

Re: [U-Boot] [PATCH v3] ARM: Add Support for the VInCo platform

2016-01-21 Thread Andreas Bießmann
Hi Gregory,

On 21.01.2016 12:08, Gregory CLEMENT wrote:
> Hello all,
>  
>  On mer., déc. 16 2015, Gregory CLEMENT  
> wrote:
> 
>> The Versatile Industrial Communication platform is a community oriented
>> board from Landis + Gyr. It comes with:
>> - an RS-485 port
>> - 2 Ethernet ports
>> - a wireless M-BUS
>> - a 4G modem
>> - a 4MB SPI flash
>> - a 4GB eMMC
>>
>> Signed-off-by: Gregory CLEMENT 
>> Acked-by: Nicolas Ferre 
> 
> I sent this patch one month ago and it seems that it didn't get applied.

I'm aware of it. Since it was way after merge window close for 2016.01
it would not have been applied for this release.

> What is the status of this patch?

I'll review and eventually apply it until end of this Weekend.

> Do you have any remark about it?

Not yet ...

Excuse me for the long waiting times for atmel patches. My list has some
unreplied patches back from end of November 2015. I'm looking forward to
improve this in future.

Andreas

> 
> Thanks,
> 
> Gregory
> 
>> ---
>> Hi again,
>>
>> Some of my fixes were not commit in my previous version.
>>
>> This version should be the correct one, I also added the acked-by from
>> Nicolas.
>>
>> Sorry for not having seen it before.
>>
>> Thanks,
>>
>> Gregory
>>
>>
>> arch/arm/mach-at91/Kconfig |   6 ++
>>  board/l+g/vinco/Kconfig|  12 +++
>>  board/l+g/vinco/Makefile   |   1 +
>>  board/l+g/vinco/vinco.c| 212 
>> +
>>  configs/vinco_defconfig|  13 +++
>>  include/configs/vinco.h| 169 
>>  6 files changed, 413 insertions(+)
>>  create mode 100644 board/l+g/vinco/Kconfig
>>  create mode 100644 board/l+g/vinco/Makefile
>>  create mode 100644 board/l+g/vinco/vinco.c
>>  create mode 100644 configs/vinco_defconfig
>>  create mode 100644 include/configs/vinco.h
>>
>> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
>> index c333647..3dfbb5f 100644
>> --- a/arch/arm/mach-at91/Kconfig
>> +++ b/arch/arm/mach-at91/Kconfig
>> @@ -114,6 +114,11 @@ config TARGET_SMARTWEB
>>  select CPU_ARM926EJS
>>  select SUPPORT_SPL
>>  
>> +config TARGET_VINCO
>> +bool "Support VINCO"
>> +select CPU_V7
>> +select SUPPORT_SPL
>> +
>>  endchoice
>>  
>>  config SYS_SOC
>> @@ -136,6 +141,7 @@ source "board/bluewater/snapper9260/Kconfig"
>>  source "board/calao/usb_a9263/Kconfig"
>>  source "board/egnite/ethernut5/Kconfig"
>>  source "board/esd/meesc/Kconfig"
>> +source "board/l+g/vinco/Kconfig"
>>  source "board/mini-box/picosam9g45/Kconfig"
>>  source "board/ronetix/pm9261/Kconfig"
>>  source "board/ronetix/pm9263/Kconfig"
>> diff --git a/board/l+g/vinco/Kconfig b/board/l+g/vinco/Kconfig
>> new file mode 100644
>> index 000..229b5ea
>> --- /dev/null
>> +++ b/board/l+g/vinco/Kconfig
>> @@ -0,0 +1,12 @@
>> +if TARGET_VINCO
>> +
>> +config SYS_BOARD
>> +default "vinco"
>> +
>> +config SYS_VENDOR
>> +default "l+g"
>> +
>> +config SYS_CONFIG_NAME
>> +default "vinco"
>> +
>> +endif
>> diff --git a/board/l+g/vinco/Makefile b/board/l+g/vinco/Makefile
>> new file mode 100644
>> index 000..a2b8a2b
>> --- /dev/null
>> +++ b/board/l+g/vinco/Makefile
>> @@ -0,0 +1 @@
>> +obj-y += vinco.o
>> diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c
>> new file mode 100644
>> index 000..3d7af09
>> --- /dev/null
>> +++ b/board/l+g/vinco/vinco.c
>> @@ -0,0 +1,212 @@
>> +/*
>> + * Board file for the VInCo platform
>> + * Based on the the SAMA5-EK board file
>> + * Configuration settings for the VInCo platform.
>> + * Copyright (C) 2014 Atmel
>> + *Bo Shen 
>> + * Copyright (C) 2015 Free Electrons
>> + *Gregory CLEMENT 
>> + *
>> + * 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 
>> +
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> +#ifdef CONFIG_ATMEL_SPI
>> +int spi_cs_is_valid(unsigned int bus, unsigned int cs)
>> +{
>> +return bus == 0 && cs == 0;
>> +}
>> +
>> +void spi_cs_activate(struct spi_slave *slave)
>> +{
>> +at91_set_pio_output(AT91_PIO_PORTC, 3, 0);
>> +}
>> +
>> +void spi_cs_deactivate(struct spi_slave *slave)
>> +{
>> +at91_set_pio_output(AT91_PIO_PORTC, 3, 1);
>> +}
>> +
>> +static void vinco_spi0_hw_init(void)
>> +{
>> +at91_set_a_periph(AT91_PIO_PORTC, 0, 0);/* SPI0_MISO */
>> +at91_set_a_periph(AT91_PIO_PORTC, 1, 0);/* SPI0_MOSI */
>> +at91_set_a_periph(AT91_PIO_PORTC, 2, 0);/* SPI0_SPCK */
>> +
>> +at91_set_pio_output(AT91_PIO_PORTC, 3, 1);  /* SPI0_CS0 */
>> +
>> +/* Enable clock */
>> +at91_periph_clk_enable(ATMEL_ID_SPI0);
>> +}
>> +#endif /* CONFIG_ATMEL_SPI */
>> +
>> +
>> +#ifdef CONFIG_CMD_USB
>> +static void vinco_usb_hw_init(void)
>> +{
>> +at91_

Re: [U-Boot] [PATCH 7/8] test/py: ums: add filesystem-based testing

2016-01-21 Thread Lukasz Majewski
Hi Stephen,

> From: Stephen Warren 
> 
> Enhance the UMS test to optionally mount a partition and read/write a
> file to it, validating that the content written and read back are
> identical.
> 
> This enhancement is backwards-compatible; old boardenv contents that
> don't define the new configuration data will cause the test code to
> perform as before.
> 
> test/ums/ is deleted since the Python test now performs the same
> testing that it did.
> 
> The code is also re-written to make use of the recently added utility
> module, and split it up into nested functions so the overall logic of
> the test process can be followed more easily without the details
> cluttering the code.
> 
> Cc: Lukasz Majewski 
> Signed-off-by: Stephen Warren 
> ---
>  test/py/tests/test_ums.py   | 212
> +++-
> test/ums/README |  30 --- test/ums/ums_gadget_test.sh
> | 183 -- 3 files changed, 169
> insertions(+), 256 deletions(-) delete mode 100644 test/ums/README
>  delete mode 100755 test/ums/ums_gadget_test.sh
> 
> diff --git a/test/py/tests/test_ums.py b/test/py/tests/test_ums.py
> index a137221c7a5b..cb6e5ef8c20b 100644
> --- a/test/py/tests/test_ums.py
> +++ b/test/py/tests/test_ums.py
> @@ -7,8 +7,11 @@
>  # should be enhanced to validate disk IO.
>  
>  import os
> +import os.path
>  import pytest
> +import re
>  import time
> +import u_boot_utils
>  
>  '''
>  Note: This test relies on:
> @@ -17,13 +20,36 @@ a) boardenv_* to contain configuration values to
> define which USB ports are available for testing. Without this, this
> test will be automatically skipped. For example:
>  
> +# Leave this list empty if you have no block_devs below with writable
> +# partitions defined.
> +env__mount_points = (
> +"/mnt/ubtest-mnt-p2371-2180-na",
> +)
> +
>  env__usb_dev_ports = (
> -{'tgt_usb_ctlr': '0', 'host_ums_dev_node':
> '/dev/disk/by-path/pci-:00:14.0-usb-0:13:1.0-scsi-0:0:0:0'},
> +{
> +"tgt_usb_ctlr": "0",
> +"host_ums_dev_node":
> "/dev/disk/by-path/pci-:00:14.0-usb-0:13:1.0-scsi-0:0:0:0",
> +},
>  )
>  
>  env__block_devs = (
> -{'type': 'mmc', 'id': '0'}, # eMMC; always present
> -{'type': 'mmc', 'id': '1'}, # SD card; present since I plugged
> one in
> +# eMMC; always present
> +{
> +"type": "mmc",
> +"id": "0",
> +# The following two properties are optional.
> +# If present, the partition will be mounted and a file
> written-to and
> +# read-from it. If missing, only a simple block read test
> will be
> +# performed.
> +"writable_fs_partition": 1,
> +"writable_fs_subdir": "tmp/",
> +},
> +# SD card; present since I plugged one in
> +{
> +"type": "mmc",
> +"id": "1"
> +},
>  )
>  
>  b) udev rules to set permissions on devices nodes, so that sudo is
> not @@ -34,41 +60,15 @@ ACTION=="add", SUBSYSTEM=="block",
> SUBSYSTEMS=="usb", KERNELS=="3-13", MODE:="66 (You may wish to change
> the group ID instead of setting the permissions wide open. All that
> matters is that the user ID running the test can access the device.)
> -'''
>  
> -def open_ums_device(host_ums_dev_node):
> -'''Attempt to open a device node, returning either the opened
> file handle,
> -or None on any error.'''
> +c) /etc/fstab entries to allow the block device to be mounted
> without requiring +root permissions. For example:
>  
> -try:
> -return open(host_ums_dev_node, 'rb')
> -except:
> -return None
> -
> -def wait_for_ums_device(host_ums_dev_node):
> -'''Continually attempt to open the device node exported by the
> "ums"
> -command, and either return the opened file handle, or raise an
> exception
> -after a timeout.'''
> -
> -for i in xrange(100):
> -fh = open_ums_device(host_ums_dev_node)
> -if fh:
> -return fh
> -time.sleep(0.1)
> -raise Exception('UMS device did not appear')
> -
> -def wait_for_ums_device_gone(host_ums_dev_node):
> -'''Continually attempt to open the device node exported by the
> "ums"
> -command, and either return once the device has disappeared, or
> raise an
> -exception if it does not before a timeout occurs.'''
> -
> -for i in xrange(100):
> -fh = open_ums_device(host_ums_dev_node)
> -if not fh:
> -return
> -fh.close()
> -time.sleep(0.1)
> -raise Exception('UMS device did not disappear')
> +/dev/disk/by-path/pci-:00:14.0-usb-0:13:1.0-scsi-0:0:0:0-part1 
> /mnt/ubtest-mnt-p2371-2180-na
> ext4 noauto,user,nosuid,nodev +
> +This entry is only needed if any block_devs above contain a
> +writable_fs_partition value.
> +'''
>  
>  @pytest.mark.buildconfigspec('cmd_usb_mass_storage')
>  def test_ums(u_boot_console, env__usb_dev_port, env__block_devs):
> @@ -76,6 +76,14 @@ def test_ums(u_boot_console, env__usb_dev_port,
> env__block_devs):

Re: [U-Boot] [PATCH 3/4] spi: omap3: Convert to DM

2016-01-21 Thread Tom Rini
On Wed, Jan 20, 2016 at 07:46:15PM -0700, Simon Glass wrote:
> +Mugunthan, Tom
> 
> On 17 January 2016 at 03:56, Christophe Ricard
>  wrote:
> > Convert omap3_spi driver to DM and keep compatibility with previous
> > mode.
> >
> > Signed-off-by: Christophe Ricard 
> > ---
> >
> >  drivers/spi/Kconfig |   6 +
> >  drivers/spi/omap3_spi.c | 439 
> > ++--
> >  drivers/spi/omap3_spi.h |  14 +-
> >  3 files changed, 402 insertions(+), 57 deletions(-)
> 
> This is a pretty painful conversion, with lots of #ifdefs. I think it
> would be possible to use a common pointer type and reduce this.
> 
> But perhaps it does not matter - how long must we be in the state of
> supporting legacy SPI? Can we convert all TI boards to driver model?

We _really_ need some way to support more than one board per binary
before we can move everything to DM only.

I think we can kind of do this today if we stick to using platform data
for everything that's board-specific rather than SoC-defined.  What we
talked about at ELCE was auto-generating the pdata from the device tree,
I think.

-- 
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 v3 01/14] MIPS: initialize board_init_f() argument to zero.

2016-01-21 Thread Daniel Schwierzeck
Hi Purna,

Am Donnerstag, den 14.01.2016, 10:59 +0530 schrieb Purna Chandra
Mandal:
> On 01/12/2016 05:59 PM, Daniel Schwierzeck wrote:
> 
> > 2016-01-12 11:18 GMT+01:00 Purna Chandra Mandal <
> > purna.man...@microchip.com>:
> > > Signed-off-by: Purna Chandra Mandal 
> > > ---
> > > 
> > > Changes in v3: None
> > > Changes in v2: None
> > > 
> > >  arch/mips/cpu/start.S | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
> > > index e95cdca..35d9650 100644
> > > --- a/arch/mips/cpu/start.S
> > > +++ b/arch/mips/cpu/start.S
> > > @@ -185,6 +185,8 @@ reset:
> > > PTR_ADDU t0, k0, GD_MALLOC_BASE # gd->malloc_base offset
> > > sw  sp, 0(t0)
> > >  #endif
> > > +   /* Initialize args to zero */
> > > +   movea0, zero
> > the comment should be on the same line and more precise. That is
> > useful in disassemblies or when debugging. E.g.
> > 
> > movea0, zero# a0 <-- boot_flags = 0
> > 
> > Also add a commit message please explaining why the change is
> > required. Something like that the boot_flags of board_init_f should
> > be
> > set to 0 because $a0 may be utilized in lowlevel_init or
> > mips_cache_reset.
> 
> ack. Will add accordingly,
> 

can you send an updated version as separate patch promptly? I'd like to
apply this patch as soon as possible because I have some follow-up
patches for start.S. Thanks.

-- 
- Daniel

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


[U-Boot] [PATCH v2] common/console.c: Remove unused inline functions

2016-01-21 Thread Tom Rini
clang-3.8 reports that these functions are unused, remove them.  As this
is the last part of CONFIG_MODEM_SUPPORT_DEBUG, drop that from README.

Reviewed-by: Bin Meng 
Signed-off-by: Tom Rini 

---
Changes in v2:
- Drop CONFIG_MODEM_SUPPORT_DEBUG from README as per Bin
---
 README   |6 --
 common/console.c |   48 
 2 files changed, 54 deletions(-)

diff --git a/README b/README
index ece4793..864c7cc 100644
--- a/README
+++ b/README
@@ -3712,12 +3712,6 @@ Modem Support:
 - RTS/CTS Flow control enable:
CONFIG_HWFLOW
 
-- Modem debug support:
-   CONFIG_MODEM_SUPPORT_DEBUG
-
-   Enables debugging stuff (char screen[1024], dbg())
-   for modem support. Useful only with BDI2000.
-
 - Interrupt support (PPC):
 
There are common interrupt_init() and timer_interrupt()
diff --git a/common/console.c b/common/console.c
index bc37b6d..b3f5fdc 100644
--- a/common/console.c
+++ b/common/console.c
@@ -227,11 +227,6 @@ static void console_puts(int file, const char *s)
}
 }
 
-static inline void console_printdevs(int file)
-{
-   iomux_printdevs(file);
-}
-
 static inline void console_doenv(int file, struct stdio_dev *dev)
 {
iomux_doenv(file, dev->name);
@@ -265,11 +260,6 @@ static inline void console_puts(int file, const char *s)
stdio_devices[file]->puts(stdio_devices[file], s);
 }
 
-static inline void console_printdevs(int file)
-{
-   printf("%s\n", stdio_devices[file]->name);
-}
-
 static inline void console_doenv(int file, struct stdio_dev *dev)
 {
console_setfile(file, dev);
@@ -653,44 +643,6 @@ void clear_ctrlc(void)
ctrlc_was_pressed = 0;
 }
 
-#ifdef CONFIG_MODEM_SUPPORT_DEBUG
-char   screen[1024];
-char *cursor = screen;
-int once = 0;
-inline void dbg(const char *fmt, ...)
-{
-   va_list args;
-   uinti;
-   charprintbuffer[CONFIG_SYS_PBSIZE];
-
-   if (!once) {
-   memset(screen, 0, sizeof(screen));
-   once++;
-   }
-
-   va_start(args, fmt);
-
-   /* For this to work, printbuffer must be larger than
-* anything we ever want to print.
-*/
-   i = vsnprintf(printbuffer, sizeof(printbuffer), fmt, args);
-   va_end(args);
-
-   if ((screen + sizeof(screen) - 1 - cursor)
-   < strlen(printbuffer) + 1) {
-   memset(screen, 0, sizeof(screen));
-   cursor = screen;
-   }
-   sprintf(cursor, printbuffer);
-   cursor += strlen(printbuffer);
-
-}
-#else
-static inline void dbg(const char *fmt, ...)
-{
-}
-#endif
-
 /** U-Boot INIT FUNCTIONS */
 
 struct stdio_dev *search_device(int flags, const char *name)
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH v3] ARM: Add Support for the VInCo platform

2016-01-21 Thread Gregory CLEMENT
Hi Andreas,
 
 On jeu., janv. 21 2016, "Andreas Bießmann"  
wrote:

> Hi Gregory,
>
> On 21.01.2016 12:08, Gregory CLEMENT wrote:
>> Hello all,
>>  
>>  On mer., déc. 16 2015, Gregory CLEMENT  
>> wrote:
>> 
>>> The Versatile Industrial Communication platform is a community oriented
>>> board from Landis + Gyr. It comes with:
>>> - an RS-485 port
>>> - 2 Ethernet ports
>>> - a wireless M-BUS
>>> - a 4G modem
>>> - a 4MB SPI flash
>>> - a 4GB eMMC
>>>
>>> Signed-off-by: Gregory CLEMENT 
>>> Acked-by: Nicolas Ferre 
>> 
>> I sent this patch one month ago and it seems that it didn't get applied.
>
> I'm aware of it. Since it was way after merge window close for 2016.01
> it would not have been applied for this release.
>
>> What is the status of this patch?
>
> I'll review and eventually apply it until end of this Weekend.
>
>> Do you have any remark about it?
>
> Not yet ...
>
> Excuse me for the long waiting times for atmel patches. My list has some
> unreplied patches back from end of November 2015. I'm looking forward to
> improve this in future.

No problem and thanks for the news :)

Gregory


>
> Andreas
>
>> 
>> Thanks,
>> 
>> Gregory
>> 
>>> ---
>>> Hi again,
>>>
>>> Some of my fixes were not commit in my previous version.
>>>
>>> This version should be the correct one, I also added the acked-by from
>>> Nicolas.
>>>
>>> Sorry for not having seen it before.
>>>
>>> Thanks,
>>>
>>> Gregory
>>>
>>>
>>> arch/arm/mach-at91/Kconfig |   6 ++
>>>  board/l+g/vinco/Kconfig|  12 +++
>>>  board/l+g/vinco/Makefile   |   1 +
>>>  board/l+g/vinco/vinco.c| 212 
>>> +
>>>  configs/vinco_defconfig|  13 +++
>>>  include/configs/vinco.h| 169 
>>>  6 files changed, 413 insertions(+)
>>>  create mode 100644 board/l+g/vinco/Kconfig
>>>  create mode 100644 board/l+g/vinco/Makefile
>>>  create mode 100644 board/l+g/vinco/vinco.c
>>>  create mode 100644 configs/vinco_defconfig
>>>  create mode 100644 include/configs/vinco.h
>>>
>>> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
>>> index c333647..3dfbb5f 100644
>>> --- a/arch/arm/mach-at91/Kconfig
>>> +++ b/arch/arm/mach-at91/Kconfig
>>> @@ -114,6 +114,11 @@ config TARGET_SMARTWEB
>>> select CPU_ARM926EJS
>>> select SUPPORT_SPL
>>>  
>>> +config TARGET_VINCO
>>> +   bool "Support VINCO"
>>> +   select CPU_V7
>>> +   select SUPPORT_SPL
>>> +
>>>  endchoice
>>>  
>>>  config SYS_SOC
>>> @@ -136,6 +141,7 @@ source "board/bluewater/snapper9260/Kconfig"
>>>  source "board/calao/usb_a9263/Kconfig"
>>>  source "board/egnite/ethernut5/Kconfig"
>>>  source "board/esd/meesc/Kconfig"
>>> +source "board/l+g/vinco/Kconfig"
>>>  source "board/mini-box/picosam9g45/Kconfig"
>>>  source "board/ronetix/pm9261/Kconfig"
>>>  source "board/ronetix/pm9263/Kconfig"
>>> diff --git a/board/l+g/vinco/Kconfig b/board/l+g/vinco/Kconfig
>>> new file mode 100644
>>> index 000..229b5ea
>>> --- /dev/null
>>> +++ b/board/l+g/vinco/Kconfig
>>> @@ -0,0 +1,12 @@
>>> +if TARGET_VINCO
>>> +
>>> +config SYS_BOARD
>>> +   default "vinco"
>>> +
>>> +config SYS_VENDOR
>>> +   default "l+g"
>>> +
>>> +config SYS_CONFIG_NAME
>>> +   default "vinco"
>>> +
>>> +endif
>>> diff --git a/board/l+g/vinco/Makefile b/board/l+g/vinco/Makefile
>>> new file mode 100644
>>> index 000..a2b8a2b
>>> --- /dev/null
>>> +++ b/board/l+g/vinco/Makefile
>>> @@ -0,0 +1 @@
>>> +obj-y += vinco.o
>>> diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c
>>> new file mode 100644
>>> index 000..3d7af09
>>> --- /dev/null
>>> +++ b/board/l+g/vinco/vinco.c
>>> @@ -0,0 +1,212 @@
>>> +/*
>>> + * Board file for the VInCo platform
>>> + * Based on the the SAMA5-EK board file
>>> + * Configuration settings for the VInCo platform.
>>> + * Copyright (C) 2014 Atmel
>>> + *   Bo Shen 
>>> + * Copyright (C) 2015 Free Electrons
>>> + *   Gregory CLEMENT 
>>> + *
>>> + * 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 
>>> +
>>> +DECLARE_GLOBAL_DATA_PTR;
>>> +
>>> +#ifdef CONFIG_ATMEL_SPI
>>> +int spi_cs_is_valid(unsigned int bus, unsigned int cs)
>>> +{
>>> +   return bus == 0 && cs == 0;
>>> +}
>>> +
>>> +void spi_cs_activate(struct spi_slave *slave)
>>> +{
>>> +   at91_set_pio_output(AT91_PIO_PORTC, 3, 0);
>>> +}
>>> +
>>> +void spi_cs_deactivate(struct spi_slave *slave)
>>> +{
>>> +   at91_set_pio_output(AT91_PIO_PORTC, 3, 1);
>>> +}
>>> +
>>> +static void vinco_spi0_hw_init(void)
>>> +{
>>> +   at91_set_a_periph(AT91_PIO_PORTC, 0, 0);/* SPI0_MISO */
>>> +   at91_set_a_periph(AT91_PIO_PORTC, 1, 0);/* SPI0_MOSI */
>>> +   at91_set_a_periph(AT91_PIO_PORTC, 2, 0);/* 

[U-Boot] [PATCH v2] MIPS: initialize board_init_f() argument to zero.

2016-01-21 Thread Purna Chandra Mandal
Argument boot_flags of board_init_f() should be set to 0 as
$a0 may be utilized in lowlevel_init() or mips_cache_reset()
or previous stage boot-loader.

Signed-off-by: Purna Chandra Mandal 

---

Changes in v2:
- add comment in same line as of the asm instruction
- add commit message

 arch/mips/cpu/start.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index e95cdca..2aa2dcb 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -185,7 +185,7 @@ reset:
PTR_ADDU t0, k0, GD_MALLOC_BASE # gd->malloc_base offset
sw  sp, 0(t0)
 #endif
-
+   movea0, zero# a0 <-- boot_flags = 0
PTR_LA  t9, board_init_f
jr  t9
 move   ra, zero
-- 
1.8.3.1

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


Re: [U-Boot] [PATCH v2 1/9] Revert "fdt_support: Add multi-serial support for stdout fixup"

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:26, Simon Glass  wrote:
> On 13 January 2016 at 20:38, Bin Meng  wrote:
>> This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b.
>>
>> The fix up in the /aliases node does not work under the following
>> scenarios:
>> - Not every non-DM serial driver was written to have a driver name
>>   that conforms the format of "serial%d" or "eserial%d".
>> - With driver model serial, the stdio_devices[] stores the serial
>>   device node name in the device tree.
>>
>> Signed-off-by: Bin Meng 
>>
>> ---
>>
>> Changes in v2:
>> - Rewrite the commit message using 'git revert' format.
>>
>>  common/fdt_support.c | 16 +---
>>  1 file changed, 1 insertion(+), 15 deletions(-)
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 2/9] arm: ls1021atwr: Convert to driver model and enable serial support

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:26, Simon Glass  wrote:
> On 13 January 2016 at 20:38, Bin Meng  wrote:
>> Convert ls1021atwr_nor to driver model support. As a start, enable
>> ns16550 serial port driver.
>>
>> Signed-off-by: Bin Meng 
>> ---
>>
>> Changes in v2: None
>>
>>  arch/arm/dts/ls1021a-twr.dts | 4 
>>  arch/arm/dts/ls1021a.dtsi| 4 
>>  configs/ls1021atwr_nor_defconfig | 4 
>>  include/configs/ls1021atwr.h | 2 ++
>>  4 files changed, 10 insertions(+), 4 deletions(-)
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 3/9] serial: lpuart: Move CONFIG_FSL_LPUART to Kconfig

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:26, Simon Glass  wrote:
> On 15 January 2016 at 14:11, Stefan Agner  wrote:
>> Looks good to me,
>>
>> Acked-by: Stefan Agner 
>>
>> On 13.01.2016 19:39, Bin Meng wrote:
>>> LPUART is seen on Freescale VF610 and QorIQ Layerscape devices.
>>> Create a Kconfig option and move it to defconfig for all boards
>>> that have this serial driver.
>>>
>>> Signed-off-by: Bin Meng 
>>> Reviewed-by: Simon Glass 
>>> ---
>>>
>>> Changes in v2: None
>>>
>>>  configs/colibri_vf_defconfig | 1 +
>>>  configs/colibri_vf_dtb_defconfig | 1 +
>>>  configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 +
>>>  configs/ls1021aqds_nor_lpuart_defconfig  | 1 +
>>>  configs/ls1021atwr_nor_lpuart_defconfig  | 1 +
>>>  configs/pcm052_defconfig | 1 +
>>>  configs/vf610twr_defconfig   | 1 +
>>>  configs/vf610twr_nand_defconfig  | 1 +
>>>  drivers/serial/Kconfig   | 6 ++
>>>  include/configs/colibri_vf.h | 1 -
>>>  include/configs/ls1021aqds.h | 1 -
>>>  include/configs/ls1021atwr.h | 1 -
>>>  include/configs/pcm052.h | 1 -
>>>  include/configs/vf610twr.h   | 1 -
>>>  14 files changed, 14 insertions(+), 5 deletions(-)
>>>
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 5/9] serial: lpuart: Call local version of setbrg and putc directly

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:27, Simon Glass  wrote:
> On 13 January 2016 at 20:39, Bin Meng  wrote:
>> There is no need to go through serial driver subsystem, instead
>> call the driver's setbrg and putc routines directly.
>>
>> Signed-off-by: Bin Meng 
>> Reviewed-by: Simon Glass 
>> ---
>>
>> Changes in v2: None
>>
>>  drivers/serial/serial_lpuart.c | 8 
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 9/9] arm: ls1021atwr: Enable driver model lpuart serial driver

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:27, Simon Glass  wrote:
> On 18 January 2016 at 02:39, Huan Wang  wrote:
>> Hi,
>>
>>> -Original Message-
>>> From: Bin Meng [mailto:bmeng...@gmail.com]
>>> Sent: Thursday, January 14, 2016 11:39 AM
>>> To: Simon Glass; Stefan Agner; Bhuvanchandra DV; Albert ARIBAUD (3ADEV);
>>> York Sun; Alison Wang; U-Boot Mailing List
>>> Subject: [PATCH v2 9/9] arm: ls1021atwr: Enable driver model lpuart
>>> serial driver
>>>
>>> Convert ls1021atwr_nor_lpuart to driver model support. As a start,
>>> enable lpuart serial port driver.
>>>
>>> Signed-off-by: Bin Meng 
>>> Reviewed-by: Simon Glass 
>>>
>>> ---
>>>
>>> Changes in v2:
>>> - Create a ls1021a-twr-lpuart.dts for ls1021atwr_nor_lpuart_defconfig
>>>
>>>  arch/arm/dts/Makefile   |  2 +-
>>>  arch/arm/dts/ls1021a-twr-lpuart.dts | 16 
>>>  configs/ls1021atwr_nor_lpuart_defconfig |  4 
>>>  3 files changed, 21 insertions(+), 1 deletion(-)  create mode 100644
>>> arch/arm/dts/ls1021a-twr-lpuart.dts
>>>
>>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index
>>> 02b031e..4bbf661 100644
>>> --- a/arch/arm/dts/Makefile
>>> +++ b/arch/arm/dts/Makefile
>>> @@ -89,7 +89,7 @@ dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-
>>> x15.dtb
>>>  dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
>>>
>>>  dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
>>> - ls1021a-twr-duart.dtb
>>> + ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
>>>  dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
>>>   fsl-ls2080a-rdb.dtb
>>>  dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds.dtb \ diff --git
>>> a/arch/arm/dts/ls1021a-twr-lpuart.dts b/arch/arm/dts/ls1021a-twr-
>>> lpuart.dts
>>> new file mode 100644
>>> index 000..2941ec0
>>> --- /dev/null
>>> +++ b/arch/arm/dts/ls1021a-twr-lpuart.dts
>>> @@ -0,0 +1,16 @@
>>> +/*
>>> + * Freescale ls1021a TWR board device tree source
>>> + *
>>> + * Copyright 2013-2015 Freescale Semiconductor, Inc.
>>> + *
>>> + * SPDX-License-Identifier:  GPL-2.0+
>>> + */
>>> +
>>> +/dts-v1/;
>>> +#include "ls1021a-twr.dtsi"
>>> +
>>> +/ {
>>> + chosen {
>>> + stdout-path = &lpuart0;
>>> + };
>>> +};
>>> diff --git a/configs/ls1021atwr_nor_lpuart_defconfig
>>> b/configs/ls1021atwr_nor_lpuart_defconfig
>>> index 58cd61f..599342f 100644
>>> --- a/configs/ls1021atwr_nor_lpuart_defconfig
>>> +++ b/configs/ls1021atwr_nor_lpuart_defconfig
>>> @@ -1,7 +1,11 @@
>>>  CONFIG_ARM=y
>>>  CONFIG_TARGET_LS1021ATWR=y
>>> +CONFIG_DM_SERIAL=y
>>> +CONFIG_DEFAULT_DEVICE_TREE="ls1021a-twr-lpuart"
>>>  CONFIG_SYS_EXTRA_OPTIONS="LPUART"
>>>  # CONFIG_CMD_SETEXPR is not set
>>> +CONFIG_OF_CONTROL=y
>>> +CONFIG_DM=y
>>>  CONFIG_NETDEVICES=y
>>>  CONFIG_E1000=y
>>>  CONFIG_FSL_LPUART=y
>>> --
>>> 1.8.2.1
>>
>> Reviewed-by: Alison Wang 
>> Tested-by: Alison Wang 
>>
>>
>> Best Regards,
>> Alison Wang
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 01/14] dm: video: Add a video uclass

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> U-Boot has separate code for LCDs and 'video' devices. Both now use a
> very similar API thanks to earlier work by Nikita Kiryanov. With the driver-
> model conversion we should unify these into a single uclass.
>
> Unfortunately there are different features supported by each. This
> implementation provides for a common set of features which should serve
> most purposes. The intent is to support:
>
> - bitmap devices with 8, 16 and 32 bits per pixel
> - text console wih white on black or vice versa
> - rotated text console
> - bitmap display (BMP format)
>
> More can be added as additional boards are ported over to use driver model
> for video.
>
> The name 'video' is chosen for the uclass since it is more generic than LCD.
> Another option would be 'display' but that would introduce a third concept
> to U-Boot which seems like the wrong approach.
>
> The existing LCD and video init functions are not needed now, so this uclass
> makes no attempt to implement them.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2:
> - Fix Ebabling typo in comment
> - Remove duplicated @fb_size line in common
> - Fix comment for video_get_ysize()
>
>  drivers/video/Kconfig|  40 
>  drivers/video/Makefile   |   1 +
>  drivers/video/video-uclass.c | 228 
> +++
>  include/dm/uclass-id.h   |   1 +
>  include/video.h  | 168 +--
>  5 files changed, 432 insertions(+), 6 deletions(-)
>  create mode 100644 drivers/video/video-uclass.c

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


Re: [U-Boot] [PATCH v2 03/14] dm: video: Add a uclass for the text console

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> The existing LCD/video interface suffers from conflating the bitmap display
> with text output on that display. As a result the implementation is more
> complex than it needs to me.
>
> We can support multiple text console drivers. Create a separate uclass to
> support this, with its own API.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2:
> - Fix reference to \n which should be \b
> - Fix 'withthe' typo in comment
>
>  drivers/video/Makefile|   2 +-
>  drivers/video/vidconsole-uclass.c | 239 
> ++
>  drivers/video/video-uclass.c  |  21 
>  include/dm/uclass-id.h|   1 +
>  include/video_console.h   | 136 ++
>  5 files changed, 398 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/video/vidconsole-uclass.c
>  create mode 100644 include/video_console.h

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


Re: [U-Boot] [PATCH v2 05/14] dm: video: Add a driver for a rotated text console

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Sometimes the console must be rotated. Add a driver which supports rotating
> the text clockwise to 90, 180 and 270 degrees. This can support devices
> where the display is rotated for mechanical reasons.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  drivers/video/Kconfig  |  13 ++
>  drivers/video/Makefile |   1 +
>  drivers/video/console_rotate.c | 436 
> +
>  3 files changed, 450 insertions(+)
>  create mode 100644 drivers/video/console_rotate.c

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


Re: [U-Boot] [PATCH v2 04/14] dm: video: Add a 'normal' text console driver

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Most of the time we don't need to rotate the display so a simple font
> blitting feature is enough for our purposes. Add a simple driver which
> supports this function. It provides text output on the console using
> the standard 8x16-pixel font.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  drivers/video/Makefile |   2 +-
>  drivers/video/console_normal.c | 141 
> +
>  2 files changed, 142 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/video/console_normal.c

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


Re: [U-Boot] [PATCH v2 07/14] dm: common: Add memory reservation for the video uclass

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Before relocation we need to reserve memory for the video driver frame
> buffers so that they can use this memory when they start up (after
> relocation). Add a call to the uclass to permit this.
>
> The current top and bottom of the region is stored in global_data so that
> it can be checked post-relocation to ensure enough memory is available. No
> video device should be probed before relocation.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  common/board_f.c  | 47 
> +--
>  include/asm-generic/global_data.h |  4 
>  2 files changed, 39 insertions(+), 12 deletions(-)

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


Re: [U-Boot] [PATCH v2 08/14] dm: video: Implement the bmp command for driver model

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> This command can use the bitmap display code in the uclass. This is similar
> to the code in lcd.c and cfb_console.c. These other copies will go away when
> all boards are converted to use driver model for video.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  common/cmd_bmp.c  |  22 ++-
>  drivers/video/Makefile|   1 +
>  drivers/video/video_bmp.c | 353 
> ++
>  3 files changed, 375 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/video/video_bmp.c

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


Re: [U-Boot] [PATCH v2 06/14] common: Move LCD and video memory reservation together

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> These two functions are conceptually the same. Move them together in the
> pre-relocation init.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  common/board_f.c | 28 ++--
>  1 file changed, 14 insertions(+), 14 deletions(-)

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


Re: [U-Boot] [PATCH v2 09/14] dm: stdio: video: Plumb the video uclass into stdio

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Register video drivers with stdio so that they can be used for text output.
> This needs to be done explicitly for now. At some point we should be able to
> convert stdio itself to driver model and avoid this step.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  common/stdio.c | 19 +++
>  1 file changed, 15 insertions(+), 4 deletions(-)

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


Re: [U-Boot] [PATCH v2 7/9] serial: lpuart: Add driver model serial support

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:27, Simon Glass  wrote:
> On 13 January 2016 at 20:39, Bin Meng  wrote:
>> This adds driver model support to lpuart serial driver.
>>
>> Signed-off-by: Bin Meng 
>>
>> ---
>>
>> Changes in v2:
>> - Split to use two separate U_BOOT_DRIVER()
>>
>>  doc/driver-model/serial-howto.txt |   1 -
>>  drivers/serial/serial_lpuart.c| 167 
>> ++
>>  2 files changed, 167 insertions(+), 1 deletion(-)
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 10/14] sandbox: Move CONFIG_VIDEO_SANDBOX_SDL to Kconfig

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Move this option to Kconfig. This is quite simple as only sandbox uses the
> driver.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  configs/sandbox_defconfig | 3 ++-
>  drivers/video/Kconfig | 9 +
>  include/configs/sandbox.h | 1 -
>  3 files changed, 11 insertions(+), 2 deletions(-)

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


Re: [U-Boot] [PATCH v2 4/9] serial: lpuart: Fix several cosmetic issues

2016-01-21 Thread Simon Glass
On 20 January 2016 at 13:27, Simon Glass  wrote:
> On 13 January 2016 at 20:39, Bin Meng  wrote:
>> Clean up the driver codes a little bit, by:
>> - Use tab instead of space in the macro defines
>> - Use single line comment whenever possible
>> - Fix insertion of blank lines
>>
>> Signed-off-by: Bin Meng 
>> Reviewed-by: Simon Glass 
>> ---
>>
>> Changes in v2: None
>>
>>  drivers/serial/serial_lpuart.c | 35 +++
>>  1 file changed, 15 insertions(+), 20 deletions(-)
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH v2 12/14] dm: video: test: Add tests for the video uclass

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Add tests that check that the video console is working correcty. Also check
> that text output produces the expected result. Test coverage includes
> character output, wrapping and scrolling.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2:
> - Fix 'resolutino' typo in comment
>
>  arch/sandbox/dts/test.dts   |   7 ++
>  drivers/video/sandbox_sdl.c |   9 ---
>  include/dm/test.h   |   8 ++
>  test/dm/Makefile|   1 +
>  test/dm/video.c | 190 
> 
>  5 files changed, 206 insertions(+), 9 deletions(-)
>  create mode 100644 test/dm/video.c

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


Re: [U-Boot] [PATCH v2 13/14] dm: video: test: Add tests for rotated consoles

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Test that text is displayed correctly when the console is rotated.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  configs/sandbox_defconfig |  1 +
>  test/dm/video.c   | 27 +++
>  2 files changed, 28 insertions(+)

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


Re: [U-Boot] [PATCH v2 14/14] dm: video: test: Test that bitmap display works correctly

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Add a test for the 'bmp' command. Test both the uncompressed and compressed
> versions of the file, since they use different code paths.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  include/configs/sandbox.h |   2 ++
>  test/dm/video.c   |  54 
> ++
>  tools/logos/denx-comp.bmp | Bin 0 -> 4148 bytes
>  3 files changed, 56 insertions(+)
>  create mode 100644 tools/logos/denx-comp.bmp

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


Re: [U-Boot] [PATCH v2 11/14] dm: video: sandbox: Convert sandbox to use driver model for video

2016-01-21 Thread Simon Glass
On 18 January 2016 at 19:52, Simon Glass  wrote:
> Now that driver model support is available, convert sandbox over to use it.
> We can remove a few of the special hooks that sandbox currently has.
>
> Signed-off-by: Simon Glass 
> Acked-by: Anatolij Gustschin 
> ---
>
> Changes in v2: None
>
>  arch/sandbox/dts/sandbox.dts |  1 +
>  board/sandbox/sandbox.c  | 17 
>  common/lcd.c | 11 -
>  configs/sandbox_defconfig|  1 +
>  drivers/serial/sandbox.c |  5 +--
>  drivers/video/sandbox_sdl.c  | 95 
> ++--
>  include/configs/sandbox.h| 10 ++---
>  include/fdtdec.h |  1 -
>  lib/fdtdec.c |  1 -
>  9 files changed, 56 insertions(+), 86 deletions(-)

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


[U-Boot] Please pull u-boot-dm

2016-01-21 Thread Simon Glass
Hi Tom,

This includes the lpuart and TI driver-model model conversion, clock
improvements, the new Python-based test infrastructure and a
video/console uclass initially implemented for sandbox.


The following changes since commit 57e5ecaf755d5301cd33683788e4b8432938bbbe:

  iocon / bamboo: Drop CONFIG_SYS_LONGHELP (2016-01-20 15:25:00 -0500)

are available in the git repository at:

  git://git.denx.de/u-boot-dm.git

for you to fetch changes up to 747440d0fa95f2205a8fcef49b6c7845700b6246:

  dm: video: test: Test that bitmap display works correctly
(2016-01-20 19:10:16 -0700)


Bin Meng (9):
  Revert "fdt_support: Add multi-serial support for stdout fixup"
  arm: ls1021atwr: Convert to driver model and enable serial support
  serial: lpuart: Move CONFIG_FSL_LPUART to Kconfig
  serial: lpuart: Fix several cosmetic issues
  serial: lpuart: Call local version of setbrg and putc directly
  serial: lpuart: Prepare the driver for DM conversion
  serial: lpuart: Add driver model serial support
  arm: ls1021atwr: Split off board device tree
  arm: ls1021atwr: Enable driver model lpuart serial driver

Masahiro Yamada (5):
  clk: move Kconfig options into sub-menu
  clk: fix comments in include/clk.h
  clk: add needed include and declaration to include/clk.h
  clk: add static qualifier to local functions
  clk: add API to enable clock

Mateusz Kulikowski (1):
  patman: Add --thread option

Mugunthan V N (19):
  arm: omap-common: do not build timer when CONFIG_TIMER defined
  dm: timer: uclass: add timer init in uclass driver to add timer device
  dm: timer: uclass: Add flag to control sequence numbering
  drivers: timer: omap_timer: add timer driver for omap devices based on dm
  am43xx_evm: timer: do not define CONFIG_TIMER for spl
  arm: dts: am437x-sk-evm: add tick-timer to chosen node
  defconfig: am437x_sk_evm: enable timer driver model
  arm: dts: am437x-gp-evm: add tick-timer to chosen node
  defconfig: am437x_gp_evm: enable timer driver model
  am335x_evm: timer: do not define CONFIG_TIMER for spl
  arm: dts: am335x-boneblack: add tick-timer to chosen node
  defconfig: am335x_boneblack_vboot: enable timer driver model
  arm: dts: am335x-evm: add tick-timer to chosen node
  defconfig: am335x_gp_evm: enable timer driver model
  ti_omap5_common: timer: do not define CONFIG_TIMER for spl
  arm: dts: dra72-evm: add tick-timer to chosen node
  defconfig: dra72_evm: enable timer driver model
  arm: dts: dra7-evm: add tick-timer to chosen node
  defconfig: dra74_evm: enable timer driver model

Simon Glass (25):
  dm: core: Provide uclass_find_device_by_phandle() only when needed
  tiny-printf: Avoid printing NULL strings
  dm: gpio: Allow the uclass to work without printf()
  dm: mmc: Try to honour the sequence order
  i2c: Correct command return values
  pinctrl: Avoid binding all pinconfig nodes before relocation
  tiny-printf: Always print zeroes
  sandbox: Support the bmp command
  dm: core: Call uclass post_bind() after the driver's bind() method
  bzip2: Support compression for sandbox
  usb: Define USB_MAX_STOR_DEV in only one place
  dm: video: Add a video uclass
  dm: lcd: Avoid using the lcd.h header file with driver model
  dm: video: Add a uclass for the text console
  dm: video: Add a 'normal' text console driver
  dm: video: Add a driver for a rotated text console
  common: Move LCD and video memory reservation together
  dm: common: Add memory reservation for the video uclass
  dm: video: Implement the bmp command for driver model
  dm: stdio: video: Plumb the video uclass into stdio
  sandbox: Move CONFIG_VIDEO_SANDBOX_SDL to Kconfig
  dm: video: sandbox: Convert sandbox to use driver model for video
  dm: video: test: Add tests for the video uclass
  dm: video: test: Add tests for rotated consoles
  dm: video: test: Test that bitmap display works correctly

Stephen Warren (10):
  dm: timer: refuse timers with zero clock_rate
  timer: sandbox: work without device tree
  test/py: Implement pytest infrastructure
  test/py: test that sandbox exits when asked
  test/py: add test of setenv/printenv/echo
  test/py: test the md/mw commands
  test/py: add test of basic shell functionality
  test/py: test the shell if command
  test/py: test the ums command
  test/py: add a test for the sleep command

 arch/arm/cpu/armv7/omap-common/Makefile|6 +
 arch/arm/dts/Makefile  |2 +-
 arch/arm/dts/am335x-boneblack.dts  |1 +
 arch/arm/dts/am335x-evm.dts|1 +
 arch/arm/dts/am437x-gp-evm.dts |1 +
 arch/arm/dts/am437x-sk-evm.dts |1 +
 arch/arm/dt

Re: [U-Boot] [PATCH] bootm: fix size arg of flush_cache() in bootm_load_os().

2016-01-21 Thread Daniel Schwierzeck
Am Mittwoch, den 20.01.2016, 14:07 +0530 schrieb Purna Chandra Mandal:
> Variable _load_end_ points to end address of uncompressed buffer
> (*not* uncomress_buffer_end / sizeof(ulong)), so multipling
> uncompressed
> size with sizeof(ulong) is grossly incorrect in flush_cache().
> It might lead to access of address beyond valid memory range and hang
> the CPU.
> 
> Tested on MIPS architecture by using compressed(gzip, lzma)
> and uncompressed uImage.
> 
> Signed-off-by: Purna Chandra Mandal 

Reviewed-by: Daniel Schwierzeck 

> ---
> 
>  common/bootm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/bootm.c b/common/bootm.c
> index 58936ca..99d574d 100644
> --- a/common/bootm.c
> +++ b/common/bootm.c
> @@ -435,7 +435,7 @@ static int bootm_load_os(bootm_headers_t *images,
> unsigned long *load_end,
>   bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE);
>   return err;
>   }
> - flush_cache(load, (*load_end - load) * sizeof(ulong));
> + flush_cache(load, *load_end - load);
>  
>   debug("   kernel loaded at 0x%08lx, end = 0x%08lx\n", load,
> *load_end);
>   bootstage_mark(BOOTSTAGE_ID_KERNEL_LOADED);
-- 
- Daniel

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


  1   2   3   4   >