summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-12-03 15:51:56 -0600
committerTom Rini <[email protected]>2024-12-03 15:51:56 -0600
commitdf863c4aa30ee4e624058f64132b7243c6370ef5 (patch)
tree8fe7f779125a2145ff160e7bccb636dd3eb5d5e2 /drivers
parentc33be116dcc2fe78291b41c4680cf5f774c3a345 (diff)
parent46097afc70352ce5dc0caa8f95b74cba1e00af9b (diff)
Merge tag 'xilinx-for-v2025.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next
AMD/Xilinx changes for v2025.04-rc1 binman: - Separate binman description from main DT zynqmp: - Enable binman for ZynqMP platforms - DT sync with Linux v6.12 - Update usb5744 hub for SOMs common: - Drop SPL_FIT_GENERATOR support versal2 - Enable OPTEE layers ospi: - Refactor the flash reset functionality pytest: - Fix tcminit mode handling
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/cadence_ospi_versal.c45
-rw-r--r--drivers/spi/cadence_qspi.c6
2 files changed, 6 insertions, 45 deletions
diff --git a/drivers/spi/cadence_ospi_versal.c b/drivers/spi/cadence_ospi_versal.c
index 222f828f54e..dcf28c75596 100644
--- a/drivers/spi/cadence_ospi_versal.c
+++ b/drivers/spi/cadence_ospi_versal.c
@@ -125,49 +125,8 @@ int cadence_qspi_apb_wait_for_dma_cmplt(struct cadence_spi_priv *priv)
return 0;
}
-#if defined(CONFIG_DM_GPIO)
-int cadence_qspi_versal_flash_reset(struct udevice *dev)
-{
- struct gpio_desc gpio;
- u32 reset_gpio;
- int ret;
-
- /* request gpio and set direction as output set to 1 */
- ret = gpio_request_by_name(dev, "reset-gpios", 0, &gpio,
- GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
- if (ret) {
- printf("%s: unable to reset ospi flash device", __func__);
- return ret;
- }
-
- reset_gpio = PMIO_NODE_ID_BASE + gpio.offset;
-
- /* Request for pin */
- xilinx_pm_request(PM_PINCTRL_REQUEST, reset_gpio, 0, 0, 0, NULL);
-
- /* Enable hysteresis in cmos receiver */
- xilinx_pm_request(PM_PINCTRL_CONFIG_PARAM_SET, reset_gpio,
- PM_PINCTRL_CONFIG_SCHMITT_CMOS,
- PM_PINCTRL_INPUT_TYPE_SCHMITT, 0, NULL);
-
- /* Disable Tri-state */
- xilinx_pm_request(PM_PINCTRL_CONFIG_PARAM_SET, reset_gpio,
- PM_PINCTRL_CONFIG_TRI_STATE,
- PM_PINCTRL_TRI_STATE_DISABLE, 0, NULL);
- udelay(1);
-
- /* Set value 0 to pin */
- dm_gpio_set_value(&gpio, 0);
- udelay(1);
-
- /* Set value 1 to pin */
- dm_gpio_set_value(&gpio, 1);
- udelay(1);
-
- return 0;
-}
-#else
-int cadence_qspi_versal_flash_reset(struct udevice *dev)
+#if !CONFIG_IS_ENABLED(DM_GPIO)
+int cadence_qspi_flash_reset(struct udevice *dev)
{
/* CRP WPROT */
writel(0, WPROT_CRP);
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 331a46d88f7..623904ecdad 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -33,7 +33,7 @@ __weak int cadence_qspi_apb_dma_read(struct cadence_spi_priv *priv,
return 0;
}
-__weak int cadence_qspi_versal_flash_reset(struct udevice *dev)
+__weak int cadence_qspi_flash_reset(struct udevice *dev)
{
return 0;
}
@@ -252,7 +252,9 @@ static int cadence_spi_probe(struct udevice *bus)
priv->wr_delay = 50 * DIV_ROUND_UP(NSEC_PER_SEC, priv->ref_clk_hz);
/* Reset ospi flash device */
- return cadence_qspi_versal_flash_reset(bus);
+ return cadence_qspi_flash_reset(bus);
+
+ return 0;
}
static int cadence_spi_remove(struct udevice *dev)