[PATCH u-boot-marvell 05/10] pci: pci_mvebu, pci_aardvark: Fix size of configuration cache

2021-11-11 Thread Marek Behún
From: Marek Behún Since u32 takes up 4 bytes, we need to divide the number of u32s by 4 for cfgcache. Signed-off-by: Marek Behún --- drivers/pci/pci-aardvark.c | 2 +- drivers/pci/pci_mvebu.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci-aardvark.c

[PATCH u-boot-marvell 02/10] arm: mvebu: a38x: serdes: Move non-serdes PCIe code to pci_mvebu.c

2021-11-11 Thread Marek Behún
or every mvebu board which use PEX_ROOT_COMPLEX_X4. Currently in U-Boot there is no such board. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h | 4 .../serdes/a38x/high_speed_env_spec.c | 15 --- dri

[PATCH u-boot-marvell 04/10] pci: pci_mvebu: Replace MBUS_PCI_*_SIZE by resource_size()

2021-11-11 Thread Marek Behún
From: Pali Rohár Use more appropriate resource_size() function when working with data in struct resource. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- drivers/pci/pci_mvebu.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pci_mvebu.c

[PATCH u-boot-marvell 07/10] pci: pci_mvebu: Fix PCIe MEM and IO resources assignment and mbus mapping

2021-11-11 Thread Marek Behún
mvebu_pcie_membase and mvebu_pcie_iobase. This makes pci_mvebu.c driver independent of global static variables (which store the state of allocation) and allows to bind and unbind the driver more times. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/include/mach/cpu.h | 4

[PATCH u-boot-marvell 06/10] pci: pci_mvebu: Do not allow setting ROM BAR on PCI Bridge

2021-11-11 Thread Marek Behún
Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- drivers/pci/pci_mvebu.c | 55 +++-- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c index b545e62689..701a17dfb7 100644 --- a/drivers/pci/p

[PATCH u-boot-marvell 09/10] arm: a37xx: pci: Do not allow setting ROM BAR on PCI Bridge

2021-11-11 Thread Marek Behún
Signed-off-by: Marek Behún --- drivers/pci/pci-aardvark.c | 54 +- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index 8abbc3ffe8..a92f00d0af 100644 --- a/drivers/pci/pci-aardvark.c +++ b/d

[PATCH u-boot-marvell 10/10] arm: mvebu: turris_mox: Remove extra newline after module topology

2021-11-11 Thread Marek Behún
From: Marek Behún Remove extra newline after module topology is printed. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 2202eb8cfb

[PATCH u-boot-marvell 08/10] pci: pci_mvebu: Remove unused DECLARE_GLOBAL_DATA_PTR

2021-11-11 Thread Marek Behún
From: Pali Rohár The global data pointer is not used in this driver, remove it's declaration. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- drivers/pci/pci_mvebu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c index

Re: [PATCH u-boot-marvell 00/11] Some mvebu comphy + mox + fdt_support changes

2021-11-11 Thread Marek Behún
Hello Stefan, did you have time to look at this series? Marek

[PATCH u-boot-marvell 2/5] SPL: Add struct spl_boot_device parameter into spl_parse_board_header()

2021-11-11 Thread Marek Behún
From: Pali Rohár Add parameter spl_boot_device to spl_parse_board_header(), which allows the implementations to see from which device we are booting and do boot-device-specific checks of the image header. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c

[PATCH u-boot-marvell 0/5] More verifications for kwbimage in SPL

2021-11-11 Thread Marek Behún
From: Marek Behún Hello Stefan, this series adds more checks for kwbimage validity and consistency to SPL, mainly checking image data checksum. Marek Pali Rohár (5): arm: mvebu: Check that kwbimage offset and blocksize are valid SPL: Add struct spl_boot_device parameter

[PATCH u-boot-marvell 1/5] arm: mvebu: Check that kwbimage offset and blocksize are valid

2021-11-11 Thread Marek Behún
From: Pali Rohár There are certain restrictions for kwbimage offset and blocksize. Validate them. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu

[PATCH u-boot-marvell 3/5] arm: mvebu: Check that kwbimage blockid matches boot mode

2021-11-11 Thread Marek Behún
From: Pali Rohár Each boot mode has its own kwbimage specified by blockid. So check that kwbimage is valid by blockid. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 32 +++- 1 file changed, 23 insertions(+), 9 deletions

Re: [RFC PATCH 3/3] imx: imx8mp_evk: override env_get_location

2021-11-29 Thread Marek Behún
On Sun, 28 Nov 2021 18:47:11 +0100 Tommaso Merciai wrote: > On Fri, Nov 26, 2021 at 07:00:21PM +0100, Marek Behún wrote: > > On Fri, 26 Nov 2021 18:43:31 +0100 > > Tommaso Merciai wrote: > > > > > Override env_get_location function at board level, previously

[PATCH u-boot-marvell v2 2/9] SPL: Add struct spl_boot_device parameter into spl_parse_board_header()

2021-11-26 Thread Marek Behún
From: Pali Rohár Add parameter spl_boot_device to spl_parse_board_header(), which allows the implementations to see from which device we are booting and do boot-device-specific checks of the image header. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese

[PATCH u-boot-marvell v2 5/9] arm: mvebu: Check for kwbimage data checksum

2021-11-26 Thread Marek Behún
From: Pali Rohár Last 4 bytes of kwbimage boot image is checksum. Verify it via the new spl_check_board_image() function which is called by U-Boot SPL after loading kwbimage. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- Changes since v1: - changed

[PATCH u-boot-marvell v2 3/9] arm: mvebu: Check that kwbimage blockid matches boot mode

2021-11-26 Thread Marek Behún
From: Pali Rohár Each boot mode has its own kwbimage specified by blockid. So check that kwbimage is valid by blockid. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- Changes since v1: - updated error messages as requested by Stefan --- arch/arm/mach-mvebu

[PATCH u-boot-marvell v2 4/9] SPL: Add support for checking board / BootROM specific image types

2021-11-26 Thread Marek Behún
Board may implement this function for checking if loaded board specific image is valid. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- common/spl/spl.c | 9 + 1 file changed, 9 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index bf2139a058..

[PATCH u-boot-marvell RESEND 09/11] phy: marvell: a3700: Convert to official DT bindings in COMPHY driver

2021-11-26 Thread Marek Behún
From: Pali Rohár Convert A3720 common PHY driver to official DT bindings. This puts us closer to be able to synchronize A3720 device-trees with those from Linux. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Cc: Konstantin Porotchkin Cc: Robert Marko Cc: Luka Perkov Cc: Marcin

[PATCH u-boot-marvell RESEND 10/11] arm: mvebu: turris_mox: Fix unstable board topology reading

2021-11-26 Thread Marek Behún
From: Marek Behún The pre-relocation board topology reading in board_fix_fdt() is unstable: sometimes wrong data are read from the SPI bus. This is due to wrong order of SPI bus configuration instructions: we first need to set the pins to SPI mode, and only after that configure the bus. Also

[PATCH u-boot-marvell RESEND 07/11] arm: mvebu: turris_mox: Find DT nodes by compatible or alias instead of path

2021-11-26 Thread Marek Behún
From: Marek Behún It is better to find DT nodes by compatible strings or aliases instead of path. There were issues with Linux some DTBs having different names of some nodes, e.g. internal-regs instead of internal-regs@d000 This should be a generic fix for such issues. Also since

[PATCH u-boot-marvell RESEND 06/11] fdt_support: Add some useful functions

2021-11-26 Thread Marek Behún
From: Marek Behún Add functions fdt_node_offset_by_pathf(), fdt_create_phandle_by_pathf(), fdt_set_status_by_pathf() to get node offset, get/create node phandle and set status for node given by path/alias formatted with sprintf. Add functions fdt_create_phandle_by_compatible

[PATCH u-boot-marvell RESEND 03/11] fdt_support: Remove fdt_alloc_phandle() in favor of fdt_generate_phandle()

2021-11-26 Thread Marek Behún
From: Marek Behún Commit f0921f5098d ("fdt: Sync up to the latest libfdt") introduced fdt_generate_phandle() in libfdt, making fdt_alloc_phandle() obsolete in fdt_support. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Cc: Simon Glass Cc: "hui.song" Cc: Me

[PATCH u-boot-marvell RESEND 04/11] fdt_support: Remove FDT_STATUS_FAIL_ERROR_CODE

2021-11-26 Thread Marek Behún
From: Marek Behún Since no one uses this feature and I am not aware of any parsers of this in Linux, remove it. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Cc: Simon Glass Cc: Andy Shevchenko Cc: Pratyush Yadav Cc: Tim Harvey Cc: Michael Walle Cc: Priyanka Jain --- arch/arm

[PATCH u-boot-marvell RESEND 02/11] treewide: Use fdt_create_phandle() where appropriate

2021-11-26 Thread Marek Behún
From: Marek Behún Replace fdt_alloc_phandle() with subsequent fdt_set_phandle() by fdt_create_phandle(). Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Cc: Aaron Williams Cc: Ramon Fried Cc: Vladimir Oltean --- board/Marvell/octeon_ebb7304/board.c | 5 ++--- drivers/misc

[PATCH u-boot-marvell RESEND 11/11] fdt_support: Add fdt_delete_disabled_nodes() and use in Turris MOX

2021-11-26 Thread Marek Behún
From: Marek Behún Move Turris MOX specific remove_disabled_nodes() to fdt_support with name fdt_delete_disabled_nodes(), so that others can potentially use it. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/turris_mox.c | 20 +--- common

[PATCH u-boot-marvell RESEND 05/11] fdt_support: Fix comment for fdt_create_phandle()

2021-11-26 Thread Marek Behún
From: Marek Behún This function does not necessarily create a new phandle. If a phandle exists, no new phandle is created. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- common/fdt_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/fdt_support.c b

[PATCH u-boot-marvell RESEND 08/11] arm: mvebu: turris_mox: Enable eth1 in U-Boot if a network module is present

2021-11-26 Thread Marek Behún
From: Pali Rohár Enable eth1 node in U-Boot's device-tree if a network module (SFP, Topaz or Peridot) is detected. This is required for proper detection of eth1 comphy in a3700 comphy driver by the following patches. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan

[PATCH u-boot-marvell v2 0/9] More verifications for kwbimage in SPL

2021-11-26 Thread Marek Behún
From: Marek Behún Hello Stefan, this is v2 of series that adds more checks for kwbimage validity and consistency to SPL, mainly checking image data checksum. Changes since v1: - updated error messages as requested by Stefan - fixed checkpatch warnings for uintN_t types (converted to preferred

[PATCH u-boot-marvell v2 1/9] arm: mvebu: Check that kwbimage offset and blocksize are valid

2021-11-26 Thread Marek Behún
From: Pali Rohár There are certain restrictions for kwbimage offset and blocksize. Validate them. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- Changes since v1: - updated error messages as requested by Stefan --- arch/arm/mach-mvebu/spl.c | 12

[PATCH u-boot-marvell RESEND 00/11] Some mvebu comphy + mox + fdt_support changes

2021-11-26 Thread Marek Behún
From: Marek Behún Hello Stefan, as requested I am resending this series with board maintainers added in Ccs. Original message: Pali prepared patches that convert A3720 comphy driver to use Linux' DT bindings. (Yes, I have patches that convert the whole driver into using SMC calls into ATF

[PATCH u-boot-marvell RESEND 01/11] include/linux/byteorder: Fix compilation of __constant_cpu_to_be32()

2021-11-26 Thread Marek Behún
mean ‘__builtin_bswap32’? [-Wimplicit-function-declaration] #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) Declare all ___constant_swabXX() macros. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- include/linux/byteorder/swab.h

[PATCH u-boot-marvell v2 8/9] arm: mvebu: spl: Use IS_ENABLED() instead of #ifdef where possible

2021-11-26 Thread Marek Behún
From: Marek Behún Use the preferred if (IS_ENABLED(X)) instead of #ifdef X where possible. There are still places where this is not possible or is more complicated to convert in this file. Leave those be for now. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 43

[PATCH u-boot-marvell v2 7/9] arm: mvebu: spl: Use preferred types u8/u16/u32 instead of uintN_t

2021-11-26 Thread Marek Behún
From: Marek Behún Checkpatch warns about using uint32/16/8_t instead of u32/16/8. Use the preferred types. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-mvebu

[PATCH u-boot-marvell v2 9/9] arm: mvebu: spl: Fix 100 column exceeds

2021-11-26 Thread Marek Behún
From: Marek Behún Fix 100 column exceeds in arch/arm/mach-mvebu/spl.c. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 7dbe8eeba3..7450e1e3da 100644

[PATCH u-boot-marvell v2 6/9] arm: mvebu: spl: Print srcaddr in error message

2021-11-26 Thread Marek Behún
From: Marek Behún Print the wrong srcaddr (spl_image->offset) in error message also for SATA case. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c in

Re: [RFC PATCH 3/3] imx: imx8mp_evk: override env_get_location

2021-11-26 Thread Marek Behún
On Fri, 26 Nov 2021 18:43:31 +0100 Tommaso Merciai wrote: > Override env_get_location function at board level, previously dropped > down from soc.c > > References: > - commit f1575f23df1ef704051f218d5bc4aeeb20c2c542 > > Signed-off-by: Tommaso Merciai > --- > Changes since v1: > - Remove

Re: [PATCH u-boot-marvell 09/11] phy: marvell: a3700: Convert to official DT bindings in COMPHY driver

2021-11-12 Thread Marek Behún
On Fri, 12 Nov 2021 14:29:54 +0100 Stefan Roese wrote: > On 11/3/21 03:02, Marek Behún wrote: > > From: Pali Rohár > > > > Convert A3720 common PHY driver to official DT bindings. > > > > This puts us closer to be able to synchronize A3720 devic

Re: [PATCH u-boot-marvell 03/11] fdt_support: Remove fdt_alloc_phandle() in favor of fdt_generate_phandle()

2021-11-12 Thread Marek Behún
On Fri, 12 Nov 2021 13:42:29 +0100 Stefan Roese wrote: > On 11/3/21 03:02, Marek Behún wrote: > > From: Marek Behún > > > > Commit f0921f5098d ("fdt: Sync up to the latest libfdt") introduced > > fdt_generate_phandle() in libfdt, making fdt_alloc_

Re: [PATCH] Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"

2021-11-18 Thread Marek Behún
_ADDR + LOAD_OFFSET; > > + gd->env_addr = (ulong)_environment[0]; > + > synquacer_setup_scbm_smmu(); > > return 0; > Reviewed-by: Marek Behún I will look into this when I respin the default environment series. Marek

Re: [PATCH v4 1/2] net: brcm: netXtreme driver

2021-10-30 Thread Marek Behún
Hello Roman, On Thu, 28 Oct 2021 16:29:28 -0700 Roman Bacik wrote: > +void bnxt_env_set_ethaddr(struct udevice *dev) > +{ > + struct eth_pdata *plat = dev_get_plat(dev); > + char cmd[100]; > + char var[32]; > + u8 mac_env[ARP_HLEN]; > + > +

Re: [PATCH v5 1/2] net: brcm: netXtreme driver

2021-11-02 Thread Marek Behún
On Mon, 1 Nov 2021 13:21:44 -0700 Roman Bacik wrote: > +static int set_phy_speed(struct bnxt *bp) > +{ > + char name[20]; > + char name1[30]; > + u16 flag = PHY_STATUS | PHY_SPEED | DETECT_MEDIA; > + > + /* Query Link Status */ > + if (bnxt_hwrm_port_phy_qcfg(bp, flag) !=

[PATCH u-boot-marvell 09/11] phy: marvell: a3700: Convert to official DT bindings in COMPHY driver

2021-11-02 Thread Marek Behún
From: Pali Rohár Convert A3720 common PHY driver to official DT bindings. This puts us closer to be able to synchronize A3720 device-trees with those from Linux. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/dts/armada-3720-espressobin.dts | 21 +--- arch/arm/dts/armada

[PATCH u-boot-marvell 00/11] Some mvebu comphy + mox + fdt_support changes

2021-11-02 Thread Marek Behún
From: Marek Behún Hello Stefan, Pali prepared patches that convert A3720 comphy driver to use Linux' DT bindings. (Yes, I have patches that convert the whole driver into using SMC calls into ATF, but haven't found time yet to rebase them since last year, and Pali has done this in the meantime

[PATCH u-boot-marvell 07/11] arm: mvebu: turris_mox: Find DT nodes by compatible or alias instead of path

2021-11-02 Thread Marek Behún
From: Marek Behún It is better to find DT nodes by compatible strings or aliases instead of path. There were issues with Linux some DTBs having different names of some nodes, e.g. internal-regs instead of internal-regs@d000 This should be a generic fix for such issues. Also since

[PATCH u-boot-marvell 11/11] fdt_support: Add fdt_delete_disabled_nodes() and use in Turris MOX

2021-11-02 Thread Marek Behún
From: Marek Behún Move Turris MOX specific remove_disabled_nodes() to fdt_support with name fdt_delete_disabled_nodes(), so that others can potentially use it. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 20 +--- common/fdt_support.c

[PATCH u-boot-marvell 10/11] arm: mvebu: turris_mox: Fix unstable board topology reading

2021-11-02 Thread Marek Behún
From: Marek Behún The pre-relocation board topology reading in board_fix_fdt() is unstable: sometimes wrong data are read from the SPI bus. This is due to wrong order of SPI bus configuration instructions: we first need to set the pins to SPI mode, and only after that configure the bus. Also

[PATCH u-boot-marvell 06/11] fdt_support: Add some useful functions

2021-11-02 Thread Marek Behún
From: Marek Behún Add functions fdt_node_offset_by_pathf(), fdt_create_phandle_by_pathf(), fdt_set_status_by_pathf() to get node offset, get/create node phandle and set status for node given by path/alias formatted with sprintf. Add functions fdt_create_phandle_by_compatible

[PATCH u-boot-marvell 01/11] include/linux/byteorder: Fix compilation of __constant_cpu_to_be32()

2021-11-02 Thread Marek Behún
mean ‘__builtin_bswap32’? [-Wimplicit-function-declaration] #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) Declare all ___constant_swabXX() macros. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- include/linux/byteorder/swab.h | 4 1 file changed

[PATCH u-boot-marvell 02/11] treewide: Use fdt_create_phandle() where appropriate

2021-11-02 Thread Marek Behún
From: Marek Behún Replace fdt_alloc_phandle() with subsequent fdt_set_phandle() by fdt_create_phandle(). Signed-off-by: Marek Behún --- board/Marvell/octeon_ebb7304/board.c | 5 ++--- drivers/misc/fsl_portals.c | 10 -- 2 files changed, 6 insertions(+), 9 deletions(-) diff

[PATCH u-boot-marvell 04/11] fdt_support: Remove FDT_STATUS_FAIL_ERROR_CODE

2021-11-02 Thread Marek Behún
From: Marek Behún Since no one uses this feature and I am not aware of any parsers of this in Linux, remove it. Signed-off-by: Marek Behún --- arch/arm/cpu/armv7/ls102xa/fdt.c | 6 +++--- board/gateworks/gw_ventana/common.c | 3 +-- board/kontron/sl28/sl28.c| 2

[PATCH u-boot-marvell 03/11] fdt_support: Remove fdt_alloc_phandle() in favor of fdt_generate_phandle()

2021-11-02 Thread Marek Behún
From: Marek Behún Commit f0921f5098d ("fdt: Sync up to the latest libfdt") introduced fdt_generate_phandle() in libfdt, making fdt_alloc_phandle() obsolete in fdt_support. Signed-off-by: Marek Behún --- board/freescale/lx2160a/eth_lx2160aqds.c | 8 +-- board/freesca

[PATCH u-boot-marvell 08/11] arm: mvebu: turris_mox: Enable eth1 in U-Boot if a network module is present

2021-11-02 Thread Marek Behún
From: Pali Rohár Enable eth1 node in U-Boot's device-tree if a network module (SFP, Topaz or Peridot) is detected. This is required for proper detection of eth1 comphy in a3700 comphy driver by the following patches. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- board/CZ.NIC

[PATCH u-boot-marvell 05/11] fdt_support: Fix comment for fdt_create_phandle()

2021-11-02 Thread Marek Behún
From: Marek Behún This function does not necessarily create a new phandle. If a phandle exists, no new phandle is created. Signed-off-by: Marek Behún --- common/fdt_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index

[PATCH u-boot-marvell 1/5] tools: kwboot: Fix sending retry of last header packet

2021-10-27 Thread Marek Behún
for initializing state variables from kwboot_xm_recv_reply() to kwboot_xm_sendblock(). Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index bb7cae9f05..b2c48812c3 100644

[PATCH u-boot-marvell 0/5] kwboot fix for AXP + some others

2021-10-27 Thread Marek Behún
From: Marek Behún Hi Stefan, here are some more Pali's changes for kwboot, reviewed by me. The last one should fix boot on AXP. Marek Pali Rohár (5): tools: kwboot: Fix sending retry of last header packet tools: kwboot: Do not call tcdrain() after each sent packet tools: kwboot

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-27 Thread Marek Behún
On Wed, 27 Oct 2021 08:05:11 -0700 Roman Bacik wrote: > chimp_ld_secure #this command loads FW, which is necessary for PCIe to > enumerate it > pci enum #this command is necessary to call bnxt_bind Wait, so what is this firmware for? Is it firmware for the netXtreme controller or for PCIe

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-27 Thread Marek Behún
On Wed, 27 Oct 2021 10:02:41 -0700 Roman Bacik wrote: > Marek, Simon, > > Thank you very much for your comments. We will remove bnxt commands and will > probe bnxt driver each boot in the next version. > Thanks, Roman I think that the idea of not loading fw or initializing the controller

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-27 Thread Marek Behún
On Wed, 27 Oct 2021 10:58:35 -0700 Roman Bacik wrote: > Thank you very much for your suggestion. To simplify, we will decouple > this issue from the current bnxt driver submission. Very well, that seems reasonable. I am willing to help you with this afterwards. Marek

[PATCH u-boot-marvell 5/5] tools: kwboot: Do not use stack when setting baudrate back to default value

2021-10-27 Thread Marek Behún
and expects that there is either code which returns to the BootROM or jumps to the original exec address. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 112 - 1 file changed, 65 insertions(+), 47 deletions(-) diff --git a/tools

[PATCH u-boot-marvell 3/5] tools: kwboot: Increase delay after changing baudrate in ARM code

2021-10-27 Thread Marek Behún
is not supported by ARMv5te cores. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index a6bfd3d4ce..84294cadfe 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c

[PATCH u-boot-marvell 4/5] tools: kwboot: Replace ARM mov + movt instruction pair by mov + orr

2021-10-27 Thread Marek Behún
be compatible with any 32-bit ARM core compatible by ARMv2 or new. At least GNU AS does not throw any error or warning. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index

[PATCH u-boot-marvell 2/5] tools: kwboot: Do not call tcdrain() after each sent packet

2021-10-27 Thread Marek Behún
(). Therefore do not call tcdrain() after each xmodem packet sent. Instead directly wait for any reply after putting xmodem packet into write kernel queue. This change could speed up xmodem transfer in case tcdrain() function waits for a longer time. Signed-off-by: Pali Rohár Reviewed-by: Marek

Re: [PATCH v4 2/2] arm: mvebu: add Globalscale MOCHAbin support

2021-10-27 Thread Marek Behún
On Wed, 27 Oct 2021 21:40:11 +0200 Robert Marko wrote: > To me, it also doesn't make sense to do it like that as what's the > purpose of having stuff that is completely unsupported in U-boot in > DTS? It makes sense because the device tree should compeltely describe the device. It doesn't

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-26 Thread Marek Behún
On Tue, 26 Oct 2021 09:40:44 -0700 Roman Bacik wrote: > On Tue, Oct 26, 2021 at 9:02 AM Roman Bacik wrote: > > > > On Tue, Oct 26, 2021 at 8:55 AM Marek Behún wrote: > > > > > > On Tue, 26 Oct 2021 08:14:28 -0700 > > > Roman Bacik wrote: > > &g

Re: [PATCH u-boot-marvell 00/13] Yet another kwboot improvements

2021-10-26 Thread Marek Behún
On Tue, 26 Oct 2021 17:25:10 +0200 Stefan Roese wrote: > On 26.10.21 17:20, Marek Behún wrote: > > On Tue, 26 Oct 2021 17:13:05 +0200 > > Stefan Roese wrote: > > > >> Here is now just hangs forever. No output from main U-Boot proper at > >> all. Th

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-26 Thread Marek Behún
On Tue, 26 Oct 2021 09:02:54 -0700 Roman Bacik wrote: > On Tue, Oct 26, 2021 at 8:55 AM Marek Behún wrote: > > > > On Tue, 26 Oct 2021 08:14:28 -0700 > > Roman Bacik wrote: > > > > > Hi Marek, > > > > > > We do not want this driver

Re: [PATCH u-boot-marvell 00/13] Yet another kwboot improvements

2021-10-26 Thread Marek Behún
On Tue, 26 Oct 2021 17:13:05 +0200 Stefan Roese wrote: > Here is now just hangs forever. No output from main U-Boot proper at > all. This happed every time, when the baudrate is changed, meaning a > non 115200 -B is passed to kwboot. I checked with 115201 and here no > U-Boot proper output is

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-26 Thread Marek Behún
On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik wrote: > Hi Marek, > > We do not want this driver to be automatically probed. It is not needed > all the time and also slows down the boot time. We have stripped down > everything else to bare minimum. > Thanks, > > Roman Hi Roman, OK, that is

Re: kirkwood stack size

2021-10-27 Thread Marek Behún
On Wed, 27 Oct 2021 16:06:58 -0700 Tony Dinh wrote: > Hi Marek, > > In reference to: > https://lists.denx.de/pipermail/u-boot/2021-October/465221.html > > I have several Kirkwood boards, and currently support these boards in > mainline: Sheevaplug, Zyxel NSA310S, GoFlex Home, Dockstar. I also

[PATCH 2/5] env: Fix env_get() when returning empty string using env_get_f()

2021-10-27 Thread Marek Behún
From: Marek Behún The env_get_f() function returns -1 on failure. Returning 0 means that the variable exists, and is empty string. Signed-off-by: Marek Behún --- env/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/common.c b/env/common.c index 2aa23545ba

[PATCH 5/5] arm: mvebu: Espressobin: Use new API for setting default env at runtime

2021-10-27 Thread Marek Behún
From: Marek Behún ESPRESSObin's board code uses an ad-hoc solution for ensuring that ethaddrs are not overwritten by `env default -a` command and that the `fdtfile` is set to correct value when `env default -a` is called. This ad-hoc solution is overwriting the default_environment[] buffer

[PATCH 0/5] Board specific runtime determined default env

2021-10-27 Thread Marek Behún
From: Marek Behún Hello Simon, Stefan, Pali, this series adds support for board specific runtime determined default environment variables. IMPORTANT: This series depends on the series http://patchwork.ozlabs.org/project/uboot/list/?series=268452 Currently the env default [-a] command uses

[PATCH 4/5] env: Add support for board specific special default environment

2021-10-27 Thread Marek Behún
From: Marek Behún The default_environment[] buffer is built at compile time, but sometimes it makes sense for some default environment variables to be determined at runtime, for example: - one board code may support different boards, and needs that fdtfile, board, board_name are set

[PATCH 1/5] env: Don't set ready flag if import failed in env_set_default()

2021-10-27 Thread Marek Behún
From: Marek Behún Do not set GD_FLG_ENV_READY nor GD_FLG_ENV_DEFAULT if failed importing in env_set_default(). Signed-off-by: Marek Behún --- env/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/env/common.c b/env/common.c index 99729ca002..2aa23545ba 100644

[PATCH 3/5] env: Simplify env_get_default()

2021-10-27 Thread Marek Behún
From: Marek Behún Instead of pretending that we don't have environment to force searching default environment in env_get_default(), get the data from the default_environment[] buffer directly. Signed-off-by: Marek Behún --- env/common.c | 45 - 1

kirkwood stack size

2021-10-27 Thread Marek Behún
Hello Stefan, do you have some ARM Kirkwood board? I am working on some env patches, because the code in the env/ directory is a pain in the ass of old relics, and Kirkwood is the only platform using the eeprom environment driver. I would like to ask about Kirkwood stack size. In

Re: kirkwood stack size

2021-10-28 Thread Marek Behún
OK I discovered how it works :) Pre-relocation only env_init() is called, which does not call the .load() env driver method, only .init(). So the 2K stack usage in env_eeprom_load() is only used after relocation, and at that time stack is big enough to contain it. This means that I can greatly

Re: [PATCH u-boot-marvell 00/13] Yet another kwboot improvements

2021-10-26 Thread Marek Behún
On Tue, 26 Oct 2021 14:40:48 +0200 Pali Rohár wrote: > What is happening here? I do not know. But as Marek told me that > observed same issue and replacing USB-UART cable by another decreased > transfer time. So I think that issue is somewhere in USB-UART > transmitter. My guess is that USB-UART

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-26 Thread Marek Behún
On Mon, 25 Oct 2021 16:44:44 -0700 Roman Bacik wrote: > From: Bharat Gooty > > Following netXtreme commands are supported: > probe, remove. > > Signed-off-by: Bharat Gooty > > Signed-off-by: Roman Bacik Hi Roman, why do you need to have custom command for probing / removing the driver?

Re: Question: LTO and failing objcopy in "u-boot-initial-env" target

2021-10-22 Thread Marek Behún
On Fri, 22 Oct 2021 17:16:18 +0200 Patrick DELAUNAY wrote: > Hi, > > > I made tests with LTO option activated on stm32mp15 boards but if have a > issue > > with the U-Boot target  "u-boot-initial-env" (this command used by YOCTO) > > > $> make u-boot-initial-env > > ... > > GENENV 

Re: Question: LTO and failing objcopy in "u-boot-initial-env" target

2021-10-22 Thread Marek Behún
On Fri, 22 Oct 2021 14:19:16 -0500 Adam Ford wrote: > I am not sure it's the right solution, but it appears to work for me > on a board that uses LTO. I didn't try it with a board that doesn't > use LTO. Need to be tested with GCC as well as Clang. Marek

[PATCH u-boot-marvell 10/13] tools: kwboot: Do not modify kwbimage header before increasing its size

2021-10-25 Thread Marek Behún
From: Pali Rohár This ensures that kwboot_img_grow_hdr() function still sees valid kwbimage header. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index

[PATCH u-boot-marvell 09/13] tools: kwboot: Simplify code for aligning image header

2021-10-25 Thread Marek Behún
in this variable. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 7fd28aa754..adec4ec97d 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -1563,8 +1563,7

[PATCH u-boot-marvell 12/13] tools: kwboot: Change retry loop from decreasing to increasing

2021-10-25 Thread Marek Behún
From: Pali Rohár This patch does not change behavior of the code, just allows to implement new changes more easily. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/kwboot.c b/tools

[PATCH u-boot-marvell 11/13] tools: kwboot: Calculate real used space in kwbimage header when calling kwboot_img_grow_hdr()

2021-10-25 Thread Marek Behún
From: Pali Rohár Size of the header stored in kwbimage may be larger than real used size in the kwbimage header. If there is unused space in kwbimage header then use it for growing it. So update code to calculate used space of kwbimage header. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

[PATCH u-boot-marvell 13/13] tools: kwboot: Resend first 3 xmodem retry packets immediately

2021-10-25 Thread Marek Behún
-by: Marek Behún --- tools/kwboot.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 16c5a84825..bb7cae9f05 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -851,7 +851,8 @@ kwboot_baud_magic_handle(int fd, char c, int

[PATCH u-boot-marvell 07/13] tools: kwboot: Correctly set configuration of UART for BootROM messages

2021-10-25 Thread Marek Behún
From: Pali Rohár For kwbimage v1, tell BootROM to send BootROM messages to UART port number 0 (used also for UART booting) with default baudrate (which should be 115200) and do not touch UART MPP configuration. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 11

[PATCH u-boot-marvell 08/13] tools: kwboot: Show verbose message when waiting for baudrate change magic

2021-10-25 Thread Marek Behún
From: Pali Rohár It is hard to debug why kwboot is failing when the last message is 'Finishing transfer' and no additional output. So show verbose message when kwboot finished transfer and is waiting for baudrate change magic sequence. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

[PATCH u-boot-marvell 00/13] Yet another kwboot improvements

2021-10-25 Thread Marek Behún
From: Marek Behún Hello Stefan, these are another improvements for kwboot, please apply only after series arm: mvebu: nandpagesize support for kwbimage v1 The main improvement is in patch 5, which changes where we inject the code for changing baudrate back to 115200 Baud after fast upload

[PATCH u-boot-marvell 02/13] tools: kwboot: Fix initialization of tty device

2021-10-25 Thread Marek Behún
From: Pali Rohár Explicitly disable 2 stop bits by clearing CSTOPB flag, disable modem control flow by clearing CRTSCTS flag and do not send hangup after closing device by clearing HUPCL flag. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 1 + 1 file changed, 1

[PATCH u-boot-marvell 04/13] tools: kwboot: Validate 4-byte image data checksum

2021-10-25 Thread Marek Behún
From: Pali Rohár Data part of the image contains 4-byte checksum. Validate it when processing the image. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún --- tools/kwboot.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tools

[PATCH u-boot-marvell 05/13] tools: kwboot: Inject baudrate change back code after data part

2021-10-25 Thread Marek Behún
to that offset. Also store original execution address into baudrate change code, so after it changes baudrate back to 115200 Bd, it can jump to orignal address. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún --- tools/kwboot.c | 72

[PATCH u-boot-marvell 06/13] tools: kwboot: Recalculate 4-byte data checksum after injecting baudrate code

2021-10-25 Thread Marek Behún
Rohár [ refactored ] Signed-off-by: Marek Behún --- tools/kwboot.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/kwboot.c b/tools/kwboot.c index bf26a667b7..1131c2eb1c 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -1544,6 +1544,9 @@ kwboot_img_patch(void *img, size_t *size

[PATCH u-boot-marvell 03/13] tools: kwboot: Reserve enough space for patching kwbimage in memory

2021-10-25 Thread Marek Behún
From: Pali Rohár SPI image header and data parts do not have to be aligned to 128 byte xmodem block size. So reserve additional memory for aligning header part and additional memory for aligning data part. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 4 +++- 1 file

[PATCH u-boot-marvell 01/13] tools: kwboot: Initialize rfds to zero

2021-10-25 Thread Marek Behún
From: Pali Rohár Explicitly zero out the rfds fd_set with FD_ZERO() before using it. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/kwboot.c b/tools/kwboot.c index 7e1be29623..695d433b96 100644 --- a/tools

Re: [PATCH v2 2/2] cmd: brcm: netXtreme commands

2021-10-25 Thread Marek Behún
On Fri, 22 Oct 2021 16:23:33 -0700 Roman Bacik wrote: > From: Bharat Gooty > > Following netXtreme commands are supported:- > Device probe, remove, supported speeds, get/set speeds and > get/set MAC address. NAK. - "bnxt get mac U-Boot uses the ethaddr and ethNaddr environment variables

Re: [PATCH v2 1/2] net: brcm: netXtreme driver

2021-10-25 Thread Marek Behún
NAK for this driver. - display_banner() spams the output unnecessarily, the information should be printed with debug() - you are introducing custom mechanism for setting / getting PHY parameters, via custom specific env variables, for example in the set_phy_speed() and set_phy_link()

[PATCH u-boot-marvell 07/11] tools: kwbimage: Do not put final image padding to the image data size

2021-11-08 Thread Marek Behún
. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwbimage.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index b939b4cb49..a6f2659ab4 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c

[PATCH u-boot-marvell 03/11] tools: kwbimage: Set BOOT_FROM by default to SPI

2021-11-08 Thread Marek Behún
From: Pali Rohár kwbimage must have valid blockid member instead of zero value. Thus if config file does not contain BOOT_FROM command, use by default the value for SPI booting (which is probably the most common). Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwbimage.c | 32

<    6   7   8   9   10   11   12   13   14   15   >