Re: [U-Boot] [PATCH][v2] armv8: ls1012a: Updating CONFIG_EXTRA_ENV_SETTINGS

2016-10-06 Thread Pratiyush Srivastava


> -Original Message-
> From: york sun
> Sent: Thursday, October 06, 2016 10:19 PM
> To: Pratiyush Srivastava ; u-
> b...@lists.denx.de
> Cc: Prabhakar Kushwaha 
> Subject: Re: [PATCH][v2] armv8: ls1012a: Updating
> CONFIG_EXTRA_ENV_SETTINGS
> 
> On 10/04/2016 04:38 AM, Pratiyush Mohan Srivastava wrote:
> > Remove ramdisk_addr, ramdisk_size and update UART baud-rate.
> >
> > Signed-off-by: Prabhakar Kushwaha 
> > Signed-off-by: Pratiyush Mohan Srivastava
> 
> > ---
> > Changes for v2 :
> > - Removed "initrd_high=0x\0"
> > - Removed console variable
> >
> >  include/configs/ls1012a_common.h | 4 
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/include/configs/ls1012a_common.h
> b/include/configs/ls1012a_common.h
> > index af45993..02cbf5d 100644
> > --- a/include/configs/ls1012a_common.h
> > +++ b/include/configs/ls1012a_common.h
> > @@ -106,19 +106,15 @@
> >
> >  /* Initial environment variables */
> >  #define CONFIG_EXTRA_ENV_SETTINGS  \
> > -   "initrd_high=0x\0"  \
> > "verify=no\0"   \
> > "hwconfig=fsl_ddr:bank_intlv=auto\0"\
> 
> I realize this hwconfig is not used. Please remove.
[Pratiyush>] Ok .I will remove it.
> 
> York
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][v3] board: ls1012afrdm: overwrite CONFIG_EXTRA_ENV_SETTINGS

2016-10-06 Thread Pratiyush Srivastava


> -Original Message-
> From: york sun
> Sent: Thursday, October 06, 2016 10:02 PM
> To: Pratiyush Srivastava ; u-
> b...@lists.denx.de
> Cc: Prabhakar Kushwaha 
> Subject: Re: [PATCH][v3] board: ls1012afrdm: overwrite
> CONFIG_EXTRA_ENV_SETTINGS
> 
> On 10/04/2016 04:38 AM, Pratiyush Mohan Srivastava wrote:
> > LS1012AFRDM has 512MB of DDR.
> > So update Kernel load address as 0x9600 instead of default
> > 0xa000.
> >
> > Signed-off-by: Prabhakar Kushwaha 
> > Signed-off-by: Pratiyush Mohan Srivastava
> > 
> > ---
> > Changes for v3:
> > - Rebased v2 patch to master
> > - Removed "initrd_high=0x\0"
> > - Removed console variable "console=ttyAMA0,115200n8\0"
> >
> > Changes for v2: Incorporated York's comments
> > - Removed ramdisk_addr, ramdisk_size
> > - Updated UART baud-rate.
> >
> >  include/configs/ls1012afrdm.h | 12 
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/include/configs/ls1012afrdm.h
> > b/include/configs/ls1012afrdm.h index 612f243..5763d86 100644
> > --- a/include/configs/ls1012afrdm.h
> > +++ b/include/configs/ls1012afrdm.h
> > @@ -20,6 +20,18 @@
> >  #define CONFIG_SYS_MEMTEST_START   0x8000
> >  #define CONFIG_SYS_MEMTEST_END 0x9fff
> >
> > +#undef CONFIG_EXTRA_ENV_SETTINGS
> > +#define CONFIG_EXTRA_ENV_SETTINGS  \
> > +   "verify=no\0"   \
> 
> Why do you need this?
[Pratiyush>] This is needed for fast-boot.
> 
> > +   "hwconfig=fsl_ddr:bank_intlv=auto\0"\
> 
> This board doesn't use Freescale DDR driver. This hwconfig is not used.
[Pratiyush>] ok I will remove it
> 
> > +   "loadaddr=0x8010\0" \
> > +   "kernel_addr=0x10\0"\
> > +   "fdt_high=0x\0" \
> > +   "initrd_high=0x\0"  \
> > +   "kernel_start=0xa0\0"   \
> > +   "kernel_load=0x9600\0"  \
> > +   "kernel_size=0x280\0"
> > +
> 
> York

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


Re: [U-Boot] [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs

2016-10-06 Thread Sriram Dash
>From: york sun
>Sent: Thursday, October 06, 2016 9:33 PM
>To: Sriram Dash ; u-boot@lists.denx.de
>Cc: Prabhakar Kushwaha ;
>albert.u.b...@aribaud.net; Suresh Gupta 
>Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs
>
>On 10/05/2016 11:03 PM, Sriram Dash wrote:
>>> From: york sun
>>> Sent: Thursday, October 06, 2016 12:37 AM
>>> To: Sriram Dash ; u-boot@lists.denx.de
>>> Cc: Prabhakar Kushwaha ;
>>> albert.u.b...@aribaud.net; Suresh Gupta 
>>> Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in
>>> defconfigs
>>>
>>> On 09/28/2016 11:18 PM, Sriram Dash wrote:
 Enables driver model flag CONFIG_DM_USB for LS2080A platform
 defconfigs.

 Signed-off-by: Sriram Dash 
 ---
  configs/ls2080aqds_SECURE_BOOT_defconfig | 1 +
  configs/ls2080aqds_defconfig | 1 +
  configs/ls2080aqds_nand_defconfig| 1 +
  configs/ls2080aqds_qspi_defconfig| 1 +
  configs/ls2080ardb_SECURE_BOOT_defconfig | 1 +
  configs/ls2080ardb_defconfig | 1 +
  configs/ls2080ardb_nand_defconfig| 2 ++
  7 files changed, 8 insertions(+)
>>>
>>> Sriram,
>>>
>>> Please retest ls2080ardb_nand. It fails in my build.
>>>
>>> "undefined reference to `dm_scan_fdt_dev'"
>>>
>>
>> Hello York,
>>
>> As of now, nand boot is disfeatured and hence, the config is missing
>> some features
>
>NAND boot may be defeatured for the SDK, but not for U-Boot. It is not big 
>burden
>to maintain it. Let's keep it running, shall we?
>

OK.

>> for the nand boot. For this case, as the device tree is not enabled,
>> the function isn't compiled. Setting CONFIG_OF_CONTROL and
>CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
>> will make it compile without errors.
>>
>> However, I will remove the the USB DM feature for nand in the next revision.
>
>Can you add the device tree support for NAND boot?
>

Sure. I will add the support for the device tree in next patch rev.

>York

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


[U-Boot] [PATCH v4 2/2] ARM: sun7i: dts: add support for Sinovoip/Bananapi R1

2016-10-06 Thread Stephen Arnold
From: Steve Arnold 

Signed-off-by: Steve Arnold 
Cc: Ian Campbell 
Cc: Hans De Goede 
---
 arch/arm/dts/Makefile  |   1 +
 arch/arm/dts/sun7i-a20-bananapi-r1.dts | 376 +
 2 files changed, 377 insertions(+)
 create mode 100644 arch/arm/dts/sun7i-a20-bananapi-r1.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 032c5ae..0cbae00 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -216,6 +216,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-ainol-aw1.dtb \
sun7i-a20-bananapi.dtb \
sun7i-a20-bananapi-m1-plus.dtb \
+   sun7i-a20-bananapi-r1.dtb \
sun7i-a20-bananapro.dtb \
sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \
diff --git a/arch/arm/dts/sun7i-a20-bananapi-r1.dts 
b/arch/arm/dts/sun7i-a20-bananapi-r1.dts
new file mode 100644
index 000..1a550f9
--- /dev/null
+++ b/arch/arm/dts/sun7i-a20-bananapi-r1.dts
@@ -0,0 +1,376 @@
+/*
+ * Copyright 2015 Hans de Goede 
+ * Changes copyright 2016 Stephen Arnold 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include 
+#include 
+#include 
+
+/ {
+   model = "Banana Pi BPI-R1";
+   compatible = "sinovoip,bpi-r1", "allwinner,sun7i-a20";
+
+   aliases {
+   serial0 = 
+   serial1 = 
+   serial2 = 
+   serial3 = 
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   leds {
+   compatible = "gpio-leds";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins_bpi_r1>;
+
+   green {
+   label = "bpi-r1:green:usr";
+   gpios = < 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
+   linux,default-trigger = "heartbeat";
+   };
+   };
+
+   reg_gmac_3v3: gmac-3v3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = "default";
+   pinctrl-0 = <_power_pin_bpi_r1>;
+   regulator-name = "gmac-3v3";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   startup-delay-us = <10>;
+   enable-active-high;
+   gpio = < 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
+   };
+
+};
+
+ {
+   target-supply = <_ahci_5v>;
+   status = "okay";
+};
+
+ {
+   cpu-supply = <_dcdc2>;
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins_rgmii_a>;
+   phy = <>;
+   phy-mode = "rgmii";
+   phy-supply = <_gmac_3v3>;
+   status = "okay";
+
+   fixed-link {
+   speed = <1000>;
+   full-duplex;
+

[U-Boot] [PATCH v4 0/2] ARM: add support for Bananapi BPI-R1

2016-10-06 Thread Stephen Arnold
From: Steve Arnold 

* changes from lamobo-r1 required include:
  - unset ahci power pin
  - usbvbus gpio pin change
  - mmc cd gpio pin change
  - enable uart2, set default LED trigger
  - CONFIG_GMAC_TX_DELAY change

Changes for v2:
  - incorprated feedback for config options (remove 3, add 1)
Changes for v3/v4:
  - re-submit (no change to patch payload) with cover

Steve Arnold (2):
  ARM: sun7i: config: add config for Sinovoip/Bananapi BPI-R1
  ARM: sun7i: dts: add support for Sinovoip/Bananapi BPI-R1

 arch/arm/dts/Makefile  |   1 +
 arch/arm/dts/sun7i-a20-bananapi-r1.dts | 376 +
 configs/Bananapi_R1_defconfig  |  16 ++
 3 files changed, 393 insertions(+)
 create mode 100644 arch/arm/dts/sun7i-a20-bananapi-r1.dts
 create mode 100644 configs/Bananapi_R1_defconfig

Signed-off-by: Steve Arnold 
Cc: Ian Campbell 
Cc: Hans De Goede 

-- 
2.9.3

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


[U-Boot] [PATCH v4 1/2] ARM: sun7i: config: add config for Sinovoip/Bananapi R1

2016-10-06 Thread Stephen Arnold
From: Steve Arnold 

Signed-off-by: Steve Arnold 
Cc: Ian Campbell 
Cc: Hans De Goede 
---
 configs/Bananapi_R1_defconfig | 16 
 1 file changed, 16 insertions(+)
 create mode 100644 configs/Bananapi_R1_defconfig

diff --git a/configs/Bananapi_R1_defconfig b/configs/Bananapi_R1_defconfig
new file mode 100644
index 000..3743d5c
--- /dev/null
+++ b/configs/Bananapi_R1_defconfig
@@ -0,0 +1,16 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN7I=y
+CONFIG_DRAM_CLK=432
+CONFIG_GMAC_TX_DELAY=3
+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi-r1"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_DM_ETH=y
+CONFIG_PHYLIB=y
+# CONFIG_RTL8211X_PHY_FORCE_MASTER=y
-- 
2.9.3

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


Re: [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL

2016-10-06 Thread Eric Anholt
Stefan Bruens  writes:

> On Donnerstag, 6. Oktober 2016 12:32:12 CEST Eric Anholt wrote:
>> Alexander Graf  writes:
>> >> Am 05.10.2016 um 18:48 schrieb Fabian Vogt :
>> >> 
>> >> Hi,
>> >> 
>> >> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
>> >>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
>>  This patch series modifies the used drivers to work with OF_CONTROL
>>  and switches the board code and configs to use it.
>>  The added device trees are directly from the linux kernel tree
>>  and can thus be used for booting the (upstream) kernel.
>> >>> 
>> >>> Is there a user-visible or developer-visible benefit to this change? In
>> >>> general, converting to use DT to instantiate devices simply ends up
>> >>> using more code (and hence complexity and time) to get to the exact same
>> >>> state afterwards.
>> >> 
>> >> There are various reasons, like:
>> >> 
>> >> - The device tree describes the platform, so it can also be used by the
>> >> 
>> >>  linux kernel for configuration (no separate dtb needed)
>> > 
>> > With a bit of lobbying, we might even be able to get a working dt from
>> > the rpi firmware. That again would enable awesome things like hat
>> > support in u-boot :).
>> 
>> I can't imagine the firmware handing any DT off to the kernel other than
>> the one that's being shipped from whatever kernel is being loaded.
>> Being able to update the DT in lockstep with the kernel is very much
>> part of their process.  (This makes linux insisting that DT is ABI that
>> must maintain backwards compat quite painful for upstreaming)
>> 
>> Given that the firmware already hands the kernel's DT back to the
>> kernel, it seems like we should be able to load the kernel's DT too if
>> we wanted that.
>
> You mean the DT modified by the firmware according to config.txt, at least 
> applying the specified DT overlays?

Yeah, that.


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


Re: [U-Boot] [PATCH 0/6] ARM: Introduce function to switch to hypervisor mode and enable LPAE

2016-10-06 Thread Keerthy



On Wednesday 14 September 2016 10:43 AM, Keerthy wrote:

On SoCs like DRA7, OMAP5 one cannot enable hypervisor mode directly from the
u-boot because the ROM code puts the chip to supervisor mode after it
jumps to boot loader.

Patch 1-4 enable LPAE.

Patch 5: Introduces a weak function which can be overridden specific to
SoCs to switch to hypervisor mode.

Patch 6: overrides weak function in patch 1 switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for hypervisor mode on OMAP5 based SoCs.

Tested on AM57XX-EVM, DRA7XX-EVM.


Tom,

Can you pull this series please.

Regards,
Keerthy


Keerthy (6):
  omap: Remove hardcoding of mmu section shift to 20
  omap: Set appropriate cache configuration for LPAE and non-LAPE cases
  configs: am57xx_evm_defconfig: Enable LPAE mode
  configs: dra7xx_evm_defconfig: Enable LPAE mode
  ARM: Introduce function to switch to hypervisor mode
  ARM: OMAP5+: Override switch_to_hypervisor function

 arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 24 +
 arch/arm/cpu/armv7/omap-common/omap-cache.c| 29 ++
 arch/arm/cpu/armv7/start.S | 21 +++
 arch/arm/include/asm/system.h  |  4 
 configs/am57xx_evm_defconfig   |  1 +
 configs/dra7xx_evm_defconfig   |  1 +
 6 files changed, 76 insertions(+), 4 deletions(-)


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


Re: [U-Boot] Unable to boot from QSPI (u-boot 2016.11-rc1)

2016-10-06 Thread Teoh Choon Zone
Hi,

Can you elaborate more on which file or function to look at? I am quite new
to u-boot.

On Thu, Oct 6, 2016 at 11:31 PM, Jagan Teki 
wrote:

> On Tue, Oct 4, 2016 at 1:10 PM, Teoh Choon Zone
>  wrote:
> > Hi all,
> >
> > I have a custom board based on Altera Cyclone V SoC, when I tried to boot
> > from QSPI, it stuck in a boot loop, I try to enable some debug message,
> and
> > here it is:
> >
> > U-Boot SPL 2016.09.01 (Oct 03 2016 - 18:14:42)
> > drivers/ddr/altera/sequencer.c: Preparing to start memory calibration
> > drivers/ddr/altera/sequencer.c: CALIBRATION PASSED
> > drivers/ddr/altera/sequencer.c: Calibration complete
> > bind node soc
> >- found match at 'generic_simple_bus'
> > bind node dwmmc0@ff704000
> >- found match at 'socfpga_dwmmc'
> > Bound device dwmmc0@ff704000 to soc
> > bind node spi@ff705000
> >- found match at 'cadence_spi'
> > bind node n25q00@0
> > No match for node 'n25q00@0'
> > Bound device spi@ff705000 to soc
> > Bound device soc to root_driver
> > Trying to boot from SPI
> > Bound device spi_flash to spi@ff705000
> > SF: Got idcodes
> > x: x x x x x  .!.D
> >
> >
> > u-boot from Altera working fine, but I plan to use the mainline u-boot.
> Any
> > idea why it does not work?
>
> Look like some controller init issue for getting RDID, try to probe in
> u-boot instead SPL.
>
> thanks!
> --
> Jagan Teki
> Free Software Engineer | www.openedev.com
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Cash flash correction of do_load()

2016-10-06 Thread Tom Rini
On Sun, Sep 25, 2016 at 12:10:07PM +0900, yoko wrote:

> Signed-off-by: yoko 
> ---
>  fs/fs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
>  For a program execution abnormal measure by the fatload command, cash flash 
> processing is added to do_load().

Can you please move this bottom part into the commit message itself and
elaborate on why we need a flush, and here, rather than say in 'go' or
'bootelf' or .. ?  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] ML: SPL: NOR: Add CONFIG_SPL_NOR_COPY_ENTIRE_IMAGE define to enable whole image copy from NOR

2016-10-06 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.
> 
> Signed-off-by: Lukasz Majewski 

Please re-base this on top of 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, 16/16] README: Fix CONFIG_SYS_NAND_MAX_DEVICE typo

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:11PM -0600, Simon Glass wrote:

> This should be CONFIG_SYS_MAX_NAND_DEVICE. Fix it.
> 
> Signed-off-by: Simon Glass 
> Acked-by: Scott Wood 
> Reviewed-by: Bin Meng 

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,14/16] README: Drop README.imx31

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:09PM -0600, Simon Glass wrote:

> The only content of this file is CONFIG options which are no-longer present
> in U-Boot. Drop it.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,13/16] atmel: Drop README.at91-soc

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:08PM -0600, Simon Glass wrote:

> This issue covered by this doc appears to be fixed, so let's remove the
> README.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> Acked-by: Andreas Bießmann 

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,15/16] README: Drop CONFIG_MPC8349ADS

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:10PM -0600, Simon Glass wrote:

> This option is not used now.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,12/16] README: Drop CONFIG_SYS_USE_OSCCLK

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:07PM -0600, Simon Glass wrote:

> This is not used in U-Boot so drop it.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,11/16] README: Drop CONFIG_SYS_INIT_DATA_SIZE

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:06PM -0600, Simon Glass wrote:

> This appears to be calculated automatically now. Drop the old reference.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,07/16] README: Drop CONFIG_LAN91C96_BASE

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:02PM -0600, Simon Glass wrote:

> This is not used in U-Boot.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,08/16] README: Drop CONFIG_SYS_USB_BRG_CLK

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:03PM -0600, Simon Glass wrote:

> This is not used in U-Boot.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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, 10/16] README: i2c: Drop unused i2c CONFIG options

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:05PM -0600, Simon Glass wrote:

> CONFIG_SYS_NUM_I2C_ADAPTERS and CONFIG_SYS_I2C_MULTI_NOPROBES are not used
> in U-Boot, so drop them.
> 
> Signed-off-by: Simon Glass 
> Acked-by: Heiko Schocher 
> Reviewed-by: Bin Meng 

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, 09/16] README: sh: Drop CONFIG_SYS_I2C_SH_BASE5

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:04PM -0600, Simon Glass wrote:

> This is not used in U-Boot. Drop both the BASE and the SIZE config.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,04/16] README: Drop unused JFFS2 options

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:00:59PM -0600, Simon Glass wrote:

> There appear to be neither implemented nor used. Drop them.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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, 05/16] README: Drop unused CONFIG_SYS_LS_MC_FW_... options

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:00PM -0600, Simon Glass wrote:

> Drop a few that are not used in U-Boot.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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, 03/16] README: Correct CONFIG_ENV_OFFSET_RENDUND typo

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:00:58PM -0600, Simon Glass wrote:

> Change this to CONFIG_ENV_OFFSET_REDUND.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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, 02/16] README: Drop CONFIG_COGENT and related options

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:00:57PM -0600, Simon Glass wrote:

> These are no-longer present in U-Boot. Drop them.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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,06/16] README: Drop CONFIG_OF_BOOT_CPU

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:01:01PM -0600, Simon Glass wrote:

> This is not used in U-Boot.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

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, 01/16] README: Drop old Intel Monahans comment

2016-10-06 Thread Tom Rini
On Sun, Oct 02, 2016 at 06:00:56PM -0600, Simon Glass wrote:

> This is no longer in the U-Boot source code, so drop this note from the
> README.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 27/27] spl: Make spl_boot_list a local variable

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:17PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:15PM -0600, Simon Glass wrote:

> Update the fat loader to avoid using the spl_image global variable.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:14PM -0600, Simon Glass wrote:

> Update the ext loader to avoid using the spl_image global variable.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:16PM -0600, Simon Glass wrote:

> Upda the SPL FIT code to use the spl_image parameter.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:12PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code. Update existing users.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:13PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:07PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:08PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:11PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:09PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:10PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:03PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:06PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:04PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:05PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:02PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:59PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Converted the DFU case as well and applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 07/27] spl: Convert boot_device into a struct

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:57PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:58PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:01PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:20:00PM -0600, Simon Glass wrote:

> Add a linker list declaration for this method and remove the explicit
> switch() code.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:53PM -0600, Simon Glass wrote:

> Instead of using the global spl_image variable, pass the required struct in
> as an argument.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:55PM -0600, Simon Glass wrote:

> Add some comments to describe this function.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:52PM -0600, Simon Glass wrote:

> Rather than act on the global variable, pass the required struct in as a
> parameter.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:54PM -0600, Simon Glass wrote:

> Instead of using the global spl_image variable, pass the required struct in
> as an argument.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 06/27] spl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:56PM -0600, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing uses. Also add a function
> comment to the header file.
> 
> Signed-off-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-10-06 Thread Tom Rini
On Sat, Sep 24, 2016 at 06:19:51PM -0600, Simon Glass wrote:

> 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 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] serial: ns16550: Handle -ENOENT when requesting clock

2016-10-06 Thread Tom Rini
On Fri, Sep 30, 2016 at 05:37:00PM +0900, Alexandre Courbot wrote:

> When calling clk_get_by_index(), fall back to the legacy method of
> getting the clock if -ENOENT is returned.
> 
> Signed-off-by: Alexandre Courbot 
> Tested-by: Stephen Warren 
> Acked-by: Thierry Reding 

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] fastboot: add support for writing raw MMC

2016-10-06 Thread Jaehoon Chung
On 10/05/2016 10:38 PM, Petr Kulhavy wrote:
> The current fastboot implementation is only able to flash partition images.
> However sometimes it is needed to write the raw MMC, e.g. when storing the
> U-boot environment image or SPL.
> 
> This patch adds the possibility to write MMC as a block device using a
> special target name composed of "lba:" followed by the block address.
> The address can be in decimal or hexadecimal with the "0x" prefix.
> 
> Signed-off-by: Petr Kulhavy 
> ---
>  common/fb_mmc.c | 38 +-
>  doc/README.android-fastboot | 15 +++
>  2 files changed, 52 insertions(+), 1 deletion(-)
> 
> diff --git a/common/fb_mmc.c b/common/fb_mmc.c
> index 81a3bd0..c4fe2ac 100644
> --- a/common/fb_mmc.c
> +++ b/common/fb_mmc.c
> @@ -27,6 +27,9 @@
>  #define CONFIG_FASTBOOT_MBR_NAME "mbr"
>  #endif
>  
> +#define FB_RAW_PREFIX"lba:"
> +#define FB_RAW_PREFIX_LEN4
> +
>  struct fb_mmc_sparse {
>   struct blk_desc *dev_desc;
>  };
> @@ -68,6 +71,29 @@ static lbaint_t fb_mmc_sparse_reserve(struct 
> sparse_storage *info,
>   return blkcnt;
>  }
>  
> +/*
> + * attempt to interpret the partition name as raw LBA
> + * on success return 1 and fill info
> + * on failure (not a LBA matching name) return 0 (info undefined)
> + */
> +static int get_raw_part_info(const struct blk_desc *dev_desc, const char 
> *name,
> + disk_partition_t *info)

Is it right about "const struct blk_desc ..."? Why use "const"?

> +{
> + if (strlen(name) <= FB_RAW_PREFIX_LEN ||
> + strncmp(name, FB_RAW_PREFIX, FB_RAW_PREFIX_LEN) != 0)

strlen(name) was need to check?

> + return 0;
> +
> +#if CONFIG_SYS_64BIT_LBA
> + info->start = simple_strtoull(name + FB_RAW_PREFIX_LEN, NULL, 10);
> +#else
> + info->start = simple_strtoul(name + FB_RAW_PREFIX_LEN, NULL, 10);
> +#endif
> + info->size = dev_desc->lba - info->start;
> + info->blksz = dev_desc->blksz;
> +
> + return 1;
> +}
> +
>  static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t 
> *info,
>   const char *part_name, void *buffer,
>   unsigned int download_bytes)
> @@ -153,7 +179,17 @@ void fb_mmc_flash_write(const char *cmd, void 
> *download_buffer,
>   }
>  #endif
>  
> - if (part_get_info_by_name_or_alias(dev_desc, cmd, )) {
> + /* first try to interpret as a raw write */
> + if (get_raw_part_info(dev_desc, cmd, )) {
> + printf("%s: writing raw data at LBA 0x%llx\n", __func__,
> +(unsigned long long) info.start);
> + /* check if start is within the media */
> + if (info.start >= dev_desc->lba) {
> + error("Attempt to write beyond the end of media\n");
> + fastboot_fail("LBA write out of media");
> + return;
> + }
> + } else if (part_get_info_by_name_or_alias(dev_desc, cmd, )) {
>   error("cannot find partition: '%s'\n", cmd);
>   fastboot_fail("cannot find partition");
>   return;
> diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot
> index b8afa15..cbc42a1 100644
> --- a/doc/README.android-fastboot
> +++ b/doc/README.android-fastboot
> @@ -97,6 +97,21 @@ configuration options:
>  CONFIG_FASTBOOT_GPT_NAME
>  CONFIG_FASTBOOT_MBR_NAME
>  
> +Writing as a Block Device
> +=
> +Sometimes it is useful to write sections of eMMC which are not allocated as
> +partitions. For instance to store the SPL or U-Boot environment.
> +
> +This can be achieved by writing a special target with the name "lba:" (lower
> +case) followed by the block address at which the image should be stored. The
> +block address can be noted in decimal or hexadecimal (prefixed with "0x").
> +
> +Example command:
> +
> +  $ fastboot flash "lba:1024" uboot-env.bin
> +
> +This writes the uboot-env.bin image file at logical block 1024, i.e. 512KiB.
> +
>  In Action
>  =
>  Enter into fastboot by executing the fastboot command in u-boot and you
> 

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-06 Thread Jaehoon Chung
On 10/03/2016 02:39 AM, AneoX wrote:
> Emmc Card was the new one, so i just burn a dump of working sd. Previously
> sd have been wired to board for test.
> 
> Board is a custom,  like olinuxino lime which with nand and sd slot, 512 mb
> ram. So i using it defconfig and in case of sd card, it works.
> Emmc lines has external pullups according to the datasheet.

Well, i needs to get more information..If you guess that seems to return 0 from 
block_read()..
then you can find which condition was hit..is it impossible?

If you can share more debug message..then i will help you.

Best Regards,
Jaehoon Chung

> 
> 2 окт. 2016 г. 23:28 пользователь "Jagan Teki" 
> написал:
> 
> On Sun, Oct 2, 2016 at 10:45 PM, AneoX  wrote:
>> Like a sd card. I have emmc to sd adapter, so
>>
>> dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
> 
> I guess you cleaned[1] the card before doing this?
> 
>>
>> and then just solder emmc to my board.
> 
> OK, which a20 board?
> 
> [1] http://linux-sunxi.org/Bootable_SD_card
> 
> thanks!
> --
> Jagan Teki
> Free Software Engineer | www.openedev.com
> 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 mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL

2016-10-06 Thread Stefan Bruens
On Donnerstag, 6. Oktober 2016 12:32:12 CEST Eric Anholt wrote:
> Alexander Graf  writes:
> >> Am 05.10.2016 um 18:48 schrieb Fabian Vogt :
> >> 
> >> Hi,
> >> 
> >> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
> >>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
>  This patch series modifies the used drivers to work with OF_CONTROL
>  and switches the board code and configs to use it.
>  The added device trees are directly from the linux kernel tree
>  and can thus be used for booting the (upstream) kernel.
> >>> 
> >>> Is there a user-visible or developer-visible benefit to this change? In
> >>> general, converting to use DT to instantiate devices simply ends up
> >>> using more code (and hence complexity and time) to get to the exact same
> >>> state afterwards.
> >> 
> >> There are various reasons, like:
> >> 
> >> - The device tree describes the platform, so it can also be used by the
> >> 
> >>  linux kernel for configuration (no separate dtb needed)
> > 
> > With a bit of lobbying, we might even be able to get a working dt from
> > the rpi firmware. That again would enable awesome things like hat
> > support in u-boot :).
> 
> I can't imagine the firmware handing any DT off to the kernel other than
> the one that's being shipped from whatever kernel is being loaded.
> Being able to update the DT in lockstep with the kernel is very much
> part of their process.  (This makes linux insisting that DT is ABI that
> must maintain backwards compat quite painful for upstreaming)
> 
> Given that the firmware already hands the kernel's DT back to the
> kernel, it seems like we should be able to load the kernel's DT too if
> we wanted that.

You mean the DT modified by the firmware according to config.txt, at least 
applying the specified DT overlays?

Kind regards,

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/6] [RFC] at91: SPL clock fix for AT91SAM9G15 based boards.

2016-10-06 Thread Andreas Bießmann
Hi Heiko,

On 17.08.16 09:13, Heiko Schocher wrote:
> on a at91sam9g15 basd board I need another MOR register
> init as common for at91 based boards. Changes:
> 
> - set AT91_PMC_MOR_KEY to 0x37, without this writting has
>   no effect to tthis register.
> - AT91_PMC_MOR_OSCOUNT to 0
> - set AT91_PMC_MOR_MOSCEN and AT91_PMC_MOR_MOSCSEL
> 
> Signed-off-by: Heiko Schocher 
> 
> ---
> I post this as a RFC patch, because this settings may
> break other boards ... so if this is not a valid common
> setting, I propose to make this setting board configurable
> through a weak function ...
> 
>  arch/arm/mach-at91/spl_at91.c | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
> index cc3341a..4d8ed26 100644
> --- a/arch/arm/mach-at91/spl_at91.c
> +++ b/arch/arm/mach-at91/spl_at91.c
> @@ -31,13 +31,20 @@ static void enable_ext_reset(void)
>  void lowlevel_clock_init(void)
>  {
>   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
> + u32 tmp;
>  
>   if (!(readl(>sr) & AT91_PMC_MOSCS)) {
> - /* Enable Main Oscillator */
> - writel(AT91_PMC_MOSCS | (0x40 << 8), >mor);
> + tmp = readl(>mor);
> + tmp &= ~AT91_PMC_MOR_OSCOUNT(0xff);
> + tmp &= ~AT91_PMC_MOR_KEY(0xff);
> + tmp |= AT91_PMC_MOR_MOSCEN;
> + tmp |= AT91_PMC_MOR_MOSCSEL;
> + tmp |= AT91_PMC_MOR_OSCOUNT(0);

this is weird configuration to me. Why do you set the counter to 0? Is
the Oscillator really immediately stable? Or is it an external
Oscillator which should be bypassed?

Nevertheless, you should do a two step procedure here according to PMC
Programming Sequence. First switching the Oscillator on and second
activate the master clock from it. Each of the steps may poll the status
register for appropriate flags (or use interrupts).

Any chance to merge this lowlevel clock init with spl_atmel? At least
this part for enabling main oscillator.

Andreas

> + tmp |= AT91_PMC_MOR_KEY(0x37);
> + writel(tmp, >mor);
>  
>   /* Wait until Main Oscillator is stable */
> - while (!(readl(>sr) & AT91_PMC_MOSCS))
> + while (!(readl(>sr) & AT91_PMC_IXR_MOSCS))
>   ;
>   }
>  
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] at91: add function to set IO drive

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add new function to set I/O drive.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
>  arch/arm/mach-at91/include/mach/at91_pio.h |  5 +
>  arch/arm/mach-at91/include/mach/gpio.h |  2 ++
>  drivers/gpio/at91_gpio.c   | 29 +
>  3 files changed, 36 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
> b/arch/arm/mach-at91/include/mach/at91_pio.h
> index 8e054e1..535208a 100644
> --- a/arch/arm/mach-at91/include/mach/at91_pio.h
> +++ b/arch/arm/mach-at91/include/mach/at91_pio.h
> @@ -134,6 +134,7 @@ int at91_set_pio_debounce(unsigned port, unsigned pin, 
> int is_on, int div);
>  int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on);
>  int at91_set_pio_disable_schmitt_trig(unsigned port, unsigned pin);
>  #endif
> +int at91_set_pio_io_drive(unsigned port, unsigned pin, int value);
>  int at91_set_pio_input(unsigned port, unsigned pin, int use_pullup);
>  int at91_set_pio_multi_drive(unsigned port, unsigned pin, int is_on);
>  int at91_set_pio_output(unsigned port, unsigned pin, int value);
> @@ -151,4 +152,8 @@ int at91_get_pio_value(unsigned port, unsigned pin);
>  #define  AT91_PIO_PORTD  0x3
>  #define  AT91_PIO_PORTE  0x4
>  
> +/* allowed I/O driver values */
> +#define AT91_PIO_HI_DRIVE0

sama5 has 0 + 1 low drive, 2 medium and 3 hi :(

> +#define AT91_PIO_MEDIUM_DRIVE1
> +#define AT91_PIO_LOW_DRIVE   2
>  #endif
> diff --git a/arch/arm/mach-at91/include/mach/gpio.h 
> b/arch/arm/mach-at91/include/mach/gpio.h
> index 6d2a7b7..2b89309 100644
> --- a/arch/arm/mach-at91/include/mach/gpio.h
> +++ b/arch/arm/mach-at91/include/mach/gpio.h
> @@ -227,6 +227,8 @@ static inline unsigned pin_to_mask(unsigned pin)
>   at91_set_pio_value((x - PIN_BASE) / 32,(x % 32), y)
>  #define at91_get_gpio_value(x) \
>   at91_get_pio_value((x - PIN_BASE) / 32,(x % 32))
> +#define at91_set_gpio_io_drive(x, v) \
> + at91_set_pio_io_drive((x - PIN_BASE) / 32,(x % 32), v)
>  #else
>  #define at91_set_gpio_value(x, y)at91_set_pio_value(x, y)
>  #define at91_get_gpio_value(x)   at91_get_pio_value(x)
> diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
> index 8e52e3d..1f624f8 100644
> --- a/drivers/gpio/at91_gpio.c
> +++ b/drivers/gpio/at91_gpio.c
> @@ -358,6 +358,35 @@ int at91_set_pio_multi_drive(unsigned port, unsigned 
> pin, int is_on)
>   return 0;
>  }
>  
> +#if defined(CPU_HAS_PIO3)
> +/*
> + * set I/O driver value
> + */
> +int at91_set_pio_io_drive(unsigned port, unsigned pin, int value)
> +{
> + struct at91_port *at91_port = at91_pio_get_port(port);
> + u32 *reg;
> + u32 mask;
> +
> + if (pin > 15) {
> + reg = _port->io_driver2;
> + pin -= 16;
> + } else {
> + reg = _port->io_driver1;
> + }
> +
> + mask = 0x3 << (pin * 2);
> + clrsetbits_le32(reg, mask, value << (pin * 2));
> + return 0;
> +}
> +#else
> +int at91_set_pio_io_drive(unsigned port, unsigned pin, int value)
> +{
> + return -ENOENT;
> +}
> +#endif
> +
> +
>  static void at91_set_port_value(struct at91_port *at91_port, int offset,
>   int value)
>  {
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] arm, at91: add some missing fields in PIO struct

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add missing
> 
> u32 io_delay;   /* 0x110 I/O delay register */
> u32 io_driver1; /* 0x114 I/O driver register 1 */
> u32 io_driver2; /* 0x118 I/O driver register 2 */

This is also a mess ... it is true for sam9x5, but sama5d4 has 0x110
reserved, 0x114 reserved and 0x118 I/O driver register 1, same for
sama5d3 and persumably others ...

Why is is needed here? Couldn't we switch to device tree on the long run?

Andreas

> 
> fields in struct at91_port.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
>  arch/arm/mach-at91/include/mach/at91_pio.h | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
> b/arch/arm/mach-at91/include/mach/at91_pio.h
> index 3012278..8e054e1 100644
> --- a/arch/arm/mach-at91/include/mach/at91_pio.h
> +++ b/arch/arm/mach-at91/include/mach/at91_pio.h
> @@ -103,7 +103,11 @@ typedef struct at91_port {
>   u32 wpsr;   /* 0xE8 Write Protect Status Register */
>   u32 reserved11[5];  /* */
>   u32 schmitt;/* 0x100 Schmitt Trigger Register */
> - u32 reserved12[63];
> + u32 reserved12[3];
> + u32 io_delay;   /* 0x110 I/O delay register */
> + u32 io_driver1; /* 0x114 I/O driver register 1 */
> + u32 io_driver2; /* 0x118 I/O driver register 2 */
> + u32 reserved13[57];
>  #else
>   u32 reserved6[85];
>  #endif
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] arm, at91: add icache support

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add at least icache support for at91 based boards.
> This speeds up NOR flash access on an at91sam9g15
> based board from 15.2 seconds reading 8 MiB from
> a SPI NOR flash to 5.7 seconds.
> 
> Signed-off-by: Heiko Schocher 

Reviewed-by: Andreas Bießmann 

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


Re: [U-Boot] [PATCH 2/6] ARM: at91: clock: correct PRES offset for at91sam9x5

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> on at91sam9x5 PRES offset is 4 in the PMC master
> clock register.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
>  arch/arm/mach-at91/arm926ejs/clock.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/arm926ejs/clock.c 
> b/arch/arm/mach-at91/arm926ejs/clock.c
> index c8d24ae..e3181fa 100644
> --- a/arch/arm/mach-at91/arm926ejs/clock.c
> +++ b/arch/arm/mach-at91/arm926ejs/clock.c
> @@ -162,7 +162,13 @@ int at91_clock_init(unsigned long main_clock)
>   gd->arch.mck_rate_hz = at91_css_to_rate(mckr & AT91_PMC_MCKR_CSS_MASK);
>   freq = gd->arch.mck_rate_hz;
>  
> +#if defined(CONFIG_AT91SAM9X5)
> + /* different in prescale on at91sam9x5 */
> + freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 4));

This one is really ugly ... I can live with the ifdef here but have you
realized the 0x7 for PRES?

Andreas

> +#else
>   freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 2)); /* prescale */
> +#endif
> +
>  #if defined(CONFIG_AT91SAM9G20)
>   /* mdiv ; (x >> 7) = ((x >> 8) * 2) */
>   gd->arch.mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ?
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] spi: fsl_qspi: Preserve endianness of QSPI MCR

2016-10-06 Thread York Sun
The endianness can be changed by RCW + PBI sequence. It may have
other than power on reset value.

Signed-off-by: York Sun 
CC: Yuan Yao 
CC: Peng Fan 
CC: Alison Wang 
---
Change log
 v2: Fix variable name in spi_setup_slave

 drivers/spi/fsl_qspi.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index 2144fca..729ded9 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -865,6 +865,7 @@ static inline struct fsl_qspi *to_qspi_spi(struct spi_slave 
*slave)
 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
unsigned int max_hz, unsigned int mode)
 {
+   u32 mcr_val;
struct fsl_qspi *qspi;
struct fsl_qspi_regs *regs;
u32 total_size;
@@ -896,8 +897,10 @@ struct spi_slave *spi_setup_slave(unsigned int bus, 
unsigned int cs,
 
qspi->slave.max_write_size = TX_BUFFER_SIZE;
 
+   mcr_val = qspi_read32(qspi->priv.flags, >mcr);
qspi_write32(qspi->priv.flags, >mcr,
-QSPI_MCR_RESERVED_MASK | QSPI_MCR_MDIS_MASK);
+QSPI_MCR_RESERVED_MASK | QSPI_MCR_MDIS_MASK |
+(mcr_val & QSPI_MCR_END_CFD_MASK));
 
qspi_cfg_smpr(>priv,
  ~(QSPI_SMPR_FSDLY_MASK | QSPI_SMPR_DDRSMP_MASK |
@@ -975,6 +978,7 @@ static int fsl_qspi_child_pre_probe(struct udevice *dev)
 
 static int fsl_qspi_probe(struct udevice *bus)
 {
+   u32 mcr_val;
u32 amba_size_per_chip;
struct fsl_qspi_platdata *plat = dev_get_platdata(bus);
struct fsl_qspi_priv *priv = dev_get_priv(bus);
@@ -999,8 +1003,10 @@ static int fsl_qspi_probe(struct udevice *bus)
priv->flash_num = plat->flash_num;
priv->num_chipselect = plat->num_chipselect;
 
+   mcr_val = qspi_read32(priv->flags, >regs->mcr);
qspi_write32(priv->flags, >regs->mcr,
-QSPI_MCR_RESERVED_MASK | QSPI_MCR_MDIS_MASK);
+QSPI_MCR_RESERVED_MASK | QSPI_MCR_MDIS_MASK |
+(mcr_val & QSPI_MCR_END_CFD_MASK));
 
qspi_cfg_smpr(priv, ~(QSPI_SMPR_FSDLY_MASK | QSPI_SMPR_DDRSMP_MASK |
QSPI_SMPR_FSPHS_MASK | QSPI_SMPR_HSENA_MASK), 0);
-- 
2.7.4

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


[U-Boot] [PATCH v2 5/5] arm: kirkwood: fix Synology board tag

2016-10-06 Thread Walter Schweizer
Signed-off-by: Walter Schweizer 
---

Changes in v2: None

 board/Synology/ds109/ds109.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index 8ab1387..b46c09d 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -115,6 +115,7 @@ void setup_board_tags(struct tag **in_params)
unsigned int boardId;
struct tag *params;
struct tag_mv_uboot *t;
+   int i;
 
printf("Synology board tags...");
params = *in_params;
@@ -128,6 +129,12 @@ void setup_board_tags(struct tag **in_params)
t->tclk = CONFIG_SYS_TCLK;
t->sysclk = CONFIG_SYS_TCLK*2;
 
+   t->isusbhost = 1;
+   for (i = 0; i < 4; i++) {
+   memset(t->macaddr[i], 0, sizeof(t->macaddr[i]));
+   t->mtu[i] = 0;
+   }
+
params->hdr.tag = ATAG_MV_UBOOT;
params->hdr.size = tag_size(tag_mv_uboot);
params = tag_next(params);
-- 
2.1.4

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


[U-Boot] [PATCH v2 1/5] arm: kirkwood: add support for Synology DS109 board

2016-10-06 Thread Walter Schweizer
Synology DS109 is based on MV88F6281. The code
is based on Dreamplug code with modificatons
from Synologys open source repository.

Signed-off-by: Walter Schweizer 
---

Changes in v2:
- adapt config options to new checks
- tag with kirkwood instead of mvebu

 arch/arm/mach-kirkwood/Kconfig|   4 +
 board/Synology/ds109/Kconfig  |  12 +++
 board/Synology/ds109/Makefile |   9 ++
 board/Synology/ds109/ds109.c  | 169 ++
 board/Synology/ds109/ds109.h  |  44 ++
 board/Synology/ds109/kwbimage.cfg | 147 +
 board/Synology/ds109/openocd.cfg  | 115 ++
 configs/ds109_defconfig   |  16 
 include/configs/ds109.h   | 103 +++
 9 files changed, 619 insertions(+)
 create mode 100644 board/Synology/ds109/Kconfig
 create mode 100644 board/Synology/ds109/Makefile
 create mode 100644 board/Synology/ds109/ds109.c
 create mode 100644 board/Synology/ds109/ds109.h
 create mode 100644 board/Synology/ds109/kwbimage.cfg
 create mode 100644 board/Synology/ds109/openocd.cfg
 create mode 100644 configs/ds109_defconfig
 create mode 100644 include/configs/ds109.h

diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 9205b1e..9c24921 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -10,6 +10,9 @@ config TARGET_OPENRD
 config TARGET_DREAMPLUG
bool "DreamPlug Board"
 
+config TARGET_DS109
+   bool "Synology DS109"
+
 config TARGET_GURUPLUG
bool "GuruPlug Board"
 
@@ -59,6 +62,7 @@ config SYS_SOC
 
 source "board/Marvell/openrd/Kconfig"
 source "board/Marvell/dreamplug/Kconfig"
+source "board/Synology/ds109/Kconfig"
 source "board/Marvell/guruplug/Kconfig"
 source "board/Marvell/sheevaplug/Kconfig"
 source "board/buffalo/lsxl/Kconfig"
diff --git a/board/Synology/ds109/Kconfig b/board/Synology/ds109/Kconfig
new file mode 100644
index 000..a7c75ae
--- /dev/null
+++ b/board/Synology/ds109/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_DS109
+
+config SYS_BOARD
+   default "ds109"
+
+config SYS_VENDOR
+   default "Synology"
+
+config SYS_CONFIG_NAME
+   default "ds109"
+
+endif
diff --git a/board/Synology/ds109/Makefile b/board/Synology/ds109/Makefile
new file mode 100644
index 000..eeeb64d
--- /dev/null
+++ b/board/Synology/ds109/Makefile
@@ -0,0 +1,9 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Written-by: Prafulla Wadaskar 
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := ds109.o
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
new file mode 100644
index 000..8ab1387
--- /dev/null
+++ b/board/Synology/ds109/ds109.c
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2009-2012
+ * Wojciech Dubowik 
+ * Luka Perkov 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "ds109.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+   /*
+* default gpio configuration
+* There are maximum 64 gpios controlled through 2 sets of registers
+* the below configuration configures mainly initial LED status
+*/
+   mvebu_config_gpio(DS109_OE_VAL_LOW,
+ DS109_OE_VAL_HIGH,
+ DS109_OE_LOW, DS109_OE_HIGH);
+
+   /* Multi-Purpose Pins Functionality configuration */
+   static const u32 kwmpp_config[] = {
+   MPP0_SPI_SCn,   /* SPI Flash */
+   MPP1_SPI_MOSI,
+   MPP2_SPI_SCK,
+   MPP3_SPI_MISO,
+   MPP4_GPIO,
+   MPP5_GPO,
+   MPP6_SYSRST_OUTn,   /* Reset signal */
+   MPP7_GPO,
+   MPP8_TW_SDA,/* I2C */
+   MPP9_TW_SCK,/* I2C */
+   MPP10_UART0_TXD,
+   MPP11_UART0_RXD,
+   MPP12_GPO,
+   MPP13_UART1_TXD,
+   MPP14_UART1_RXD,
+   MPP15_GPIO,
+   MPP16_GPIO,
+   MPP17_GPIO,
+   MPP18_GPO,
+   MPP19_GPO,
+   MPP20_SATA1_ACTn,
+   MPP21_SATA0_ACTn,
+   MPP22_GPIO, /* HDD2 FAIL LED */
+   MPP23_GPIO, /* HDD1 FAIL LED */
+   MPP24_GPIO,
+   MPP25_GPIO,
+   MPP26_GPIO,
+   MPP27_GPIO,
+   MPP28_GPIO,
+   MPP29_GPIO,
+   MPP30_GPIO,
+   MPP31_GPIO, /* HDD2 */
+   MPP32_GPIO, /* FAN A */
+   MPP33_GPIO, /* FAN B */
+   MPP34_GPIO, /* FAN C */
+   MPP35_GPIO, /* FAN SENSE */
+   MPP36_GPIO,
+   MPP37_GPIO,
+   MPP38_GPIO,
+   

[U-Boot] [PATCH v2 4/5] arm: kirkwood: fix output enable settings

2016-10-06 Thread Walter Schweizer
Signed-off-by: Walter Schweizer 
---

Changes in v2: None

 board/Synology/ds109/ds109.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/Synology/ds109/ds109.h b/board/Synology/ds109/ds109.h
index 95d924c..a57cda7 100644
--- a/board/Synology/ds109/ds109.h
+++ b/board/Synology/ds109/ds109.h
@@ -9,8 +9,8 @@
 #ifndef __DS109_H
 #define __DS109_H
 
-#define DS109_OE_LOW   (~(0))
-#define DS109_OE_HIGH  (~(0))
+#define DS109_OE_LOW   (0)
+#define DS109_OE_HIGH  (0)
 #define DS109_OE_VAL_LOW   ((1 << 22)|(1 << 23))
 #define DS109_OE_VAL_HIGH  ((1 << 1)|1)
 
-- 
2.1.4

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


[U-Boot] [PATCH v2 3/5] arm: kirkwood: fix kirkwood initial setup

2016-10-06 Thread Walter Schweizer
Signed-off-by: Walter Schweizer 
---

Changes in v2: None

 board/Synology/ds109/kwbimage.cfg | 27 ---
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/board/Synology/ds109/kwbimage.cfg 
b/board/Synology/ds109/kwbimage.cfg
index 19d77e3..d544af5 100644
--- a/board/Synology/ds109/kwbimage.cfg
+++ b/board/Synology/ds109/kwbimage.cfg
@@ -19,7 +19,10 @@ BOOT_FROMspi
 # Maximum KWBIMAGE_MAX_CONFIG configurations allowed
 
 # Configure RGMII-0/1 interface pad voltage to 1.8V
-DATA 0xFFD100e0 0x1b1b9b9b
+DATA 0xFFD100e0 0x1b1b1b9b
+
+DATA 0xFFD20134 0x
+DATA 0xFFD20138 0x00bb
 
 #Dram initalization for SINGLE x16 CL=5 @ 400MHz
 DATA 0xFFD01400 0x43000c30 # DDR Configuration register
@@ -30,7 +33,7 @@ DATA 0xFFD01400 0x43000c30# DDR Configuration register
 # bit29-26: zero
 # bit31-30: 01
 
-DATA 0xFFD01404 0x37543000 # DDR Controller Control Low
+DATA 0xFFD01404 0x39543000 # DDR Controller Control Low
 # bit 4:0=addr/cmd in smame cycle
 # bit 5:0=clk is driven during self refresh, we don't care for APX
 # bit 6:0=use recommended falling edge of clk for addr/cmd
@@ -52,14 +55,14 @@ DATA 0xFFD01408 0x22125451  # DDR Timing (Low) (active 
cycles value +1)
 # bit27-24: TRRD
 # bit31-28: TRTP
 
-DATA 0xFFD0140C 0x0a33 #  DDR Timing (High)
+DATA 0xFFD0140C 0x0833 #  DDR Timing (High)
 # bit6-0:   TRFC
 # bit8-7:   TR2R
 # bit10-9:  TR2W
 # bit12-11: TW2W
 # bit31-13: zero required
 
-DATA 0xFFD01410 0x00cc #  DDR Address Control
+DATA 0xFFD01410 0x000d #  DDR Address Control
 # bit1-0:   01, Cs0width=x8
 # bit3-2:   10, Cs0size=1Gb
 # bit5-4:   01, Cs1width=x8
@@ -92,7 +95,7 @@ DATA 0xFFD0141C 0x0C52#  DDR Mode
 # bit12:0, PD must be zero
 # bit31-13: 0 required
 
-DATA 0xFFD01420 0x0040 #  DDR Extended Mode
+DATA 0xFFD01420 0x0042 #  DDR Extended Mode
 # bit0:0,  DDR DLL enabled
 # bit1:0,  DDR drive strenght normal
 # bit2:0,  DDR ODT control lsd (disabled)
@@ -104,7 +107,7 @@ DATA 0xFFD01420 0x0040  #  DDR Extended Mode
 # bit12:   0, DDR output buffer enabled
 # bit31-13: 0 required
 
-DATA 0xFFD01424 0xF17F #  DDR Controller Control High
+DATA 0xFFD01424 0xF1FF #  DDR Controller Control High
 # bit2-0:  111, required
 # bit3  :  1  , MBUS Burst Chop disabled
 # bit6-4:  111, required
@@ -120,26 +123,28 @@ DATA 0xFFD01428 0x00085520# DDR2 ODT Read Timing 
(default values)
 DATA 0xFFD0147C 0x8552 # DDR2 ODT Write Timing (default values)
 
 DATA 0xFFD01500 0x # CS[0]n Base address to 0x0
-DATA 0xFFD01504 0x0FF1 # CS[0]n Size
+DATA 0xFFD01504 0x07F1 # CS[0]n Size
 # bit0:1,  Window enabled
 # bit1:0,  Write Protect disabled
 # bit3-2:  00, CS0 hit selected
 # bit23-4: ones, required
-# bit31-24: 0x0F, Size (i.e. 256MB)
+# bit31-24: 0x07, Size (i.e. 128MB)
 
 DATA 0xFFD01508 0x1000 # CS[1]n Base address to 256Mb
-DATA 0xFFD0150C 0x0FF5 # CS[1]n Size 256Mb Window enabled for CS1
+DATA 0xFFD0150C 0x # CS[1]n Size, window disabled
 
+DATA 0xFFD01510 0x2000 # CS[2]n Base address to 256Mb
 DATA 0xFFD01514 0x # CS[2]n Size, window disabled
+DATA 0xFFD01518 0x3000 # CS[3]n Base address to 256Mb
 DATA 0xFFD0151C 0x # CS[3]n Size, window disabled
 
-DATA 0xFFD01494 0x0003 #  DDR ODT Control (Low)
+DATA 0xFFD01494 0x003C #  DDR ODT Control (Low)
 DATA 0xFFD01498 0x #  DDR ODT Control (High)
 # bit1-0:  00, ODT0 controlled by ODT Control (low) register above
 # bit3-2:  01, ODT1 active NEVER!
 # bit31-4: zero, required
 
-DATA 0xFFD0149C 0xE803 # CPU ODT Control
+DATA 0xFFD0149C 0xF80F # CPU ODT Control
 DATA 0xFFD01480 0x0001 # DDR Initialization Control
 #bit0=1, enable DDR init upon this register write
 
-- 
2.1.4

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


[U-Boot] [PATCH v2 2/5] arm: kirkwood: ds109 board is maintained

2016-10-06 Thread Walter Schweizer
Signed-off-by: Walter Schweizer 
---

Changes in v2: None

 board/Synology/ds109/MAINTAINERS | 6 ++
 1 file changed, 6 insertions(+)
 create mode 100644 board/Synology/ds109/MAINTAINERS

diff --git a/board/Synology/ds109/MAINTAINERS b/board/Synology/ds109/MAINTAINERS
new file mode 100644
index 000..8783fdb
--- /dev/null
+++ b/board/Synology/ds109/MAINTAINERS
@@ -0,0 +1,6 @@
+DS109 BOARD
+M: Walter Schweizer 
+S: Maintained
+F: board/Synology/ds109
+F: configs/ds109_defconfig
+F: include/configs/ds109.h
-- 
2.1.4

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


Re: [U-Boot] [PATCH 0/6] libfdt: Sync to upstream

2016-10-06 Thread Maxime Ripard
Hi Simon,

On Thu, Oct 06, 2016 at 08:36:36AM -0600, Simon Glass wrote:
> > On Sun, Oct 02, 2016 at 05:59:24PM -0600, Simon Glass wrote:
> >> In a few cases the upstream versions of functions first written for U-Boot
> >> have landed in a slightly different form.
> >>
> >> This includes a few patches to fix these as well as various minor changes 
> >> to
> >> reduce the delta.
> >
> > Thanks a lot for working on this.
> >
> > The overlay code just got merged, and it has a significant amount of
> > fixes, so it might be nice to do that sync with the latest dtc HEAD.
> 
> Nice work! I see you have sent some fix-up patches two, right? If so I
> should probably wait until they land.

Yep, indeed. It's not really a big deal though, so I don't expect it
to take too much time.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


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


Re: [U-Boot] [PATCH 1/6] arm: at91: mpddrc: add missing MPDDRC_MD defines

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add missing MPDDRC_MD defines
> 
> Signed-off-by: Heiko Schocher 

Reviewed-by: Andreas Bießmann 

> ---
> 
>  arch/arm/mach-at91/include/mach/atmel_mpddrc.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h 
> b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
> index d37d908..f6bcecd 100644
> --- a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
> +++ b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
> @@ -147,6 +147,9 @@ int ddr3_init(const unsigned int base,
>  #define ATMEL_MPDDRC_TPR2_TFAW_MASK  0xf
>  
>  /* Bit field in Memory Device Register */
> +#define ATMEL_MPDDRC_MD_SDR_SDRAM0x0
> +#define ATMEL_MPDDRC_MD_LP_SDR_SDRAM 0x1
> +#define ATMEL_MPDDRC_MD_DDR_SDRAM0x2
>  #define ATMEL_MPDDRC_MD_LPDDR_SDRAM  0x3
>  #define ATMEL_MPDDRC_MD_DDR3_SDRAM   0x4
>  #define ATMEL_MPDDRC_MD_LPDDR3_SDRAM 0x5
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 02/11] binman: Add basic entry types for U-Boot

2016-10-06 Thread Simon Glass
Add entries to support some standard U-Boot binaries, such as u-boot.bin,
u-boot.dtb, etc. Also add some tests for these.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 tools/binman/entry_test.py |  27 +
 tools/binman/etype/_testing.py |  26 +
 tools/binman/etype/blob.py |  37 ++
 tools/binman/etype/u_boot.py   |  17 +
 tools/binman/etype/u_boot_dtb.py   |  17 +
 tools/binman/etype/u_boot_nodtb.py |  17 +
 tools/binman/etype/u_boot_spl.py   |  17 +
 tools/binman/func_test.py  | 542 +
 tools/binman/test/01_invalid.dts   |   5 +
 tools/binman/test/02_missing_node.dts  |   6 +
 tools/binman/test/03_empty.dts |   9 +
 tools/binman/test/04_invalid_entry.dts |  11 +
 tools/binman/test/05_simple.dts|  11 +
 tools/binman/test/06_dual_image.dts|  22 +
 tools/binman/test/07_bad_align.dts |  12 +
 tools/binman/test/08_pack.dts  |  30 ++
 tools/binman/test/09_pack_extra.dts|  35 ++
 tools/binman/test/10_pack_align_power2.dts |  12 +
 tools/binman/test/11_pack_align_size_power2.dts|  12 +
 tools/binman/test/12_pack_inv_align.dts|  13 +
 tools/binman/test/13_pack_inv_size_align.dts   |  13 +
 tools/binman/test/14_pack_overlap.dts  |  16 +
 tools/binman/test/15_pack_overflow.dts |  12 +
 tools/binman/test/16_pack_image_overflow.dts   |  13 +
 tools/binman/test/17_pack_image_size.dts   |  13 +
 tools/binman/test/18_pack_image_align.dts  |  13 +
 tools/binman/test/19_pack_inv_image_align.dts  |  14 +
 .../binman/test/20_pack_inv_image_align_power2.dts |  13 +
 tools/binman/test/21_image_pad.dts |  16 +
 tools/binman/test/22_image_name.dts|  21 +
 tools/binman/test/23_blob.dts  |  12 +
 tools/binman/test/24_sorted.dts|  17 +
 tools/binman/test/25_pack_zero_size.dts|  15 +
 tools/binman/test/26_pack_u_boot_dtb.dts   |  14 +
 34 files changed, 1080 insertions(+)
 create mode 100644 tools/binman/entry_test.py
 create mode 100644 tools/binman/etype/_testing.py
 create mode 100644 tools/binman/etype/blob.py
 create mode 100644 tools/binman/etype/u_boot.py
 create mode 100644 tools/binman/etype/u_boot_dtb.py
 create mode 100644 tools/binman/etype/u_boot_nodtb.py
 create mode 100644 tools/binman/etype/u_boot_spl.py
 create mode 100644 tools/binman/func_test.py
 create mode 100644 tools/binman/test/01_invalid.dts
 create mode 100644 tools/binman/test/02_missing_node.dts
 create mode 100644 tools/binman/test/03_empty.dts
 create mode 100644 tools/binman/test/04_invalid_entry.dts
 create mode 100644 tools/binman/test/05_simple.dts
 create mode 100644 tools/binman/test/06_dual_image.dts
 create mode 100644 tools/binman/test/07_bad_align.dts
 create mode 100644 tools/binman/test/08_pack.dts
 create mode 100644 tools/binman/test/09_pack_extra.dts
 create mode 100644 tools/binman/test/10_pack_align_power2.dts
 create mode 100644 tools/binman/test/11_pack_align_size_power2.dts
 create mode 100644 tools/binman/test/12_pack_inv_align.dts
 create mode 100644 tools/binman/test/13_pack_inv_size_align.dts
 create mode 100644 tools/binman/test/14_pack_overlap.dts
 create mode 100644 tools/binman/test/15_pack_overflow.dts
 create mode 100644 tools/binman/test/16_pack_image_overflow.dts
 create mode 100644 tools/binman/test/17_pack_image_size.dts
 create mode 100644 tools/binman/test/18_pack_image_align.dts
 create mode 100644 tools/binman/test/19_pack_inv_image_align.dts
 create mode 100644 tools/binman/test/20_pack_inv_image_align_power2.dts
 create mode 100644 tools/binman/test/21_image_pad.dts
 create mode 100644 tools/binman/test/22_image_name.dts
 create mode 100644 tools/binman/test/23_blob.dts
 create mode 100644 tools/binman/test/24_sorted.dts
 create mode 100644 tools/binman/test/25_pack_zero_size.dts
 create mode 100644 tools/binman/test/26_pack_u_boot_dtb.dts

diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py
new file mode 100644
index 000..8a9ae01
--- /dev/null
+++ b/tools/binman/entry_test.py
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Test for the Entry class
+
+import collections
+import unittest
+
+import entry
+
+class TestEntry(unittest.TestCase):
+def testEntryContents(self):
+"""Test the Entry bass class"""
+base_entry = entry.Entry(None, None, None, read_node=False)
+self.assertEqual(True, base_entry.ObtainContents())
+
+def testUnknownEntry(self):
+"""Test that unknown entry types are detected"""
+   

[U-Boot] [PATCH v4 11/11] x86: Use binman all x86 boards

2016-10-06 Thread Simon Glass
Change x86 boards to use binman to produce the ROM. This involves adding the
image definition to the device tree and using it in the Makefile. The
existing ifdtool features are no-longer needed.

Note that the .dtsi file is common and is used for all x86 boards.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Remove RFC tag
- Use binman for all x86 boards

Changes in v3:
- Put the binman definition in u-boot.dtsi

Changes in v2:
- Add automated test coverage
- Put the binman definition in a common file for x86
- Various changes and improvements based on using this tool for a while

 Makefile | 45 +++
 arch/x86/dts/u-boot.dtsi | 62 
 2 files changed, 65 insertions(+), 42 deletions(-)
 create mode 100644 arch/x86/dts/u-boot.dtsi

diff --git a/Makefile b/Makefile
index a5bbb24..31c3146 100644
--- a/Makefile
+++ b/Makefile
@@ -1060,50 +1060,11 @@ endif
 
 # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including
 # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
-# the middle.
+# the middle. This is handled by binman based on an image description in the
+# board's device tree.
 ifneq ($(CONFIG_X86_RESET_VECTOR),)
 rom: u-boot.rom FORCE
 
-IFDTOOL=$(objtree)/tools/ifdtool
-IFDTOOL_FLAGS  = -f 0:$(objtree)/u-boot.dtb
-IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' 
' -f1)
-IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-nodtb.bin
-IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin
-IFDTOOL_FLAGS += -C
-
-ifneq ($(CONFIG_HAVE_INTEL_ME),)
-IFDTOOL_ME_FLAGS  = -D $(srctree)/board/$(BOARDDIR)/descriptor.bin
-IFDTOOL_ME_FLAGS += -i ME:$(srctree)/board/$(BOARDDIR)/me.bin
-endif
-
-ifneq ($(CONFIG_HAVE_MRC),)
-IFDTOOL_FLAGS += -w $(CONFIG_X86_MRC_ADDR):$(srctree)/board/$(BOARDDIR)/mrc.bin
-endif
-
-ifneq ($(CONFIG_HAVE_FSP),)
-IFDTOOL_FLAGS += -w 
$(CONFIG_FSP_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_FSP_FILE)
-endif
-
-ifneq ($(CONFIG_HAVE_CMC),)
-IFDTOOL_FLAGS += -w 
$(CONFIG_CMC_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_CMC_FILE)
-endif
-
-ifneq ($(CONFIG_HAVE_VGA_BIOS),)
-IFDTOOL_FLAGS += -w 
$(CONFIG_VGA_BIOS_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_VGA_BIOS_FILE)
-endif
-
-ifneq ($(CONFIG_HAVE_REFCODE),)
-IFDTOOL_FLAGS += -w $(CONFIG_X86_REFCODE_ADDR):refcode.bin
-endif
-
-quiet_cmd_ifdtool = IFDTOOL $@
-cmd_ifdtool  = $(IFDTOOL) -c -r $(CONFIG_ROM_SIZE) u-boot.tmp;
-ifneq ($(CONFIG_HAVE_INTEL_ME),)
-cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_ME_FLAGS) u-boot.tmp;
-endif
-cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp;
-cmd_ifdtool += mv u-boot.tmp $@
-
 refcode.bin: $(srctree)/board/$(BOARDDIR)/refcode.bin FORCE
$(call if_changed,copy)
 
@@ -1113,7 +1074,7 @@ cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
 
 u-boot.rom: u-boot-x86-16bit.bin u-boot.bin FORCE \
$(if $(CONFIG_HAVE_REFCODE),refcode.bin)
-   $(call if_changed,ifdtool)
+   $(call if_changed,binman)
 
 OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
 u-boot-x86-16bit.bin: u-boot FORCE
diff --git a/arch/x86/dts/u-boot.dtsi b/arch/x86/dts/u-boot.dtsi
new file mode 100644
index 000..724913f
--- /dev/null
+++ b/arch/x86/dts/u-boot.dtsi
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2016 Google, Inc
+ * Written by Simon Glass 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+
+#ifdef CONFIG_ROM_SIZE
+/ {
+   binman {
+   filename = "u-boot.rom";
+   end-at-4gb;
+   sort-by-pos;
+   pad-byte = <0xff>;
+   size = ;
+#ifdef CONFIG_HAVE_INTEL_ME
+   intel-descriptor {
+   };
+   intel-me {
+   };
+#endif
+   u-boot-with-ucode-ptr {
+   pos = ;
+   };
+   u-boot-dtb-with-ucode {
+   };
+   u-boot-ucode {
+   align = <16>;
+   };
+#ifdef CONFIG_HAVE_MRC
+   intel-mrc {
+   pos = ;
+   };
+#endif
+#ifdef CONFIG_HAVE_FSP
+   intel-fsp {
+   pos = ;
+   };
+#endif
+#ifdef CONFIG_HAVE_CMC
+   intel-cmc {
+   pos = ;
+   };
+#endif
+#ifdef CONFIG_HAVE_VGA_BIOS
+   intel-vga {
+   pos = ;
+   };
+#endif
+#ifdef CONFIG_HAVE_REFCODE
+   intel-refcode {
+   pos = ;
+   };
+#endif
+   x86-start16 {
+   pos = ;
+   };
+   };
+};
+#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 v4 10/11] sunxi: Use binman for sunxi boards

2016-10-06 Thread Simon Glass
Move sunxi boards to use binman. This involves adding the image definition
to the device tree and using it in the Makefile.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Remove RFC tag
- Update sunxi rule to depend on u-boot.dtb
- Use binman for all sunxi boards

Changes in v3:
- Use a -u-boot.dtsi file for the binman changes

Changes in v2: None

 Makefile   |  6 ++
 arch/arm/dts/sunxi-u-boot.dtsi | 14 ++
 2 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/sunxi-u-boot.dtsi

diff --git a/Makefile b/Makefile
index a5428a2..a5bbb24 100644
--- a/Makefile
+++ b/Makefile
@@ -1121,10 +1121,8 @@ u-boot-x86-16bit.bin: u-boot FORCE
 endif
 
 ifneq ($(CONFIG_SUNXI),)
-OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
-  --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE
-   $(call if_changed,pad_cat)
+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
+   $(call if_changed,binman)
 endif
 
 ifneq ($(CONFIG_TEGRA),)
diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
new file mode 100644
index 000..5adfd9b
--- /dev/null
+++ b/arch/arm/dts/sunxi-u-boot.dtsi
@@ -0,0 +1,14 @@
+#include 
+
+/ {
+   binman {
+   filename = "u-boot-sunxi-with-spl.bin";
+   pad-byte = <0xff>;
+   blob {
+   filename = "spl/sunxi-spl.bin";
+   };
+   u-boot-img {
+   pos = ;
+   };
+   };
+};
-- 
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 v4 09/11] binman: Automatically include a U-Boot .dtsi file

2016-10-06 Thread Simon Glass
For boards that need U-Boot-specific additions to the device tree, it is
a minor annoyance to have to add these each time the tree is synced with
upstream.

Add a means to include a file (e.g. u-boot.dtsi) automatically into the .dts
file before it is compiled.

The file uses is the first one that exists in this list:

   arch//dts/-u-boot.dtsi
   arch//dts/-u-boot.dtsi
   arch//dts/-u-boot.dtsi
   arch//dts/-u-boot.dtsi
   arch//dts/u-boot.dtsi

Signed-off-by: Simon Glass 
Suggested-by: Tom Rini 
---

Changes in v4:
- Add an option to bring in an soc .dtsi file also
- Fix up rule to #include on "/ {" rather than "/dts-v1/;"
- Rename binman_dtsi variable to u-boot-dtsi

Changes in v3:
- Add a new patch to automatically include a U-Boot .dtsi file

Changes in v2: None

 scripts/Makefile.lib | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 2539ba5..f6d7d34 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -164,6 +164,18 @@ cpp_flags  = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) 
$(UBOOTINCLUDE) \
 
 ld_flags   = $(LDFLAGS) $(ldflags-y)
 
+dts_dir = $(srctree)/arch/$(ARCH)/dts
+
+# Try these files in order to find the U-Boot-specific .dtsi include file
+u-boot-dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir 
$<))-u-boot.dtsi) \
+   $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
+   $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
+   $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
+   $(wildcard $(dts_dir)/u-boot.dtsi)
+
+# We use the first match
+u-boot-dtsi = $(firstword $(u-boot-dtsi_options))
+
 # Modified for U-Boot
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc\
 -I$(srctree)/arch/$(ARCH)/dts   \
@@ -293,8 +305,11 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 
 quiet_cmd_dtc = DTC $@
 # Modified for U-Boot
+# Bring in any U-Boot-specific include after the '/dts-v1/;' header
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
-   $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+   cat $< $(if $(u-boot-dtsi),\
+   | sed 's%^/ {$$%\#include \"$(u-boot-dtsi)\"\n&%')  | \
+   $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; 
\
$(DTC) -O dtb -o $@ -b 0 \
-i $(dir $<) $(DTC_FLAGS) \
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
-- 
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 v4 07/11] binman: Add a build rule for binman

2016-10-06 Thread Simon Glass
Add a standard command definition for binman so that it can be used in
makefiles.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 Makefile | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/Makefile b/Makefile
index b5c9421..a5428a2 100644
--- a/Makefile
+++ b/Makefile
@@ -889,6 +889,12 @@ u-boot.ldr:u-boot
$(LDR) -T $(CONFIG_CPU) -c $@ $< $(LDR_FLAGS)
$(BOARD_SIZE_CHECK)
 
+# binman
+# ---
+quiet_cmd_binman = BINMAN  $@
+cmd_binman = $(srctree)/tools/binman/binman -d u-boot.dtb -O . \
+   -I . -I $(srctree)/board/$(BOARDDIR) $<
+
 OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
 
 OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
-- 
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 v4 06/11] binman: Add support for building x86 images with FSP/CMC

2016-10-06 Thread Simon Glass
Add support for two more from the inexhaustible supply of x86 binary blob
types.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Add new patch to support building x86 images with FSP/CMC

Changes in v3: None
Changes in v2: None

 tools/binman/etype/intel_cmc.py| 17 +
 tools/binman/etype/intel_fsp.py| 17 +
 tools/binman/func_test.py  | 14 ++
 tools/binman/test/42_intel-fsp.dts | 13 +
 tools/binman/test/43_intel-cmc.dts | 13 +
 5 files changed, 74 insertions(+)
 create mode 100644 tools/binman/etype/intel_cmc.py
 create mode 100644 tools/binman/etype/intel_fsp.py
 create mode 100644 tools/binman/test/42_intel-fsp.dts
 create mode 100644 tools/binman/test/43_intel-cmc.dts

diff --git a/tools/binman/etype/intel_cmc.py b/tools/binman/etype/intel_cmc.py
new file mode 100644
index 000..9bce8ae
--- /dev/null
+++ b/tools/binman/etype/intel_cmc.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for Intel Chip Microcode binary blob
+#
+
+from entry import Entry
+from blob import Entry_blob
+
+class Entry_intel_cmc(Entry_blob):
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+
+def GetDefaultFilename(self):
+return 'cmc.bin'
diff --git a/tools/binman/etype/intel_fsp.py b/tools/binman/etype/intel_fsp.py
new file mode 100644
index 000..d75be5b
--- /dev/null
+++ b/tools/binman/etype/intel_fsp.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for Intel Firmware Support Package binary blob
+#
+
+from entry import Entry
+from blob import Entry_blob
+
+class Entry_intel_fsp(Entry_blob):
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+
+def GetDefaultFilename(self):
+return 'fsp.bin'
diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py
index 3202947..fa30cce 100644
--- a/tools/binman/func_test.py
+++ b/tools/binman/func_test.py
@@ -36,6 +36,8 @@ VGA_DATA= 'vga'
 U_BOOT_DTB_DATA = 'udtb'
 X86_START16_DATA= 'start16'
 U_BOOT_NODTB_DATA   = 'nodtb with microcode pointer somewhere in here'
+FSP_DATA= 'fsp'
+CMC_DATA= 'cmc'
 
 class TestFunctional(unittest.TestCase):
 """Functional tests for binman
@@ -70,6 +72,8 @@ class TestFunctional(unittest.TestCase):
 TestFunctional._MakeInputFile('u-boot.dtb', U_BOOT_DTB_DATA)
 TestFunctional._MakeInputFile('u-boot-x86-16bit.bin', X86_START16_DATA)
 TestFunctional._MakeInputFile('u-boot-nodtb.bin', U_BOOT_NODTB_DATA)
+TestFunctional._MakeInputFile('fsp.bin', FSP_DATA)
+TestFunctional._MakeInputFile('cmc.bin', CMC_DATA)
 self._output_setup = False
 
 # ELF file with a '_dt_ucode_base_size' symbol
@@ -761,3 +765,13 @@ class TestFunctional(unittest.TestCase):
 self._DoReadFile('41_unknown_pos_size.dts', True)
 self.assertIn("Image '/binman': Unable to set pos/size for unknown "
 "entry 'invalid-entry'", str(e.exception))
+
+def testPackFsp(self):
+"""Test that an image with a FSP binary can be created"""
+data = self._DoReadFile('42_intel-fsp.dts')
+self.assertEqual(FSP_DATA, data[:len(FSP_DATA)])
+
+def testPackCmc(self):
+"""Test that an image with a FSP binary can be created"""
+data = self._DoReadFile('43_intel-cmc.dts')
+self.assertEqual(CMC_DATA, data[:len(CMC_DATA)])
diff --git a/tools/binman/test/42_intel-fsp.dts 
b/tools/binman/test/42_intel-fsp.dts
new file mode 100644
index 000..e0a1e76
--- /dev/null
+++ b/tools/binman/test/42_intel-fsp.dts
@@ -0,0 +1,13 @@
+/dts-v1/;
+
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   binman {
+   size = <16>;
+
+   intel-fsp {
+   };
+   };
+};
diff --git a/tools/binman/test/43_intel-cmc.dts 
b/tools/binman/test/43_intel-cmc.dts
new file mode 100644
index 000..26c456d
--- /dev/null
+++ b/tools/binman/test/43_intel-cmc.dts
@@ -0,0 +1,13 @@
+/dts-v1/;
+
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   binman {
+   size = <16>;
+
+   intel-cmc {
+   };
+   };
+};
-- 
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 v4 08/11] binman: Allow configuration options to be used in .dts files

2016-10-06 Thread Simon Glass
It is sometimes useful to be able to reference configuration options in a
device tree source file. Add the necessary includes so that this works.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 scripts/Makefile.lib | 5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 2b31b1a..2539ba5 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -168,6 +168,11 @@ ld_flags   = $(LDFLAGS) $(ldflags-y)
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc\
 -I$(srctree)/arch/$(ARCH)/dts   \
 -I$(srctree)/arch/$(ARCH)/dts/include   \
+-Iinclude   \
+-I$(srctree)/include\
+-I$(srctree)/arch/$(ARCH)/include   \
+-include $(srctree)/include/linux/kconfig.h \
+-D__ASSEMBLY__  \
 -undef -D__DTS__
 
 # Finds the multi-part object the current object will be linked into
-- 
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 v4 05/11] binman: Add support for building x86 ROMs with SPL

2016-10-06 Thread Simon Glass
When building for 64-bit x86 we need an SPL binary in the ROM. Add support
for this. Also increase entry test code coverage to 100%.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 tools/binman/etype/u_boot_spl_bss_pad.py |  26 +
 tools/binman/etype/u_boot_spl_with_ucode_ptr.py  |  28 +
 tools/binman/etype/x86_start16_spl.py|  17 ++
 tools/binman/func_test.py|  71 +++
 tools/binman/test/37_x86_no_ucode.dts|  20 +++
 tools/binman/test/38_x86_ucode_missing_node.dts  |  26 +
 tools/binman/test/39_x86_ucode_missing_node2.dts |  23 
 tools/binman/test/40_x86_ucode_not_in_image.dts  |  28 +
 tools/binman/test/41_unknown_pos_size.dts|  11 
 tools/binman/test/u_boot_no_ucode_ptr| Bin 0 -> 4182 bytes
 tools/binman/test/u_boot_no_ucode_ptr.c  |  15 +
 11 files changed, 265 insertions(+)
 create mode 100644 tools/binman/etype/u_boot_spl_bss_pad.py
 create mode 100644 tools/binman/etype/u_boot_spl_with_ucode_ptr.py
 create mode 100644 tools/binman/etype/x86_start16_spl.py
 create mode 100644 tools/binman/test/37_x86_no_ucode.dts
 create mode 100644 tools/binman/test/38_x86_ucode_missing_node.dts
 create mode 100644 tools/binman/test/39_x86_ucode_missing_node2.dts
 create mode 100644 tools/binman/test/40_x86_ucode_not_in_image.dts
 create mode 100644 tools/binman/test/41_unknown_pos_size.dts
 create mode 100755 tools/binman/test/u_boot_no_ucode_ptr
 create mode 100644 tools/binman/test/u_boot_no_ucode_ptr.c

diff --git a/tools/binman/etype/u_boot_spl_bss_pad.py 
b/tools/binman/etype/u_boot_spl_bss_pad.py
new file mode 100644
index 000..c005f28
--- /dev/null
+++ b/tools/binman/etype/u_boot_spl_bss_pad.py
@@ -0,0 +1,26 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for BSS padding for spl/u-boot-spl.bin. This padding
+# can be added after the SPL binary to ensure that anything concatenated
+# to it will appear to SPL to be at the end of BSS rather than the start.
+#
+
+import command
+from entry import Entry
+from blob import Entry_blob
+import tools
+
+class Entry_u_boot_spl_bss_pad(Entry_blob):
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+
+def ObtainContents(self):
+fname = tools.GetInputFilename('spl/u-boot-spl')
+args = [['nm', fname], ['grep', '__bss_size']]
+out = command.RunPipe(args, capture=True).stdout.splitlines()
+bss_size = int(out[0].split()[0], 16)
+self.data = chr(0) * bss_size
+self.contents_size = bss_size
diff --git a/tools/binman/etype/u_boot_spl_with_ucode_ptr.py 
b/tools/binman/etype/u_boot_spl_with_ucode_ptr.py
new file mode 100644
index 000..764c282
--- /dev/null
+++ b/tools/binman/etype/u_boot_spl_with_ucode_ptr.py
@@ -0,0 +1,28 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for an SPL binary with an embedded microcode pointer
+#
+
+import struct
+
+import command
+from entry import Entry
+from blob import Entry_blob
+from u_boot_with_ucode_ptr import Entry_u_boot_with_ucode_ptr
+import tools
+
+class Entry_u_boot_spl_with_ucode_ptr(Entry_u_boot_with_ucode_ptr):
+"""U-Boot SPL with embedded microcode pointer
+
+See Entry_u_boot_ucode for full details of the entries involved in this
+process.
+"""
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+self.elf_fname = 'spl/u-boot-spl'
+
+def GetDefaultFilename(self):
+return 'spl/u-boot-spl.bin'
diff --git a/tools/binman/etype/x86_start16_spl.py 
b/tools/binman/etype/x86_start16_spl.py
new file mode 100644
index 000..3679a43
--- /dev/null
+++ b/tools/binman/etype/x86_start16_spl.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for the 16-bit x86 start-up code for U-Boot SPL
+#
+
+from entry import Entry
+from blob import Entry_blob
+
+class Entry_x86_start16_spl(Entry_blob):
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+
+def GetDefaultFilename(self):
+return 'spl/u-boot-x86-16bit-spl.bin'
diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py
index e36d7bd..3202947 100644
--- a/tools/binman/func_test.py
+++ b/tools/binman/func_test.py
@@ -686,7 +686,78 @@ class TestFunctional(unittest.TestCase):
 self.assertEqual('nodtb with microcode' + pos_and_size +
 ' somewhere in here', first)
 
+def testPackUbootSingleMicrocode(self):
+"""Test that x86 microcode can be handled 

[U-Boot] [PATCH v4 04/11] binman: Add support for u-boot.img as an input binary

2016-10-06 Thread Simon Glass
Add an entry type for u-boot.img (a legacy U-Boot image) and a simple test.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 tools/binman/etype/u_boot_img.py| 17 +
 tools/binman/func_test.py   |  5 +
 tools/binman/test/36_u_boot_img.dts | 11 +++
 3 files changed, 33 insertions(+)
 create mode 100644 tools/binman/etype/u_boot_img.py
 create mode 100644 tools/binman/test/36_u_boot_img.dts

diff --git a/tools/binman/etype/u_boot_img.py b/tools/binman/etype/u_boot_img.py
new file mode 100644
index 000..744f1b4
--- /dev/null
+++ b/tools/binman/etype/u_boot_img.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for U-Boot binary
+#
+
+from entry import Entry
+from blob import Entry_blob
+
+class Entry_u_boot_img(Entry_blob):
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+
+def GetDefaultFilename(self):
+return 'u-boot.img'
diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py
index a32f640..e36d7bd 100644
--- a/tools/binman/func_test.py
+++ b/tools/binman/func_test.py
@@ -685,3 +685,8 @@ class TestFunctional(unittest.TestCase):
 first = data[:len(U_BOOT_NODTB_DATA)]
 self.assertEqual('nodtb with microcode' + pos_and_size +
 ' somewhere in here', first)
+
+def testUBootImg(self):
+"""Test that u-boot.img can be put in a file"""
+data = self._DoReadFile('36_u_boot_img.dts')
+self.assertEqual(U_BOOT_IMG_DATA, data)
diff --git a/tools/binman/test/36_u_boot_img.dts 
b/tools/binman/test/36_u_boot_img.dts
new file mode 100644
index 000..aa5a3fe
--- /dev/null
+++ b/tools/binman/test/36_u_boot_img.dts
@@ -0,0 +1,11 @@
+/dts-v1/;
+
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   binman {
+   u-boot-img {
+   };
+   };
+};
-- 
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 v4 03/11] binman: Add support for building x86 ROMs

2016-10-06 Thread Simon Glass
The structure of x86 ROMs is pretty complex. There are various binary blobs
to place in the image. Microcode requires special handling so that it is
available to very early code and can be used without any memory whatsoever.

Add support for the various entry types that are currently needed, along
with some tests.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Fix incorrect comments at the top of intel_*.py

Changes in v3: None
Changes in v2: None

 tools/binman/etype/intel_descriptor.py  |  55 +++
 tools/binman/etype/intel_me.py  |  17 
 tools/binman/etype/intel_mrc.py |  17 
 tools/binman/etype/intel_vga.py |  17 
 tools/binman/etype/u_boot_dtb_with_ucode.py |  72 ++
 tools/binman/etype/u_boot_ucode.py  |  77 +++
 tools/binman/etype/u_boot_with_ucode_ptr.py |  73 ++
 tools/binman/etype/x86_start16.py   |  17 
 tools/binman/func_test.py   | 145 
 tools/binman/test/27_pack_4gb_no_size.dts   |  18 
 tools/binman/test/28_pack_4gb_outside.dts   |  19 
 tools/binman/test/29_x86-rom.dts|  19 
 tools/binman/test/30_x86-rom-me-no-desc.dts |  15 +++
 tools/binman/test/31_x86-rom-me.dts |  18 
 tools/binman/test/32_intel-vga.dts  |  13 +++
 tools/binman/test/33_x86-start16.dts|  13 +++
 tools/binman/test/34_x86_ucode.dts  |  29 ++
 tools/binman/test/35_x86_single_ucode.dts   |  26 +
 tools/binman/test/u_boot_ucode_ptr  | Bin 0 -> 4175 bytes
 tools/binman/test/u_boot_ucode_ptr.c|  15 +++
 tools/binman/test/u_boot_ucode_ptr.lds  |  18 
 21 files changed, 693 insertions(+)
 create mode 100644 tools/binman/etype/intel_descriptor.py
 create mode 100644 tools/binman/etype/intel_me.py
 create mode 100644 tools/binman/etype/intel_mrc.py
 create mode 100644 tools/binman/etype/intel_vga.py
 create mode 100644 tools/binman/etype/u_boot_dtb_with_ucode.py
 create mode 100644 tools/binman/etype/u_boot_ucode.py
 create mode 100644 tools/binman/etype/u_boot_with_ucode_ptr.py
 create mode 100644 tools/binman/etype/x86_start16.py
 create mode 100644 tools/binman/test/27_pack_4gb_no_size.dts
 create mode 100644 tools/binman/test/28_pack_4gb_outside.dts
 create mode 100644 tools/binman/test/29_x86-rom.dts
 create mode 100644 tools/binman/test/30_x86-rom-me-no-desc.dts
 create mode 100644 tools/binman/test/31_x86-rom-me.dts
 create mode 100644 tools/binman/test/32_intel-vga.dts
 create mode 100644 tools/binman/test/33_x86-start16.dts
 create mode 100644 tools/binman/test/34_x86_ucode.dts
 create mode 100644 tools/binman/test/35_x86_single_ucode.dts
 create mode 100755 tools/binman/test/u_boot_ucode_ptr
 create mode 100644 tools/binman/test/u_boot_ucode_ptr.c
 create mode 100644 tools/binman/test/u_boot_ucode_ptr.lds

diff --git a/tools/binman/etype/intel_descriptor.py 
b/tools/binman/etype/intel_descriptor.py
new file mode 100644
index 000..7f4ea0b
--- /dev/null
+++ b/tools/binman/etype/intel_descriptor.py
@@ -0,0 +1,55 @@
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass 
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Entry-type module for 'u-boot'
+#
+
+import struct
+
+from entry import Entry
+from blob import Entry_blob
+
+FD_SIGNATURE   = struct.pack('> 4) | 0xfff
+self.size = self.limit - self.base + 1
+
+class Entry_intel_descriptor(Entry_blob):
+"""Intel flash descriptor block (4KB)
+
+This is placed at the start of flash and provides information about
+the SPI flash regions. In particular it provides the base address and
+size of the ME region, allowing us to place the ME binary in the right
+place.
+"""
+def __init__(self, image, etype, node):
+Entry_blob.__init__(self, image, etype, node)
+self._regions = []
+
+def GetDefaultFilename(self):
+return 'descriptor.bin'
+
+def GetPositions(self):
+pos = self.data.find(FD_SIGNATURE)
+if pos == -1:
+self.Raise('Cannot find FD signature')
+flvalsig, flmap0, flmap1, flmap2 = struct.unpack('<',
+self.data[pos:pos + 16])
+frba = ((flmap0 >> 16) & 0xff) << 4
+for i in range(MAX_REGIONS):
+self._regions.append(Region(self.data, frba, i))
+
+# Set the offset for ME only, for now, since the others are not used
+return {'intel-me': [self._regions[REGION_ME].base,
+ 

[U-Boot] [PATCH v4 01/11] binman: Introduce binman, a tool for building binary images

2016-10-06 Thread Simon Glass
This adds the basic code for binman, including command parsing, processing
of entries and generation of images.

So far no entry types are supported. These will be added in future commits
as examples of how to add new types.

See the README for documentation.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Add test for code coverage
- Fix the -b option
- drop the unused __len__() method

 tools/binman/.gitignore |   1 +
 tools/binman/README | 491 
 tools/binman/binman |   1 +
 tools/binman/binman.py  | 116 +++
 tools/binman/cmdline.py |  53 +
 tools/binman/control.py | 118 +++
 tools/binman/etype/entry.py | 190 +
 tools/binman/fdt_test.py|  48 +
 tools/binman/image.py   | 229 +
 9 files changed, 1247 insertions(+)
 create mode 100644 tools/binman/.gitignore
 create mode 100644 tools/binman/README
 create mode 12 tools/binman/binman
 create mode 100755 tools/binman/binman.py
 create mode 100644 tools/binman/cmdline.py
 create mode 100644 tools/binman/control.py
 create mode 100644 tools/binman/etype/entry.py
 create mode 100644 tools/binman/fdt_test.py
 create mode 100644 tools/binman/image.py

diff --git a/tools/binman/.gitignore b/tools/binman/.gitignore
new file mode 100644
index 000..0d20b64
--- /dev/null
+++ b/tools/binman/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/tools/binman/README b/tools/binman/README
new file mode 100644
index 000..c73fb3c
--- /dev/null
+++ b/tools/binman/README
@@ -0,0 +1,491 @@
+# Copyright (c) 2016 Google, Inc
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+Introduction
+
+
+Firmware often consists of several components which must be packaged together.
+For example, we may have SPL, U-Boot, a device tree and an environment area
+grouped together and placed in MMC flash. When the system starts, it must be
+able to find these pieces.
+
+So far U-Boot has not provided a way to handle creating such images in a
+general way. Each SoC does what it needs to build an image, often packing or
+concatenating images in the U-Boot build system.
+
+Binman aims to provide a mechanism for building images, from simple
+SPL + U-Boot combinations, to more complex arrangements with many parts.
+
+
+What it does
+
+
+Binman reads your board's device tree and finds a node which describes the
+required image layout. It uses this to work out what to place where. The
+output file normally contains the device tree, so it is in principle possible
+to read an image and extract its constituent parts.
+
+
+Features
+
+
+So far binman is pretty simple. It supports binary blobs, such as 'u-boot',
+'spl' and 'fdt'. It supports empty entries (such as setting to 0xff). It can
+place entries at a fixed location in the image, or fit them together with
+suitable padding and alignment. It provides a way to process binaries before
+they are included, by adding a Python plug-in. The device tree is available
+to U-Boot at run-time so that the images can be interpreted.
+
+Binman does not yet update the device tree with the final location of
+everything when it is done. A simple C structure could be generated for
+constrained environments like SPL (using dtoc) but this is also not
+implemented.
+
+Binman can also support incorporating filesystems in the image if required.
+For example x86 platforms may use CBFS in some cases.
+
+Binman is intended for use with U-Boot but is designed to be general enough
+to be useful in other image-packaging situations.
+
+
+Motivation
+--
+
+Packaging of firmware is quite a different task from building the various
+parts. In many cases the various binaries which go into the image come from
+separate build systems. For example, ARM Trusted Firmware is used on ARMv8
+devices but is not built in the U-Boot tree. If a Linux kernel is included
+in the firmware image, it is built elsewhere.
+
+It is of course possible to add more and more build rules to the U-Boot
+build system to cover these cases. It can shell out to other Makefiles and
+build scripts. But it seems better to create a clear divide between building
+software and packaging it.
+
+At present this is handled by manual instructions, different for each board,
+on how to create images that will boot. By turning these instructions into a
+standard format, we can support making valid images for any board without
+manual effort, lots of READMEs, etc.
+
+Benefits:
+- Each binary can have its own build system and tool chain without creating
+any dependencies between them
+- Avoids the need for a single-shot build: individual parts can be updated
+and brought in as needed
+- Provides for a standard image description available in the build and at
+run-time
+- SoC-specific image-signing tools can be accomodated
+- Avoids cluttering the U-Boot build system with image-building code

[U-Boot] [PATCH v4 00/11] binman: A tool for creating firmware images

2016-10-06 Thread Simon Glass
This series introduces binman, a tool designed to create firmware images.
It provides a way to bring together various binaries and place them in an
image, at particular positions and with configurable alignment.

Packaging of firmware is quite a different task from building the various
parts. In many cases the various binaries which go into the image come from
separate build systems. For example, ARM Trusted Firmware is used on ARMv8
devices but is not built in the U-Boot tree. If a Linux kernel is included
in the firmware image, it is built elsewhere.

It is of course possible to add more and more build rules to the U-Boot
build system to cover these cases. It can shell out to other Makefiles and
build scripts. But it seems better to create a clear divide between building
software and packaging it.

U-Boot supports a very large number of boards. Many of these have their own
specific rules for how an image should be put together so that it boots
correctly. At present these rules are described by manual instructions,
different for each board. By turning these instructions into a standard
format, we can support making valid images for any board without manual
effort, lots of READMEs, etc.

Images consist of a number of entries which are combined to make up the
final image. The image is described in the device tree for the board, meaning
that it can be accessed at run-time if desired.

Binman is an extensible tool. A set of standard entries is provides, but
new entries can be created fairly easily. Entries can be as simple as
providing the name of a file to include. They can also handle more complex
requirements, such as adjusting the input file or reading header information
from one entry to control the position of another.

U-Boot's mkimage builds FIT images and various other binaries. Binman
augments this by allowing these binaries to be packed together. While FIT
should be used where possible, it cannot be used everywhere. For example,
many devices require executable code at a particular offset in the image.
X86 machines require lots of binary blobs at particular places, and a
microcode collection easily accessible at boot.

So far binman has enough functionality to be useful, so sunxi and x86 boards
are switched over to use it, as examples.

The series is available at u-boot-dm/binman-working

Future work and missing features are documented in the README.

Changes in v4:
- Add an option to bring in an soc .dtsi file also
- Add new patch to support building x86 images with FSP/CMC
- Fix incorrect comments at the top of intel_*.py
- Fix up rule to #include on "/ {" rather than "/dts-v1/;"
- Remove RFC tag
- Rename binman_dtsi variable to u-boot-dtsi
- Update sunxi rule to depend on u-boot.dtb
- Use binman for all sunxi boards
- Use binman for all x86 boards

Changes in v3:
- Add a new patch to automatically include a U-Boot .dtsi file
- Put the binman definition in u-boot.dtsi
- Use a -u-boot.dtsi file for the binman changes

Changes in v2:
- Add automated test coverage
- Add test for code coverage
- Fix the -b option
- Put the binman definition in a common file for x86
- Various changes and improvements based on using this tool for a while
- drop the unused __len__() method

Simon Glass (11):
  binman: Introduce binman, a tool for building binary images
  binman: Add basic entry types for U-Boot
  binman: Add support for building x86 ROMs
  binman: Add support for u-boot.img as an input binary
  binman: Add support for building x86 ROMs with SPL
  binman: Add support for building x86 images with FSP/CMC
  binman: Add a build rule for binman
  binman: Allow configuration options to be used in .dts files
  binman: Automatically include a U-Boot .dtsi file
  sunxi: Use binman for sunxi boards
  x86: Use binman all x86 boards

 Makefile   |  57 +-
 arch/arm/dts/sunxi-u-boot.dtsi |  14 +
 arch/x86/dts/u-boot.dtsi   |  62 ++
 scripts/Makefile.lib   |  22 +-
 tools/binman/.gitignore|   1 +
 tools/binman/README| 491 +
 tools/binman/binman|   1 +
 tools/binman/binman.py | 116 +++
 tools/binman/cmdline.py|  53 ++
 tools/binman/control.py| 118 
 tools/binman/entry_test.py |  27 +
 tools/binman/etype/_testing.py |  26 +
 tools/binman/etype/blob.py |  37 +
 tools/binman/etype/entry.py| 190 +
 tools/binman/etype/intel_cmc.py|  17 +
 tools/binman/etype/intel_descriptor.py |  55 ++
 tools/binman/etype/intel_fsp.py|  17 +
 tools/binman/etype/intel_me.py |  17 +
 tools/binman/etype/intel_mrc.py|  17 +
 tools/binman/etype/intel_vga.py   

Re: [U-Boot] [PATCH 13/16] atmel: Drop README.at91-soc

2016-10-06 Thread Andreas Bießmann
On 03.10.16 02:01, Simon Glass wrote:
> This issue covered by this doc appears to be fixed, so let's remove the
> README.
> 
> Signed-off-by: Simon Glass 

Acked-by: Andreas Bießmann 

> ---
> 
>  doc/README.at91-soc | 48 
>  1 file changed, 48 deletions(-)
>  delete mode 100644 doc/README.at91-soc
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][v3] board: ls1012afrdm: overwrite CONFIG_EXTRA_ENV_SETTINGS

2016-10-06 Thread york sun
On 10/04/2016 04:38 AM, Pratiyush Mohan Srivastava wrote:
> LS1012AFRDM has 512MB of DDR.
> So update Kernel load address as 0x9600 instead of default
> 0xa000.
>
> Signed-off-by: Prabhakar Kushwaha 
> Signed-off-by: Pratiyush Mohan Srivastava 
> ---
> Changes for v3:
>   - Rebased v2 patch to master
>   - Removed "initrd_high=0x\0"
>   - Removed console variable "console=ttyAMA0,115200n8\0"
>
> Changes for v2: Incorporated York's comments
>   - Removed ramdisk_addr, ramdisk_size
>   - Updated UART baud-rate.
>
>  include/configs/ls1012afrdm.h | 12 
>  1 file changed, 12 insertions(+)
>
> diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h
> index 612f243..5763d86 100644
> --- a/include/configs/ls1012afrdm.h
> +++ b/include/configs/ls1012afrdm.h
> @@ -20,6 +20,18 @@
>  #define CONFIG_SYS_MEMTEST_START 0x8000
>  #define CONFIG_SYS_MEMTEST_END   0x9fff
>
> +#undef CONFIG_EXTRA_ENV_SETTINGS
> +#define CONFIG_EXTRA_ENV_SETTINGS  \
> +   "verify=no\0"   \

Why do you need this?

> +   "hwconfig=fsl_ddr:bank_intlv=auto\0"\

This board doesn't use Freescale DDR driver. This hwconfig is not used.

> +   "loadaddr=0x8010\0" \
> +   "kernel_addr=0x10\0"\
> +   "fdt_high=0x\0" \
> +   "initrd_high=0x\0"  \
> +   "kernel_start=0xa0\0"   \
> +   "kernel_load=0x9600\0"  \
> +   "kernel_size=0x280\0"
> +

York

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


Re: [U-Boot] ACPI in general

2016-10-06 Thread Olof Johansson
On Thu, Oct 6, 2016 at 6:01 AM, Timur Tabi  wrote:
> Bin Meng wrote:
>>>
>>> >I believe that ACPI systems generally expect EFI runtime services to
>>> >be present as well.  I know ours does.
>>
>> This is not true. ACPI does not require any EFI runtime services.
>
>
> Please re-read my sentence.  I said "generally expect".
>
> If you guys want to spend the man-years necessary to get ACPI and ARM
> working in U-Boot, go right on ahead.  I think it's a fool's errand.  I work
> on ARM Servers, so I know the pain that is ACPI.  You don't want it.  If
> your system works with device tree, stick with that.  ACPI has no value
> outside of ARM servers, and ARM servers already have UEFI.

Remember, if you expect to run Linux on top of ACPI, that is only
supported for SBSA-compliant platforms.

No ACPI on embedded platforms, period.


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


Re: [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL

2016-10-06 Thread Eric Anholt
Alexander Graf  writes:

>> Am 05.10.2016 um 18:48 schrieb Fabian Vogt :
>> 
>> Hi,
>> 
>> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
>>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
 This patch series modifies the used drivers to work with OF_CONTROL
 and switches the board code and configs to use it.
 The added device trees are directly from the linux kernel tree
 and can thus be used for booting the (upstream) kernel.
>>> 
>>> Is there a user-visible or developer-visible benefit to this change? In 
>>> general, converting to use DT to instantiate devices simply ends up 
>>> using more code (and hence complexity and time) to get to the exact same 
>>> state afterwards.
>> 
>> There are various reasons, like:
>> 
>> - The device tree describes the platform, so it can also be used by the
>>  linux kernel for configuration (no separate dtb needed)
>
> With a bit of lobbying, we might even be able to get a working dt from
> the rpi firmware. That again would enable awesome things like hat
> support in u-boot :).

I can't imagine the firmware handing any DT off to the kernel other than
the one that's being shipped from whatever kernel is being loaded.
Being able to update the DT in lockstep with the kernel is very much
part of their process.  (This makes linux insisting that DT is ABI that
must maintain backwards compat quite painful for upstreaming)

Given that the firmware already hands the kernel's DT back to the
kernel, it seems like we should be able to load the kernel's DT too if
we wanted that.


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


Re: [U-Boot] [PATCH v1 0/2] spl: move SPL_OS_BOOT and SYS_OS_BASE to Kconfig

2016-10-06 Thread Tom Rini
On Thu, Oct 06, 2016 at 11:29:27AM -0500, Andrew F. Davis wrote:
> On 10/06/2016 12:55 AM, Heiko Schocher wrote:
> > This 2 patches move SPL_OS_BOOT and SYS_OS_BASE
> > to Kconfig. Checked with tbot testcase:
> > https://github.com/hsdenx/tbot/blob/master/src/tc/uboot/tc_uboot_check_kconfig.py
> > 
> > result:
> > 
> > Boards  : 1213
> > compile err : 13
> > not checked : 1
> > U-Boot good : 1185 bad 14
> > SPL good: 1199 bad 0
> > 
> > Boards not checked, as they had compile errors:
> > ['adp-ag101p', 'bf533-stamp', 'cm-bf527', 'colibri_pxa270', 
> > 'omap4_sdp4430', 'openrisc-generic', 'qemu-x86_efi_payload64', 'sandbox', 
> > 'sandbox_noblk', 'sandbox_spl', 'smdk5250', 'snow', 'spring']
> > 
> > Boards not checked, as no toolchain:
> > ['xtfpga']
> > 
> > Boards which have differences in the resulting U-Boot bin:
> > ['am335x_baltos', 'am335x_evm_spiboot', 'am335x_igep0033', 'cm_t335', 
> > 'cm_t43', 'cm_t54', 'duovero', 'k2e_evm', 'k2g_evm', 'k2hk_evm', 'k2l_evm', 
> > 'omap3_pandora', 'omap3_zoom1', 'pepper']
> > 
> > I looked into the Boards with differences in the resulting U-Boot bin,
> > but could not find the reason, why they are different :-(
> > 
> > for example am335x_baltos:
> > 
> > $ make am335x_baltos_defconfig
> > $ cp .config config_org
> > $ make mrproper
> > - applied the 2 patches
> > $ make am335x_baltos_defconfig
> > $ diff -pruN config_org .config > gnlmpf
> > $ cat gnlmpf
> > 
> > --- config_org  2016-10-06 06:58:01.636514195 +0200
> > +++ .config 2016-10-06 06:58:36.459726538 +0200
> > @@ -270,6 +270,7 @@ CONFIG_SPL_MTD_SUPPORT=y
> >  # CONFIG_SPL_NO_CPU_SUPPORT is not set
> >  # CONFIG_SPL_NOR_SUPPORT is not set
> >  # CONFIG_SPL_ONENAND_SUPPORT is not set
> > +# CONFIG_SPL_OS_BOOT is not set
> >  # CONFIG_SPL_POST_MEM_SUPPORT is not set
> >  # CONFIG_SPL_SATA_SUPPORT is not set
> >  # CONFIG_SPL_USBETH_SUPPORT is not set
> > 
> > change in this patchserie for this board:
> > diff --git a/include/configs/baltos.h b/include/configs/baltos.h
> > index 58df571..e69c1b6 100644
> > --- a/include/configs/baltos.h
> > +++ b/include/configs/baltos.h
> > @@ -54,7 +54,6 @@
> >  #undef CONFIG_SYS_OMAP24_I2C_SPEED
> >  #define CONFIG_SYS_OMAP24_I2C_SPEED 1000
> > 
> > -#undef CONFIG_SPL_OS_BOOT
> >  #ifdef CONFIG_NAND
> >  #define CONFIG_SYS_NAND_U_BOOT_OFFS0x0008
> >  #ifdef CONFIG_SPL_OS_BOOT
> > 
> > Seems Ok to me, but I get a different md5sum for the U-Boot bin ...
> > 
> > Or for example the omap3_pandora board:
> > $ make omap3_pandora_defconfig
> > $ cp .config config_org
> > $ make mrproper
> > - applied the 2 patches
> > $ make omap3_pandora_defconfig
> > $ diff -pruN config_org .config > gnlmpf
> > $ cat gnlmpf
> > $
> > 
> > No difference in the .config before and after this patch,
> > but a difference in the resulting binary ... ?
> > 
> > Seems to me SPL_OS_BOOT, which is a SPL config option
> > has somewhere an influence to the U-Boot binary ...
> > 
> > Any ideas whats going on here?
> > 
> 
> No idea, all I know is that some config headers with long histories are
> full of hacky ifdef tricks and bugs. IMHO the best thing we can do is to
> quickly move everything to Kconfig and sort it out then, instead of
> battling the config logic in the header files with every change as we go.
> 
> I will try to help test these changes with the boards I have, but  I
> haven't been able to get any of my omap3 boards to boot correctly in a
> while :(. I'll see if anyone else here has one working they can test this.

FWIW, omap3_beagle (and it's an xM) is part of my current lab and tested
every time.  I'm FAT booting mine not raw mode.

-- 
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 v1 1/4] sf: add ADDR_4B for 4byte address support

2016-10-06 Thread york sun
On 09/28/2016 04:21 AM, Yuan Yao wrote:
> From: Yuan Yao 
>
> Some new flash don't support bar register but use 4bytes address to
> support exceed 16MB flash size.
> So add flash flag:
> ADDR_4B
> for some flash which support 4bytes address.
>
> Signed-off-by: Yuan Yao 
> ---
>  drivers/mtd/spi/sf_internal.h |  4 +++-
>  drivers/mtd/spi/sf_params.c   |  2 +-
>  drivers/mtd/spi/spi_flash.c   | 38 +-
>  include/spi_flash.h   |  1 +
>  4 files changed, 30 insertions(+), 15 deletions(-)

Jagan,

Please review and give your comment. Thanks.

York

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


Re: [U-Boot] [PATCH 0/6] libfdt: Sync to upstream

2016-10-06 Thread Simon Glass
Hi Maxime,

On 6 October 2016 at 07:53, Maxime Ripard
 wrote:
> Hi Simon,
>
> On Sun, Oct 02, 2016 at 05:59:24PM -0600, Simon Glass wrote:
>> In a few cases the upstream versions of functions first written for U-Boot
>> have landed in a slightly different form.
>>
>> This includes a few patches to fix these as well as various minor changes to
>> reduce the delta.
>
> Thanks a lot for working on this.
>
> The overlay code just got merged, and it has a significant amount of
> fixes, so it might be nice to do that sync with the latest dtc HEAD.

Nice work! I see you have sent some fix-up patches two, right? If so I
should probably wait until they land.

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


Re: [U-Boot] [PATCH v1 0/2] spl: move SPL_OS_BOOT and SYS_OS_BASE to Kconfig

2016-10-06 Thread Andrew F. Davis
On 10/06/2016 12:55 AM, Heiko Schocher wrote:
> This 2 patches move SPL_OS_BOOT and SYS_OS_BASE
> to Kconfig. Checked with tbot testcase:
> https://github.com/hsdenx/tbot/blob/master/src/tc/uboot/tc_uboot_check_kconfig.py
> 
> result:
> 
> Boards  : 1213
> compile err : 13
> not checked : 1
> U-Boot good : 1185 bad 14
> SPL good: 1199 bad 0
> 
> Boards not checked, as they had compile errors:
> ['adp-ag101p', 'bf533-stamp', 'cm-bf527', 'colibri_pxa270', 'omap4_sdp4430', 
> 'openrisc-generic', 'qemu-x86_efi_payload64', 'sandbox', 'sandbox_noblk', 
> 'sandbox_spl', 'smdk5250', 'snow', 'spring']
> 
> Boards not checked, as no toolchain:
> ['xtfpga']
> 
> Boards which have differences in the resulting U-Boot bin:
> ['am335x_baltos', 'am335x_evm_spiboot', 'am335x_igep0033', 'cm_t335', 
> 'cm_t43', 'cm_t54', 'duovero', 'k2e_evm', 'k2g_evm', 'k2hk_evm', 'k2l_evm', 
> 'omap3_pandora', 'omap3_zoom1', 'pepper']
> 
> I looked into the Boards with differences in the resulting U-Boot bin,
> but could not find the reason, why they are different :-(
> 
> for example am335x_baltos:
> 
> $ make am335x_baltos_defconfig
> $ cp .config config_org
> $ make mrproper
> - applied the 2 patches
> $ make am335x_baltos_defconfig
> $ diff -pruN config_org .config > gnlmpf
> $ cat gnlmpf
> 
> --- config_org  2016-10-06 06:58:01.636514195 +0200
> +++ .config 2016-10-06 06:58:36.459726538 +0200
> @@ -270,6 +270,7 @@ CONFIG_SPL_MTD_SUPPORT=y
>  # CONFIG_SPL_NO_CPU_SUPPORT is not set
>  # CONFIG_SPL_NOR_SUPPORT is not set
>  # CONFIG_SPL_ONENAND_SUPPORT is not set
> +# CONFIG_SPL_OS_BOOT is not set
>  # CONFIG_SPL_POST_MEM_SUPPORT is not set
>  # CONFIG_SPL_SATA_SUPPORT is not set
>  # CONFIG_SPL_USBETH_SUPPORT is not set
> 
> change in this patchserie for this board:
> diff --git a/include/configs/baltos.h b/include/configs/baltos.h
> index 58df571..e69c1b6 100644
> --- a/include/configs/baltos.h
> +++ b/include/configs/baltos.h
> @@ -54,7 +54,6 @@
>  #undef CONFIG_SYS_OMAP24_I2C_SPEED
>  #define CONFIG_SYS_OMAP24_I2C_SPEED 1000
> 
> -#undef CONFIG_SPL_OS_BOOT
>  #ifdef CONFIG_NAND
>  #define CONFIG_SYS_NAND_U_BOOT_OFFS0x0008
>  #ifdef CONFIG_SPL_OS_BOOT
> 
> Seems Ok to me, but I get a different md5sum for the U-Boot bin ...
> 
> Or for example the omap3_pandora board:
> $ make omap3_pandora_defconfig
> $ cp .config config_org
> $ make mrproper
> - applied the 2 patches
> $ make omap3_pandora_defconfig
> $ diff -pruN config_org .config > gnlmpf
> $ cat gnlmpf
> $
> 
> No difference in the .config before and after this patch,
> but a difference in the resulting binary ... ?
> 
> Seems to me SPL_OS_BOOT, which is a SPL config option
> has somewhere an influence to the U-Boot binary ...
> 
> Any ideas whats going on here?
> 

No idea, all I know is that some config headers with long histories are
full of hacky ifdef tricks and bugs. IMHO the best thing we can do is to
quickly move everything to Kconfig and sort it out then, instead of
battling the config logic in the header files with every change as we go.

I will try to help test these changes with the boards I have, but  I
haven't been able to get any of my omap3 boards to boot correctly in a
while :(. I'll see if anyone else here has one working they can test this.

Thanks,
Andrew

> Hmm... looking into ".config" after an "make omap3_pandora_defconfig"
> There are a lot of CONFIG_SPL symbols defined, but:
>  #
>  # SPL / TPL
>  #
>  CONFIG_SUPPORT_SPL=y
>  # CONFIG_SPL is not set
> 
> This seems bogus to me! SPL support is deactivated, but
> a lot of CONFIG_SPL_* symbols are activated! For example
> I find in .config:
> CONFIG_SPL_GPIO_SUPPORT=y
> CONFIG_SPL_LIBCOMMON_SUPPORT=y
> CONFIG_SPL_LIBGENERIC_SUPPORT=y
> 
> Does currently the omap3_pandora board boot with
> "Prepare v2016.11-rc1" ?
> 
> 
> 
> Heiko Schocher (2):
>   spl: move SPL_OS_BOOT to Kconfig
>   spl: move SYS_OS_BASE to Kconfig
> 
>  common/spl/Kconfig   | 18 ++
>  configs/a3m071_defconfig |  2 ++
>  configs/a4m2k_defconfig  |  1 +
>  configs/am335x_boneblack_defconfig   |  3 ++-
>  configs/am335x_boneblack_vboot_defconfig |  3 ++-
>  configs/am335x_evm_defconfig |  1 +
>  configs/am335x_evm_nor_defconfig |  1 +
>  configs/am335x_evm_usbspl_defconfig  |  1 +
>  configs/am335x_shc_defconfig |  3 ++-
>  configs/am335x_shc_ict_defconfig |  3 ++-
>  configs/am335x_shc_netboot_defconfig |  3 ++-
>  configs/am335x_shc_prompt_defconfig  |  3 ++-
>  configs/am335x_shc_sdboot_defconfig  |  3 ++-
>  configs/am335x_shc_sdboot_prompt_defconfig   |  3 ++-
>  configs/am335x_sl50_defconfig|  3 ++-
>  configs/am43xx_evm_defconfig |  1 +
>  configs/am43xx_evm_ethboot_defconfig |  1 +
>  configs/am43xx_evm_usbhost_boot_defconfig   

Re: [U-Boot] [PATCH v6 0/6] power: pmic: Add support for Palmas family of PMICs

2016-10-06 Thread Keerthy



On Friday 30 September 2016 09:20 AM, Keerthy wrote:

The series adds support for Palmas family of PMICs.
Implements functions to configure regulators. Enable/Disable
Get/Set voltages of regulators.

Supports TPS659038, TPS65917, Palmas.

Tested on TPS659038, TPS65917 using DRA7XX-EVM and AM57XX-EVM.


Simon,

If you are okay with this series please pull it.

Regards,
Keerthy


Changes in v5:

removed u8 i2c read/write functions made use of already
existing functions.

Added read/write functions.

Changes in v4:

Added Reviewed-by and a minor change from printf to debug.

Changes in v3:

Introduced u8 i2c read/write functions.

Keerthy (6):
  power: regulator: Add ctrl_reg and volt_reg fields for pmic
  power: pmic: Palmas: Add the base pmic support
  power: regulator: palmas: Add regulator support
  configs: dra7xx_evm_defconfig: Enable PALMAS options
  configs: am57xx_evm_defconfig: Enable PALMAS options
  configs: am57xx_evm_defconfig: Enable CMD_REG option

 configs/am57xx_evm_defconfig   |   5 +
 configs/dra7xx_evm_defconfig   |   3 +
 drivers/power/pmic/Kconfig |   7 +
 drivers/power/pmic/Makefile|   1 +
 drivers/power/pmic/palmas.c| 104 +++
 drivers/power/regulator/Kconfig|   8 +
 drivers/power/regulator/Makefile   |   1 +
 drivers/power/regulator/palmas_regulator.c | 453 +
 include/power/palmas.h |  25 ++
 include/power/regulator.h  |   4 +
 10 files changed, 611 insertions(+)
 create mode 100644 drivers/power/pmic/palmas.c
 create mode 100644 drivers/power/regulator/palmas_regulator.c
 create mode 100644 include/power/palmas.h


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


Re: [U-Boot] [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs

2016-10-06 Thread york sun
On 10/05/2016 11:03 PM, Sriram Dash wrote:
>> From: york sun
>> Sent: Thursday, October 06, 2016 12:37 AM
>> To: Sriram Dash ; u-boot@lists.denx.de
>> Cc: Prabhakar Kushwaha ;
>> albert.u.b...@aribaud.net; Suresh Gupta 
>> Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs
>>
>> On 09/28/2016 11:18 PM, Sriram Dash wrote:
>>> Enables driver model flag CONFIG_DM_USB for LS2080A platform
>>> defconfigs.
>>>
>>> Signed-off-by: Sriram Dash 
>>> ---
>>>  configs/ls2080aqds_SECURE_BOOT_defconfig | 1 +
>>>  configs/ls2080aqds_defconfig | 1 +
>>>  configs/ls2080aqds_nand_defconfig| 1 +
>>>  configs/ls2080aqds_qspi_defconfig| 1 +
>>>  configs/ls2080ardb_SECURE_BOOT_defconfig | 1 +
>>>  configs/ls2080ardb_defconfig | 1 +
>>>  configs/ls2080ardb_nand_defconfig| 2 ++
>>>  7 files changed, 8 insertions(+)
>>
>> Sriram,
>>
>> Please retest ls2080ardb_nand. It fails in my build.
>>
>> "undefined reference to `dm_scan_fdt_dev'"
>>
>
> Hello York,
>
> As of now, nand boot is disfeatured and hence, the config is missing some 
> features

NAND boot may be defeatured for the SDK, but not for U-Boot. It is not 
big burden to maintain it. Let's keep it running, shall we?

> for the nand boot. For this case, as the device tree is not enabled, the 
> function isn’t
> compiled. Setting CONFIG_OF_CONTROL and 
> CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
> will make it compile without errors.
>
> However, I will remove the the USB DM feature for nand in the next revision.

Can you add the device tree support for NAND boot?

York

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


Re: [U-Boot] [PATCH][v2] armv8: ls1012a: Updating CONFIG_EXTRA_ENV_SETTINGS

2016-10-06 Thread york sun
On 10/04/2016 04:38 AM, Pratiyush Mohan Srivastava wrote:
> Remove ramdisk_addr, ramdisk_size and update UART baud-rate.
>
> Signed-off-by: Prabhakar Kushwaha 
> Signed-off-by: Pratiyush Mohan Srivastava 
> ---
> Changes for v2 :
>   - Removed "initrd_high=0x\0"
>   - Removed console variable
>
>  include/configs/ls1012a_common.h | 4 
>  1 file changed, 4 deletions(-)
>
> diff --git a/include/configs/ls1012a_common.h 
> b/include/configs/ls1012a_common.h
> index af45993..02cbf5d 100644
> --- a/include/configs/ls1012a_common.h
> +++ b/include/configs/ls1012a_common.h
> @@ -106,19 +106,15 @@
>
>  /* Initial environment variables */
>  #define CONFIG_EXTRA_ENV_SETTINGS\
> - "initrd_high=0x\0"  \
>   "verify=no\0"   \
>   "hwconfig=fsl_ddr:bank_intlv=auto\0"\

I realize this hwconfig is not used. Please remove.

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


Re: [U-Boot] sf: proposed status register protect

2016-10-06 Thread George McCollister
On Thu, Oct 6, 2016 at 11:55 AM, Jagan Teki  wrote:
> On Thu, Oct 6, 2016 at 9:21 PM, George McCollister
>  wrote:
>> On Thu, Oct 6, 2016 at 10:27 AM, Jagan Teki  wrote:
>>> On Thu, Oct 6, 2016 at 8:32 PM, George McCollister
>>>  wrote:
 I'm looking into adding a sub-command to sf to protect status
 registers on Winbond SPI flash parts via the status register protect
 bits SRP0, SRP1. I propose the sub-command be named sr-protect.

 My use case is simple, I want to make the SPI flash read-only when the
 /WP pin is low. To do this I must do 'sf protect lock 0 $size' then
 set SRP0 to 1 and hold the /WP pin low. Although my use case doesn't
 require it, setting SRP1 to 1 allows either Power Supply Lock-Down or
 One Time Program (if supported by hardware) and I would probably add
 support for these as well.

 All of the current Winbond SPI NOR flash part datasheets that I've
 looked at show that the parts support the same locking implemented in
 stm_lock() even though SPI_FLASH_CFI_MFR_WINBOND is not in the list of
 vendors which use the function. I'll change this to make
 SPI_FLASH_CFI_MFR_WINBOND parts use stm_lock(), stm_unlock(),
 stm_is_locked().
>>>
>>> Does stm_lock can't protect the Winbond? how different is in the
>>> process of doing when compared to stm?
>>
>> stm_lock() does work with the Winbond parts. The issue is that you can
>> simply unlock from software (stm_unlock). To make it impossible to
>> write to the flash from software you must use stm_lock() then use the
>> status register protect bits to prevent an unlock.
>
> So, you need even if stm_unlock triggered from cmd flash still lock?
> then what is the point of using unlock?

stm_lock()/stm_unlock() change the block protect bits in the status
register to lock/unlock flash blocks. The status register protect bits
allow changes to the status register to be blocked under certain
conditions (if /WP pin is low, until re-powered or permanently).

> Just describe me what is the diff b/w winbond vs other stm flash in
> case of lock and unlocking.

I think it may be the same but if you have a part number this code is
known to work with I'll get the datasheet and check. The comment above
stm_lock() actually mentions a Winbond part! As far as I can tell
STMicroelectronics no longer manufactures SPI Flash.

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


Re: [U-Boot] sf: proposed status register protect

2016-10-06 Thread Jagan Teki
On Thu, Oct 6, 2016 at 9:21 PM, George McCollister
 wrote:
> On Thu, Oct 6, 2016 at 10:27 AM, Jagan Teki  wrote:
>> On Thu, Oct 6, 2016 at 8:32 PM, George McCollister
>>  wrote:
>>> I'm looking into adding a sub-command to sf to protect status
>>> registers on Winbond SPI flash parts via the status register protect
>>> bits SRP0, SRP1. I propose the sub-command be named sr-protect.
>>>
>>> My use case is simple, I want to make the SPI flash read-only when the
>>> /WP pin is low. To do this I must do 'sf protect lock 0 $size' then
>>> set SRP0 to 1 and hold the /WP pin low. Although my use case doesn't
>>> require it, setting SRP1 to 1 allows either Power Supply Lock-Down or
>>> One Time Program (if supported by hardware) and I would probably add
>>> support for these as well.
>>>
>>> All of the current Winbond SPI NOR flash part datasheets that I've
>>> looked at show that the parts support the same locking implemented in
>>> stm_lock() even though SPI_FLASH_CFI_MFR_WINBOND is not in the list of
>>> vendors which use the function. I'll change this to make
>>> SPI_FLASH_CFI_MFR_WINBOND parts use stm_lock(), stm_unlock(),
>>> stm_is_locked().
>>
>> Does stm_lock can't protect the Winbond? how different is in the
>> process of doing when compared to stm?
>
> stm_lock() does work with the Winbond parts. The issue is that you can
> simply unlock from software (stm_unlock). To make it impossible to
> write to the flash from software you must use stm_lock() then use the
> status register protect bits to prevent an unlock.

So, you need even if stm_unlock triggered from cmd flash still lock?
then what is the point of using unlock?
Just describe me what is the diff b/w winbond vs other stm flash in
case of lock and unlocking.

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


Re: [U-Boot] [PATCH v2 5/9] tegra: select ARM_GIC for Tegra TK1s

2016-10-06 Thread Antoine Tenart
Hi Stephen,

On Thu, Oct 06, 2016 at 10:15:06AM -0600, Stephen Warren wrote:
> On 10/06/2016 08:33 AM, Antoine Tenart wrote:
> >Select the newly introduced ARM_GIC option to the relevant configuration
> >which also have a psci implementation.
> 
> >diff --git a/arch/arm/mach-tegra/tegra124/Kconfig 
> >b/arch/arm/mach-tegra/tegra124/Kconfig
> 
> > config TARGET_JETSON_TK1
> > bool "NVIDIA Tegra124 Jetson TK1 board"
> >+select ARM_GIC
> > select CPU_V7_HAS_NONSEC
> > select CPU_V7_HAS_VIRT
> > select ARCH_SUPPORT_PSCI
> >
> > config TARGET_CEI_TK1_SOM
> > bool "Colorado Engineering Inc Tegra124 TK1-som board"
> >+select ARM_GIC
> > select CPU_V7_HAS_NONSEC if !SPL_BUILD
> > select CPU_V7_HAS_VIRT if !SPL_BUILD
> > help
> 
> This isn't correct; all Tegra variants have an ARM GIC; it's not
> board-specific. Shouldn't CONFIG_TEGRA or CONFIG_TEGRA_COMMON select
> ARM_GIC?

I focused on adding ARM_GIC for targets using PSCI, but I was hopping
for comments like this one :)

I'll move the ARM_GIC selection to CONFIG_TEGRA or CONFIG_TEGRA_COMMON
then.

Thanks!

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


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


Re: [U-Boot] [PATCH v2 5/9] tegra: select ARM_GIC for Tegra TK1s

2016-10-06 Thread Stephen Warren

On 10/06/2016 08:33 AM, Antoine Tenart wrote:

Select the newly introduced ARM_GIC option to the relevant configuration
which also have a psci implementation.



diff --git a/arch/arm/mach-tegra/tegra124/Kconfig 
b/arch/arm/mach-tegra/tegra124/Kconfig



 config TARGET_JETSON_TK1
bool "NVIDIA Tegra124 Jetson TK1 board"
+   select ARM_GIC
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
select ARCH_SUPPORT_PSCI

 config TARGET_CEI_TK1_SOM
bool "Colorado Engineering Inc Tegra124 TK1-som board"
+   select ARM_GIC
select CPU_V7_HAS_NONSEC if !SPL_BUILD
select CPU_V7_HAS_VIRT if !SPL_BUILD
help


This isn't correct; all Tegra variants have an ARM GIC; it's not 
board-specific. Shouldn't CONFIG_TEGRA or CONFIG_TEGRA_COMMON select 
ARM_GIC?

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


Re: [U-Boot] sf: proposed status register protect

2016-10-06 Thread George McCollister
On Thu, Oct 6, 2016 at 10:27 AM, Jagan Teki  wrote:
> On Thu, Oct 6, 2016 at 8:32 PM, George McCollister
>  wrote:
>> I'm looking into adding a sub-command to sf to protect status
>> registers on Winbond SPI flash parts via the status register protect
>> bits SRP0, SRP1. I propose the sub-command be named sr-protect.
>>
>> My use case is simple, I want to make the SPI flash read-only when the
>> /WP pin is low. To do this I must do 'sf protect lock 0 $size' then
>> set SRP0 to 1 and hold the /WP pin low. Although my use case doesn't
>> require it, setting SRP1 to 1 allows either Power Supply Lock-Down or
>> One Time Program (if supported by hardware) and I would probably add
>> support for these as well.
>>
>> All of the current Winbond SPI NOR flash part datasheets that I've
>> looked at show that the parts support the same locking implemented in
>> stm_lock() even though SPI_FLASH_CFI_MFR_WINBOND is not in the list of
>> vendors which use the function. I'll change this to make
>> SPI_FLASH_CFI_MFR_WINBOND parts use stm_lock(), stm_unlock(),
>> stm_is_locked().
>
> Does stm_lock can't protect the Winbond? how different is in the
> process of doing when compared to stm?

stm_lock() does work with the Winbond parts. The issue is that you can
simply unlock from software (stm_unlock). To make it impossible to
write to the flash from software you must use stm_lock() then use the
status register protect bits to prevent an unlock.

>
>>
>> spi_flash_protect() (which ultimately calls either stm_lock() or
>> stm_unlock()) is not part of the driver model (dm_spi_flash_ops).
>> Is there any issue with adding another function (let's call it
>> spi_flash_sr_protect) that is not part of the driver model?
>
> Why spi_flash_sr_protect, why can't existing stm_lock?

Explained above.

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


Re: [U-Boot] Unable to boot from QSPI (u-boot 2016.11-rc1)

2016-10-06 Thread Jagan Teki
On Tue, Oct 4, 2016 at 1:10 PM, Teoh Choon Zone
 wrote:
> Hi all,
>
> I have a custom board based on Altera Cyclone V SoC, when I tried to boot
> from QSPI, it stuck in a boot loop, I try to enable some debug message, and
> here it is:
>
> U-Boot SPL 2016.09.01 (Oct 03 2016 - 18:14:42)
> drivers/ddr/altera/sequencer.c: Preparing to start memory calibration
> drivers/ddr/altera/sequencer.c: CALIBRATION PASSED
> drivers/ddr/altera/sequencer.c: Calibration complete
> bind node soc
>- found match at 'generic_simple_bus'
> bind node dwmmc0@ff704000
>- found match at 'socfpga_dwmmc'
> Bound device dwmmc0@ff704000 to soc
> bind node spi@ff705000
>- found match at 'cadence_spi'
> bind node n25q00@0
> No match for node 'n25q00@0'
> Bound device spi@ff705000 to soc
> Bound device soc to root_driver
> Trying to boot from SPI
> Bound device spi_flash to spi@ff705000
> SF: Got idcodes
> x: x x x x x  .!.D
>
>
> u-boot from Altera working fine, but I plan to use the mainline u-boot. Any
> idea why it does not work?

Look like some controller init issue for getting RDID, try to probe in
u-boot instead SPL.

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


  1   2   >