From 34dec6a443df2adb5df2c65b2c441652c5976b44 Mon Sep 17 00:00:00 2001 From: Ashok Reddy Soma Date: Wed, 14 Jun 2023 06:04:52 -0600 Subject: cadence_qspi: Enable flash reset for Versal NET platform Enable flash reset functionality for Versal NET platform. In cadence_qspi.c there is weak function defined for reset, hence remove the check for config, so that it will work for Versal and Versal NET platforms. Add register defines in Versal NET hardware.h for mini U-Boot flash reset. Add read_delay initialization for Versal NET also. Signed-off-by: Ashok Reddy Soma Link: https://lore.kernel.org/r/20230614120452.21019-1-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek --- drivers/spi/cadence_qspi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'drivers/spi/cadence_qspi.c') diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index 2d715e478c..cc3a54f295 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -249,17 +249,14 @@ static int cadence_spi_probe(struct udevice *bus) priv->wr_delay = 50 * DIV_ROUND_UP(NSEC_PER_SEC, priv->ref_clk_hz); - if (IS_ENABLED(CONFIG_ARCH_VERSAL)) { - /* Versal platform uses spi calibration to set read delay */ + /* Versal and Versal-NET use spi calibration to set read delay */ + if (CONFIG_IS_ENABLED(ARCH_VERSAL) || + CONFIG_IS_ENABLED(ARCH_VERSAL_NET)) if (priv->read_delay >= 0) priv->read_delay = -1; - /* Reset ospi flash device */ - ret = cadence_qspi_versal_flash_reset(bus); - if (ret) - return ret; - } - return 0; + /* Reset ospi flash device */ + return cadence_qspi_versal_flash_reset(bus); } static int cadence_spi_remove(struct udevice *dev) -- cgit v1.2.3