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

Petr Vorel petr.vorel at gmail.com
Mon Dec 10 21:08:19 UTC 2018


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 at st.com>
Reviewed-by: Petr Vorel <petr.vorel at 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


More information about the U-Boot mailing list