[U-Boot] [PATCH 6/7] env: Read default speed and mode values from DT

Petr Vorel
2018-12-10T21:08:19Z

Hi Patrick,

> In case of DT boot, don't read default speed and mode for SPI from
> CONFIG_*, instead read from DT node.

> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
> ---

> env/Kconfig | 4 ++--
> env/sf.c | 5 ++++-
> 2 files changed, 6 insertions(+), 3 deletions(-)

...
> +++ b/env/sf.c
> @@ -24,12 +24,15 @@
> #ifndef CONFIG_ENV_SPI_CS
> # define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
> #endif
> +
> +#ifndef CONFIG_DM_SPI_FLASH
> #ifndef CONFIG_ENV_SPI_MAX_HZ
> # define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
> #endif
> #ifndef CONFIG_ENV_SPI_MODE
> # define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
> #endif
> +#endif

Maybe indent? (code style mix indent and not)
#ifndef CONFIG_DM_SPI_FLASH
# ifndef CONFIG_ENV_SPI_MAX_HZ
# define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
# endif
# ifndef CONFIG_ENV_SPI_MODE
# define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
# endif
#endif

Kind regards,
Petr