Re: [U-Boot] [PATCH] Revert "image-fit: switch ENOLINK to ENOENT"

2016-09-18 Thread Marek Vasut
On 09/17/2016 05:42 AM, Jonathan Gray wrote:
> On Fri, Sep 16, 2016 at 10:21:43PM +0100, Paul Burton wrote:
>> Commit bac17b78dace ("image-fit: switch ENOLINK to ENOENT") changed
>> fit_get_node_from_config to return -ENOENT when a property doesn't
>> exist, but didn't change any of its callers which check return values.
>> Notably it didn't change boot_get_ramdisk, which leads to U-Boot failing
>> to boot FIT images which don't include ramdisks with the following
>> message:
>>
>>   Ramdisk image is corrupt or invalid
>>
>> The offending commit seems to dislike ENOLINK due to it not existing on
>> OpenBSD, but I'm not sure why that matters as we define it in
>> include/asm-generic/errno.h anyway so simply revert the commit to fix
>> FIT image handling.
> 
> That header is not used when building native tools.
> So reverting it will break the build of u-boot on OpenBSD.
> 
>   WRAPtools/common/image-fit.c
>   HOSTCC  tools/common/image-fit.o
> In file included from tools/common/image-fit.c:1:
> /usr/users/jsg/src/u-boot/tools/../common/image-fit.c: In function 
> 'fit_get_node_from_config':
> /usr/users/jsg/src/u-boot/tools/../common/image-fit.c:1569: error: 'ENOLINK' 
> undeclared (first use in this function)
> /usr/users/jsg/src/u-boot/tools/../common/image-fit.c:1569: error: (Each 
> undeclared identifier is reported only once
> /usr/users/jsg/src/u-boot/tools/../common/image-fit.c:1569: error: for each 
> function it appears in.)
> 

I seriously do not care if it's broken on OpenBSD if there is about one
user of such system. The problem is the original patch broke booting of
fitImage-wrapped kernels and this is serious breakage which makes
2016.09 release effectively useless.

I do support this revert and we will likely need v2016.09.1 unfortunately.

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


Re: [U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-18 Thread Stefano Babic
Hi Peng,

On 18/09/2016 08:50, Peng Fan wrote:
> Hi,
> 
> On Sat, Sep 10, 2016 at 04:40:47PM -0700, Eric Nelson wrote:
>> Hi Tom,
>>
>> On 09/06/2016 07:15 AM, Tom Rini wrote:
>>> On Tue, Sep 06, 2016 at 07:00:56AM -0700, Eric Nelson wrote:
 On 09/06/2016 06:40 AM, Tom Rini wrote:
> On Fri, Sep 02, 2016 at 10:53:58PM +0200, Petr Kulhavy wrote:
>>
>> 
>>
>
> Would it be possible to implement having the next stage also be sent via
> imx_usb_loader?  ie there's examples today of doing u-boot.imx + kernel
> + initrd via imx_usb_loader, so what would be needed for SPL +
> u-boot.img (+ kenrel + initrd) via imx_usb_loader?  Thanks!
>

 SPL+u-boot.img could be bundled into a single image through the
 use of plugins which would require:

 - updates to mkimage to support plugins, and
 - Makefile updates to produce a third output (u-boot.imx?), and
 - an update to SPL startup on i.MX to check for the plugin flag
 and return to the boot ROM after startup (instead of loading
 U-Boot) if set.

>>
>> It appears that the mkimage support is present in a patch against v2015.04:
>>
>> http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/tools/mkimage.c?h=imx_v2015.04_4.1.15_1.0.0_ga=3d9e1681
>>
>> Peng, can you up-stream this?
> Hi Stefano,
> 
> I would like see your points on this. I tried to uptream plugin before, but 
> rejected,
> Since more people would like to see this in, do you agree to let plugin 
> supported
> in mainline?
> 

Yes - I see a general agreement to get in mainline, and thanks for the
effort to push it.

Best regards,
Stefano

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


Re: [U-Boot] [PATCH 05/15] usb: xhci: Add Marvell MVEBU xHCI support

2016-09-18 Thread Marek Vasut
On 09/16/2016 03:09 PM, Stefan Roese wrote:
> This patch adds DM based support for the xHCI USB 3.0 controller
> integrated in the Armada 3700 SoC. It may be extended to be used
> by other MVEBU SoCs as well.
> 
> Signed-off-by: Stefan Roese 
> Cc: Nadav Haklai 
> Cc: Kostya Porotchkin 
> Cc: Wilson Ding 
> Cc: Victor Gu 
> Cc: Hua Jing 
> Cc: Terry Zhou 
> Cc: Hanna Hawa 
> Cc: Haim Boot 
> Cc: Marek Vasut 
> ---

Acked-by: Marek Vasut 

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


Re: [U-Boot] [PATCH 1/2] usb: fsl: Rename fdt_fixup_dr_usb

2016-09-18 Thread Marek Vasut
On 09/16/2016 01:42 PM, Sriram Dash wrote:
> The function fdt_fixup_dr_usb is specific to fsl/nxp. So,
> make the function name explicit and rename fdt_fixup_dr_usb
> into fsl_fdt_fixup_dr_usb.
> 
> Signed-off-by: Sriram Dash 
> ---
>  board/Arcturus/ucp1020/ucp1020.c| 2 +-
>  board/freescale/b4860qds/b4860qds.c | 2 +-
>  board/freescale/bsc9131rdb/bsc9131rdb.c | 2 +-
>  board/freescale/bsc9132qds/bsc9132qds.c | 2 +-
>  board/freescale/corenet_ds/corenet_ds.c | 2 +-
>  board/freescale/ls2080aqds/ls2080aqds.c | 2 +-
>  board/freescale/ls2080ardb/ls2080ardb.c | 2 +-
>  board/freescale/mpc8308rdb/mpc8308rdb.c | 2 +-
>  board/freescale/mpc8315erdb/mpc8315erdb.c   | 2 +-
>  board/freescale/mpc837xemds/mpc837xemds.c   | 2 +-
>  board/freescale/mpc837xerdb/mpc837xerdb.c   | 2 +-
>  board/freescale/mpc8536ds/mpc8536ds.c   | 2 +-
>  board/freescale/p1010rdb/p1010rdb.c | 2 +-
>  board/freescale/p1022ds/p1022ds.c   | 2 +-
>  board/freescale/p1023rdb/p1023rdb.c | 2 +-
>  board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 2 +-
>  board/freescale/p1_twr/p1_twr.c | 2 +-
>  board/freescale/p2041rdb/p2041rdb.c | 2 +-
>  board/freescale/t102xqds/t102xqds.c | 2 +-
>  board/freescale/t102xrdb/t102xrdb.c | 2 +-
>  board/freescale/t1040qds/t1040qds.c | 2 +-
>  board/freescale/t104xrdb/t104xrdb.c | 2 +-
>  board/freescale/t208xqds/t208xqds.c | 2 +-
>  board/freescale/t208xrdb/t208xrdb.c | 2 +-
>  board/freescale/t4qds/t4240emu.c| 2 +-
>  board/freescale/t4qds/t4240qds.c| 2 +-
>  board/freescale/t4rdb/t4240rdb.c| 2 +-
>  board/gdsys/mpc8308/hrcon.c | 2 +-
>  board/gdsys/mpc8308/strider.c   | 2 +-
>  board/gdsys/p1022/controlcenterd.c  | 2 +-
>  board/keymile/kmp204x/kmp204x.c | 2 +-
>  board/mpc8308_p1m/mpc8308_p1m.c | 2 +-
>  board/varisys/cyrus/cyrus.c | 2 +-
>  drivers/usb/common/fsl-dt-fixup.c   | 2 +-
>  include/fdt_support.h   | 4 ++--
>  35 files changed, 36 insertions(+), 36 deletions(-)
> 

Applied, thanks.

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


Re: [U-Boot] [PATCH 06/15] usb: ehci: ehci-marvell.c: Add Armada 3700 support (ARMv8)

2016-09-18 Thread Marek Vasut
On 09/16/2016 03:09 PM, Stefan Roese wrote:
> This patch adds DM based support for the Armada 3700 EHCI controller.
> The address windows don't need to get configured in this case. The
> difference here is detected via DT compatible property at runtime.
> 
> With this support and the DM xHCI driver, both XHCI and eHCI can be
> used simultaniously on the MVEBU boards now.
> 
> Signed-off-by: Stefan Roese 
> Cc: Nadav Haklai 
> Cc: Kostya Porotchkin 
> Cc: Wilson Ding 
> Cc: Victor Gu 
> Cc: Hua Jing 
> Cc: Terry Zhou 
> Cc: Hanna Hawa 
> Cc: Haim Boot 
> Cc: Marek Vasut 
> ---

Acked-by: Marek Vasut 

Feel free to pick this all up via the marvell tree if that helps.

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


Re: [U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-18 Thread Peng Fan
Hi,

On Sat, Sep 10, 2016 at 04:40:47PM -0700, Eric Nelson wrote:
>Hi Tom,
>
>On 09/06/2016 07:15 AM, Tom Rini wrote:
>> On Tue, Sep 06, 2016 at 07:00:56AM -0700, Eric Nelson wrote:
>>> On 09/06/2016 06:40 AM, Tom Rini wrote:
 On Fri, Sep 02, 2016 at 10:53:58PM +0200, Petr Kulhavy wrote:
>
>
>

 Would it be possible to implement having the next stage also be sent via
 imx_usb_loader?  ie there's examples today of doing u-boot.imx + kernel
 + initrd via imx_usb_loader, so what would be needed for SPL +
 u-boot.img (+ kenrel + initrd) via imx_usb_loader?  Thanks!

>>>
>>> SPL+u-boot.img could be bundled into a single image through the
>>> use of plugins which would require:
>>>
>>> - updates to mkimage to support plugins, and
>>> - Makefile updates to produce a third output (u-boot.imx?), and
>>> - an update to SPL startup on i.MX to check for the plugin flag
>>> and return to the boot ROM after startup (instead of loading
>>> U-Boot) if set.
>>>
>
>It appears that the mkimage support is present in a patch against v2015.04:
>
>http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/tools/mkimage.c?h=imx_v2015.04_4.1.15_1.0.0_ga=3d9e1681
>
>Peng, can you up-stream this?
Hi Stefano,

I would like see your points on this. I tried to uptream plugin before, but 
rejected,
Since more people would like to see this in, do you agree to let plugin 
supported
in mainline?

Thanks,
Peng.

>
>>> Troy implemented the key bits back in 2012, and I provided
>>> some links here:
>>>
>>> http://lists.denx.de/pipermail/u-boot/2016-June/258784.html
>> 
>> Ah yes, this.  I really would like to see this come in as I think it'll
>> be required to really drop the old style u-boot.imx binaries for cases
>> like factory programming.  As well as the use cases outlined before too
>> about supporting multiple boards more easily.
>> 
>
>I'd also like to see this get pulled into main-line, and I just ran across
>another reason for supporting plugins.
>
>The i.MX7 LPSR mode resumes from a "power-off" state by going through
>the boot ROM, and it's up to the code loaded by the boot ROM to recognize
>the condition, take DRAM out of self-refresh and jump back into IRAM:
>
>http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/board/freescale/mx7d_12x12_lpddr3_arm2/plugin.S?h=imx_v2015.04_4.1.15_1.0.0_ga=47f82f3978cda0c1fd637adcd9e8aa070f616493
>
>Some additional commentary is in this post on NXP community:
>
>https://community.nxp.com/thread/434057#comment-830672
>
>For this use case, SPL will be too heavyweight and plugin support is
>needed.
>
>Regards,
>
>
>Eric
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v1] ARM: at91/dt: sama5d2: Fix the warning from dtc

2016-09-18 Thread Wenyou Yang
Fix the warning from dtc like,
---8<
Warning (unit_address_vs_reg): Node 
/ahb/apb/pmc@f0014000/periph64ck/sdmmc0_hclk has a reg or ranges property, but 
no unit name
--->8

Signed-off-by: Wenyou Yang 
---

 arch/arm/dts/sama5d2.dtsi | 140 +++---
 1 file changed, 70 insertions(+), 70 deletions(-)

diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi
index 19feb66..a881d9e 100644
--- a/arch/arm/dts/sama5d2.dtsi
+++ b/arch/arm/dts/sama5d2.dtsi
@@ -79,7 +79,7 @@
#clock-cells = <0>;
};
 
-   plla: pllack {
+   plla: pllack@0 {
compatible = "atmel,sama5d3-clk-pll";
#clock-cells = <0>;
clocks = <>;
@@ -146,17 +146,17 @@
interrupt-parent = <>;
clocks = <>, <>, <>, 
<>;
 
-   prog0: prog0 {
+   prog0: prog@0 {
#clock-cells = <0>;
reg = <0>;
};
 
-   prog1: prog1 {
+   prog1: prog@1 {
#clock-cells = <0>;
reg = <1>;
};
 
-   prog2: prog2 {
+   prog2: prog@2 {
#clock-cells = <0>;
reg = <2>;
};
@@ -167,49 +167,49 @@
#address-cells = <1>;
#size-cells = <0>;
 
-   ddrck: ddrck {
+   ddrck: ddrck@2 {
#clock-cells = <0>;
reg = <2>;
clocks = <>;
};
 
-   lcdck: lcdck {
+   lcdck: lcdck@3 {
#clock-cells = <0>;
reg = <3>;
clocks = <>;
};
 
-   uhpck: uhpck {
+   uhpck: uhpck@6 {
#clock-cells = <0>;
reg = <6>;
clocks = <>;
};
 
-   udpck: udpck {
+   udpck: udpck@7 {
#clock-cells = <0>;
reg = <7>;
clocks = <>;
};
 
-   pck0: pck0 {
+   pck0: pck0@8 {
#clock-cells = <0>;
reg = <8>;
clocks = <>;
};
 
-   pck1: pck1 {
+   pck1: pck1@9 {
#clock-cells = <0>;
reg = <9>;
clocks = <>;
};
 
-   pck2: pck2 {
+   pck2: pck2@10 {
#clock-cells = <0>;
reg = <10>;
clocks = <>;
};
 
-   iscck: iscck {
+   iscck: iscck@18 {
#clock-cells = <0>;
reg = <18>;
clocks = <>;
@@ -222,203 +222,203 @@
#size-cells = <0>;
clocks = <>;
 
-   macb0_clk: macb0_clk {
+

Re: [U-Boot] [PATCH v2 01/17] imx: iomux-v3: Fix build error with snvs base

2016-09-18 Thread Peng Fan
Hi Jagan,
On Sat, Sep 17, 2016 at 02:18:33AM +0530, Jagan Teki wrote:
>snvs base is added only for i.MX6ULL but the code is
>added for common, so firing build error while compiling
>other i.MX6 SOC's
>
>Issue observed with the below patch
>"imx: mx6ull: Update memory map address"
>(sha1: e8eac1b5b3a98a06426bc4867c03c38329841e5c)
>
>Build log:
>  CC  arch/arm/imx-common/iomux-v3.o
>arch/arm/imx-common/iomux-v3.c: In function 'imx_iomux_v3_setup_pad':
>arch/arm/imx-common/iomux-v3.c:56:19: error: 'IOMUXC_SNVS_BASE_ADDR' 
>undeclared (first use in this function)
>base = (void *)IOMUXC_SNVS_BASE_ADDR;

CONFIG_IOMUX_LPSR is only needed for i.MX7 and i.MX6ULL now.
CONFIG_IOMUX_LPSR is defined in your configuration?
I did not meet such build error.

Regards,
Peng.
>
>Cc: Stefano Babic 
>Cc: Peng Fan 
>Cc: Michael Trimarchi 
>Signed-off-by: Jagan Teki 
>---
> arch/arm/imx-common/iomux-v3.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c
>index 78f667e..efb884c 100644
>--- a/arch/arm/imx-common/iomux-v3.c
>+++ b/arch/arm/imx-common/iomux-v3.c
>@@ -50,7 +50,7 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
>   if (sel_input_ofs)
>   sel_input_ofs += IOMUX_LPSR_SEL_INPUT_OFS;
>   }
>-#else
>+#elif defined(CONFIG_MX6ULL)
>   if (is_mx6ull()) {
>   if (lpsr == IOMUX_CONFIG_LPSR) {
>   base = (void *)IOMUXC_SNVS_BASE_ADDR;
>-- 
>2.7.4
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] imx: imx6ul: disable POR_B internal pull up

2016-09-18 Thread van . freenix
From: Peng Fan 

>From TO1.1, SNVS adds internal pull up control for POR_B,
the register filed is GPBIT[1:0], after system boot up,
it can be set to 2b'01 to disable internal pull up.
It can save about 30uA power in SNVS mode.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
---
 arch/arm/cpu/armv7/mx6/soc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index f96b610..f6eacb5 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -383,7 +383,6 @@ int arch_cpu_init(void)
writel((readl(MX6UL_SNVS_LP_BASE_ADDR + 0x10) &
   (~0x1400)) | 0x400,
   MX6UL_SNVS_LP_BASE_ADDR + 0x10);
-   
}
}
 
-- 
2.6.2

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


[U-Boot] [PATCH] Repair image-fit: switch ENOLINK to ENOENT

2016-09-18 Thread Marek Vasut
This patch broke booting of any fitImage-wrapped kernel images due
to replacement of ENOLINK with ENOENT without checking where the
ENOLINK return value is being tested for. Adjust the tests as well
to repair the breakage.

Signed-off-by: Marek Vasut 
Cc: Jonathan Gray 
Cc: Paul Burton 
Cc: Tom Rini 
---
 common/image-fdt.c | 2 +-
 common/image.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/image-fdt.c b/common/image-fdt.c
index d6ee225..3d23608 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -285,7 +285,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], 
uint8_t arch,
fdt_noffset = fit_get_node_from_config(images,
   FIT_FDT_PROP,
   fdt_addr);
-   if (fdt_noffset == -ENOLINK)
+   if (fdt_noffset == -ENOENT)
return 0;
else if (fdt_noffset < 0)
return 1;
diff --git a/common/image.c b/common/image.c
index 7ad04ca..c8d9bc8 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1078,7 +1078,7 @@ int boot_get_ramdisk(int argc, char * const argv[], 
bootm_headers_t *images,
rd_addr = map_to_sysmem(images->fit_hdr_os);
rd_noffset = fit_get_node_from_config(images,
FIT_RAMDISK_PROP, rd_addr);
-   if (rd_noffset == -ENOLINK)
+   if (rd_noffset == -ENOENT)
return 0;
else if (rd_noffset < 0)
return 1;
-- 
2.9.3

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


[U-Boot] [PATCH v1] ARM: dts: Makefile: Use board to decide to compile dts

2016-09-18 Thread Wenyou Yang
To avoid to compile all AT91 SoCs' board dts files, use the board
to decide to build its corresponding dts, instead of
CONFIG_AT91FAMILY.

Signed-off-by: Wenyou Yang 
---

 arch/arm/dts/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 223124e..2ac1f20 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -2,10 +2,10 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-dtb-$(CONFIG_AT91FAMILY) += at91sam9260-smartweb.dtb \
-   at91sam9g20-taurus.dtb \
-   at91sam9g45-corvus.dtb \
-   at91sam9g45-gurnard.dtb
+dtb-$(CONFIG_TARGET_SMARTWEB) += at91sam9260-smartweb.dtb
+dtb-$(CONFIG_TARGET_TAURUS) += at91sam9g20-taurus.dtb
+dtb-$(CONFIG_TARGET_CORVUS) += at91sam9g45-corvus.dtb
+dtb-$(CONFIG_TARGET_GURNARD) += at91sam9g45-gurnard.dtb
 
 dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
 dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
-- 
2.7.4

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


[U-Boot] [PATCH] imx-common: enlarge mux width to 4

2016-09-18 Thread van . freenix
From: Peng Fan 

For i.MX6, the mux width is 4, not 3. So enlarge the width.
IOMUX_CONFIG_LPSR is changed from 0x8 to 0x20 to not use bit 3 of mux.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
---
 arch/arm/include/asm/imx-common/iomux-v3.h | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h 
b/arch/arm/include/asm/imx-common/iomux-v3.h
index e0f8350..b3af696 100644
--- a/arch/arm/include/asm/imx-common/iomux-v3.h
+++ b/arch/arm/include/asm/imx-common/iomux-v3.h
@@ -39,10 +39,9 @@
  * MUX_CTRL_OFS:   0..11 (12)
  * PAD_CTRL_OFS:  12..23 (12)
  * SEL_INPUT_OFS: 24..35 (12)
- * MUX_MODE + SION:   36..40  (5)
- * PAD_CTRL + NO_PAD_CTRL: 41..58 (18)
- * SEL_INP:   59..62  (4)
- * reserved:63(1)
+ * MUX_MODE + SION + LPSR: 36..41  (6)
+ * PAD_CTRL + NO_PAD_CTRL: 42..59 (18)
+ * SEL_INP:   60..63  (4)
 */
 
 typedef u64 iomux_v3_cfg_t;
@@ -57,10 +56,10 @@ typedef u64 iomux_v3_cfg_t;
MUX_SEL_INPUT_OFS_SHIFT)
 
 #define MUX_MODE_SHIFT 36
-#define MUX_MODE_MASK  ((iomux_v3_cfg_t)0x1f << MUX_MODE_SHIFT)
-#define MUX_PAD_CTRL_SHIFT 41
+#define MUX_MODE_MASK  ((iomux_v3_cfg_t)0x3f << MUX_MODE_SHIFT)
+#define MUX_PAD_CTRL_SHIFT 42
 #define MUX_PAD_CTRL_MASK  ((iomux_v3_cfg_t)0x3 << MUX_PAD_CTRL_SHIFT)
-#define MUX_SEL_INPUT_SHIFT59
+#define MUX_SEL_INPUT_SHIFT60
 #define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT)
 
 #define MUX_MODE_SION  ((iomux_v3_cfg_t)IOMUX_CONFIG_SION << \
@@ -85,7 +84,7 @@ typedef u64 iomux_v3_cfg_t;
 
 #define NO_PAD_CTRL(1 << 17)
 
-#define IOMUX_CONFIG_LPSR   0x8
+#define IOMUX_CONFIG_LPSR   0x20
 #define MUX_MODE_LPSR   ((iomux_v3_cfg_t)IOMUX_CONFIG_LPSR << \
MUX_MODE_SHIFT)
 #ifdef CONFIG_MX7
-- 
2.6.2

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


Re: [U-Boot] [U-Boot, v3, 30/45] Convert CONFIG_SPL_NAND_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:48PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 26/45] Convert CONFIG_SPL_MMC_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:44PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 25/45] Convert CONFIG_SPL_LIBGENERIC_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:43PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 27/45] Convert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:45PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 23/45] Convert CONFIG_SPL_LIBCOMMON_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:41PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 24/45] Convert CONFIG_SPL_LIBDISK_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:42PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 21/45] Convert CONFIG_SPL_GPIO_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:39PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 41/45] Convert CONFIG_SPL_USBETH_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:59PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 42/45] Convert CONFIG_SPL_USB_HOST_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:19:00PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 38/45] Convert CONFIG_SPL_SERIAL_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:56PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 37/45] Convert CONFIG_SPL_SATA_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:55PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 40/45] Convert CONFIG_SPL_SPI_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:58PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 39/45] Convert CONFIG_SPL_SPI_FLASH_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:57PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] Repair image-fit: switch ENOLINK to ENOENT

2016-09-18 Thread Tom Rini
On Sun, Sep 18, 2016 at 03:27:31PM +0200, Marek Vasut wrote:

> This patch broke booting of any fitImage-wrapped kernel images due
> to replacement of ENOLINK with ENOENT without checking where the
> ENOLINK return value is being tested for. Adjust the tests as well
> to repair the breakage.
> 
> Signed-off-by: Marek Vasut 
> Cc: Jonathan Gray 
> Cc: Paul Burton 
> Cc: Tom Rini 

Fixes: bac17b78dace ("image-fit: switch ENOLINK to ENOENT")
Reviewed-by: Tom Rini 

-- 
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] [GIT PULL] Xilinx changes

2016-09-18 Thread Tom Rini
On Wed, Sep 14, 2016 at 01:14:37PM +0200, Michal Simek wrote:

> Hi Tom,
> 
> here are patches I have collected for improving Xilinx support.
> I have also patches regarding moving IDENT_STRING to Kconfig
> but they need to be rework because simple adding it to Kconfig
> won't work. All boards need to be converted in this patch.

OK, pass it back over to me in patchwork and I'll take care of it.

> 
> Also I have pending patches around moving ceva driver to DM
> which need to be reviewed by Simon.
> 
> Thanks,
> Michal
> 
> 
> The following changes since commit 8cbb389bb3da80cbf8911f8386cbff92c6a78afe:
> 
>   Prepare v2016.09 (2016-09-12 10:05:51 -0400)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-microblaze.git master
> 
> for you to fetch changes up to 463265791c51dbdf16c0be763ff5bcd148964837:
> 
>   ARM64: zynqmp: Enable CONFIG_AHCI via Kconfig (2016-09-14 13:11:04 +0200)
> 

NAK.  And yes, I know the PR came before the SPL series went in along
with the series to reject new Kconfig options, sorry.  But on top of
tree:
   aarch64:  +   xilinx_zynqmp_zc1751_xm019_dc5
+(xilinx_zynqmp_zc1751_xm019_dc5) Error: You must add new CONFIG options using 
Kconfig
+(xilinx_zynqmp_zc1751_xm019_dc5) The following new ad-hoc CONFIG options were 
detected:
+(xilinx_zynqmp_zc1751_xm019_dc5) CONFIG_ARM_SMC
+(xilinx_zynqmp_zc1751_xm019_dc5) CONFIG_FPGA_ZYNQMPPL
+(xilinx_zynqmp_zc1751_xm019_dc5) 
+(xilinx_zynqmp_zc1751_xm019_dc5) Please add these via Kconfig instead. Find a 
suitable Kconfig
+(xilinx_zynqmp_zc1751_xm019_dc5) file and add a 'config' or 'menuconfig' 
option.
+(xilinx_zynqmp_zc1751_xm019_dc5) make[1]: *** [no_new_adhoc_configs_check] 
Error 1
+(xilinx_zynqmp_zc1751_xm019_dc5) make: *** [sub-make] Error 2

-- 
Tom


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


[U-Boot] [PATCH 19/27] spl: Convert spl_spi_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code. Also set up the sunxi function.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c| 4 
 common/spl/spl_spi.c| 4 +++-
 drivers/mtd/spi/sunxi_spi_spl.c | 4 +++-
 include/spl.h   | 3 ---
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 5dd2548..1d4f258 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
-   case BOOT_DEVICE_SPI:
-   return spl_spi_load_image();
-#endif
 #ifdef CONFIG_SPL_ETH_SUPPORT
case BOOT_DEVICE_CPGMAC:
 #ifdef CONFIG_SPL_ETH_DEVICE
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index e4cc0d0..b9294f2 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -65,7 +65,7 @@ static ulong spl_spi_fit_read(struct spl_load_info *load, 
ulong sector,
  * configured and available since this code loads the main U-Boot image
  * from SPI into SDRAM and starts it from there.
  */
-int spl_spi_load_image(struct spl_boot_device *bootdev)
+static int spl_spi_load_image(struct spl_boot_device *bootdev)
 {
int err = 0;
struct spi_flash *flash;
@@ -121,3 +121,5 @@ int spl_spi_load_image(struct spl_boot_device *bootdev)
 
return err;
 }
+/* Use priorty 1 so that boards can override this */
+SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_SPI, spl_spi_load_image);
diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c
index 767959c..70d6d15 100644
--- a/drivers/mtd/spi/sunxi_spi_spl.c
+++ b/drivers/mtd/spi/sunxi_spi_spl.c
@@ -262,7 +262,7 @@ static void spi0_read_data(void *buf, u32 addr, u32 len)
 
 /*/
 
-int spl_spi_load_image(struct spl_boot_device *bootdev)
+static int spl_spi_load_image(struct spl_boot_device *bootdev)
 {
int err;
struct image_header *header;
@@ -281,3 +281,5 @@ int spl_spi_load_image(struct spl_boot_device *bootdev)
spi0_deinit();
return 0;
 }
+/* Use priorty 0 to override the default if it happens to be linked in */
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_SPI, spl_spi_load_image);
diff --git a/include/spl.h b/include/spl.h
index 279896d..29dcf5b 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -181,9 +181,6 @@ struct spl_image_loader {
.load_image = __method, \
}
 
-/* SPI SPL functions */
-int spl_spi_load_image(struct spl_boot_device *bootdev);
-
 /* Ethernet SPL functions */
 int spl_net_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 24/27] spl: Update ext functions to take an spl_image parameter

2016-09-18 Thread Simon Glass
Update the ext loader to avoid using the spl_image global variable.

Signed-off-by: Simon Glass 
---

 common/spl/spl_ext.c| 21 -
 common/spl/spl_mmc.c|  4 ++--
 drivers/mtd/spi/sunxi_spi_spl.c |  9 +
 include/spl.h   |  6 --
 4 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index e5af24e..b93e1ea 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -10,9 +10,9 @@
 #include 
 
 #ifdef CONFIG_SPL_EXT_SUPPORT
-int spl_load_image_ext(struct blk_desc *block_dev,
-   int partition,
-   const char *filename)
+int spl_load_image_ext(struct spl_image_info *spl_image,
+  struct blk_desc *block_dev, int partition,
+  const char *filename)
 {
s32 err;
struct image_header *header;
@@ -48,13 +48,13 @@ int spl_load_image_ext(struct blk_desc *block_dev,
goto end;
}
 
-   err = spl_parse_image_header(_image, header);
+   err = spl_parse_image_header(spl_image, header);
if (err < 0) {
puts("spl: ext: failed to parse image header\n");
goto end;
}
 
-   err = ext4fs_read((char *)spl_image.load_addr, filelen, );
+   err = ext4fs_read((char *)spl_image->load_addr, filelen, );
 
 end:
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
@@ -67,7 +67,8 @@ end:
 }
 
 #ifdef CONFIG_SPL_OS_BOOT
-int spl_load_image_ext_os(struct blk_desc *block_dev, int partition)
+int spl_load_image_ext_os(struct spl_image_info *spl_image,
+ struct blk_desc *block_dev, int partition)
 {
int err;
__maybe_unused loff_t filelen, actlen;
@@ -104,7 +105,8 @@ int spl_load_image_ext_os(struct blk_desc *block_dev, int 
partition)
}
file = getenv("falcon_image_file");
if (file) {
-   err = spl_load_image_ext(block_dev, partition, file);
+   err = spl_load_image_ext(spl_image, block_dev,
+partition, file);
if (err != 0) {
puts("spl: falling back to default\n");
goto defaults;
@@ -134,11 +136,12 @@ defaults:
return -1;
}
 
-   return spl_load_image_ext(block_dev, partition,
+   return spl_load_image_ext(spl_image, block_dev, partition,
CONFIG_SPL_FS_LOAD_KERNEL_NAME);
 }
 #else
-int spl_load_image_ext_os(struct blk_desc *block_dev, int partition)
+int spl_load_image_ext_os(struct spl_image_info *spl_image,
+ struct blk_desc *block_dev, int partition)
 {
return -ENOSYS;
 }
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 6536e66..5f5d9d0 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -245,13 +245,13 @@ static int spl_mmc_do_fs_boot(struct spl_image_info 
*spl_image, struct mmc *mmc)
 #endif
 #ifdef CONFIG_SPL_EXT_SUPPORT
if (!spl_start_uboot()) {
-   err = spl_load_image_ext_os(>block_dev,
+   err = spl_load_image_ext_os(spl_image, >block_dev,
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
if (!err)
return err;
}
 #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
-   err = spl_load_image_ext(>block_dev,
+   err = spl_load_image_ext(spl_image, >block_dev,
 CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
if (!err)
diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c
index 70d6d15..67c7edd 100644
--- a/drivers/mtd/spi/sunxi_spi_spl.c
+++ b/drivers/mtd/spi/sunxi_spi_spl.c
@@ -262,7 +262,8 @@ static void spi0_read_data(void *buf, u32 addr, u32 len)
 
 /*/
 
-static int spl_spi_load_image(struct spl_boot_device *bootdev)
+static int spl_spi_load_image(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev)
 {
int err;
struct image_header *header;
@@ -271,12 +272,12 @@ static int spl_spi_load_image(struct spl_boot_device 
*bootdev)
spi0_init();
 
spi0_read_data((void *)header, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40);
-   err = spl_parse_image_header(_image, header);
+   err = spl_parse_image_header(spl_image, header);
if (err)
return err;
 
-   spi0_read_data((void *)spl_image.load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS,
-  spl_image.size);
+   spi0_read_data((void *)spl_image->load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS,
+  spl_image->size);
 
spi0_deinit();
return 0;
diff --git 

[U-Boot] [PATCH 23/27] spl: Pass spl_image as a parameter to load_image() methods

2016-09-18 Thread Simon Glass
Rather than having a global variable, pass the spl_image as a parameter.
This avoids BSS use, and makes it clearer what the function is actually
doing.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-sunxi/board.c  |  3 +-
 arch/arm/mach-uniphier/boot-mode/spl_board.c |  9 ++---
 arch/sandbox/cpu/spl.c   |  3 +-
 common/spl/spl.c |  7 ++--
 common/spl/spl_mmc.c | 54 +++-
 common/spl/spl_nand.c| 33 +
 common/spl/spl_net.c | 15 
 common/spl/spl_nor.c | 17 -
 common/spl/spl_onenand.c |  7 ++--
 common/spl/spl_sata.c|  3 +-
 common/spl/spl_spi.c | 18 +-
 common/spl/spl_ubi.c |  7 ++--
 common/spl/spl_usb.c |  3 +-
 common/spl/spl_ymodem.c  |  9 ++---
 include/spl.h|  4 ++-
 15 files changed, 110 insertions(+), 82 deletions(-)

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 22f3e3c..7713813 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -134,7 +134,8 @@ static int gpio_init(void)
 }
 
 #ifdef CONFIG_SPL_BUILD
-static int spl_board_load_image(struct spl_boot_device *bootdev)
+static int spl_board_load_image(struct spl_image_info *spl_image,
+   struct spl_boot_device *bootdev)
 {
debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr);
return_to_fel(fel_stash.sp, fel_stash.lr);
diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c 
b/arch/arm/mach-uniphier/boot-mode/spl_board.c
index e2b202e..854ab05 100644
--- a/arch/arm/mach-uniphier/boot-mode/spl_board.c
+++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c
@@ -65,7 +65,8 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32),
return 0;
 }
 
-static int spl_board_load_image(struct spl_boot_device *bootdev)
+static int spl_board_load_image(struct spl_image_info *spl_image,
+   struct spl_boot_device *bootdev)
 {
int (*send_cmd)(u32 cmd, u32 arg);
int (*card_blockaddr)(u32 rca);
@@ -113,12 +114,12 @@ static int spl_board_load_image(struct spl_boot_device 
*bootdev)
return ret;
}
 
-   ret = spl_parse_image_header(_image, (void *)CONFIG_SYS_TEXT_BASE);
+   ret = spl_parse_image_header(spl_image, (void *)CONFIG_SYS_TEXT_BASE);
if (ret)
return ret;
 
-   ret = (*load_image)(dev_addr, spl_image.load_addr,
-   spl_image.size / 512);
+   ret = (*load_image)(dev_addr, spl_image->load_addr,
+   spl_image->size / 512);
if (ret) {
printf("failed to load image\n");
return ret;
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 2c45354..1ad7fb6 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -38,7 +38,8 @@ void spl_board_announce_boot_device(void)
printf("%s\n", fname);
 }
 
-static int spl_board_load_image(struct spl_boot_device *bootdev)
+static int spl_board_load_image(struct spl_image_info *spl_image,
+   struct spl_boot_device *bootdev)
 {
char fname[256];
int ret;
diff --git a/common/spl/spl.c b/common/spl/spl.c
index e0d0c9e..e295b2e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -185,7 +185,8 @@ static ulong spl_ram_load_read(struct spl_load_info *load, 
ulong sector,
return count;
 }
 
-static int spl_ram_load_image(struct spl_boot_device *bootdev)
+static int spl_ram_load_image(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev)
 {
struct image_header *header;
 
@@ -210,7 +211,7 @@ static int spl_ram_load_image(struct spl_boot_device 
*bootdev)
header = (struct image_header *)
(CONFIG_SYS_TEXT_BASE - sizeof(struct image_header));
 
-   spl_parse_image_header(_image, header);
+   spl_parse_image_header(spl_image, header);
}
 
return 0;
@@ -370,7 +371,7 @@ static int spl_load_image(u32 boot_device)
bootdev.boot_device = boot_device;
bootdev.boot_device_name = NULL;
if (loader)
-   return loader->load_image();
+   return loader->load_image(_image, );
 
 #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
puts("SPL: Unsupported Boot Device!\n");
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 5e8172e..6536e66 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -18,26 +18,26 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int mmc_load_legacy(struct mmc *mmc, ulong sector,
-  

[U-Boot] [PATCH 21/27] spl: Convert spl_net_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code. We need two variants - one for BOOT_DEVICE_CPGMAC and one for
BOOT_DEVICE_USBETH.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 12 
 common/spl/spl_net.c | 26 +-
 include/spl.h|  3 ---
 3 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 1d4f258..c5b5572 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,18 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_ETH_SUPPORT
-   case BOOT_DEVICE_CPGMAC:
-#ifdef CONFIG_SPL_ETH_DEVICE
-   bootdev.boot_device_name = CONFIG_SPL_ETH_DEVICE;
-#endif
-   return spl_net_load_image();
-#endif
-#ifdef CONFIG_SPL_USBETH_SUPPORT
-   case BOOT_DEVICE_USBETH:
-   bootdev.boot_device_name = "usb_ether";
-   return spl_net_load_image();
-#endif
 #ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
case BOOT_DEVICE_BOARD:
return spl_board_load_image();
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 730f88e..0cbd995 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -14,7 +14,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int spl_net_load_image(struct spl_boot_device *bootdev)
+#if defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)
+static int spl_net_load_image(struct spl_boot_device *bootdev)
 {
int rv;
 
@@ -37,3 +38,26 @@ int spl_net_load_image(struct spl_boot_device *bootdev)
return spl_parse_image_header(_image,
  (struct image_header *)load_addr);
 }
+#endif
+
+#ifdef CONFIG_SPL_ETH_SUPPORT
+int spl_net_load_image_cpgmac(struct spl_boot_device *bootdev)
+{
+#ifdef CONFIG_SPL_ETH_DEVICE
+   bootdev->boot_device_name = CONFIG_SPL_ETH_DEVICE;
+#endif
+
+   return spl_net_load_image(bootdev);
+}
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_CPGMAC, spl_net_load_image_cpgmac);
+#endif
+
+#ifdef CONFIG_SPL_USBETH_SUPPORT
+int spl_net_load_image_usb(struct spl_boot_device *bootdev)
+{
+   bootdev->boot_device_name = "usb_ether";
+
+   return spl_net_load_image(bootdev);
+}
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USBETH, spl_net_load_image_usb);
+#endif
diff --git a/include/spl.h b/include/spl.h
index 29dcf5b..24a6ec4 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -181,9 +181,6 @@ struct spl_image_loader {
.load_image = __method, \
}
 
-/* Ethernet SPL functions */
-int spl_net_load_image(struct spl_boot_device *bootdev);
-
 /* SPL FAT image functions */
 int spl_load_image_fat(struct blk_desc *block_dev, int partition,
   const char *filename);
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 25/27] spl: Update fat functions to take an spl_image parameter

2016-09-18 Thread Simon Glass
Update the fat loader to avoid using the spl_image global variable.

Signed-off-by: Simon Glass 
---

 common/spl/spl_fat.c  | 21 -
 common/spl/spl_mmc.c  |  4 ++--
 common/spl/spl_sata.c | 11 +++
 common/spl/spl_usb.c  | 13 -
 include/spl.h |  6 --
 5 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 68702a2..e2bb000 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -54,9 +54,9 @@ static ulong spl_fit_read(struct spl_load_info *load, ulong 
file_offset,
return actread;
 }
 
-int spl_load_image_fat(struct blk_desc *block_dev,
-   int partition,
-   const char *filename)
+int spl_load_image_fat(struct spl_image_info *spl_image,
+  struct blk_desc *block_dev, int partition,
+  const char *filename)
 {
int err;
struct image_header *header;
@@ -84,12 +84,12 @@ int spl_load_image_fat(struct blk_desc *block_dev,
 
return spl_load_simple_fit(, 0, header);
} else {
-   err = spl_parse_image_header(_image, header);
+   err = spl_parse_image_header(spl_image, header);
if (err)
goto end;
 
err = file_fat_read(filename,
-   (u8 *)(uintptr_t)spl_image.load_addr, 0);
+   (u8 *)(uintptr_t)spl_image->load_addr, 0);
}
 
 end:
@@ -103,7 +103,8 @@ end:
 }
 
 #ifdef CONFIG_SPL_OS_BOOT
-int spl_load_image_fat_os(struct blk_desc *block_dev, int partition)
+int spl_load_image_fat_os(struct spl_image_info *spl_image,
+ struct blk_desc *block_dev, int partition)
 {
int err;
__maybe_unused char *file;
@@ -123,7 +124,8 @@ int spl_load_image_fat_os(struct blk_desc *block_dev, int 
partition)
}
file = getenv("falcon_image_file");
if (file) {
-   err = spl_load_image_fat(block_dev, partition, file);
+   err = spl_load_image_fat(spl_image, block_dev,
+partition, file);
if (err != 0) {
puts("spl: falling back to default\n");
goto defaults;
@@ -148,11 +150,12 @@ defaults:
return -1;
}
 
-   return spl_load_image_fat(block_dev, partition,
+   return spl_load_image_fat(spl_image, block_dev, partition,
CONFIG_SPL_FS_LOAD_KERNEL_NAME);
 }
 #else
-int spl_load_image_fat_os(struct blk_desc *block_dev, int partition)
+int spl_load_image_fat_os(struct spl_image_info *spl_image,
+ struct blk_desc *block_dev, int partition)
 {
return -ENOSYS;
 }
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 5f5d9d0..16a6b49 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -230,13 +230,13 @@ static int spl_mmc_do_fs_boot(struct spl_image_info 
*spl_image, struct mmc *mmc)
 
 #ifdef CONFIG_SPL_FAT_SUPPORT
if (!spl_start_uboot()) {
-   err = spl_load_image_fat_os(mmc_get_blk_desc(mmc),
+   err = spl_load_image_fat_os(spl_image, mmc_get_blk_desc(mmc),
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
if (!err)
return err;
}
 #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
-   err = spl_load_image_fat(mmc_get_blk_desc(mmc),
+   err = spl_load_image_fat(spl_image, mmc_get_blk_desc(mmc),
 CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
if (!err)
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 19b5ba5..a3c07cd 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -41,12 +41,15 @@ static int spl_sata_load_image(struct spl_image_info 
*spl_image,
}
 
 #ifdef CONFIG_SPL_OS_BOOT
-   if (spl_start_uboot() || spl_load_image_fat_os(stor_dev,
-   
CONFIG_SYS_SATA_FAT_BOOT_PARTITION))
+   if (spl_start_uboot() ||
+   spl_load_image_fat_os(spl_image, stor_dev,
+ CONFIG_SYS_SATA_FAT_BOOT_PARTITION))
 #endif
-   err = spl_load_image_fat(stor_dev,
-   CONFIG_SYS_SATA_FAT_BOOT_PARTITION,
+   {
+   err = spl_load_image_fat(spl_image, stor_dev,
+   CONFIG_SYS_SATA_FAT_BOOT_PARTITION,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
+   }
if (err) {
puts("Error loading sata device\n");
return err;
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index 

[U-Boot] [PATCH 27/27] spl: Make spl_boot_list a local variable

2016-09-18 Thread Simon Glass
There is no need for this to be in the BSS region. By moving it we can delay
use of BSS in SPL. This is useful for machines where the BSS region is not
in writeable space. On 64-bit x86, SPL runs from SPI flash and it is easier
to eliminate BSS use than link SPL to run with BSS at a particular
cache-as-RAM (CAR) address.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 23 +++
 include/spl.h|  2 --
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 0a9c632..1e0cf86 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -29,7 +29,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #endif
 
 u32 *boot_params_ptr = NULL;
-struct spl_image_info spl_image;
 
 /* Define board data structure */
 static bd_t bdata __attribute__ ((section(".data")));
@@ -255,14 +254,6 @@ int spl_init(void)
 #define BOOT_DEVICE_NONE 0xdeadbeef
 #endif
 
-static u32 spl_boot_list[] = {
-   BOOT_DEVICE_NONE,
-   BOOT_DEVICE_NONE,
-   BOOT_DEVICE_NONE,
-   BOOT_DEVICE_NONE,
-   BOOT_DEVICE_NONE,
-};
-
 __weak void board_boot_order(u32 *spl_boot_list)
 {
spl_boot_list[0] = spl_boot_device();
@@ -363,7 +354,7 @@ static struct spl_image_loader *spL_find_loader(uint 
boot_device)
return NULL;
 }
 
-static int spl_load_image(u32 boot_device)
+static int spl_load_image(struct spl_image_info *spl_image, u32 boot_device)
 {
struct spl_boot_device bootdev;
struct spl_image_loader *loader = spL_find_loader(boot_device);
@@ -371,7 +362,7 @@ static int spl_load_image(u32 boot_device)
bootdev.boot_device = boot_device;
bootdev.boot_device_name = NULL;
if (loader)
-   return loader->load_image(_image, );
+   return loader->load_image(spl_image, );
 
 #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
puts("SPL: Unsupported Boot Device!\n");
@@ -381,6 +372,14 @@ static int spl_load_image(u32 boot_device)
 
 void board_init_r(gd_t *dummy1, ulong dummy2)
 {
+   u32 spl_boot_list[] = {
+   BOOT_DEVICE_NONE,
+   BOOT_DEVICE_NONE,
+   BOOT_DEVICE_NONE,
+   BOOT_DEVICE_NONE,
+   BOOT_DEVICE_NONE,
+   };
+   struct spl_image_info spl_image;
int i;
 
debug(">>spl:board_init_r()\n");
@@ -410,7 +409,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
for (i = 0; i < ARRAY_SIZE(spl_boot_list) &&
spl_boot_list[i] != BOOT_DEVICE_NONE; i++) {
announce_boot_device(spl_boot_list[i]);
-   if (!spl_load_image(spl_boot_list[i]))
+   if (!spl_load_image(_image, spl_boot_list[i]))
break;
}
 
diff --git a/include/spl.h b/include/spl.h
index 7514d8e..b51ba90 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -63,8 +63,6 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
 
 #define SPL_COPY_PAYLOAD_ONLY  1
 
-extern struct spl_image_info spl_image;
-
 /* SPL common functions */
 void preloader_console_init(void);
 u32 spl_boot_device(void);
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 20/27] spi: Move freescale-specific code into a private header

2016-09-18 Thread Simon Glass
At present there are two SPI functions only used by freescale which are
defined in the spi_flash.h header. One function name matches an existing
generic SPL function.

Move these into a private header to avoid confusion.

Arcturus looks like it does not actually support SPI, so drop the SPI code
from that board.

Signed-off-by: Simon Glass 
---

 board/Arcturus/ucp1020/spl.c   |  2 --
 board/freescale/common/spl.h   | 13 +
 board/freescale/p1010rdb/spl.c |  3 ++-
 board/freescale/p1022ds/spl.c  |  3 ++-
 board/freescale/p1_p2_rdb_pc/spl.c |  3 ++-
 board/freescale/t102xqds/spl.c |  7 ---
 board/freescale/t102xrdb/spl.c |  7 ---
 board/freescale/t104xrdb/spl.c |  7 ---
 board/freescale/t208xqds/spl.c |  7 ---
 board/freescale/t208xrdb/spl.c |  7 ---
 drivers/mtd/spi/fsl_espi_spl.c |  4 ++--
 include/spi_flash.h|  3 ---
 12 files changed, 41 insertions(+), 25 deletions(-)
 create mode 100644 board/freescale/common/spl.h

diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index 9315bb7..9c19c87 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -119,8 +119,6 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
-#elif defined(CONFIG_SPL_SPI_BOOT)
-   spi_boot();
 #elif defined(CONFIG_SPL_NAND_BOOT)
nand_boot();
 #endif
diff --git a/board/freescale/common/spl.h b/board/freescale/common/spl.h
new file mode 100644
index 000..88c987e
--- /dev/null
+++ b/board/freescale/common/spl.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2016 Google, Inc
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __FREESCALE_BOARD_SPL_H
+#define __FREESCALE_BOARD_SPL_H
+
+void fsl_spi_spl_load_image(uint32_t offs, unsigned int size, void *vdst);
+void fsl_spi_boot(void) __noreturn;
+
+#endif
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index f858408..9844194 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -103,7 +104,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
 #elif defined(CONFIG_SPL_SPI_BOOT)
-   spi_boot();
+   fsl_spi_boot();
 #elif defined(CONFIG_SPL_NAND_BOOT)
nand_boot();
 #endif
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 04db767..6a5fe74 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -14,6 +14,7 @@
 #include "../common/ngpixis.h"
 #include 
 #include 
+#include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -120,7 +121,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
 #elif defined(CONFIG_SPL_SPI_BOOT)
-   spi_boot();
+   fsl_spi_boot();
 #elif defined(CONFIG_SPL_NAND_BOOT)
nand_boot();
 #endif
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c 
b/board/freescale/p1_p2_rdb_pc/spl.c
index 76a3cf4..9e8f359 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -117,7 +118,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
 #elif defined(CONFIG_SPL_SPI_BOOT)
-   spi_boot();
+   fsl_spi_boot();
 #elif defined(CONFIG_SPL_NAND_BOOT)
nand_boot();
 #endif
diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c
index d59d343..61bfb29 100644
--- a/board/freescale/t102xqds/spl.c
+++ b/board/freescale/t102xqds/spl.c
@@ -14,6 +14,7 @@
 #include 
 #include "../common/qixis.h"
 #include "t102xqds_qixis.h"
+#include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -132,8 +133,8 @@ void board_init_r(gd_t *gd, ulong dest_addr)
   (uchar *)CONFIG_ENV_ADDR);
 #endif
 #ifdef CONFIG_SPL_SPI_BOOT
-   spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
-  (uchar *)CONFIG_ENV_ADDR);
+   fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
+  (uchar *)CONFIG_ENV_ADDR);
 #endif
 
gd->env_addr  = (ulong)(CONFIG_ENV_ADDR);
@@ -146,7 +147,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
 #elif defined(CONFIG_SPL_SPI_BOOT)
-   spi_boot();
+   fsl_spi_boot();
 #elif defined(CONFIG_SPL_NAND_BOOT)
nand_boot();
 #endif
diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c
index bd3cbbf..6d8866e 100644
--- a/board/freescale/t102xrdb/spl.c
+++ b/board/freescale/t102xrdb/spl.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include "../common/sleep.h"
+#include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -119,8 +120,8 @@ void board_init_r(gd_t *gd, ulong 

[U-Boot] [PATCH] test/py/tests/test_vboot.py: Add check that we boot the image

2016-09-18 Thread Tom Rini
Make sure that when we're telling bootm to boot an image, and we expect
the image to boot we get the output from sandbox that we attempted to
run Linux and that U-Boot completed its job.

Cc: Simon Glass 
Cc: Stephen Warren 
Signed-off-by: Tom Rini 
---
 test/py/tests/test_vboot.py | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index 021892bb3dac..6e62820743fe 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -53,7 +53,7 @@ def test_vboot(u_boot_console):
 util.run_and_log(cons, 'dtc %s %s%s -O dtb '
  '-o %s%s' % (dtc_args, datadir, dts, tmpdir, dtb))
 
-def run_bootm(sha_algo, test_type, expect_string):
+def run_bootm(sha_algo, test_type, expect_string, boots):
 """Run a 'bootm' command U-Boot.
 
 This always starts a fresh U-Boot instance since the device tree may
@@ -64,6 +64,8 @@ def test_vboot(u_boot_console):
 expect_string: A string which is expected in the output.
 sha_algo: Either 'sha1' or 'sha256', to select the algorithm to
 use.
+boots: A boolean that is True if Linux should boot and False if
+we are expected to not boot
 """
 cons.restart_uboot()
 with cons.log.section('Verified boot %s %s' % (sha_algo, test_type)):
@@ -72,6 +74,8 @@ def test_vboot(u_boot_console):
 'fdt addr 100',
 'bootm 100'])
 assert(expect_string in ''.join(output))
+if boots:
+assert('sandbox: continuing, as we cannot run' in ''.join(output))
 
 def make_fit(its):
 """Make a new FIT from the .its source file.
@@ -117,22 +121,22 @@ def test_vboot(u_boot_console):
 # Build the FIT, but don't sign anything yet
 cons.log.action('%s: Test FIT with signed images' % sha_algo)
 make_fit('sign-images-%s.its' % sha_algo)
-run_bootm(sha_algo, 'unsigned images', 'dev-')
+run_bootm(sha_algo, 'unsigned images', 'dev-', True)
 
 # Sign images with our dev keys
 sign_fit(sha_algo)
-run_bootm(sha_algo, 'signed images', 'dev+')
+run_bootm(sha_algo, 'signed images', 'dev+', True)
 
 # Create a fresh .dtb without the public keys
 dtc('sandbox-u-boot.dts')
 
 cons.log.action('%s: Test FIT with signed configuration' % sha_algo)
 make_fit('sign-configs-%s.its' % sha_algo)
-run_bootm(sha_algo, 'unsigned config', '%s+ OK' % sha_algo)
+run_bootm(sha_algo, 'unsigned config', '%s+ OK' % sha_algo, True)
 
 # Sign images with our dev keys
 sign_fit(sha_algo)
-run_bootm(sha_algo, 'signed config', 'dev+')
+run_bootm(sha_algo, 'signed config', 'dev+', True)
 
 cons.log.action('%s: Check signed config on the host' % sha_algo)
 
@@ -149,7 +153,7 @@ def test_vboot(u_boot_console):
 util.run_and_log(cons, 'fdtput -t bx %s %s value %s' %
  (fit, sig_node, sig))
 
-run_bootm(sha_algo, 'Signed config with bad hash', 'Bad Data Hash')
+run_bootm(sha_algo, 'Signed config with bad hash', 'Bad Data Hash', 
False)
 
 cons.log.action('%s: Check bad config on the host' % sha_algo)
 util.run_and_log_expect_exception(cons, [fit_check_sign, '-f', fit,
-- 
1.9.1

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


[U-Boot] Please pull u-boot-sunxi master

2016-09-18 Thread Hans de Goede

Hi Tom,

Here is the first sunxi pull-req for v2016.11.

This consists of a couple of small bug-fixes /
defconfig improvements + 1 new board.

The following changes since commit 8cbb389bb3da80cbf8911f8386cbff92c6a78afe:

  Prepare v2016.09 (2016-09-12 10:05:51 -0400)

are available in the git repository at:

  http://git.denx.de/u-boot-sunxi.git master

for you to fetch changes up to ca7628a91136364235de8fb4bd699944b981c504:

  sunxi: Enable USB gadget support for Sinlinx SinA33 (2016-09-18 14:39:16 
+0200)


Chen-Yu Tsai (4):
  sunxi: musb: Power off OTG port VBUS when disabled
  sunxi: Add mmc0 card detect pin for Sinlinx SinA33
  sunxi: Enable USB host support for Sinlinx SinA33
  sunxi: Enable USB gadget support for Sinlinx SinA33

Hans de Goede (2):
  sunxi: axp2xx: disable ldoio0/1 at boot
  sunxi: musb: Re-init musb controller on repeated probe calls

Jelle van der Waa (1):
  sunxi: Add defconfig and dts for the NanoPi NEO

 arch/arm/dts/Makefile |   3 +-
 arch/arm/dts/sun8i-h3-nanopi-neo.dts  | 125 ++
 arch/arm/include/asm/arch-sunxi/usb_phy.h |   1 -
 arch/arm/mach-sunxi/usb_phy.c |   7 --
 board/sunxi/MAINTAINERS   |   5 ++
 configs/Sinlinx_SinA33_defconfig  |  10 +++
 configs/nanopi_neo_defconfig  |  16 
 drivers/power/axp209.c|  16 
 drivers/power/axp221.c|  12 +++
 drivers/usb/musb-new/sunxi.c  |  48 ++--
 10 files changed, 209 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi-neo.dts
 create mode 100644 configs/nanopi_neo_defconfig

Regards,

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


Re: [U-Boot] [U-Boot, v3, 12/45] spear: Use upper case for CONFIG options

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:30PM -0600, Simon Glass wrote:

> There are a few options which use lower case. We should use upper case for
> all CONFIG options.
> 
> Signed-off-by: Simon Glass 

After adding in:

diff --git a/include/configs/spear3xx_evb.h b/include/configs/spear3xx_evb.h
index 5ceaadc45e24..dd73a4d1bd97 100644
--- a/include/configs/spear3xx_evb.h
+++ b/include/configs/spear3xx_evb.h
@@ -20,11 +20,11 @@
 #define CONFIG_SPEAR3XX
 #endif
 
-#if defined(CONFIG_usbtty)
+#if defined(CONFIG_USBTTY)
 #define CONFIG_SPEAR_USBTTY
 #endif
 
-#if defined(CONFIG_nand)
+#if defined(CONFIG_NAND)
 #define CONFIG_ENV_IS_IN_NAND
 #else
 #define CONFIG_ENV_IS_IN_FLASH

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v4, 08/45] Kconfig: spl: Add SPL support options to Kconfig

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 07:05:23AM -0600, Simon Glass wrote:

> There are a lot of SPL options in U-Boot to enable various features and
> drivers. Currently these do not use Kconfig. Add them to Kconfig along
> with suitable help, and drop them from the README.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 09/45] Kconfig: tpl: Add some TPL support options to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:27PM -0600, Simon Glass wrote:

> Some of the SPL options have TPL equivalents. Add these to Kconfig so that
> we can convert these options over to work from Kconfig.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 10/45] Move existing use of CONFIG_SPL_DM to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:28PM -0600, Simon Glass wrote:

> A few boards define this in a header file which is incorrect. It means that
> Kconfig options that rely on this cannot be used. Move it.
> 
> Note that quite a few boards defined this options but do not appear to
> actually use SPL:
> 
>   BSC9132QDS_NOR_DDRCLK100_SECURE
>   BSC9132QDS_NOR_DDRCLK133_SECURE
>   BSC9132QDS_SDCARD_DDRCLK100_SECURE
>   BSC9132QDS_SDCARD_DDRCLK133_SECURE
>   BSC9132QDS_SPIFLASH_DDRCLK100_SECURE
>   BSC9132QDS_SPIFLASH_DDRCLK133_SECURE
>   C29XPCIE_NOR_SECBOOT
>   P1010RDB-PA_36BIT_NAND_SECBOOT
>   P1010RDB-PA_36BIT_SPIFLASH_SECBOOT
>   P1010RDB-PA_NAND_SECBOOT
>   P1010RDB-PA_NOR_SECBOOT
>   P1010RDB-PB_36BIT_NOR_SECBOOT
>   P1010RDB-PB_36BIT_SPIFLASH_SECBOOT
>   P1010RDB-PB_NAND_SECBOOT
>   P1010RDB-PB_NOR_SECBOOT
>   P3041DS_SECURE_BOOT
>   P4080DS_SECURE_BOOT
>   P5020DS_NAND_SECURE_BOOT
>   P5040DS_SECURE_BOOT
>   T1023RDB_SECURE_BOOT
>   T1024QDS_DDR4_SECURE_BOOT
>   T1024QDS_SECURE_BOOT
>   T1024RDB_SECURE_BOOT
>   T1040RDB_SECURE_BOOT
>   T1042D4RDB_SECURE_BOOT
>   T1042RDB_SECURE_BOOT
>   T2080QDS_SECURE_BOOT
>   T2080RDB_SECURE_BOOT
>   T4160QDS_SECURE_BOOT
>   T4240QDS_SECURE_BOOT
>   ls1021aqds_nor_SECURE_BOOT
>   ls1021atwr_nor_SECURE_BOOT
>   ls1043ardb_SECURE_BOOT
> 
> For these boards CONFIG_SPL_DM will no-longer be defined in SPL. But since
> they apparently don't have an SPL, this should not matter.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 13/45] Convert CONFIG_SPL_CRYPTO_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:31PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 11/45] Move existing use of CONFIG_SPL_RSA to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:29PM -0600, Simon Glass wrote:

> A few boards define this in a header file which is incorrect. It means that
> Kconfig options that rely on this cannot be used. Move it.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 14/45] Convert CONFIG_SPL_HASH_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:32PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] ML: SPL: NOR: Add CONFIG_SPL_NOR_COPY_ENTIRE_IMAGE define to enable whole image copy from NOR

2016-09-18 Thread Tom Rini
On Fri, Sep 16, 2016 at 10:43:51AM +0200, Lukasz Majewski wrote:

> This define gives the possibility to copy entire image (including header)
> from NOR parallel memory to e.g. SDRAM.
> 
> The legacy behavior is preserved, since other board don't enabled this option.

What's the use case?

> Signed-off-by: Lukasz Majewski 
> ---
>  Kconfig  | 10 ++

This should now get moved to common/spl/Kconfig

>  README   |  4 

This can be dropped.

[snip]
> diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
> index 8ea874c..1e0f739 100644
> --- a/common/spl/spl_nor.c
> +++ b/common/spl/spl_nor.c
> @@ -9,13 +9,15 @@
>  
>  int spl_nor_load_image(void)
>  {
> + void *img_src;
>   int ret;
> +#ifndef CONFIG_SPL_NOR_COPY_ENTIRE_IMAGE
>   /*
>* Loading of the payload to SDRAM is done with skipping of
>* the mkimage header in this SPL NOR driver
>*/
>   spl_image.flags |= SPL_COPY_PAYLOAD_ONLY;
> -
> +#endif
>  #ifdef CONFIG_SPL_OS_BOOT
>   if (!spl_start_uboot()) {
>   const struct image_header *header;
> @@ -64,9 +66,13 @@ int spl_nor_load_image(void)
>   if (ret)
>   return ret;
>  

We should have a comment here about how we're calculating the base of
where to copy from.

> + img_src = (void *)CONFIG_SYS_UBOOT_BASE;
> +#ifndef CONFIG_SPL_NOR_COPY_ENTIRE_IMAGE
> + img_src += sizeof(struct image_header));
> +#endif
> +
>   memcpy((void *)(unsigned long)spl_image.load_addr,
> -(void *)(CONFIG_SYS_UBOOT_BASE + sizeof(struct image_header)),
> -spl_image.size);
> +img_src, spl_image.size);
>  
>   return 0;
>  }

Thanks!

-- 
Tom


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


[U-Boot] [PATCH 01/27] spl: Move spl_board_load_image() into a generic header

2016-09-18 Thread Simon Glass
At present this is only used on ARM and sandbox, but it is just as
applicable to other architectures. Move the function prototype into the
generic SPL header.

Signed-off-by: Simon Glass 
---

 arch/arm/include/asm/spl.h | 9 -
 arch/sandbox/include/asm/spl.h | 8 
 include/spl.h  | 8 
 3 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/arch/arm/include/asm/spl.h b/arch/arm/include/asm/spl.h
index 19c38f4..fe5370b 100644
--- a/arch/arm/include/asm/spl.h
+++ b/arch/arm/include/asm/spl.h
@@ -32,15 +32,6 @@ enum {
 };
 #endif
 
-/**
- * Board specific load method for boards that have a special way of loading
- * U-Boot, which does not fit with the existing SPL code.
- *
- * @return 0 on success, negative errno value on failure.
- */
-
-int spl_board_load_image(void);
-
 /* Linker symbols. */
 extern char __bss_start[], __bss_end[];
 
diff --git a/arch/sandbox/include/asm/spl.h b/arch/sandbox/include/asm/spl.h
index 59f2401..eb3cb56 100644
--- a/arch/sandbox/include/asm/spl.h
+++ b/arch/sandbox/include/asm/spl.h
@@ -8,14 +8,6 @@
 
 #define CONFIG_SPL_BOARD_LOAD_IMAGE
 
-/**
- * Board-specific load method for boards that have a special way of loading
- * U-Boot, which does not fit with the existing SPL code.
- *
- * @return 0 on success, negative errno value on failure.
- */
-int spl_board_load_image(void);
-
 enum {
BOOT_DEVICE_BOARD,
 };
diff --git a/include/spl.h b/include/spl.h
index 8afa085..6c397ca 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -144,4 +144,12 @@ void spl_board_init(void);
  */
 bool spl_was_boot_source(void);
 
+/**
+ * Board-specific load method for boards that have a special way of loading
+ * U-Boot, which does not fit with the existing SPL code.
+ *
+ * @return 0 on success, negative errno value on failure.
+ */
+int spl_board_load_image(void);
+
 #endif
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 02/27] spl: Add a parameter to spl_set_header_raw_uboot()

2016-09-18 Thread Simon Glass
Rather than act on the global variable, pass the required struct in as a
parameter.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c  | 14 +++---
 common/spl/spl_nand.c |  2 +-
 include/spl.h | 13 -
 3 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index e14ec80..1a4a5d8 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -82,13 +82,13 @@ __weak void spl_board_prepare_for_boot(void)
/* Nothing to do! */
 }
 
-void spl_set_header_raw_uboot(void)
+void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
 {
-   spl_image.size = CONFIG_SYS_MONITOR_LEN;
-   spl_image.entry_point = CONFIG_SYS_UBOOT_START;
-   spl_image.load_addr = CONFIG_SYS_TEXT_BASE;
-   spl_image.os = IH_OS_U_BOOT;
-   spl_image.name = "U-Boot";
+   spl_image->size = CONFIG_SYS_MONITOR_LEN;
+   spl_image->entry_point = CONFIG_SYS_UBOOT_START;
+   spl_image->load_addr = CONFIG_SYS_TEXT_BASE;
+   spl_image->os = IH_OS_U_BOOT;
+   spl_image->name = "U-Boot";
 }
 
 int spl_parse_image_header(const struct image_header *header)
@@ -153,7 +153,7 @@ int spl_parse_image_header(const struct image_header 
*header)
/* Signature not found - assume u-boot.bin */
debug("mkimage signature not found - ih_magic = %x\n",
header->ih_magic);
-   spl_set_header_raw_uboot();
+   spl_set_header_raw_uboot(_image);
 #endif
}
return 0;
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 0e35e0f..8f9bd5da 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -20,7 +20,7 @@ int spl_nand_load_image(void)
nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
CONFIG_SYS_NAND_U_BOOT_SIZE,
(void *)CONFIG_SYS_NAND_U_BOOT_DST);
-   spl_set_header_raw_uboot();
+   spl_set_header_raw_uboot(_image);
nand_deselect();
 
return 0;
diff --git a/include/spl.h b/include/spl.h
index 6c397ca..ce449ff 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -67,7 +67,18 @@ extern struct spl_image_info spl_image;
 void preloader_console_init(void);
 u32 spl_boot_device(void);
 u32 spl_boot_mode(const u32 boot_device);
-void spl_set_header_raw_uboot(void);
+
+/**
+ * spl_set_header_raw_uboot() - Set up a standard SPL image structure
+ *
+ * This sets up the given spl_image which the standard values obtained from
+ * config options: CONFIG_SYS_MONITOR_LEN, CONFIG_SYS_UBOOT_START,
+ * CONFIG_SYS_TEXT_BASE.
+ *
+ * @spl_image: Image to set up
+ */
+void spl_set_header_raw_uboot(struct spl_image_info *spl_image);
+
 int spl_parse_image_header(const struct image_header *header);
 void spl_board_prepare_for_linux(void);
 void spl_board_prepare_for_boot(void);
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 08/27] spl: Add a way to declare an SPL image loader

2016-09-18 Thread Simon Glass
Add a linker list macro which can be used to declare an SPL image loader.
Update spl_load_image() to search available loaders for the correct one.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 20 
 include/spl.h| 32 
 2 files changed, 52 insertions(+)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 3716e6a..719ae6e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -344,12 +344,32 @@ static void announce_boot_device(u32 boot_device)
 static inline void announce_boot_device(u32 boot_device) { }
 #endif
 
+static struct spl_image_loader *spL_find_loader(uint boot_device)
+{
+   struct spl_image_loader *drv =
+   ll_entry_start(struct spl_image_loader, spl_image_loader);
+   const int n_ents =
+   ll_entry_count(struct spl_image_loader, spl_image_loader);
+   struct spl_image_loader *entry;
+
+   for (entry = drv; entry != drv + n_ents; entry++) {
+   if (boot_device == entry->boot_device)
+   return entry;
+   }
+
+   /* Not found */
+   return NULL;
+}
+
 static int spl_load_image(u32 boot_device)
 {
struct spl_boot_device bootdev;
+   struct spl_image_loader *loader = spL_find_loader(boot_device);
 
bootdev.boot_device = boot_device;
bootdev.boot_device_name = NULL;
+   if (loader)
+   return loader->load_image();
 
switch (boot_device) {
 #ifdef CONFIG_SPL_RAM_DEVICE
diff --git a/include/spl.h b/include/spl.h
index 63ca68c..8f19310 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -149,6 +149,38 @@ struct spl_boot_device {
const char *boot_device_name;
 };
 
+/**
+ * Holds information about a way of loading an SPL image
+ *
+ * @boot_device: Boot device that this loader supports
+ * @load_image: Function to call to load image
+ */
+struct spl_image_loader {
+   uint boot_device;
+   /**
+* load_image() - Load an SPL image
+*
+* @bootdev: describes the boot device to load from
+*/
+   int (*load_image)(struct spl_boot_device *bootdev);
+};
+
+/* Declare an SPL image loader */
+#define SPL_LOAD_IMAGE(__name) \
+   ll_entry_declare(struct spl_image_loader, __name, spl_image_loader)
+
+/*
+ * __priority is the priority of this method, 0 meaning it will be the top
+ * choice for this device, 9 meaning it is the bottom choice.
+ * __boot_device is the BOOT_DEVICE_... value
+ * __method is the load_image function to call
+ */
+#define SPL_LOAD_IMAGE_METHOD(__priority, __boot_device, __method) \
+   SPL_LOAD_IMAGE(__method ## __priority ## __boot_device) = { \
+   .boot_device = __boot_device, \
+   .load_image = __method, \
+   }
+
 /* NAND SPL functions */
 int spl_nand_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 03/27] spl: Add a parameter to spl_parse_image_header()

2016-09-18 Thread Simon Glass
Instead of using the global spl_image variable, pass the required struct in
as an argument.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-uniphier/boot-mode/spl_board.c |  2 +-
 common/spl/spl.c | 41 ++--
 common/spl/spl_ext.c |  2 +-
 common/spl/spl_fat.c |  2 +-
 common/spl/spl_mmc.c |  2 +-
 common/spl/spl_nand.c|  4 +--
 common/spl/spl_net.c |  3 +-
 common/spl/spl_nor.c |  4 +--
 common/spl/spl_onenand.c |  2 +-
 common/spl/spl_ubi.c |  4 +--
 common/spl/spl_ymodem.c  |  5 ++--
 drivers/mtd/spi/spi_spl_load.c   |  4 +--
 drivers/mtd/spi/sunxi_spi_spl.c  |  2 +-
 include/spl.h| 20 --
 14 files changed, 58 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c 
b/arch/arm/mach-uniphier/boot-mode/spl_board.c
index 86292b6..63ab41c 100644
--- a/arch/arm/mach-uniphier/boot-mode/spl_board.c
+++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c
@@ -113,7 +113,7 @@ int spl_board_load_image(void)
return ret;
}
 
-   ret = spl_parse_image_header((void *)CONFIG_SYS_TEXT_BASE);
+   ret = spl_parse_image_header(_image, (void *)CONFIG_SYS_TEXT_BASE);
if (ret)
return ret;
 
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 1a4a5d8..6195c06 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -91,33 +91,34 @@ void spl_set_header_raw_uboot(struct spl_image_info 
*spl_image)
spl_image->name = "U-Boot";
 }
 
-int spl_parse_image_header(const struct image_header *header)
+int spl_parse_image_header(struct spl_image_info *spl_image,
+  const struct image_header *header)
 {
u32 header_size = sizeof(struct image_header);
 
if (image_get_magic(header) == IH_MAGIC) {
-   if (spl_image.flags & SPL_COPY_PAYLOAD_ONLY) {
+   if (spl_image->flags & SPL_COPY_PAYLOAD_ONLY) {
/*
 * On some system (e.g. powerpc), the load-address and
 * entry-point is located at address 0. We can't load
 * to 0-0x40. So skip header in this case.
 */
-   spl_image.load_addr = image_get_load(header);
-   spl_image.entry_point = image_get_ep(header);
-   spl_image.size = image_get_data_size(header);
+   spl_image->load_addr = image_get_load(header);
+   spl_image->entry_point = image_get_ep(header);
+   spl_image->size = image_get_data_size(header);
} else {
-   spl_image.entry_point = image_get_load(header);
+   spl_image->entry_point = image_get_load(header);
/* Load including the header */
-   spl_image.load_addr = spl_image.entry_point -
+   spl_image->load_addr = spl_image->entry_point -
header_size;
-   spl_image.size = image_get_data_size(header) +
+   spl_image->size = image_get_data_size(header) +
header_size;
}
-   spl_image.os = image_get_os(header);
-   spl_image.name = image_get_name(header);
+   spl_image->os = image_get_os(header);
+   spl_image->name = image_get_name(header);
debug("spl: payload image: %.*s load addr: 0x%x size: %d\n",
-   (int)sizeof(spl_image.name), spl_image.name,
-   spl_image.load_addr, spl_image.size);
+   (int)sizeof(spl_image->name), spl_image->name,
+   spl_image->load_addr, spl_image->size);
} else {
 #ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE
/*
@@ -135,13 +136,13 @@ int spl_parse_image_header(const struct image_header 
*header)
ulong start, end;
 
if (!bootz_setup((ulong)header, , )) {
-   spl_image.name = "Linux";
-   spl_image.os = IH_OS_LINUX;
-   spl_image.load_addr = CONFIG_SYS_LOAD_ADDR;
-   spl_image.entry_point = CONFIG_SYS_LOAD_ADDR;
-   spl_image.size = end - start;
+   spl_image->name = "Linux";
+   spl_image->os = IH_OS_LINUX;
+   spl_image->load_addr = CONFIG_SYS_LOAD_ADDR;
+   spl_image->entry_point = CONFIG_SYS_LOAD_ADDR;
+   spl_image->size = end - start;
debug("spl: payload zImage, load addr: 0x%x size: 

[U-Boot] [PATCH 10/27] spl: Convert spl_mmc_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 6 --
 common/spl/spl_mmc.c | 6 +-
 include/spl.h| 3 ---
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4fe5d98..265a689 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,12 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_MMC_SUPPORT
-   case BOOT_DEVICE_MMC1:
-   case BOOT_DEVICE_MMC2:
-   case BOOT_DEVICE_MMC2_2:
-   return spl_mmc_load_image();
-#endif
 #ifdef CONFIG_SPL_UBI
case BOOT_DEVICE_NAND:
case BOOT_DEVICE_ONENAND:
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 899caf4..5e8172e 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -267,7 +267,7 @@ int spl_mmc_do_fs_boot(struct mmc *mmc)
 }
 #endif
 
-int spl_mmc_load_image(struct spl_boot_device *bootdev)
+static int spl_mmc_load_image(struct spl_boot_device *bootdev)
 {
struct mmc *mmc = NULL;
u32 boot_mode;
@@ -345,3 +345,7 @@ int spl_mmc_load_image(struct spl_boot_device *bootdev)
 
return err;
 }
+
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC1, spl_mmc_load_image);
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC2, spl_mmc_load_image);
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC2_2, spl_mmc_load_image);
diff --git a/include/spl.h b/include/spl.h
index 8f19310..dc57c66 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -193,9 +193,6 @@ int spl_nor_load_image(struct spl_boot_device *bootdev);
 /* UBI SPL functions */
 int spl_ubi_load_image(struct spl_boot_device *bootdev);
 
-/* MMC SPL functions */
-int spl_mmc_load_image(struct spl_boot_device *bootdev);
-
 /* YMODEM SPL functions */
 int spl_ymodem_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 15/27] spl: Convert spl_ymodem_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c| 4 
 common/spl/spl_ymodem.c | 3 ++-
 include/spl.h   | 3 ---
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 45cc8a8..15e8de7 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_YMODEM_SUPPORT
-   case BOOT_DEVICE_UART:
-   return spl_ymodem_load_image();
-#endif
 #if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
case BOOT_DEVICE_SPI:
return spl_spi_load_image();
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index d82b138..168b951 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -68,7 +68,7 @@ static ulong ymodem_read_fit(struct spl_load_info *load, 
ulong offset,
return size;
 }
 
-int spl_ymodem_load_image(struct spl_boot_device *bootdev)
+static int spl_ymodem_load_image(struct spl_boot_device *bootdev)
 {
int size = 0;
int err;
@@ -132,3 +132,4 @@ end_stream:
printf("Loaded %d bytes\n", size);
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_UART, spl_ymodem_load_image);
diff --git a/include/spl.h b/include/spl.h
index 6338bcf..3605911 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -181,9 +181,6 @@ struct spl_image_loader {
.load_image = __method, \
}
 
-/* YMODEM SPL functions */
-int spl_ymodem_load_image(struct spl_boot_device *bootdev);
-
 /* SPI SPL functions */
 int spl_spi_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 13/27] spl: Convert spl_onenand_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 4 
 common/spl/spl_onenand.c | 4 +++-
 include/spl.h| 3 ---
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index bc51852..701b930 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_ONENAND_SUPPORT
-   case BOOT_DEVICE_ONENAND:
-   return spl_onenand_load_image();
-#endif
 #ifdef CONFIG_SPL_NOR_SUPPORT
case BOOT_DEVICE_NOR:
return spl_nor_load_image();
diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c
index f5e2f95..361a1b3 100644
--- a/common/spl/spl_onenand.c
+++ b/common/spl/spl_onenand.c
@@ -14,7 +14,7 @@
 #include 
 #include 
 
-int spl_onenand_load_image(struct spl_boot_device *bootdev)
+static int spl_onenand_load_image(struct spl_boot_device *bootdev)
 {
struct image_header *header;
int ret;
@@ -34,3 +34,5 @@ int spl_onenand_load_image(struct spl_boot_device *bootdev)
 
return 0;
 }
+/* Use priorty 1 so that Ubi can override this */
+SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_ONENAND, spl_onenand_load_image);
diff --git a/include/spl.h b/include/spl.h
index 86bddd8..b7a3592 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -181,9 +181,6 @@ struct spl_image_loader {
.load_image = __method, \
}
 
-/* OneNAND SPL functions */
-int spl_onenand_load_image(struct spl_boot_device *bootdev);
-
 /* NOR SPL functions */
 int spl_nor_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 14/27] spl: Convert spl_nor_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 4 
 common/spl/spl_nor.c | 3 ++-
 include/spl.h| 3 ---
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 701b930..45cc8a8 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_NOR_SUPPORT
-   case BOOT_DEVICE_NOR:
-   return spl_nor_load_image();
-#endif
 #ifdef CONFIG_SPL_YMODEM_SUPPORT
case BOOT_DEVICE_UART:
return spl_ymodem_load_image();
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index f10d679..b55fcc5 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -7,7 +7,7 @@
 #include 
 #include 
 
-int spl_nor_load_image(struct spl_boot_device *bootdev)
+static int spl_nor_load_image(struct spl_boot_device *bootdev)
 {
int ret;
/*
@@ -70,3 +70,4 @@ int spl_nor_load_image(struct spl_boot_device *bootdev)
 
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NOR, spl_nor_load_image);
diff --git a/include/spl.h b/include/spl.h
index b7a3592..6338bcf 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -181,9 +181,6 @@ struct spl_image_loader {
.load_image = __method, \
}
 
-/* NOR SPL functions */
-int spl_nor_load_image(struct spl_boot_device *bootdev);
-
 /* YMODEM SPL functions */
 int spl_ymodem_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 12/27] spl: Convert spl_nand_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c  | 4 
 common/spl/spl_nand.c | 4 +++-
 include/spl.h | 3 ---
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 5ddc08d..bc51852 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_NAND_SUPPORT
-   case BOOT_DEVICE_NAND:
-   return spl_nand_load_image();
-#endif
 #ifdef CONFIG_SPL_ONENAND_SUPPORT
case BOOT_DEVICE_ONENAND:
return spl_onenand_load_image();
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 575de66..ed758e5 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -67,7 +67,7 @@ static int spl_nand_load_element(int offset, struct 
image_header *header)
}
 }
 
-int spl_nand_load_image(void)
+static int spl_nand_load_image(struct spl_boot_device *bootdev)
 {
int err;
struct image_header *header;
@@ -145,3 +145,5 @@ int spl_nand_load_image(void)
return err;
 }
 #endif
+/* Use priorty 1 so that Ubi can override this */
+SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_NAND, spl_nand_load_image);
diff --git a/include/spl.h b/include/spl.h
index cdcd88f..86bddd8 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -181,9 +181,6 @@ struct spl_image_loader {
.load_image = __method, \
}
 
-/* NAND SPL functions */
-int spl_nand_load_image(struct spl_boot_device *bootdev);
-
 /* OneNAND SPL functions */
 int spl_onenand_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 09/27] spl: Convert spl_ram_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 719ae6e..4fe5d98 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -215,6 +215,7 @@ static int spl_ram_load_image(struct spl_boot_device 
*bootdev)
 
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image);
 #endif
 
 int spl_init(void)
@@ -372,10 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_RAM_DEVICE
-   case BOOT_DEVICE_RAM:
-   return spl_ram_load_image();
-#endif
 #ifdef CONFIG_SPL_MMC_SUPPORT
case BOOT_DEVICE_MMC1:
case BOOT_DEVICE_MMC2:
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 05/27] spl: Add function comments to spl_start_uboot()

2016-09-18 Thread Simon Glass
Add some comments to describe this function.

Signed-off-by: Simon Glass 
---

 include/spl.h | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/include/spl.h b/include/spl.h
index aebafa3..742e6c2 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -110,7 +110,18 @@ int spl_board_ubi_load_image(u32 boot_device);
  */
 void __noreturn jump_to_image_linux(struct spl_image_info *spl_image,
void *arg);
+
+/**
+ * spl_start_uboot() - Check if SPL should start the kernel or U-Boot
+ *
+ * This is called by the various SPL loaders to determine whether the board
+ * wants to load the kernel or U-Boot. This function should be provided by
+ * the board.
+ *
+ * @return 0 if SPL should start the kernel, 1 if U-Boot must be started
+ */
 int spl_start_uboot(void);
+
 void spl_display_print(void);
 
 /* NAND SPL functions */
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 06/27] spl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig

2016-09-18 Thread Simon Glass
Move this option to Kconfig and tidy up existing uses. Also add a function
comment to the header file.

Signed-off-by: Simon Glass 
---

 arch/arm/cpu/armv7/omap4/Kconfig  | 3 +++
 arch/arm/cpu/armv7/omap5/Kconfig  | 3 +++
 common/spl/Kconfig| 9 +
 include/configs/ti_omap4_common.h | 1 -
 include/configs/ti_omap5_common.h | 1 -
 include/spl.h | 7 +++
 6 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig
index c3dc95f..2091dd7 100644
--- a/arch/arm/cpu/armv7/omap4/Kconfig
+++ b/arch/arm/cpu/armv7/omap4/Kconfig
@@ -33,6 +33,9 @@ config SPL_POWER_SUPPORT
 config SPL_SERIAL_SUPPORT
default y
 
+config SPL_DISPLAY_PRINT
+   default y
+
 choice
prompt "OMAP4 board select"
optional
diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index ef68c53..caa420a 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -33,6 +33,9 @@ config SPL_POWER_SUPPORT
 config SPL_SERIAL_SUPPORT
default y
 
+config SPL_DISPLAY_PRINT
+   default y
+
 choice
prompt "OMAP5 board select"
optional
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 2a8ddbc..84670b1 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -61,6 +61,15 @@ config SPL_SEPARATE_BSS
  location is used. Normally we put the device tree at the end of BSS
  but with this option enabled, it goes at _image_binary_end.
 
+config SPL_DISPLAY_PRINT
+   depends on SPL
+   bool "Display a board-specific message in SPL"
+   help
+ If this option is enabled, U-Boot will call the function
+ spl_display_print() immediately after displaying the SPL console
+ banner ("U-Boot SPL ..."). This function should be provided by
+ the board.
+
 config TPL
bool
depends on SPL && SUPPORT_TPL
diff --git a/include/configs/ti_omap4_common.h 
b/include/configs/ti_omap4_common.h
index 4115c78..8502c8a 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -151,7 +151,6 @@
  * So moving TEXT_BASE down to non-HS limit.
  */
 #define CONFIG_SPL_TEXT_BASE   0x4030
-#define CONFIG_SPL_DISPLAY_PRINT
 #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
 #define CONFIG_SYS_SPL_ARGS_ADDR   (CONFIG_SYS_SDRAM_BASE + \
 (128 << 20))
diff --git a/include/configs/ti_omap5_common.h 
b/include/configs/ti_omap5_common.h
index cbdf0bc..5623a37 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -154,7 +154,6 @@
 #define CONFIG_SPL_TEXT_BASE   0x4030
 #endif
 
-#define CONFIG_SPL_DISPLAY_PRINT
 #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
 #define CONFIG_SYS_SPL_ARGS_ADDR   (CONFIG_SYS_SDRAM_BASE + \
 (128 << 20))
diff --git a/include/spl.h b/include/spl.h
index 742e6c2..b6990b4 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -122,6 +122,13 @@ void __noreturn jump_to_image_linux(struct spl_image_info 
*spl_image,
  */
 int spl_start_uboot(void);
 
+/**
+ * spl_display_print() - Display a board-specific message in SPL
+ *
+ * If CONFIG_SPL_DISPLAY_PRINT is enabled, U-Boot will call this function
+ * immediately after displaying the SPL console banner ("U-Boot SPL ...").
+ * This function should be provided by the board.
+ */
 void spl_display_print(void);
 
 /* NAND SPL functions */
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 04/27] spl: Add a parameter to jump_to_image_linux()

2016-09-18 Thread Simon Glass
Instead of using the global spl_image variable, pass the required struct in
as an argument.

Signed-off-by: Simon Glass 
---

 arch/arm/lib/spl.c|  4 ++--
 arch/microblaze/cpu/spl.c |  4 ++--
 arch/powerpc/lib/spl.c|  4 ++--
 common/spl/spl.c  |  3 ++-
 include/spl.h | 12 +++-
 5 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 3587ad6..e606d47 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -47,7 +47,7 @@ void __weak board_init_f(ulong dummy)
  * arg: Pointer to paramter image in RAM
  */
 #ifdef CONFIG_SPL_OS_BOOT
-void __noreturn jump_to_image_linux(void *arg)
+void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void 
*arg)
 {
unsigned long machid = 0x;
 #ifdef CONFIG_MACH_TYPE
@@ -58,7 +58,7 @@ void __noreturn jump_to_image_linux(void *arg)
typedef void (*image_entry_arg_t)(int, int, void *)
__attribute__ ((noreturn));
image_entry_arg_t image_entry =
-   (image_entry_arg_t)(uintptr_t) spl_image.entry_point;
+   (image_entry_arg_t)(uintptr_t) spl_image->entry_point;
cleanup_before_linux();
image_entry(0, machid, arg);
 }
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index f4bb091..8e6d926 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -29,13 +29,13 @@ void spl_board_init(void)
 }
 
 #ifdef CONFIG_SPL_OS_BOOT
-void __noreturn jump_to_image_linux(void *arg)
+void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void 
*arg)
 {
debug("Entering kernel arg pointer: 0x%p\n", arg);
typedef void (*image_entry_arg_t)(char *, ulong, ulong)
__attribute__ ((noreturn));
image_entry_arg_t image_entry =
-   (image_entry_arg_t)spl_image.entry_point;
+   (image_entry_arg_t)spl_image->entry_point;
 
image_entry(NULL, 0, (ulong)arg);
 }
diff --git a/arch/powerpc/lib/spl.c b/arch/powerpc/lib/spl.c
index 0e486cc..080b978 100644
--- a/arch/powerpc/lib/spl.c
+++ b/arch/powerpc/lib/spl.c
@@ -17,14 +17,14 @@ DECLARE_GLOBAL_DATA_PTR;
  * arg: Pointer to paramter image in RAM
  */
 #ifdef CONFIG_SPL_OS_BOOT
-void __noreturn jump_to_image_linux(void *arg)
+void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void 
*arg)
 {
debug("Entering kernel arg pointer: 0x%p\n", arg);
typedef void (*image_entry_arg_t)(void *, ulong r4, ulong r5, ulong r6,
  ulong r7, ulong r8, ulong r9)
__attribute__ ((noreturn));
image_entry_arg_t image_entry =
-   (image_entry_arg_t)spl_image.entry_point;
+   (image_entry_arg_t)spl_image->entry_point;
 
image_entry(arg, 0, 0, EPAPR_MAGIC, CONFIG_SYS_BOOTMAPSZ, 0, 0);
 }
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 6195c06..cb96ef3 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -466,7 +466,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
case IH_OS_LINUX:
debug("Jumping to Linux\n");
spl_board_prepare_for_linux();
-   jump_to_image_linux((void *)CONFIG_SYS_SPL_ARGS_ADDR);
+   jump_to_image_linux(_image,
+   (void *)CONFIG_SYS_SPL_ARGS_ADDR);
 #endif
default:
debug("Unsupported OS image.. Jumping nevertheless..\n");
diff --git a/include/spl.h b/include/spl.h
index 8147e6d..aebafa3 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -99,7 +99,17 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
 void spl_board_prepare_for_linux(void);
 void spl_board_prepare_for_boot(void);
 int spl_board_ubi_load_image(u32 boot_device);
-void __noreturn jump_to_image_linux(void *arg);
+
+/**
+ * jump_to_image_linux() - Jump to a Linux kernel from SPL
+ *
+ * This jumps into a Linux kernel using the information in @spl_image.
+ *
+ * @spl_image: Image description to set up
+ * @arg: Argument to pass to Linux (typically a device tree pointer)
+ */
+void __noreturn jump_to_image_linux(struct spl_image_info *spl_image,
+   void *arg);
 int spl_start_uboot(void);
 void spl_display_print(void);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] pull request: u-boot-uniphier/master (2nd round)

2016-09-18 Thread Masahiro Yamada
Hi Tom,

Here is the revised version of my pull request
for the v2016.11 development cycle.

The following UniPhier updates are included:

  - DM migration
  * remove legacy xHCI driver
  * convert MMC driver to CONFIG_BLOCK
  - Pinctrl driver improvements
  * New pin-group
  * Macro cleanup
  * Remove ad-hoc pin-mux code
  - Misc fixes, cleanups
  * Fix DRAM size of LD21 SoC
  * Consolidate board init functions
  - PLL init code cleanups and new SoC support
  - Update DRAM init code for LD20 SoC

Please pull!


The following changes since commit 8cbb389bb3da80cbf8911f8386cbff92c6a78afe:

  Prepare v2016.09 (2016-09-12 10:05:51 -0400)

are available in the git repository at:

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

for you to fetch changes up to f9d7e17e844f9e94c39a8c95f73a4454097a6948:

  ARM: uniphier: update DRAM init code for LD20 SoC (2016-09-19 00:12:26 +0900)


Masahiro Yamada (27):
  ARM: uniphier: sort select:s alphabetically
  usb: uniphier: remove UniPhier xHCI driver and select DM_USB
  ARM: uniphier: delete unnecessary xHCI pin-mux settings
  ARM: uniphier: enable Generic EHCI driver for Pro4 SoC
  mmc: uniphier-sd: migrate to CONFIG_BLK
  pinctrl: uniphier: add System Bus pin-mux settings
  pinctrl: uniphier: move register base macros from header to .c file
  ARM: uniphier: remove IECTRL setup code of LD4 SoC
  ARM: uniphier: use checkboard() instead of misc_init_f()
  ARM: uniphier: merge board init functions into board_init()
  ARM: uniphier: fix DRAM size of LD21 SoC package
  ARM: uniphier: introduce flags to adjust DRAM timing for LD20/LD21
  pinctrl: uniphier: support 4bit-width pin-mux register capability
  pinctrl: uniphier: add UniPhier sLD3 pinctrl driver
  ARM: dts: uniphier: add pinctrl device node and pinctrl properties
  ARM: uniphier: select PINCTRL and SPL_PINCTRL
  ARM: uniphier: remove redundant pin-muxing for EA24 pin of sLD3 SoC
  ARM: uniphier: remove ad-hoc pin-mux code for sLD3
  ARM: uniphier: consolidate NAND pin-mux settings
  ARM: dts: uniphier: include System Bus pin group node in SPL DT
  ARM: uniphier: consolidate System Bus pin-mux settings for LD11/LD20
  ARM: uniphier: move XIRQ pin-mux settings of LD11/LD20
  ARM: uniphier: rename CONFIG_DPLL_SSC_RATE_1PER
  ARM: uniphier: move PLL init code to U-Boot proper where possible
  ARM: uniphier: collect clock/PLL init code into a single directory
  ARM: uniphier: add PLL init code for LD20 SoC
  ARM: uniphier: update DRAM init code for LD20 SoC

 arch/arm/Kconfig  |  18 +-
 arch/arm/dts/uniphier-ph1-ld11-ref.dts|   4 +
 arch/arm/dts/uniphier-ph1-ld20-ref.dts|   4 +
 arch/arm/dts/uniphier-ph1-sld3-ref.dts|   8 +
 arch/arm/dts/uniphier-ph1-sld3.dtsi   |  35 ++
 arch/arm/mach-uniphier/Makefile   |  11 +-
 arch/arm/mach-uniphier/board_common.c |  20 --
 arch/arm/mach-uniphier/board_early_init_r.c   |  15 -
 .../mach-uniphier/{board_early_init_f.c => board_init.c}  |  62 +++-
 arch/arm/mach-uniphier/boards.c   |  27 +-
 arch/arm/mach-uniphier/clk/Makefile   |  28 +-
 arch/arm/mach-uniphier/clk/dpll-ld20.c|  22 ++
 arch/arm/mach-uniphier/clk/dpll-ld4.c |  56 
 arch/arm/mach-uniphier/clk/dpll-pro4.c|  60 
 .../{pll/pll-init-sld3.c => clk/dpll-sld3.c}  |   2 +-
 arch/arm/mach-uniphier/clk/dpll-sld8.c|  62 
 arch/arm/mach-uniphier/clk/dpll-tail.c|  21 ++
 .../arm/mach-uniphier/{early-clk => clk}/early-clk-ld11.c |   0
 .../arm/mach-uniphier/{early-clk => clk}/early-clk-ld20.c |   0
 arch/arm/mach-uniphier/{early-clk => clk}/early-clk-ld4.c |   0
 .../arm/mach-uniphier/{early-clk => clk}/early-clk-pro5.c |   0
 .../arm/mach-uniphier/{early-clk => clk}/early-clk-pxs2.c |   0
 arch/arm/mach-uniphier/clk/pll-base-ld20.c| 123 +++
 arch/arm/mach-uniphier/clk/pll-ld20.c |  40 +++
 .../mach-uniphier/{pll/pll-init-ld4.c => clk/pll-ld4.c}   |  61 +---
 .../mach-uniphier/{pll/pll-init-pro4.c => clk/pll-pro4.c} |  64 +---
 arch/arm/mach-uniphier/clk/pll-sld3.c |  14 +
 arch/arm/mach-uniphier/clk/pll.h  |  21 ++
 arch/arm/mach-uniphier/dram/ddrphy-ld20-regs.h|  78 +++--
 arch/arm/mach-uniphier/dram/umc-ld20.c| 431
+++--
 arch/arm/mach-uniphier/early-clk/Makefile |  13 -
 arch/arm/mach-uniphier/early-pinctrl/Makefile |   7 -
 arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-ld20.c |  32 --
 

Re: [U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 04:27:57PM +0800, Haibo Chen wrote:

> Suspicious implicit sign extension exist. ext_csd[] is defined
> as "u8", capacity is defined as u64, so u8 is promoted to signed
> int first int the "|" expersion, then the sign extended to u64.
> if the tmp sign value is largeer than 0x7fff, after the sign
> extension, the upper bits of the result will all be 1.
> Thanks to coverity 
> 
> e.g.
>   u8  data_8;
>   u64 data_64;
> 
>   data_8 = 0x80;
>   data_64 = data_8 << 24; //0x8000
>   data_64 = ((u64)data_8) << 24;  //0x8000
> 
> Signed-off-by: Haibo Chen 

Please add a 'Reported-by: Coverity' and you can include the CID if you
like.

> ---
>  drivers/mmc/mmc.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 43ea0bb..c1d1dc6 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1176,10 +1176,10 @@ static int mmc_startup(struct mmc *mmc)
>* ext_csd's capacity is valid if the value is more
>* than 2GB
>*/
> - capacity = ext_csd[EXT_CSD_SEC_CNT] << 0
> - | ext_csd[EXT_CSD_SEC_CNT + 1] << 8
> - | ext_csd[EXT_CSD_SEC_CNT + 2] << 16
> - | ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
> + capacity = ((u64)ext_csd[EXT_CSD_SEC_CNT]) << 0
> + | ((u64)ext_csd[EXT_CSD_SEC_CNT + 1]) 
> << 8
> + | ((u64)ext_csd[EXT_CSD_SEC_CNT + 2]) 
> << 16
> + | ((u64)ext_csd[EXT_CSD_SEC_CNT + 3]) 
> << 24;
>   capacity *= MMC_MAX_BLOCK_LEN;
>   if ((capacity >> 20) > 2 * 1024)
>   mmc->capacity_user = capacity;

Can't we just move capacity down to a u8 instead?  Thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] sunxi: musb: Re-init musb controller on repeated probe calls

2016-09-18 Thread Ian Campbell
On Sun, 2016-09-18 at 16:53 +0200, Hans de Goede wrote:
> With sunxi-musb musb_lowlevel_init() can fail when a charger; or no
> cable
> is plugged into the otg port.
> 
> To avoid leaking the struct musb allocated by musb_init_controller()
> on repeated musb_usb_probe() calls, we were caching its result.
> But musb_init_controller() does more, such as calling
> sunxi_musb_init()
> which enables the clocks.
> 
> Not calling sunxi_musb_init() causes the musb controller to stop
> working
> after a "usb reset" since that calls musb_usb_remove() which disables
> the
> clocks.
> 
> This commit fixes this by removing the caching of the struct returned
> from musb_init_controller(), it replaces this by free-ing the
> allocated
> memory in musb_usb_remove() and calling musb_usb_remove() on
> musb_usb_probe() errors to ensure proper cleanup.
> 
> While at it also make musb_usb_probe() and musb_usb_remove() static.
> 
> Signed-off-by: Hans de Goede 

LGTM in so far as it seems like a more normal way to do things, but
maybe an Ack from a USB-in-uboot-savvy person might be nice?

Anyway: Acked-by: Ian Campbell 

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


Re: [U-Boot] [U-Boot, v3, 1/2] Kconfig: Add a whitelist of ad-hoc CONFIG options

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 09:44:06PM -0600, Simon Glass wrote:

> Add a list of ad-hoc CONFIG options that don't use Kconfig. This can be used
> to check that new ones are not being added.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 44/45] Convert CONFIG_SPL_WATCHDOG_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:19:02PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 2/2] Makefile: Give a build error if ad-hoc CONFIG options are added

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 09:44:07PM -0600, Simon Glass wrote:

> New CONFIG options should be added via Kconfig. To help prevent new ad-hoc
> CONFIGs from being added, give a build error when these are detected.
> 
> Signed-off-by: Simon Glass 
> Acked-by: Stephen Warren 
> Tested-by: Stephen Warren 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 45/45] Convert CONFIG_SPL_YMODEM_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:19:03PM -0600, Simon Glass wrote:

> Convert CONFIG_SPL_YMODEM_SUPPORT to Kconfig
> 
> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 43/45] Convert CONFIG_SPL_USB_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:19:01PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH 0/2] Add sdram capacity auto detect for rk3288

2016-09-18 Thread Vagrant Cascadian
On 2016-09-15, Sandy Patterson wrote:
> An alternative for you might be to disable OF_PLATDATA for firefly and
> enable BACK_TO_BROM.

I wasn't able to successfully build with OF_PLATDATA disabled; sounds
like there are more patches needed for firefly for that to work.


> You may not be getting any output because you didn't modify your burning
> process.
> See the README.rockchip section on CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
> for details, but you have to dd your images slightly differently with this
> macro enabled.

Thanks! Unfortunately, even after using the burning process for
CONFIG_ROCKCHIP_SPL_BACK_TO_BROM described in README.rockchip.

The patches (on top of what was submitted in this series) I've applied
to v2016.09 are:

Index: u-boot/include/common.h
===
--- u-boot.orig/include/common.h
+++ u-boot/include/common.h
@@ -95,6 +95,10 @@ typedef volatile unsigned char   vu_char;
 #define CONFIG_SYS_SUPPORT_64BIT_DATA
 #endif
 
+#ifndef CONFIG_SPL_BUILD
+#define DEBUG
+#endif
+
 #ifdef DEBUG
 #define _DEBUG 1
 #else

Index: u-boot/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
===
--- u-boot.orig/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
+++ u-boot/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
@@ -1039,7 +1039,7 @@ static int conv_of_platdata(struct udevi
memcpy(>phy_timing, of_plat->rockchip_phy_timing,
   sizeof(plat->phy_timing));
memcpy(>base, of_plat->rockchip_sdram_params, sizeof(plat->base));
-   plat->num_channels = of_plat->rockchip_num_channels;
+   plat->num_channels = 2;
ret = regmap_init_mem_platdata(dev, of_plat->reg,
   ARRAY_SIZE(of_plat->reg) / 2,
   >map);

Index: u-boot/configs/firefly-rk3288_defconfig
===
--- u-boot.orig/configs/firefly-rk3288_defconfig
+++ u-boot/configs/firefly-rk3288_defconfig
@@ -70,3 +70,4 @@ CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
 # CONFIG_SPL_OF_LIBFDT is not set
+CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y


I think I'll wait for an updated series to do more tests, so I'm not
testing patches on patches on patches. Also reduces the liklihood of me
misinterpreting what people are suggesting to try.


live well,
  vagrant


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


[U-Boot] [PATCH 07/27] spl: Convert boot_device into a struct

2016-09-18 Thread Simon Glass
At present some spl_xxx_load_image() functions take a parameter and some
don't. Of those that do, most take an integer but one takes a string.

Convert this parameter into a struct so that we can pass all functions the
same thing. This will allow us to use a common function signature.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-sunxi/board.c  |  2 +-
 arch/arm/mach-uniphier/boot-mode/spl_board.c |  2 +-
 arch/sandbox/cpu/spl.c   |  2 +-
 common/spl/spl.c | 37 ++---
 common/spl/spl_mmc.c |  6 ++---
 common/spl/spl_nand.c|  2 +-
 common/spl/spl_net.c |  6 ++---
 common/spl/spl_nor.c |  2 +-
 common/spl/spl_onenand.c |  2 +-
 common/spl/spl_sata.c|  2 +-
 common/spl/spl_ubi.c |  6 ++---
 common/spl/spl_usb.c |  2 +-
 common/spl/spl_ymodem.c  |  2 +-
 drivers/mtd/spi/spi_spl_load.c   |  2 +-
 drivers/mtd/spi/sunxi_spi_spl.c  |  2 +-
 include/spl.h| 40 
 16 files changed, 70 insertions(+), 47 deletions(-)

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 6d9518d..8a385a2 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -133,7 +133,7 @@ static int gpio_init(void)
return 0;
 }
 
-int spl_board_load_image(void)
+int spl_board_load_image(struct spl_boot_device *bootdev)
 {
debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr);
return_to_fel(fel_stash.sp, fel_stash.lr);
diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c 
b/arch/arm/mach-uniphier/boot-mode/spl_board.c
index 63ab41c..4eadc2f 100644
--- a/arch/arm/mach-uniphier/boot-mode/spl_board.c
+++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c
@@ -65,7 +65,7 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32),
return 0;
 }
 
-int spl_board_load_image(void)
+int spl_board_load_image(struct spl_boot_device *bootdev)
 {
int (*send_cmd)(u32 cmd, u32 arg);
int (*card_blockaddr)(u32 rca);
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index e8349c0..4cee293 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -38,7 +38,7 @@ void spl_board_announce_boot_device(void)
printf("%s\n", fname);
 }
 
-int spl_board_load_image(void)
+int spl_board_load_image(struct spl_boot_device *bootdev)
 {
char fname[256];
int ret;
diff --git a/common/spl/spl.c b/common/spl/spl.c
index cb96ef3..3716e6a 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -185,7 +185,7 @@ static ulong spl_ram_load_read(struct spl_load_info *load, 
ulong sector,
return count;
 }
 
-static int spl_ram_load_image(void)
+static int spl_ram_load_image(struct spl_boot_device *bootdev)
 {
struct image_header *header;
 
@@ -346,66 +346,71 @@ static inline void announce_boot_device(u32 boot_device) 
{ }
 
 static int spl_load_image(u32 boot_device)
 {
+   struct spl_boot_device bootdev;
+
+   bootdev.boot_device = boot_device;
+   bootdev.boot_device_name = NULL;
+
switch (boot_device) {
 #ifdef CONFIG_SPL_RAM_DEVICE
case BOOT_DEVICE_RAM:
-   return spl_ram_load_image();
+   return spl_ram_load_image();
 #endif
 #ifdef CONFIG_SPL_MMC_SUPPORT
case BOOT_DEVICE_MMC1:
case BOOT_DEVICE_MMC2:
case BOOT_DEVICE_MMC2_2:
-   return spl_mmc_load_image(boot_device);
+   return spl_mmc_load_image();
 #endif
 #ifdef CONFIG_SPL_UBI
case BOOT_DEVICE_NAND:
case BOOT_DEVICE_ONENAND:
-   return spl_ubi_load_image(boot_device);
+   return spl_ubi_load_image();
 #else
 #ifdef CONFIG_SPL_NAND_SUPPORT
case BOOT_DEVICE_NAND:
-   return spl_nand_load_image();
+   return spl_nand_load_image();
 #endif
 #ifdef CONFIG_SPL_ONENAND_SUPPORT
case BOOT_DEVICE_ONENAND:
-   return spl_onenand_load_image();
+   return spl_onenand_load_image();
 #endif
 #endif
 #ifdef CONFIG_SPL_NOR_SUPPORT
case BOOT_DEVICE_NOR:
-   return spl_nor_load_image();
+   return spl_nor_load_image();
 #endif
 #ifdef CONFIG_SPL_YMODEM_SUPPORT
case BOOT_DEVICE_UART:
-   return spl_ymodem_load_image();
+   return spl_ymodem_load_image();
 #endif
 #if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
case BOOT_DEVICE_SPI:
-   return spl_spi_load_image();
+   return spl_spi_load_image();
 #endif
 #ifdef CONFIG_SPL_ETH_SUPPORT
case BOOT_DEVICE_CPGMAC:
 #ifdef CONFIG_SPL_ETH_DEVICE
-   return spl_net_load_image(CONFIG_SPL_ETH_DEVICE);
-#else
-  

[U-Boot] [PATCH] arm, Makefile: set SPL_PAYLOAD according to the SoC architecture

2016-09-18 Thread Raghav Dogra
SPL_PAYLOAD should be .img in case of ARM architecture and .bin in
case of other architectures. This patch takes care of the same by choosing
the SPL_PAYLOAD as u-boot.img for ARM architecture and u-boot.bin for others.

Signed-off-by: Raghav Dogra 
---
 Makefile | 4 
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 1cf15ce..83e7cea 100644
--- a/Makefile
+++ b/Makefile
@@ -941,8 +941,12 @@ u-boot.cfg:include/config.h FORCE
 ifdef CONFIG_TPL
 SPL_PAYLOAD := tpl/u-boot-with-tpl.bin
 else
+ifeq ($(ARCH),arm)
+SPL_PAYLOAD := u-boot.img
+else
 SPL_PAYLOAD := u-boot.bin
 endif
+endif
 
 OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
   --pad-to=$(CONFIG_SPL_PAD_TO)
-- 
1.9.1

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


[U-Boot] [PATCH] sunxi: musb: Re-init musb controller on repeated probe calls

2016-09-18 Thread Hans de Goede
With sunxi-musb musb_lowlevel_init() can fail when a charger; or no cable
is plugged into the otg port.

To avoid leaking the struct musb allocated by musb_init_controller()
on repeated musb_usb_probe() calls, we were caching its result.
But musb_init_controller() does more, such as calling sunxi_musb_init()
which enables the clocks.

Not calling sunxi_musb_init() causes the musb controller to stop working
after a "usb reset" since that calls musb_usb_remove() which disables the
clocks.

This commit fixes this by removing the caching of the struct returned
from musb_init_controller(), it replaces this by free-ing the allocated
memory in musb_usb_remove() and calling musb_usb_remove() on
musb_usb_probe() errors to ensure proper cleanup.

While at it also make musb_usb_probe() and musb_usb_remove() static.

Signed-off-by: Hans de Goede 
---
 drivers/usb/musb-new/sunxi.c | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index dece781..469377f 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -201,7 +201,6 @@ static irqreturn_t sunxi_musb_interrupt(int irq, void 
*__hci)
 
 /* musb_core does not call enable / disable in a balanced manner  */
 static bool enabled = false;
-static struct musb *sunxi_musb;
 
 static int sunxi_musb_enable(struct musb *musb)
 {
@@ -309,7 +308,9 @@ static struct musb_hdrc_platform_data musb_plat = {
 };
 
 #ifdef CONFIG_USB_MUSB_HOST
-int musb_usb_probe(struct udevice *dev)
+static int musb_usb_remove(struct udevice *dev);
+
+static int musb_usb_probe(struct udevice *dev)
 {
struct musb_host_data *host = dev_get_priv(dev);
struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
@@ -317,23 +318,21 @@ int musb_usb_probe(struct udevice *dev)
 
priv->desc_before_addr = true;
 
-   if (!sunxi_musb) {
-   sunxi_musb = musb_init_controller(_plat, NULL,
- (void *)SUNXI_USB0_BASE);
-   }
-
-   host->host = sunxi_musb;
+   host->host = musb_init_controller(_plat, NULL,
+ (void *)SUNXI_USB0_BASE);
if (!host->host)
return -EIO;
 
ret = musb_lowlevel_init(host);
if (ret == 0)
printf("MUSB OTG\n");
+   else
+   musb_usb_remove(dev);
 
return ret;
 }
 
-int musb_usb_remove(struct udevice *dev)
+static int musb_usb_remove(struct udevice *dev)
 {
struct musb_host_data *host = dev_get_priv(dev);
struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
@@ -346,6 +345,9 @@ int musb_usb_remove(struct udevice *dev)
 #endif
clrbits_le32(>ahb_gate0, 1 << AHB_GATE_OFFSET_USB0);
 
+   free(host->host);
+   host->host = NULL;
+
return 0;
 }
 
-- 
2.9.3

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


Re: [U-Boot] [PATCH] sunxi: musb: Re-init musb controller on repeated probe calls

2016-09-18 Thread Hans de Goede

Hi,

On 18-09-16 17:00, Ian Campbell wrote:

On Sun, 2016-09-18 at 16:53 +0200, Hans de Goede wrote:

With sunxi-musb musb_lowlevel_init() can fail when a charger; or no
cable
is plugged into the otg port.

To avoid leaking the struct musb allocated by musb_init_controller()
on repeated musb_usb_probe() calls, we were caching its result.
But musb_init_controller() does more, such as calling
sunxi_musb_init()
which enables the clocks.

Not calling sunxi_musb_init() causes the musb controller to stop
working
after a "usb reset" since that calls musb_usb_remove() which disables
the
clocks.

This commit fixes this by removing the caching of the struct returned
from musb_init_controller(), it replaces this by free-ing the
allocated
memory in musb_usb_remove() and calling musb_usb_remove() on
musb_usb_probe() errors to ensure proper cleanup.

While at it also make musb_usb_probe() and musb_usb_remove() static.

Signed-off-by: Hans de Goede 


LGTM in so far as it seems like a more normal way to do things,


Yeah my original hack here was bad, and something which I should
never have done, ain't hindsight a wonderful thing :)

Regards,

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


Re: [U-Boot] [PATCH v3 00/45] Kconfig: Move CONFIG_SPL_..._SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:18PM -0600, Simon Glass wrote:

> This series moves all the CONFIG_SPL_..._SUPPORT options to Kconfig and
> fixes up existing boards to continue to build.
> 
> It also adds a few small but useful features to moveconfig.
> 
> There is existing work going on in this area, so some of these patches may
> be superseded. It has taken me a while to get this building cleanly. But I
> have run out of time so want to get this out.
> 
> As mentioned on a recent thread [1] there is some confusion about whether an
> option means enabling driver support or media support. Andrew's recent
> series seems like a good vehicle to tidy that up. But I hope this series
> will make it easier.
> 
> NOTE: in the v2 series I have tried to use common things in Kconfig to
> reduce the diffs in the defconfig files. This has helped a fair bit. But it
> is very error-prone and time consuming. Also I have had to add some
> exceptions (disabling an option in specific board configs). Overall it was
> not a pleasant experience :-(
> 
> There are a few strange features of this conversion. The main difficulty is
> that some PowerPC boards do things like this in their board config file:
> 
> This means that TPL reuses the SPL options. We can't support this in Kconfig
> so I have added a small number of CONFIG_TPL_xxx_SUPPORT options to cope
> with this. This made the conversion more painful than it should have been.
> 
> A related issue is boards using a common header file and setting options only
> for SPL:
> 
> This is not noticed by moveconfig so we have to clean it up manually. Also
> there are a few incorrect things where Kconfig options are set with #define:
> 
> Finally, many defconfig files are not ordered correctly, resulting in larger
> patches than we might like. It would be great to have a solution for this,
> perhaps with buildman providing a warning. But it might slow down
> development.
> 
> The series is fully build-tested (for bisectability) and causes no failures
> for the boards that already pass. The following boards fail for me at
> present on mainline (which I have not yet looked at):
> 
> 01: buildman
>   blackfin:  +   cm-bf527 bf609-ezkit bf537-stamp
>  sparc:  +   grsim grsim_leon2 gr_cpci_ax2000 gr_xc3s_1500 gr_ep2s60
>  nios2:  +   10m50 3c120
> microblaze:  +   microblaze-generic
>   openrisc:  +   openrisc-generic
> 
> [1] https://patchwork.ozlabs.org/patch/661511/

This is not totally size neutral.  I've looked over the changes and in
some cases, strings just get resized slightly, and, it happens.  In
other cases, it comes down to the "fun" games I did on am335x to support
network booting in SPL and the size constrains that can be run into
there, along with just including extra stuff.  It all still links, so
I'll clean up that config afterwards.

-- 
Tom


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


Re: [U-Boot] Please pull from u-boot-i2c

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 08:36:52AM +0200, Heiko Schocher wrote:

> Hello Tom,
> 
> please pull from u-boot-i2c.git master
> 
> The following changes since commit 8cbb389bb3da80cbf8911f8386cbff92c6a78afe:
> 
>   Prepare v2016.09 (2016-09-12 10:05:51 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-i2c.git master
> 
> for you to fetch changes up to 76062b9cdbe756eff75b99beaf6e94e8bb059431:
> 
>   i2c: at91_i2c: Fix the wrong include file (2016-09-13 06:58:54 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 07/45] Use separate options for TPL support

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:25PM -0600, Simon Glass wrote:

> At present TPL uses the same options as SPL support. In a few cases the board
> config enables or disables the SPL options depending on whether
> CONFIG_TPL_BUILD is defined.
> 
> With the move to Kconfig, options are determined for the whole build and
> (without a hack like an #undef in a header file) cannot be controlled in this
> way.
> 
> Create new TPL options for these and update users. This will allow Kconfig
> conversion to proceed for these boards.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v3,06/45] Drop CONFIG_SPL_RAM_SUPPORT

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:24PM -0600, Simon Glass wrote:

> This option does not exist in U-Boot. Drop it.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 04/45] Kconfig: Move SPL settings into their own file

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:22PM -0600, Simon Glass wrote:

> Move the SPL settings into common/spl where most of the SPL code is kept.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 03/45] moveconfig: Add an option to commit changes

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:21PM -0600, Simon Glass wrote:

> The moveconfig tool is quite clever and generally produces results that
> are suitable for sending as a patch without further work. The main required
> step is to add the changes to a commit.
> 
> Add an option to do this automatically. This allows moveconfig to be used
> from a script to convert multiple CONFIG options, once per commit.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 02/45] moveconfig: Add an option to skip prompts

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:20PM -0600, Simon Glass wrote:

> At present it is not easy to use moveconfig from a script since it asks
> for user input a few times. Add a -y option to skip this and assume that
> 'y' was entered.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 01/45] Correct defconfigs using savedefconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:19PM -0600, Simon Glass wrote:

> Update the defconfig files to match their canonical form, as produced by
> 'make safedefconfig'.
> 
> This is the result of running 'tools/moveconfig.py -s' on the tree.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 05/45] arm: fsl: Adjust ordering of #ifndef CONFIG_SPL_BUILD

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:23PM -0600, Simon Glass wrote:

> The secure boot header files incorrectly define SPL options only if
> CONFIG_SPL_BUILD is defined. This means that the options are only enabled
> in an SPL build, and not with a normal 'make xxx_defconfig'. This means
> that moveconfig.py cannot work, since it sees the options as disabled even
> when they may be manually enabled in an SPL build.
> 
> Fix this by changing the order.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 34/45] Convert CONFIG_SPL_ONENAND_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:52PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 36/45] Convert CONFIG_SPL_POWER_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:54PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 28/45] Convert CONFIG_SPL_MTD_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:46PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 32/45] Convert CONFIG_SPL_NET_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:50PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 33/45] Convert CONFIG_SPL_NOR_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:51PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 29/45] Convert CONFIG_SPL_MUSB_NEW_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:47PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 31/45] Convert CONFIG_SPL_NET_VCI_STRING to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:49PM -0600, Simon Glass wrote:

> This converts the following to Kconfig:
>CONFIG_SPL_NET_VCI_STRING
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v4,35/45] Remove CONFIG_SPL_PINCTRL_SUPPORT

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 07:05:50AM -0600, Simon Glass wrote:

> This option is not used. Drop it.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


[U-Boot] [PATCH 00/27] spl: Use linker list and parameters for SPL image loading

2016-09-18 Thread Simon Glass
At present the SPL code uses a global spl_image variable which is shared
amongst lots of files, some in common/spl and some elsewhere. There is no
need for this to be global, and in fact a parameter makes it easier to
understand what information the functions act on. It also reduces the BSS
use in the SPL (at the expense of stack) which is useful on boards which
don't have BSS available early on.

There are many global functions for loading images from each boot device
type, like spl_mmc_load_image() and spl_spi_load_image(). Mostly these take
the same parameters (none or a u32). There are various rules for compiling
in calls to these functions and in some cases somewhat different rules for
compiling in the functions themselves. For example, spl_spi_load_image() is
called if either of CONFIG_SPL_SPI_SUPPORT or CONFIG_SPL_SPI__FLASHSUPPORT
is enabled, but included in the image if CONFIG_SPL_SPI_LOAD is enabled.

There is work in progress to look at that problem (Andrew F. Davis has sent
some patches [1]), and this series does not address it. But even with that
fixed its seems better to use a linker list and a consistent function
signature for loading images.

This series converts spl_image into a parameter and moves the SPL load
functions into a linker list, where each method is declared in the file
that provides it. The existing dispatching code is dropped.

There is a priorty value attached to each loader which should allow the
existing ordering to be maintained.

Code size is about 20 bytes larger on average which I think is acceptable.
The BSS size drops by about 64 bytes, but really this just transfers to
the stack.

There is an obvious follow-on from this, to move boot_name_table[] into the
same linker list struct (i.e. add a name field to struct spl_image_loader).
The complication here is that we don't want naming if
CONFIG_SPL_LIBCOMMON_SUPPORT is not enabled, since it bloats the code. In
addition I think that common/spl/spl.c can be tidied up a little.

Finally, my reading of the load functions is that they could do with some
rationalisation once we have a way to init any device without
subsystem-specific function calls. For example, spl_sata.c and spl_usb.c
contain very similar code but for the init methods.

[1] http://patchwork.ozlabs.org/patch/662945/


Simon Glass (27):
  spl: Move spl_board_load_image() into a generic header
  spl: Add a parameter to spl_set_header_raw_uboot()
  spl: Add a parameter to spl_parse_image_header()
  spl: Add a parameter to jump_to_image_linux()
  spl: Add function comments to spl_start_uboot()
  spl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig
  spl: Convert boot_device into a struct
  spl: Add a way to declare an SPL image loader
  spl: Convert spl_ram_load_image() to use linker list
  spl: Convert spl_mmc_load_image() to use linker list
  spl: Convert spl_ubi_load_image() to use linker list
  spl: Convert spl_nand_load_image() to use linker list
  spl: Convert spl_onenand_load_image() to use linker list
  spl: Convert spl_nor_load_image() to use linker list
  spl: Convert spl_ymodem_load_image() to use linker list
  spl: Convert spl_usb_load_image() to use linker list
  spl: Convert spl_sata_load_image() to use linker list
  spl: spi: Move the generic SPI loader into common/spl
  spl: Convert spl_spi_load_image() to use linker list
  spi: Move freescale-specific code into a private header
  spl: Convert spl_net_load_image() to use linker list
  spl: Convert spl_board_load_image() to use linker list
  spl: Pass spl_image as a parameter to load_image() methods
  spl: Update ext functions to take an spl_image parameter
  spl: Update fat functions to take an spl_image parameter
  spl: Update spl_load_simple_fit() to take an spl_image param
  spl: Make spl_boot_list a local variable

 arch/arm/cpu/armv7/omap4/Kconfig   |   3 +
 arch/arm/cpu/armv7/omap5/Kconfig   |   3 +
 arch/arm/include/asm/spl.h |   9 --
 arch/arm/lib/spl.c |   4 +-
 arch/arm/mach-sunxi/board.c|   6 +-
 arch/arm/mach-uniphier/boot-mode/spl_board.c   |  10 +-
 arch/microblaze/cpu/spl.c  |   4 +-
 arch/powerpc/lib/spl.c |   4 +-
 arch/sandbox/cpu/spl.c |   4 +-
 arch/sandbox/include/asm/spl.h |   8 -
 board/Arcturus/ucp1020/spl.c   |   2 -
 board/freescale/common/spl.h   |  13 ++
 board/freescale/p1010rdb/spl.c |   3 +-
 board/freescale/p1022ds/spl.c  |   3 +-
 board/freescale/p1_p2_rdb_pc/spl.c |   3 +-
 board/freescale/t102xqds/spl.c |   7 +-
 board/freescale/t102xrdb/spl.c |   7 +-
 board/freescale/t104xrdb/spl.c |   7 +-
 board/freescale/t208xqds/spl.c |   7 +-
 board/freescale/t208xrdb/spl.c

[U-Boot] [PATCH 26/27] spl: Update spl_load_simple_fit() to take an spl_image param

2016-09-18 Thread Simon Glass
Upda the SPL FIT code to use the spl_image parameter.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c| 2 +-
 common/spl/spl_fat.c| 2 +-
 common/spl/spl_fit.c| 9 +
 common/spl/spl_mmc.c| 2 +-
 common/spl/spl_nand.c   | 2 +-
 common/spl/spl_spi.c| 2 +-
 common/spl/spl_ymodem.c | 2 +-
 include/spl.h   | 4 +++-
 8 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index e295b2e..0a9c632 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -199,7 +199,7 @@ static int spl_ram_load_image(struct spl_image_info 
*spl_image,
debug("Found FIT\n");
load.bl_len = 1;
load.read = spl_ram_load_read;
-   spl_load_simple_fit(, 0, header);
+   spl_load_simple_fit(spl_image, , 0, header);
} else {
debug("Legacy image\n");
/*
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index e2bb000..a14acce 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -82,7 +82,7 @@ int spl_load_image_fat(struct spl_image_info *spl_image,
load.filename = (void *)filename;
load.priv = NULL;
 
-   return spl_load_simple_fit(, 0, header);
+   return spl_load_simple_fit(spl_image, , 0, header);
} else {
err = spl_parse_image_header(spl_image, header);
if (err)
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index be86072..aae556f 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -123,7 +123,8 @@ static int get_aligned_image_size(struct spl_load_info 
*info, int data_size,
return (data_size + info->bl_len - 1) / info->bl_len;
 }
 
-int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit)
+int spl_load_simple_fit(struct spl_image_info *spl_image,
+   struct spl_load_info *info, ulong sector, void *fit)
 {
int sectors;
ulong size, load;
@@ -184,9 +185,9 @@ int spl_load_simple_fit(struct spl_load_info *info, ulong 
sector, void *fit)
data_size = fdt_getprop_u32(fit, node, "data-size");
load = fdt_getprop_u32(fit, node, "load");
debug("data_offset=%x, data_size=%x\n", data_offset, data_size);
-   spl_image.load_addr = load;
-   spl_image.entry_point = load;
-   spl_image.os = IH_OS_U_BOOT;
+   spl_image->load_addr = load;
+   spl_image->entry_point = load;
+   spl_image->os = IH_OS_U_BOOT;
 
/*
 * Work out where to place the image. We read it so that the first
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 16a6b49..c674e61 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -80,7 +80,7 @@ static int mmc_load_image_raw_sector(struct spl_image_info 
*spl_image,
load.filename = NULL;
load.bl_len = mmc->read_bl_len;
load.read = h_spl_load_read;
-   ret = spl_load_simple_fit(, sector, header);
+   ret = spl_load_simple_fit(spl_image, , sector, header);
} else {
ret = mmc_load_legacy(spl_image, mmc, sector, header);
}
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 5cf712e..d1abda6 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -59,7 +59,7 @@ static int spl_nand_load_element(struct spl_image_info 
*spl_image,
load.filename = NULL;
load.bl_len = 1;
load.read = spl_nand_fit_read;
-   return spl_load_simple_fit(, offset, header);
+   return spl_load_simple_fit(spl_image, , offset, header);
} else {
err = spl_parse_image_header(spl_image, header);
if (err)
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 4bf3d65..a3caafb 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -108,7 +108,7 @@ static int spl_spi_load_image(struct spl_image_info 
*spl_image,
load.filename = NULL;
load.bl_len = 1;
load.read = spl_spi_fit_read;
-   err = spl_load_simple_fit(,
+   err = spl_load_simple_fit(spl_image, ,
  CONFIG_SYS_SPI_U_BOOT_OFFS,
  header);
} else {
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 8fbf895..13e8e51 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -103,7 +103,7 @@ static int spl_ymodem_load_image(struct spl_image_info 
*spl_image,
info.buf = buf;
info.image_read = BUF_SIZE;
load.read = ymodem_read_fit;
-   ret =  spl_load_simple_fit(, 0, (void *)buf);
+   ret = spl_load_simple_fit(spl_image, , 0, (void *)buf);
size = 

[U-Boot] [PATCH 22/27] spl: Convert spl_board_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code. Update existing users.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-sunxi/board.c  |  5 -
 arch/arm/mach-uniphier/boot-mode/spl_board.c |  3 ++-
 arch/sandbox/cpu/spl.c   |  3 ++-
 common/spl/spl.c | 13 ++---
 include/spl.h|  8 
 5 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 8a385a2..22f3e3c 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -133,13 +133,16 @@ static int gpio_init(void)
return 0;
 }
 
-int spl_board_load_image(struct spl_boot_device *bootdev)
+#ifdef CONFIG_SPL_BUILD
+static int spl_board_load_image(struct spl_boot_device *bootdev)
 {
debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr);
return_to_fel(fel_stash.sp, fel_stash.lr);
 
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image);
+#endif
 
 void s_init(void)
 {
diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c 
b/arch/arm/mach-uniphier/boot-mode/spl_board.c
index 4eadc2f..e2b202e 100644
--- a/arch/arm/mach-uniphier/boot-mode/spl_board.c
+++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c
@@ -65,7 +65,7 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32),
return 0;
 }
 
-int spl_board_load_image(struct spl_boot_device *bootdev)
+static int spl_board_load_image(struct spl_boot_device *bootdev)
 {
int (*send_cmd)(u32 cmd, u32 arg);
int (*card_blockaddr)(u32 rca);
@@ -126,3 +126,4 @@ int spl_board_load_image(struct spl_boot_device *bootdev)
 
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image);
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 4cee293..2c45354 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -38,7 +38,7 @@ void spl_board_announce_boot_device(void)
printf("%s\n", fname);
 }
 
-int spl_board_load_image(struct spl_boot_device *bootdev)
+static int spl_board_load_image(struct spl_boot_device *bootdev)
 {
char fname[256];
int ret;
@@ -50,6 +50,7 @@ int spl_board_load_image(struct spl_boot_device *bootdev)
/* Hopefully this will not return */
return os_spl_to_uboot(fname);
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image);
 
 void spl_board_init(void)
 {
diff --git a/common/spl/spl.c b/common/spl/spl.c
index c5b5572..e0d0c9e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -372,19 +372,10 @@ static int spl_load_image(u32 boot_device)
if (loader)
return loader->load_image();
 
-   switch (boot_device) {
-#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
-   case BOOT_DEVICE_BOARD:
-   return spl_board_load_image();
-#endif
-   default:
 #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
-   puts("SPL: Unsupported Boot Device!\n");
+   puts("SPL: Unsupported Boot Device!\n");
 #endif
-   return -ENODEV;
-   }
-
-   return -EINVAL;
+   return -ENODEV;
 }
 
 void board_init_r(gd_t *dummy1, ulong dummy2)
diff --git a/include/spl.h b/include/spl.h
index 24a6ec4..cfab92b 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -219,12 +219,4 @@ void spl_board_init(void);
  */
 bool spl_was_boot_source(void);
 
-/**
- * Board-specific load method for boards that have a special way of loading
- * U-Boot, which does not fit with the existing SPL code.
- *
- * @return 0 on success, negative errno value on failure.
- */
-int spl_board_load_image(struct spl_boot_device *bootdev);
-
 #endif
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 18/27] spl: spi: Move the generic SPI loader into common/spl

2016-09-18 Thread Simon Glass
All the other SPL loaders are in this directory, so move the SPI one in
there too.

There are two board-specific SPI loaders (fsl and sunxi). These remain in
the drivers/mtd/spi directory, since they do not contain generic code.

Signed-off-by: Simon Glass 
---

 common/spl/Makefile| 1 +
 drivers/mtd/spi/spi_spl_load.c => common/spl/spl_spi.c | 0
 drivers/mtd/spi/Makefile   | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/mtd/spi/spi_spl_load.c => common/spl/spl_spi.c (100%)

diff --git a/common/spl/Makefile b/common/spl/Makefile
index b15f0f6..275b06c 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -24,4 +24,5 @@ obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o
 obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
 obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o
 obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o
+obj-$(CONFIG_SPL_SPI_LOAD) += spl_spi.o
 endif
diff --git a/drivers/mtd/spi/spi_spl_load.c b/common/spl/spl_spi.c
similarity index 100%
rename from drivers/mtd/spi/spi_spl_load.c
rename to common/spl/spl_spi.c
diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 6f47a66..f3dc409 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -8,7 +8,6 @@
 obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o
 
 ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o
 obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o
 obj-$(CONFIG_SPL_SPI_SUNXI)+= sunxi_spi_spl.o
 endif
-- 
2.8.0.rc3.226.g39d4020

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


Re: [U-Boot] [PATCH v2 01/17] imx: iomux-v3: Fix build error with snvs base

2016-09-18 Thread Jagan Teki
On Sun, Sep 18, 2016 at 12:33 PM, Peng Fan  wrote:
> Hi Jagan,
> On Sat, Sep 17, 2016 at 02:18:33AM +0530, Jagan Teki wrote:
>>snvs base is added only for i.MX6ULL but the code is
>>added for common, so firing build error while compiling
>>other i.MX6 SOC's
>>
>>Issue observed with the below patch
>>"imx: mx6ull: Update memory map address"
>>(sha1: e8eac1b5b3a98a06426bc4867c03c38329841e5c)
>>
>>Build log:
>>  CC  arch/arm/imx-common/iomux-v3.o
>>arch/arm/imx-common/iomux-v3.c: In function 'imx_iomux_v3_setup_pad':
>>arch/arm/imx-common/iomux-v3.c:56:19: error: 'IOMUXC_SNVS_BASE_ADDR' 
>>undeclared (first use in this function)
>>base = (void *)IOMUXC_SNVS_BASE_ADDR;
>
> CONFIG_IOMUX_LPSR is only needed for i.MX7 and i.MX6ULL now.
> CONFIG_IOMUX_LPSR is defined in your configuration?
> I did not meet such build error.

Observed this when I did imx6ul, will skip this this series.

thanks!
-- 
Jagan Teki
Free Software Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/27] spl: Convert spl_ubi_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 6 --
 common/spl/spl_ubi.c | 3 +++
 include/spl.h| 3 ---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 265a689..5ddc08d 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -373,11 +373,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image();
 
switch (boot_device) {
-#ifdef CONFIG_SPL_UBI
-   case BOOT_DEVICE_NAND:
-   case BOOT_DEVICE_ONENAND:
-   return spl_ubi_load_image();
-#else
 #ifdef CONFIG_SPL_NAND_SUPPORT
case BOOT_DEVICE_NAND:
return spl_nand_load_image();
@@ -386,7 +381,6 @@ static int spl_load_image(u32 boot_device)
case BOOT_DEVICE_ONENAND:
return spl_onenand_load_image();
 #endif
-#endif
 #ifdef CONFIG_SPL_NOR_SUPPORT
case BOOT_DEVICE_NOR:
return spl_nor_load_image();
diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c
index d64e6cf..3ef00aa 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -76,3 +76,6 @@ out:
 #endif
return ret;
 }
+/* Use priorty 0 so that Ubi will override NAND and ONENAND methods */
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NAND, spl_ubi_load_image);
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_ONENAND, spl_ubi_load_image);
diff --git a/include/spl.h b/include/spl.h
index dc57c66..cdcd88f 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -190,9 +190,6 @@ int spl_onenand_load_image(struct spl_boot_device *bootdev);
 /* NOR SPL functions */
 int spl_nor_load_image(struct spl_boot_device *bootdev);
 
-/* UBI SPL functions */
-int spl_ubi_load_image(struct spl_boot_device *bootdev);
-
 /* YMODEM SPL functions */
 int spl_ymodem_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 16/27] spl: Convert spl_usb_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c | 4 
 common/spl/spl_usb.c | 3 ++-
 include/spl.h| 3 ---
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 15e8de7..70cec61 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -389,10 +389,6 @@ static int spl_load_image(u32 boot_device)
bootdev.boot_device_name = "usb_ether";
return spl_net_load_image();
 #endif
-#ifdef CONFIG_SPL_USB_SUPPORT
-   case BOOT_DEVICE_USB:
-   return spl_usb_load_image();
-#endif
 #ifdef CONFIG_SPL_SATA_SUPPORT
case BOOT_DEVICE_SATA:
return spl_sata_load_image();
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index f990336..2bc321a 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static int usb_stor_curr_dev = -1; /* current device */
 #endif
 
-int spl_usb_load_image(struct spl_boot_device *bootdev)
+static int spl_usb_load_image(struct spl_boot_device *bootdev)
 {
int err;
struct blk_desc *stor_dev;
@@ -61,3 +61,4 @@ int spl_usb_load_image(struct spl_boot_device *bootdev)
 
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USB, spl_usb_load_image);
diff --git a/include/spl.h b/include/spl.h
index 3605911..677e3a1 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -187,9 +187,6 @@ int spl_spi_load_image(struct spl_boot_device *bootdev);
 /* Ethernet SPL functions */
 int spl_net_load_image(struct spl_boot_device *bootdev);
 
-/* USB SPL functions */
-int spl_usb_load_image(struct spl_boot_device *bootdev);
-
 /* SATA SPL functions */
 int spl_sata_load_image(struct spl_boot_device *bootdev);
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 17/27] spl: Convert spl_sata_load_image() to use linker list

2016-09-18 Thread Simon Glass
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass 
---

 common/spl/spl.c  | 4 
 common/spl/spl_sata.c | 3 ++-
 include/spl.h | 3 ---
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 70cec61..5dd2548 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -389,10 +389,6 @@ static int spl_load_image(u32 boot_device)
bootdev.boot_device_name = "usb_ether";
return spl_net_load_image();
 #endif
-#ifdef CONFIG_SPL_SATA_SUPPORT
-   case BOOT_DEVICE_SATA:
-   return spl_sata_load_image();
-#endif
 #ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
case BOOT_DEVICE_BOARD:
return spl_board_load_image();
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 77fd73c..1a21c05 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -20,7 +20,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int spl_sata_load_image(struct spl_boot_device *bootdev)
+static int spl_sata_load_image(struct spl_boot_device *bootdev)
 {
int err;
struct blk_desc *stor_dev;
@@ -53,3 +53,4 @@ int spl_sata_load_image(struct spl_boot_device *bootdev)
 
return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_SATA, spl_sata_load_image);
diff --git a/include/spl.h b/include/spl.h
index 677e3a1..279896d 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -187,9 +187,6 @@ int spl_spi_load_image(struct spl_boot_device *bootdev);
 /* Ethernet SPL functions */
 int spl_net_load_image(struct spl_boot_device *bootdev);
 
-/* SATA SPL functions */
-int spl_sata_load_image(struct spl_boot_device *bootdev);
-
 /* SPL FAT image functions */
 int spl_load_image_fat(struct blk_desc *block_dev, int partition,
   const char *filename);
-- 
2.8.0.rc3.226.g39d4020

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


Re: [U-Boot] [PATCH 00/15] ARM: uniphier: more updates for UniPhier SoC family for v2016.11-rc1

2016-09-18 Thread Masahiro Yamada
2016-09-17 3:32 GMT+09:00 Masahiro Yamada :
>
>  - Add pinctrl driver for sLD3 SoC
>  - Do away with legacy pin-mux code
>  - refactoring of clock/PLL init code
>  - Add PLL init code for LD20 SoC
>  - Improvement of DRAM init code for LD20 SoC
>  - Misc cleanups
>
>
>
> Masahiro Yamada (15):
>   pinctrl: uniphier: support 4bit-width pin-mux register capability
>   pinctrl: uniphier: add UniPhier sLD3 pinctrl driver
>   ARM: dts: uniphier: add pinctrl device node and pinctrl properties
>   ARM: uniphier: select PINCTRL and SPL_PINCTRL
>   ARM: uniphier: remove redundant pin-muxing for EA24 pin of sLD3 SoC
>   ARM: uniphier: remove ad-hoc pin-mux code for sLD3
>   ARM: uniphier: consolidate NAND pin-mux settings
>   ARM: dts: uniphier: include System Bus pin group node in SPL DT
>   ARM: uniphier: consolidate System Bus pin-mux settings for LD11/LD20
>   ARM: uniphier: move XIRQ pin-mux settings of LD11/LD20
>   ARM: uniphier: rename CONFIG_DPLL_SSC_RATE_1PER
>   ARM: uniphier: move PLL init code to U-Boot proper where possible
>   ARM: uniphier: collect clock/PLL init code into a single directory
>   ARM: uniphier: add PLL init code for LD20 SoC
>   ARM: uniphier: update DRAM init code for LD20 SoC

applied to u-boot-uniphier.




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


Re: [U-Boot] [U-Boot, v3, 19/45] Convert CONFIG_SPL_EXT_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:37PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 18/45] Convert CONFIG_SPL_ETH_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:36PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 17/45] Convert CONFIG_SPL_ENV_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:35PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 20/45] Convert CONFIG_SPL_FAT_SUPPORT to Kconfig

2016-09-18 Thread Tom Rini
On Mon, Sep 12, 2016 at 11:18:38PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


  1   2   3   >