From: Stefan Roese Date: Wed, 19 Sep 2018 15:11:43 +0200 Subject: [U-Boot] [PATCH 1/5] fix: env: Fix the SPI flash device setup for DM mode In-Reply-To: <1535549696-17222-2-git-send-email-kostap@marvell.com> References: <1535549696-17222-1-git-send-email-kostap@marvell.com> <1535549696-17222-2-git-send-email-kostap@marvell.com> Message-ID: <2432c824-6273-e801-52b9-eeb2f480d7ae@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 29.08.2018 15:34, kostap at marvell.com wrote: > From: Konstantin Porotchkin > > For some reason the spi_flash_probe_bus_cs() is called > inside the setup_flash_device() with zero values in place > of configurated SPI flash mode and maximum flash speed. > This code causes HALT error during startup environment > relocation on some platforms - namely Armada-38x-GP board. > Fix the function call by replacing zeros with the appropriate > values - CONFIG_ENV_SPI_MAX_HZ and CONFIG_ENV_SPI_MODE. > > Signed-off-by: Konstantin Porotchkin > Cc: Igal Liberman > Cc: Stefan Roese > --- > env/sf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/env/sf.c b/env/sf.c > index 4945105..2e3c600 100644 > --- a/env/sf.c > +++ b/env/sf.c > @@ -58,7 +58,8 @@ static int setup_flash_device(void) > > /* speed and mode will be read from DT */ > ret = spi_flash_probe_bus_cs(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, > - 0, 0, &new); > + CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE, > + &new); > if (ret) { > set_default_env("spi_flash_probe_bus_cs() failed", 0); > return ret; > Applied to u-boot-marvell/master Thanks, Stefan