Message ID | 1541696240-11680-3-git-send-email-patrick.delaunay@st.com |
---|---|
State | Changes Requested |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
Series | Read default speed and mode values from DT | expand |
diff --git a/common/splash_source.c b/common/splash_source.c index 62763b9..f0b3407 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -25,10 +25,18 @@ static struct spi_flash *sf; static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size) { if (!sf) { +#ifdef CONFIG_DM_SPI_FLASH + /* In DM mode defaults will be taken from DT */ + sf = spi_flash_probe(CONFIG_SF_DEFAULT_BUS, + CONFIG_SF_DEFAULT_CS, + 0, + 0); +#else sf = spi_flash_probe(CONFIG_SF_DEFAULT_BUS, CONFIG_SF_DEFAULT_CS, CONFIG_SF_DEFAULT_SPEED, CONFIG_SF_DEFAULT_MODE); +#endif if (!sf) return -ENODEV; }
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> --- common/splash_source.c | 8 ++++++++ 1 file changed, 8 insertions(+)