Re: [U-Boot] [PATCH v2 1/4] ARM: qemu-arm: Add support for AArch64

2018-01-12 Thread Jonathan Gray
On Thu, Jan 11, 2018 at 04:11:23PM +0200, Tuomas Tynkkynen wrote: > This adds support for '-machine virt' on AArch64. This is rather simple: > we just add TARGET_QEMU_ARM_xxBIT to select a few different Kconfig > symbols, provide the ARMv8 memory map from the board file and add a new > defconfig

Re: [U-Boot] [U-Boot, v2, 16/18] clk: rockchip: Add rk322x gamc clock support

2018-01-12 Thread David.Wu
Hi Philipp, For the 'assigned-clocks' patches, i tested them well, and have implemented them at rk3328, rk3229, rk3288 and rk3368. The patches has been send for your review. Except for one thing, just like you said, we need to move "clk_set_defaults" further down and do it just before:

[U-Boot] [PATCH v3 17/20] config: evb-rk3229: Enable rk gmac configs

2018-01-12 Thread David Wu
Add gmac config support for rk3229 evb. Signed-off-by: David Wu --- Changes in v3: - None Changes in v2: - New patch configs/evb-rk3229_defconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig

[U-Boot] [PATCH v3 20/20] clk: rockchip: clk_rk3368: Implement "assign-clock-parent"

2018-01-12 Thread David Wu
Implement the setting parent for gmac clock, and add internal pll div set for mac clk. Signed-off-by: David Wu --- Changes in v3: - New patch Changes in v2: None arch/arm/include/asm/arch-rockchip/cru_rk3368.h | 7 ++ drivers/clk/rockchip/clk_rk3368.c

[U-Boot] [PATCH v3 18/20] ARM: dts: rk3288: Remove unused LCDC clock assigned

2018-01-12 Thread David Wu
The LCDC assigned rate is 0, it will make boot error, error log:"pll_para_config: the frequency can not be 0 Hz". Remove them, and the lcdc driver will do the correct clock rate setting. Signed-off-by: David Wu --- Changes in v3: - New patch Changes in v2: None

[U-Boot] [PATCH v3 12/20] rockchip: dts: rk3328-evb: Enable gmac2io for rk3328-evb

2018-01-12 Thread David Wu
Add rk3328-evb gmac support. Signed-off-by: David Wu --- Changes in v3: - None Changes in v2: - New patch arch/arm/dts/rk3328-evb.dts | 30 ++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/dts/rk3328-evb.dts

[U-Boot] [PATCH v3 16/20] net: gmac_rockchip: Add support for the RK3228 GMAC

2018-01-12 Thread David Wu
The GMAC in the RK3228 once again is identical to the incarnation in the RK3288 and the RK3399, except for where some of the configuration and control registers are located in the GRF. This adds the RK3368-specific logic necessary to reuse this driver. Signed-off-by: David Wu

[U-Boot] [PATCH v3 19/20] clk: rockchip: clk_rk3288: Implement "assign-clock-parent" and "assign-clock-rate"

2018-01-12 Thread David Wu
The RK3288 CRU-node assigns rates to a number of clocks that are not implemented in the RK3288 clock-driver (but which have been sufficiently initialised from rkclk_init()): for these clocks, we implement the gmac clock set parent, but simply ignore the others' set_rate() operation and return 0 to

[U-Boot] [PATCH v3 14/20] rockchip: pinctrl: Add rk322x gmac pinctrl support

2018-01-12 Thread David Wu
Set gmac pins iomux and rgmii tx pins to 12ma drive-strength, clean others to 2ma. Signed-off-by: David Wu --- Changes in v3: - adhere to the established way of writing this to avoid future confusion - use defined symbolic constants for drive-strength Changes in v2: -

[U-Boot] [PATCH v3 11/20] rockchip: dts: rk3328: Add gmac2io support

2018-01-12 Thread David Wu
Add basic dts configuration for rk3328 gmac2io. Signed-off-by: David Wu --- Changes in v3: - None Changes in v2: - New patch arch/arm/dts/rk3328.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/dts/rk3328.dtsi

[U-Boot] [PATCH v3 15/20] clk: rockchip: Add rk322x gamc clock support

2018-01-12 Thread David Wu
Assuming mac_clk is fed by an external clock, set clk_rmii_src clock select control register from IO for rgmii interface. Signed-off-by: David Wu --- Changes in v3: - Add "set parent" for gmac - Add internal mac clk div_sel for gmac Changes in v2: - New patch

[U-Boot] [PATCH v3 13/20] rockchip: pinctrl: rk322x: Move the iomux definitions into pinctrl-driver

2018-01-12 Thread David Wu
Clean the iomux definitions at grf_rk322x.h, and move them into pinctrl-driver for resolving the compiling error of redefinition. After that, define the uart2 iomux at rk322x-board file. Signed-off-by: David Wu --- Changes in v3: - Fix the wrong define for uart2 iomux

[U-Boot] [PATCH v3 10/20] rockchip: configs: Enable GMAC configs for evb-rk3328

2018-01-12 Thread David Wu
Enable GMAC configs for evb-rk3328 Signed-off-by: David Wu --- Changes in v3: - None Changes in v2: - New patch configs/evb-rk3328_defconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig index

[U-Boot] [PATCH v3 09/20] net: gmac_rockchip: Add rk3328 gmac support

2018-01-12 Thread David Wu
The GMAC2IO in the RK3328 once again is identical to the incarnation in the RK3288 and the RK3399, except for where some of the configuration and control registers are located in the GRF. This adds the RK3328-specific logic necessary to reuse this driver. Signed-off-by: David Wu

[U-Boot] [PATCH v3 08/20] clk: rockchip: Add rk3328 gamc clock support

2018-01-12 Thread David Wu
The rk3328 soc has two gmac controllers, one is gmac2io, the other is gmac2phy. We use the gmac2io rgmii interface for 1000M phy here. Signed-off-by: David Wu --- Changes in v3: - Add "set parent" for gmac2io - Add internal mac clk div_sel for gmac2io Changes in v2: -

[U-Boot] [PATCH v3 06/20] rockchip: pinctrl: rk3328: Move the iomux definitions into pinctrl-driver

2018-01-12 Thread David Wu
Clean the iomux definitions at grf_rk3328.h, and move them into pinctrl-driver for resolving the compiling error of redefinition. Signed-off-by: David Wu --- Changes in v3: - None Changes in v2: - New patch arch/arm/include/asm/arch-rockchip/grf_rk3328.h | 113

[U-Boot] [PATCH v3 07/20] rockchip: pinctrl: Add rk3328 gmac pinctrl support

2018-01-12 Thread David Wu
Need to set gmac m1 pins iomux, gmac m0 tx pins, select bit2 and bit10 at com iomux register. After that, set rgmii m1 tx pins to 12ma drive-strength, and clean others to 2ma. Signed-off-by: David Wu --- Changes in v3: - adhere to the established way of writing this to

[U-Boot] [PATCH v3 05/20] net: gmac_rockchip: Add support for the RV1108 GMAC

2018-01-12 Thread David Wu
The rv1108 GMAC only support rmii interface, so need to add the set_rmii() ops. Use the phy current interface to set rmii or rgmii ops. At the same time, need to set the mac clock rate of rmii with 50M, the clock rate of rgmii with 125M. Signed-off-by: David Wu ---

[U-Boot] [PATCH v3 02/20] rockchip: configs: Enable CONFIG_NET_RANDOM_ETHADDR for rk3288-evb

2018-01-12 Thread David Wu
If the Ethernet address is not set, the network can't work, enable the random address config for default use. Signed-off-by: David Wu Acked-by: Philipp Tomsich Reviewed-by: Philipp Tomsich

[U-Boot] [PATCH v3 04/20] rockchip: pinctrl: rv1108: Move the iomux definitions into pinctrl-driver

2018-01-12 Thread David Wu
If we include both the rk3288_grf.h and rv1108_grf.h, it will cause the conflicts of redefinition. Clean the iomux definitions at grf_rv1108.h, and move them into pinctrl-driver. Signed-off-by: David Wu Reviewed-by: Philipp Tomsich

[U-Boot] [PATCH v3 01/20] rockchip: dts: rk3399-evb: Change the tx/rx delay value for transmission quality

2018-01-12 Thread David Wu
Give the mac controller the correct tx-delay and rx-delay value for the rgmii mode transmission. If they are not matched, there would be Ethernet packets lost, the net feature may not work. Signed-off-by: David Wu Acked-by: Philipp Tomsich

[U-Boot] [PATCH v3 03/20] rockchip: grf_rv1108.h: Fix the grf offsets

2018-01-12 Thread David Wu
The last 4 grf registers offset of rv1108 are wrong, fix them for correct usage. Signed-off-by: David Wu Reviewed-by: Simon Glass --- Changes in v3: - None Changes in v2: - New patch arch/arm/include/asm/arch-rockchip/grf_rv1108.h | 8 ++-- 1

[U-Boot] [PATCH v3 00/20] Add gmac support for rk3399-evb rv1108-evb rk3328-evb and rk3229-evb

2018-01-12 Thread David Wu
This serie of patches add rmii interface support, and support more socs's gmac function, such as rv1108, rk3328 and rk3229. Implement the "assign-clock-parent" and "assign-clock-rate" for rk3328, rk3228, rk3288 and rk3368. This series of patches is based on Philipp's branch:

Re: [U-Boot] [PATCH 2/2] configs: stm32: move config flag from defconfig to Kconfig

2018-01-12 Thread Vikas Manocha
Hi, On 01/12/2018 12:23 AM, patrice.chot...@st.com wrote: > From: Patrice Chotard > > Move system flags from defconfig to mach-stm32/Kconfig > > Signed-off-by: Patrice Chotard Reviewed-by: Vikas Manocha One comment below

Re: [U-Boot] [PATCH 1/2] serial: stm32: Rename serial_stm32x7.c to serial_stm32.c

2018-01-12 Thread Vikas Manocha
Hi, On 01/12/2018 12:23 AM, patrice.chot...@st.com wrote: > From: Patrice Chotard > > Now this driver is used across stm32f4, stm32f7 and stm32h7 > SoCs family, give it a generic name. > > Signed-off-by: Patrice Chotard Reviewed-by: Vikas

[U-Boot] [PATCH] powerpc: Drop unreferenced CONFIG_* defines

2018-01-12 Thread Tuomas Tynkkynen
The following config symbols are only defined once and never referenced anywhere else: CONFIG_CYRUS CONFIG_IDS8313 CONFIG_MPC8308_P1M CONFIG_MPC8308RDB CONFIG_MPC8349EMDS CONFIG_MPC8349ITXGP CONFIG_SBC8349 CONFIG_SBC8548 CONFIG_SBC8641D CONFIG_TQM834X CONFIG_VE8313 CONFIG_XPEDITE5140

[U-Boot] [PATCH 1/1] dm: video: Correct color ANSI escape sequence support

2018-01-12 Thread Heinrich Schuchardt
Support increased intensity (bold). Get RGB sequence in pixels right (swap blue and red). Do not set reserved bits. Use u32 instead of unsigned for color bit mask. qemu-system-i386 -display sdl -vga virtio and qemu-system-i386 -display sdl -vga cirrus now display the same colors as

Re: [U-Boot] On writing .ext4 image to MMC

2018-01-12 Thread Adam Lee
I was hoping to get this done in the bootloader otherwise I have to change the rootfs ;) On Fri, Jan 12, 2018 at 1:18 PM Michael Nazzareno Trimarchi < mich...@amarulasolutions.com> wrote: > Hi > > On 12 Jan. 2018 7:15 pm, "Adam Lee" wrote: > > Hi Michael, I used gparted

Re: [U-Boot] On writing .ext4 image to MMC

2018-01-12 Thread Michael Nazzareno Trimarchi
Hi On 12 Jan. 2018 7:15 pm, "Adam Lee" wrote: Hi Michael, I used gparted to fix the issue. I am just wondering if I can do all this in U-Boot. If there is no good solution, I will put one-time script in my rootfs to do this task. Sorry most of the system on first boot

Re: [U-Boot] On writing .ext4 image to MMC

2018-01-12 Thread Adam Lee
Hi Michael, I used gparted to fix the issue. I am just wondering if I can do all this in U-Boot. If there is no good solution, I will put one-time script in my rootfs to do this task. Adam On Fri, Jan 12, 2018 at 10:18 AM Michael Nazzareno Trimarchi < mich...@amarulasolutions.com> wrote: > Hi >

Re: [U-Boot] [PATCH] imx: fix CAAM base for i.MX6UL

2018-01-12 Thread Breno Matheus Lima
Hi Anatolij, 2018-01-11 12:54 GMT-02:00 Fabio Estevam : > Hi Anatolij, > > Thanks for the fix. > > On Thu, Jan 11, 2018 at 12:14 PM, Anatolij Gustschin wrote: >> HW accelerated "hash sha256 ..." command doesn't work on i.MX6UL, we get >> "CAAM was not setup

[U-Boot] Pull request, u-boot-tegra/master

2018-01-12 Thread Tom Warren
Tom, Please pull u-boot-tegra/master into U-Boot/master. Thanks! All Tegra builds are OK, and Stephen's automated test system reports that all tests pass. The following changes since commit 373b9003410b44a1133060c2e63483b278fb476b: Merge git://git.denx.de/u-boot-sunxi (2018-01-11 14:14:19

Re: [U-Boot] [PATCH v3] armv8: errata: Implement workaround for Cortex-A53 Erratum 855873

2018-01-12 Thread York Sun
On 01/12/2018 01:12 AM, Michal Simek wrote: > On 11.1.2018 20:36, York Sun wrote: >> On 12/27/2017 09:20 PM, Alison Wang wrote: >>> 855873: An eviction might overtake a cache clean operation >>> Workaround: The erratum can be avoided by upgrading cache clean by >>> address operations to cache

Re: [U-Boot] [PATCH 3/9] optee: Make OPTEE_TZDRAM_BASE a mandatory define

2018-01-12 Thread Tom Rini
On Fri, Jan 12, 2018 at 02:52:18PM +, Bryan O'Donoghue wrote: > This patch makes OTPEE_TZDRAM_BASE a mandatory parameter. > Subsequent patches will ensure that the region between > OTPEE_TZDRAM_BASE and (OTPEE_TZDRAM_BASE + > CONFIG_OPTEE_TZDRAM_SIZE) match the information given in the OPTEE

Re: [U-Boot] [PATCH] TCP and wget implementation v5.1

2018-01-12 Thread Joe Hershberger
Hi Duncan, On Wed, Jan 10, 2018 at 8:18 PM, Duncan Hare wrote: > Date: Wed, 10 Jan 2018 17:54:07 -0800 > Subject: [PATCH] git_msg_1 > > TCP and wget implementation. Sounds like this should be the title of the series cover letter. I thought we agreed that this should be sent as

Re: [U-Boot] [PATCH V3] Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig

2018-01-12 Thread David Lechner
On 01/12/2018 07:26 AM, Adam Ford wrote: This converts the following to Kconfig: CONFIG_SYS_DV_CLKMODE CONFIG_SYS_DA850_PLL0_POSTDIV CONFIG_SYS_DA850_PLL0_PLLDIV1 CONFIG_SYS_DA850_PLL0_PLLDIV2 CONFIG_SYS_DA850_PLL0_PLLDIV3 CONFIG_SYS_DA850_PLL0_PLLDIV4

Re: [U-Boot] [PATCH v6 21/25] arm: imx: hab: Make authenticate_image() return zero on open boards

2018-01-12 Thread Breno Matheus Lima
Hi Bryan, 2018-01-12 10:40 GMT-02:00 Bryan O'Donoghue : > The BootROM will not successfully process a HAB image passed by u-boot > unless the board has been set into locked mode. Some of the existing usages > of authenticate_image() expect and rely on unlocked boards

[U-Boot] [PATCH] arm: zynq: Enable SPL_CLK only if SPL is enabled

2018-01-12 Thread Ezequiel Garcia
Setup proper dependency in Kconfig for SPL_CLK. If SPL is not enabled, SPL_CLK shouldn't be selected. Cc: Michal Simek Signed-off-by: Ezequiel Garcia --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [U-Boot] On writing .ext4 image to MMC

2018-01-12 Thread Michael Nazzareno Trimarchi
Hi resize2fs from linux? Michael On Fri, Jan 12, 2018 at 4:15 PM, Adam Lee wrote: > Hello everyone, > > I am able to download a .ext4 image over tftp and write it to my SD card. > The system boots fine. > One last thing I have to figure out is to expand this .ext4 file

[U-Boot] On writing .ext4 image to MMC

2018-01-12 Thread Adam Lee
Hello everyone, I am able to download a .ext4 image over tftp and write it to my SD card. The system boots fine. One last thing I have to figure out is to expand this .ext4 file system that I just populated. If the image is 600MB, the partition size itself is 600MB, leaving no room. Is there

Re: [U-Boot] [U-Boot, v4, 07/11] spl: add support to booting with OP-TEE

2018-01-12 Thread Bryan O'Donoghue
On 12/01/18 11:27, Philipp Tomsich wrote: OP-TEE is an open source trusted OS, in armv7, its loading and running are like this: loading: - SPL load both OP-TEE and U-Boot running: - SPL run into OP-TEE in secure mode; - OP-TEE run into U-Boot in non-secure mode; More detail:

Re: [U-Boot] [PATCH v2 0/9] reduce the size of the mmc core

2018-01-12 Thread Jaehoon Chung
On 01/04/2018 11:23 PM, Jean-Jacques Hiblot wrote: > > This series applies on u-boot/next > > It aims at reducing the size taken by the mmc core in the SPL. > Recent changes (for which I'm to blame) have bloated the mmc core and have > broken platforms that were already tight on code space. This

[U-Boot] [PATCH 4/9] optee: Add optee_image_get_entry_point()

2018-01-12 Thread Bryan O'Donoghue
Add a helper function for extracting the least significant 32 bits from the OPTEE entry point address, which will be good enough to load OPTEE binaries up to (2^32)-1 bytes. We may need to extend this out later on but for now (2^32)-1 should be fine. Signed-off-by: Bryan O'Donoghue

[U-Boot] [PATCH 3/9] optee: Make OPTEE_TZDRAM_BASE a mandatory define

2018-01-12 Thread Bryan O'Donoghue
This patch makes OTPEE_TZDRAM_BASE a mandatory parameter. Subsequent patches will ensure that the region between OTPEE_TZDRAM_BASE and (OTPEE_TZDRAM_BASE + CONFIG_OPTEE_TZDRAM_SIZE) match the information given in the OPTEE header before handing off control to the OPTEE image when booting OPTEE

[U-Boot] [PATCH 9/9] bootm: optee: Add mechanism to validate an OPTEE image before boot

2018-01-12 Thread Bryan O'Donoghue
This patch makes it possible to verify the contents and location of an OPTEE image in DRAM prior to handing off control to that image. If image verification fails we won't try to boot any further. Signed-off-by: Bryan O'Donoghue Cc: Harinarayan Bhatta

[U-Boot] [PATCH 8/9] optee: Improve error printout

2018-01-12 Thread Bryan O'Donoghue
When encountering an error in OPTEE verification print out the address of the header and image. Signed-off-by: Bryan O'Donoghue Cc: Harinarayan Bhatta Cc: Andrew F. Davis Cc: Tom Rini Cc: Kever Yang

[U-Boot] [PATCH 6/9] tools: mkimage: add optee image type

2018-01-12 Thread Bryan O'Donoghue
This patch adds support for bootable OPTEE images to mkimage. Currently there is a (Trusted Execution Environment) TEE image type, the TEE image type is installed to a memory location with u-boot continuing to own the boot process whereas the OPTEE image type defined here is a bootable image,

[U-Boot] [PATCH 5/9] optee: Add optee_image_get_load_addr()

2018-01-12 Thread Bryan O'Donoghue
This patch adds optee_image_get_load_addr() a helper function used to calculate the load-address of an OPTEE image based on the lower entry-point address given in the OPTEE header. Signed-off-by: Bryan O'Donoghue Cc: Harinarayan Bhatta Cc: Andrew

[U-Boot] [PATCH 7/9] optee: Add optee_verify_bootm_image()

2018-01-12 Thread Bryan O'Donoghue
This patch adds optee_verify_bootm_image() which will be subsequently used to verify the parameters encoded in the OPTEE header match the memory allocated to the OPTEE region, OPTEE header magic and version prior to handing off control to the OPTEE image. Signed-off-by: Bryan O'Donoghue

[U-Boot] [PATCH 2/9] optee: Add CONFIG_OPTEE_TZDRAM_SIZE

2018-01-12 Thread Bryan O'Donoghue
OPTEE is currently linked to a specific area of memory called the TrustZone DRAM. This patch adds a CONFIG entry for the default size of TrustZone DRAM that a board-port can over-ride. The region that U-Boot sets aside for the OPTEE run-time should be verified before attempting to hand off to the

[U-Boot] [PATCH 1/9] optee: Add lib entries for sharing OPTEE code across ports

2018-01-12 Thread Bryan O'Donoghue
This patch adds code to lib to enable sharing of useful OPTEE code between board-ports and architectures. The code on lib/optee/optee.c comes from the TI omap2 port. Eventually the OMAP2 code will be patched to include the shared code. The intention here is to add more useful OPTEE specific code

[U-Boot] [PATCH 0/9] Add new OPTEE bootm support to u-boot

2018-01-12 Thread Bryan O'Donoghue
This series adds a new OPTEE bootable image type to u-boot, which is directly bootable with the bootm command. There is already a TEE image type but, in this case the TEE firmware is loaded into RAM, jumped into and then back out of. This image type is a directly bootable image as described here

[U-Boot] [PATCH 5/5] arm: zynq: Add support for zc770-xm011-x16 configuration

2018-01-12 Thread Michal Simek
zc770-xm011 is x8 width configuration. This FMC card has also x16 variant which requires different ps7_init configuration. This patch adds it. Signed-off-by: Michal Simek --- arch/arm/dts/zynq-zc770-xm011-x16.dts | 1 +

[U-Boot] [PATCH 4/5] arm: zynq: Add zc770-xm013 spl configuration

2018-01-12 Thread Michal Simek
Simplify ps7_init* initialization. Signed-off-by: Michal Simek --- board/xilinx/zynq/zynq-zc770-xm013/ps7_init_gpl.c | 767 ++ 1 file changed, 767 insertions(+) create mode 100644 board/xilinx/zynq/zynq-zc770-xm013/ps7_init_gpl.c diff --git

[U-Boot] [PATCH 3/5] arm: zynq: Add zc770-xm012 spl configuration

2018-01-12 Thread Michal Simek
Simplify ps7_init* initialization. Signed-off-by: Michal Simek --- board/xilinx/zynq/zynq-zc770-xm012/ps7_init_gpl.c | 818 ++ 1 file changed, 818 insertions(+) create mode 100644 board/xilinx/zynq/zynq-zc770-xm012/ps7_init_gpl.c diff --git

[U-Boot] [PATCH 2/5] arm: zynq: Add zc770-xm011 spl configuration

2018-01-12 Thread Michal Simek
Simplify ps7_init* initialization. Signed-off-by: Michal Simek --- board/xilinx/zynq/zynq-zc770-xm011/ps7_init_gpl.c | 776 ++ 1 file changed, 776 insertions(+) create mode 100644 board/xilinx/zynq/zynq-zc770-xm011/ps7_init_gpl.c diff --git

[U-Boot] [PATCH 1/5] arm: zynq: Add zc770-xm010 spl configuration

2018-01-12 Thread Michal Simek
Simplify ps7_init* initialization. Signed-off-by: Michal Simek --- board/xilinx/zynq/zynq-zc770-xm010/ps7_init_gpl.c | 800 ++ 1 file changed, 800 insertions(+) create mode 100644 board/xilinx/zynq/zynq-zc770-xm010/ps7_init_gpl.c diff --git

Re: [U-Boot] api: bootelf: go: flush cache before starting

2018-01-12 Thread Emmanuel Vadot
On Tue, 9 Jan 2018 15:59:23 -0500 Tom Rini wrote: > On Mon, Dec 04, 2017 at 07:33:45PM +0100, Emmanuel Vadot wrote: > > > From: Warner Losh > > > > Some application might load some code at location that contain stale > > cache entries. Before running a

Re: [U-Boot] [PATCH 1/2] ARM: imx: cm_fx6: export board and soc info to env

2018-01-12 Thread Stefano Babic
On 09/01/2018 22:01, christopher.spinr...@rwth-aachen.de wrote: > From: Christopher Spinrath > > Like many other i.MX6 based boards, there are multiple variants of > the cm-fx6 module featuring different SoC variants. Furthermore, the > module can be paired

Re: [U-Boot] [PATCH 2/3] mx6memcal: spl: Also take i.MX6ULL into account

2018-01-12 Thread Stefano Babic
On 03/01/2018 15:55, Fabio Estevam wrote: > i.MX6ULL also does not support 64-bit DDR bus, so add it to the > check logic. > > Signed-off-by: Fabio Estevam > --- > board/freescale/mx6memcal/spl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [U-Boot] [PATCH] drivers: pci: imx: fix enumeration logic error

2018-01-12 Thread Stefano Babic
On 04/01/2018 14:54, Koen Vandeputte wrote: > By default, the subordinate is set equally to the secondary bus (1) when > the RC boots, and does not alter afterwards. > > This means that theoretically, the highest bus reachable downstream is > bus 1. > > Force the PCIe RC subordinate to 0xff,

Re: [U-Boot] [PATCH 3/3] mx6memcal: spl: Disambiguate the error message

2018-01-12 Thread Stefano Babic
On 03/01/2018 15:55, Fabio Estevam wrote: > Currently mmdc_do_dqs_calibration() and mmdc_do_write_level_calibration() > show the same error message, which is confusing for debugging. > > Disambiguate the mmdc_do_dqs_calibration() error message. > > Signed-off-by: Fabio Estevam

Re: [U-Boot] [PATCH 2/2] ARM: imx: cm_fx6: env: try to determine dtb to use

2018-01-12 Thread Stefano Babic
On 09/01/2018 22:01, christopher.spinr...@rwth-aachen.de wrote: > From: Christopher Spinrath > > Some distributions like Fedora expect U-Boot to select a proper > devicetree. Since there are several variants of the cm-fx6 module > featuring different SoC

Re: [U-Boot] [PATCH] misc: mxc_ocotp: check fuse word before programming on i.MX7ULP

2018-01-12 Thread Stefano Babic
On 02/01/2018 08:51, Peng Fan wrote: > On i.MX7ULP, the fuse words (except bank 0 and 1) only supports to > write once, because they use ECC mode. Multiple writes may damage > the ECC value and cause a wrong fuse value decoded when reading. > This patch adds a checking before the fuse word

Re: [U-Boot] [PATCH] imx: ventana: Rework CONFIG_CMD_EECONFIG code to not be included in SPL

2018-01-12 Thread Stefano Babic
On 03/01/2018 15:15, Tom Rini wrote: > The command can only be used from full U-Boot, so do not build it into > SPL. > > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: Tim Harvey > Signed-off-by: Tom Rini > --- >

Re: [U-Boot] [PATCH 1/3] mx6memcal: Fix the UART ports for mx6sabresd/auto boards

2018-01-12 Thread Stefano Babic
On 03/01/2018 15:55, Fabio Estevam wrote: > mx6sabresd board uses the following pins for console: > > PAD_CSI0_DAT10__UART1_TX_DATA > PAD_CSI0_DAT11__UART1_RX_DATA > > ,so put it in the same config option as wandboard. > > mx6sabreauto board uses the following pins for console: > >

Re: [U-Boot] [PATCH] imx: ventana: Rework CONFIG_CMD_GSC code to not be included in SPL

2018-01-12 Thread Stefano Babic
On 03/01/2018 15:16, Tom Rini wrote: > The command can only be used from full U-Boot, so do not build it into > SPL. > > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: Tim Harvey > Signed-off-by: Tom Rini > --- >

Re: [U-Boot] [PATCH] toradex: imx6: Rework PF0100 fuse programming commands to not be in SPL

2018-01-12 Thread Stefano Babic
On 03/01/2018 15:19, Tom Rini wrote: > The code for programming the OTP fuses on the PMIC PF0100 can only be > used in full U-Boot, so do not build / link it into SPL. > > Cc: Max Krummenacher > Cc: Stefano Babic > Cc: Fabio Estevam

Re: [U-Boot] [PATCH] arm: imx: Rework i.MX specific commands to be excluded from SPL

2018-01-12 Thread Stefano Babic
On 03/01/2018 14:52, Tom Rini wrote: > The "clocks" and "bootaux" commands are only usable in full U-Boot, not > SPL, so do not link them inside of SPL. Rework a little of the bootaux > related code to make use of __weak and declare parts of it static as > it's local to the file. > > Cc: Stefano

Re: [U-Boot] [PATCH V2 2/2] imx: mx6ull-14x14-evk: enable DM QSPI driver

2018-01-12 Thread Stefano Babic
On 03/01/2018 01:52, Peng Fan wrote: > To support QSPI DM driver > - Add spi0 alias for qspi node. Which is used for bus number 0. > - Modify the n25q256a@0 compatible property to "spi-flash". > - Modify spi4 (gpio_spi) node to spi5 > - Define DM SPI/QSPI related config to enable QSPI > >

Re: [U-Boot] [PATCH V2 1/2] spi: fsl_qspi: support i.MX6UL/6ULLL/7D

2018-01-12 Thread Stefano Babic
On 03/01/2018 01:52, Peng Fan wrote: > The QSPI module on i.MX7D is modified from i.MX6SX. The module used on > i.MX6UL/6ULL is reused from i.MX7D. They share same tx buffer size. > > The endianness is not set at qspi driver initialization. So if we don't > boot from QSPI, we will get wrong

Re: [U-Boot] [PATCH] mx6: ddr: Do not access MMDC_P1_BASE_ADDR on i.MX6ULL

2018-01-12 Thread Stefano Babic
On 02/01/2018 01:51, Fabio Estevam wrote: > From: Fabio Estevam > > i.MX6ULL also does not have a MMDC_P1_BASE_ADDR, so do not try to > access it. > > Signed-off-by: Fabio Estevam > --- > arch/arm/mach-imx/mx6/ddr.c | 4 ++-- > 1 file changed, 2

Re: [U-Boot] [PATCH 1/7] ARM: imx: Introduce dts for i.MX6SX-SDB

2018-01-12 Thread Stefano Babic
On 02/01/2018 02:32, Peng Fan wrote: > Introduce dts from Kernel commit > commit 71ee203389f7cb1c("Merge tag 'scsi-fixes' of > git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi") > > Signed-off-by: Peng Fan > Cc: Stefano Babic > Cc: Fabio Estevam

[U-Boot] [PATCH] arm: zynq: Fix types in ps7_spl_init

2018-01-12 Thread Michal Simek
The patch is fixing the following Warning: arch/arm/mach-zynq/ps7_spl_init.c:133:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (ioread(addr) < delay) ^ Signed-off-by: Michal Simek ---

[U-Boot] [PATCH V3] Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig

2018-01-12 Thread Adam Ford
This converts the following to Kconfig: CONFIG_SYS_DV_CLKMODE CONFIG_SYS_DA850_PLL0_POSTDIV CONFIG_SYS_DA850_PLL0_PLLDIV1 CONFIG_SYS_DA850_PLL0_PLLDIV2 CONFIG_SYS_DA850_PLL0_PLLDIV3 CONFIG_SYS_DA850_PLL0_PLLDIV4 CONFIG_SYS_DA850_PLL0_PLLDIV5 CONFIG_SYS_DA850_PLL0_PLLDIV7

Re: [U-Boot] [PATCH v1 2/2] x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

2018-01-12 Thread Andy Shevchenko
On Fri, 2018-01-12 at 17:00 +0800, Bin Meng wrote: > Hi Andy, > > On Thu, Jan 11, 2018 at 1:40 AM, Andy Shevchenko > wrote: > > New field acpi_rsdp_addr, which has been introduced in boot protocol > > v2.14 [1], in boot parameters tells kernel the exact address

Re: [U-Boot] [PATCH 1/2] ARM: imx: cm_fx6: export board and soc info to env

2018-01-12 Thread Stefano Babic
On 09/01/2018 22:51, Fabio Estevam wrote: > Hi Christopher, > > On Tue, Jan 9, 2018 at 7:01 PM, wrote: >> From: Christopher Spinrath >> >> Like many other i.MX6 based boards, there are multiple variants of >> the cm-fx6

[U-Boot] [PATCH v6 24/25] arm: imx: hab: Implement hab_rvt_failsafe

2018-01-12 Thread Bryan O'Donoghue
This patch implements the basic callback hooks for hab_rvt_check_failsafe for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just do nothing and there's definitely a TODO to implement that extra functionality on the

[U-Boot] [PATCH v6 23/25] arm: imx: hab: Define rvt_failsafe()

2018-01-12 Thread Bryan O'Donoghue
The hab_rvt_failsafe() callback according to the HABv4 documentation: "This function provides a safe path when image authentication has failed and all possible boot paths have been exhausted. It is intended for use by post-ROM boot stage components, via the ROM Vector Table." Once invoked the

[U-Boot] [PATCH v6 19/25] arm: imx: hab: Prefix authenticate_image with imx_hab

2018-01-12 Thread Bryan O'Donoghue
Tidy up the HAB namespace a bit by prefixing external functions with imx_hab. All external facing functions past this point will be prefixed in the same way to make the fact we are doing IMX HAB activities clear from reading the code. authenticate_image() could mean anything

[U-Boot] [PATCH v6 15/25] arm: imx: hab: Implement hab_rvt_check_target

2018-01-12 Thread Bryan O'Donoghue
This patch implements the basic callback hooks for hab_rvt_check_target() for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just have HAB_SUCCESS as a result code. Adding support for the new BootROM callbacks is a TODO.

[U-Boot] [PATCH v6 06/25] arm: imx: hab: Move CSF_PAD_SIZE to hab.h

2018-01-12 Thread Bryan O'Donoghue
CSF_PAD_SIZE should be defined in hab.h, move it to that location now. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven

[U-Boot] [PATCH v6 13/25] arm: imx: hab: Print additional IVT elements during debug

2018-01-12 Thread Bryan O'Donoghue
This patch enables printout of the IVT entry, dcd and csf data fields. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven

[U-Boot] [PATCH v6 09/25] arm: imx: hab: Add IVT header verification

2018-01-12 Thread Bryan O'Donoghue
The IVT header contains a magic number, fixed length and one of two version identifiers. Validate these settings before doing anything with a putative IVT binary. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam

[U-Boot] [PATCH v6 11/25] arm: imx: hab: Only call ROM once headers are verified

2018-01-12 Thread Bryan O'Donoghue
Previous patches added IVT header verification steps. We shouldn't call hab_rvt_entry() until we have done the basic header verification steps. This patch changes the time we make the hab_rvt_entry() call so that it only takes place if we are happy with the IVT header sanity checks.

[U-Boot] [PATCH v6 20/25] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled

2018-01-12 Thread Bryan O'Donoghue
Understanding if the HAB is enabled is something that we want to interrogate and report on outside of the HAB layer. First step to that is renaming the relevant function to match the previously introduced external naming convention imx_hab_function() The name imx_hab_is_hab_enabled() is a

[U-Boot] [PATCH v6 16/25] arm: imx: hab: Add a hab_rvt_check_target to image auth

2018-01-12 Thread Bryan O'Donoghue
Add a hab_rvt_check_target() step to authenticate_image() as a sanity check for the target memory region authenticate_image() will run over, prior to making the BootROM authentication callback itself. This check is recommended by the HAB documentation so it makes sense to adhere to the guidance

[U-Boot] [PATCH v6 25/25] arm: imx: hab: Add hab_failsafe console command

2018-01-12 Thread Bryan O'Donoghue
hab_failsafe when called puts the part into BootROM recovery mode. This will allow u-boot scripts to script the dropping down into recovery mode. => hab_failsafe Shows the i.MX7 appear as "hiddev0,hidraw5: USB HID v1.10 Device [Freescale SemiConductor Inc SP Blank ULT1] " in a Linux dmesg thus

[U-Boot] [PATCH v6 22/25] arm: imx: hab: Make imx_hab_is_enabled global

2018-01-12 Thread Bryan O'Donoghue
It will be helpful to boot commands to know if the HAB is enabled. Export imx_hab_is_enabled() now to facilitate further work with this data-point in a secure-boot context. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam

[U-Boot] [PATCH v6 12/25] arm: imx: hab: Print CSF based on IVT descriptor

2018-01-12 Thread Bryan O'Donoghue
The IVT gives the absolute address of the CSF. There is no requirement for the CSF to be located adjacent to the IVT so lets use the address provided in the IVT header instead of the hard-coded fixed CSF offset currently in place. Signed-off-by: Bryan O'Donoghue Cc:

[U-Boot] [PATCH v6 21/25] arm: imx: hab: Make authenticate_image() return zero on open boards

2018-01-12 Thread Bryan O'Donoghue
The BootROM will not successfully process a HAB image passed by u-boot unless the board has been set into locked mode. Some of the existing usages of authenticate_image() expect and rely on unlocked boards doing the following 1. Not calling into the BootROM authenticate_image() callback 2.

[U-Boot] [PATCH v6 14/25] arm: imx: hab: Define rvt_check_target()

2018-01-12 Thread Bryan O'Donoghue
The hab_rvt_check_target() callback according to the HABv4 documentation: "This function reports whether or not a given target region is allowed for either peripheral configuration or image loading in memory. It is intended for use by post-ROM boot stage components, via the ROM Vector Table, in

[U-Boot] [PATCH v6 18/25] arm: imx: hab: Make internal functions and data static

2018-01-12 Thread Bryan O'Donoghue
There is no need to export these functions and data structures externally. Make them all static now. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud

[U-Boot] [PATCH v6 07/25] arm: imx: hab: Fix authenticate_image input parameters

2018-01-12 Thread Bryan O'Donoghue
u-boot command "hab_auth_img" tells a user that it takes - addr - image hex address - offset - hex offset of IVT in the image but in fact the callback hab_auth_img makes to authenticate_image treats the second 'offset' parameter as an image length. Furthermore existing code requires the IVT

[U-Boot] [PATCH v6 03/25] arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail

2018-01-12 Thread Bryan O'Donoghue
There is no need to call is_enabled() twice in authenticate_image - it does nothing but add an additional layer of indentation. We can check for is_enabled() at the start of the function and return the result code directly. Signed-off-by: Bryan O'Donoghue Cc: Stefano

[U-Boot] [PATCH v6 17/25] arm: imx: hab: Print HAB event log only after calling ROM

2018-01-12 Thread Bryan O'Donoghue
The current flow of authenticate_image() will print the HAB event log even if we reject an element of the IVT header before ever calling into the ROM. This can be confusing. This patch changes the flow of the code so that the HAB event log is only printed out if we have called into the ROM and

[U-Boot] [PATCH v6 05/25] arm: imx: hab: Move IVT_SIZE to hab.h

2018-01-12 Thread Bryan O'Donoghue
The size of the IVT header should be defined in hab.h move it there now. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc:

[U-Boot] [PATCH v6 10/25] arm: imx: hab: Verify IVT self matches calculated address

2018-01-12 Thread Bryan O'Donoghue
The IVT is a self-describing structure which contains a self field. The self field is the absolute physical base address the IVT ought to be at in memory. Use the IVT self field to validate the calculated ivt_addr bugging out if the two values differ. Signed-off-by: Bryan O'Donoghue

[U-Boot] [PATCH v6 08/25] arm: imx: hab: Add IVT header definitions

2018-01-12 Thread Bryan O'Donoghue
The various i.MX BootROMs containing the High Assurance Boot (HAB) block rely on a data structure called the Image Vector Table (IVT) to describe to the BootROM where to locate various data-structures used by HAB during authentication. This patch adds a definition of the IVT header for use in

[U-Boot] [PATCH v6 02/25] arm: imx: hab: Fix authenticate_image result code

2018-01-12 Thread Bryan O'Donoghue
authenticate_image returns 1 for success and 0 for failure. That result code is mapped directly to the result code for the command line function hab_auth_img - which means when hab_auth_img succeeds it is returning CMD_RET_FAILURE (1) instead of CMD_RET_SUCCESS (0). This patch fixes this

  1   2   >