From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Mon, 10 Dec 2018 22:08:19 +0100 Subject: [U-Boot] [PATCH 6/7] env: Read default speed and mode values from DT In-Reply-To: <1544439166-5749-7-git-send-email-patrick.delaunay@st.com> References: <1544439166-5749-1-git-send-email-patrick.delaunay@st.com> <1544439166-5749-7-git-send-email-patrick.delaunay@st.com> Message-ID: <20181210210818.GB396@x230> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Petr Vorel > --- > 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