summaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)Author
4 daysspi: coreqspi: add xfer function for PolarFire SoCEoin Dickson
Add xfer function to PolarFire SoC coreqspi driver. The read and write operations are limited to one byte at a time instead of four as CMD18 (multiple block read) reads garbage when four byte ops are enabled. Signed-off-by: Eoin Dickson <eoin.dickson@microchip.com> Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
13 dayscadence_qspi: fix odd byte read issue in STIG modeVenkatesh Yadav Abbarapu
In DDR mode, even bytes are read using DMA, while the remaining odd bytes are read using STIG mode. However, the data is not correctly transferred into the flash read data lower register because the supplementary byte of the STIG opcode is not being written to the opcode extension register, resulting in incorrect data being read. To resolve this issue, when using STIG transactions, the corresponding supplementary byte of any STIG opcode must be defined in the Opcode Extension Register (Lower). Issue has been observed on the Macronix MX66UM2G45G flashes. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20250702053953.640046-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
13 daysspi: cadence_qspi: Set tshsl_ns to at least one sclk_nsVenkatesh Yadav Abbarapu
tshsl_ns is the clock delay for chip select deassert. This is the delay in master reference clocks for the length that the master mode chip select outputs are de-asserted between transactions. The minimum delay is always SCLK period to ensure the chip select is never re-asserted within one SCLK period. That is why tshsl_ns delay should be at least one sclk_ns value. If it is less than sclk_ns, set it equal to sclk_ns. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20250702065717.3871435-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
13 daysspi: cadence_qspi: Fix odd byte write issue in STIG modeVenkatesh Yadav Abbarapu
Starting from 'commit <8077d296adff> ("spi: cadence-quadspi: Use STIG mode for all ops with small payload") the utilization of STIG mode has been implemented for read and write operations involving less than 8 bytes of data. However, following this commit, encountering timeout issues occurs when writing odd bytes of data in DDR mode, as indicated below: "jedec_spi_nor flash@0: flash operation timed out SF: 3 bytes @ 0x0 Written: ERROR -110" To resolve this issue, the number of bytes to write has been updated specifically for DDR mode. Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20250704040444.671604-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-06-27nxp: Prepare macros for KVM changesIlias Apalodimas
A following patch is replacing our IO accessors with do { ... } while(0) ones in order to make them usable with KVM. That leads to an error eventually looking like this: arch/arm/include/asm/io.h:62:9: error: expected expression before 'do' 62 | do { \ | ^~ arch/arm/include/asm/io.h:211:41: note: in expansion of macro '__raw_writel' 211 | #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a) | ^~~~~~~~~~~ arch/arm/include/asm/io.h:223:25: note: in expansion of macro 'out_arch' 223 | #define out_be32(a,v) out_arch(l,be32,a,v) | ^~~~~~~~ drivers/spi/fsl_dspi.c:127:17: note: in expansion of macro 'out_be32' 127 | out_be32(addr, val) : out_le32(addr, val); | ^~~~~~~~ So adjust the current macros and code to be compatible with the upcoming change. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-05-12spi: fspi: dev_dbg() call assumes fdt_addr_t always a long longJonathan Currier
On 32-bit systems, e.g. i.mxrt-1170 fdt_addr_t may only be 32-bit. Cast to a "long long" for garbage avoidance. Signed-off-by: Jonathan Currier <dullfire@yahoo.com>
2025-05-12spi: fspi: Add imxrt1170 device dataJonathan Currier
Add the device specific driver data, and the clock configuration. Signed-off-by: Jonathan Currier <dullfire@yahoo.com>
2025-05-12spi: fspi: involve lut_num for struct nxp_fspi_devtype_dataJonathan Currier
The flexspi on different SoCs may have different number of LUTs. So involve lut_num in nxp_fspi_devtype_data to make distinguish. This patch prepare for the adding of imx8ulp. Fixes: ef89fd56bdfc ("arm64: dts: imx8ulp: add flexspi node") Cc: stable@kernel.org Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20240905094338.1986871-3-haibo.chen@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> (Picked from linux 190b7e2efb1ed8435fc7431d9c7a2447d05d5066) Signed-off-by: Jonathan Currier <dullfire@yahoo.com>
2025-04-29drivers: spi: Fix data loss issue in QSPINaresh Kumar Ravulapalli
QSPI driver performs chip select operation before every read/write access. During this operation, driver needs to enable and disable the QSPI controller. This may cause data loss if there is inadvertent halting of any ongoing read/write operation. To avoid this scenario, waiting for the QSPI status to be idle before next read/write operation is implemented. Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-04-25spi: fsl_qspi: Move AHB read buffer config after LUTPawel Kochanowski
When using CONFIG_FSL_QSPI_AHB_FULL_MAP the fsl_qspi_default_setup() sets the BFGENCR register to use the LUT(SEQID_LUT_AHB) before the Look Up Table is populated. This result in a situation that after 'sf probe' command any memory read from qspi using AHB will result in undefined behaviour (hang) untill first 'sf read' op is executed. Move the BFGENCR write to fsl_qspi_prepare_lut() to ensure that the setup is consistent. AHB reads will use the default LUT(index 0) setup by previous boot stage untill the first read op. Signed-off-by: Pawel Kochanowski <pkochanowski@sii.pl>
2025-04-24spi: cadence-qspi: Add disable STIG mode quikrs.Boon Khai Ng
Adding quirk to disable STIG mode since cadence controller has issue for read/write using the STIG mode. STIG mode is enabled by default since 2023.04 for small read/write(<8bytes). Updated STIG mode reading from dev_get_driver_data by assigning to platdata struct before read quirks variable. The STIG mode is disabled for normal read case and enabled for QSPI Jedec ID read/write since it requires STIG read/write. Porting from linux implementation https://lore.kernel.org/all/20241204063338.296959-1-niravkumar .l.rabara@intel.com/T/ Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-04-17Merge tag 'xilinx-for-v2025.07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze AMD/Xilinx/FPGA changes for v2025.07-rc1 AMD/Xilinx: - Synchronize enums around tcm_mode - Access bootmode registers via firmware interface - Setup default values for DEBUG_UART - Fix dfu alt buffer clearing - Convert loadpdi command to fpga - Fix board detection code - Minor defconfig updates Versal: - Wire multi_boot register Versal Gen 2: - Enable missing drivers - Wire i2c FRU decoding at start - Wire saving variables to different locations - Disable default DEBUG_UART - Wire USB/UFS boot and fix access via firmware interface - Minor fixes ZynqMP/Kria: - Enable mkfwumdata - Topic board update - Enhance binman configurations - Kria usb update BuR: - Add multiple Zynq based boards cadence_ospi: - Enable device reset fpga: - Add support for loading bitstream for Altera SoCs
2025-04-17spi: airoha: Add Airoha SPI NAND driverChristian Marangi
Add Airoha SPI NAND driver to permit usage of attached SNAND on the Airoha AN7581 SoC. While SPI controller supports DMA transation, due to U-Boot limitation we currently limit it to single command in Manual mode. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16spi: cadence_ospi: Add device reset via OSPI controllerVenkatesh Yadav Abbarapu
Add support for flash device reset via OSPI controller instead of using GPIO, as OSPI IP has device reset feature on Versal Gen2 platform. Also add compatible string for Versal Gen2 platform. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20250311041317.2992862-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-12spi: tegra20_slink: fix CS polarity setupSvyatoslav Ryhel
Add missing configuration of chip select polarity. Default polarity is LOW, which satisfies most cases but some devices require HIGH polarity and will not work. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-03-12Merge patch series "drivers: Driver support for ADI SC5xx SoCs"Tom Rini
Greg Malysa <malysagreg@gmail.com> says: This series adds all of the supported peripheral drivers for the sc5xx series of SoCs from Analog Devices and other drivers that are used by the evaluation kits, such as a GPIO expander used by the EZLITE carrier boards. This series passes gitlab CI tests. Link: https://lore.kernel.org/r/20250226173150.13198-1-malysagreg@gmail.com
2025-03-12spi: Add support for ADI SC5XX-family processor SPI peripheralsNathan Barrett-Morrison
This adds support for the ADI-specific SPI driver present in the ADI SC5xx line of SoCs. This IP block is distinct from the QSPI/OSPI block that uses the Cadence driver. Both may be used at once with appropriate pin muxing configuration. Co-developed-by: Greg Malysa <malysagreg@gmail.com> Signed-off-by: Greg Malysa <malysagreg@gmail.com> Co-developed-by: Angelo Dureghello <angelo.dureghello@timesys.com> Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com> Co-developed-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Ian Roberts <ian.roberts@timesys.com> Co-developed-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com> Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com> Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
2025-02-18Merge tag 'u-boot-at91-2025.07-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 into next First set of u-boot-at91 features for the 2025.07 cycle: This feature set includes improvements on the atmel-quadspi driver, a fix for the nand driver, and improvements on the pinctrl driver to be able to use the Linux DT (also sync on the DT side as well).
2025-02-14spi: soft_spi: Add support for SPI_3WIREHironori KIKUCHI
When 3-wire mode is claimed on the bus, use the MOSI (output) pin to receive data. In this mode, since the transfer can only be either TX or RX, return -EINVAL if both are required at the same time. Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
2025-02-12spi: atmel-quadspi: Improve probe debuggingAlexander Dahl
Report spi clk speed and make use of `log_ret()`. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-02-12spi: atmel-quadspi: Add support for classic SPI modeAlexander Dahl
The qspi controller on sama5d2 and sam9x60 supports "classic" SPI mode without spi-mem enhancements and accelerations, very similar to the old SPI controller on sam9g20 or the modern flexcom controllers of the same SoC family. Register interface differs somewhat, especially because only one hardware controlled CS line is supported. Some fields are missing, some are in different registers, but in principal it works similar. So code is very much inspired by the old atmel-spi driver. Tested on sam9x60 with a non-mainline driver to configure an FPGA. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-02-12spi: atmel-quadspi: Allow setting SMM to classic SPI modeAlexander Dahl
Switching between Serial Memory Mode (SMM) and (classic) SPI mode is a preparation for implementing .xfer() in the future. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-02-12spi: atmel-quadspi: Remove default mode setting at probe timeAlexander Dahl
The Serial Memory Mode (SMM) is enabled with atmel_qspi_set_cfg() on each invocation of atmel_qspi_exec_op(). Setting SMM through atmel_qspi_init() at probe time is redundant. Removing the SMM setting at probe time should therefore 1) be safe to do and 2) allows for setting it to a different value in a future implementation of .xfer() which needs to disable SMM. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-02-12spi: atmel-quadspi: Avoid overwriting MR register settingsAlexander Dahl
Port these commits: - v6.11-rc5-90-g329ca3eed4a9a ("spi: atmel-quadspi: Avoid overwriting delay register settings") - v6.12-rc1-1-g162d9b5d2308c ("spi: atmel-quadspi: Fix wrong register value written to MR"). - v6.13-rc2-27-gf663898d047a7 ("spi: atmel-quadspi: Factor out switching to Serial Memory Mode to function") Cc: Csókás Bence <csokas.bence@prolan.hu> Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-02-12spi: atmel-quadspi: Port collected fixes from Linux v5.10 and v5.15Alexander Dahl
Port changes from a 4 piece patch series from Linux kernel v5.10, merged with v5.10-rc1-83-gc732b7567d869 ("Merge series "spi: atmel-quadspi: Fix AHB memory accesses" from Tudor Ambarus …"). Port the single fix v5.15-rc1-14-g09134c5322df9 ("spi: Fixed division by zero warning"). Reduces differences between linux and u-boot driver. Cc: Tudor Ambarus <tudor.ambarus@microchip.com> Cc: Yoshitaka Ikeda <ikeda@nskint.co.jp> Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-02-12spi: atmel-quadspi: Depend on SPI_MEMAlexander Dahl
Most other spi-mem drivers also depend on SPI_MEM. Fixes this build error: arm-v5te-linux-gnueabi-ld.bfd: drivers/spi/atmel-quadspi.o: in function `atmel_qspi_supports_op': /mnt/data/adahl/src/u-boot/drivers/spi/atmel-quadspi.c:460: undefined reference to `spi_mem_default_supports_op' make[1]: *** [/mnt/data/adahl/src/u-boot/Makefile:1821: u-boot] Error 1 Signed-off-by: Alexander Dahl <ada@thorsis.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-02-12spi: ca_sflash: Remove redundant dependencyAlexander Dahl
This is inside of an 'if DM_SPI' block, and thus always true. Signed-off-by: Alexander Dahl <ada@thorsis.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-02-05spi: cadence_qspi: Add missing prototype for cadence_qspi_flash_resetVenkatesh Yadav Abbarapu
Add missing prototype to fix the sparse warning, warning: no previous prototype for 'cadence_qspi_flash_reset' [-Wmissing-prototypes]. Fixes: 6d234a79e9 ("cadence_qspi: Refactor the flash reset functionality") Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20250122135334.1201562-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-05spi: cadence_qspi: Fix OSPI DDR mode alignment issuePadmarao Begari
If the least significant bit of the address is set to one when using the DDR protocol for data transfer then the results are indeterminate for few flash devices. To fix this the least significant bit of the address is set to zero. Signed-off-by: Padmarao Begari <padmarao.begari@amd.com> Link: https://lore.kernel.org/r/20250106095120.800753-1-padmarao.begari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-01-23spi: mtk_spim: check slave device mode in spi-mem's supports_opWeijie Gao
Call spi_mem_default_supports_op() in supports_op to honor the slave's supported single/dual/quad mode settings. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-23spi: mtk_spim: add support to use DT live treeWeijie Gao
Change devfdt_get_addr_ptr to dev_read_addr_ptr to support DT live tree. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-22Merge patch series "spi: Collected fixes"Tom Rini
Alexander Dahl <ada@thorsis.com> says: Hello, two patches for header issues I came across when working on (Q)SPI drivers for atmel boards. Link: https://lore.kernel.org/r/20250115161621.1551826-1-ada@thorsis.com
2025-01-22spi: cadence-quadspi: fix potential malfunction after ~49 days uptimeRonald Wahl
The get_timer function returns an unsigned long which may be calculated from the ARM system counter. This counter is reset only on a cold reset. U-boot divides this counter down to a 1000 Hz counter that will cross the 32bit barrier after a bit more than 49 days. Assigning the value to an unsigned int will truncate it on 64bit systems. Passing this truncated value back to the get_timer function will return a very large value that is certainly larger than the timeout and so will go down the error path and besides stopping U-Boot will lead to messages like "SPI: QSPI is still busy after poll for 5000 ms." Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com> Cc: Vignesh R <vigneshr@ti.com> Cc: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
2025-01-22spi: atmel: Really drop atmel_spi.hAlexander Dahl
First try dropping this was with commit 37434db29be4 ("spi: atmel: Drop atmel_spi.h") back in 2018 which was reverted not much later with commit 5270df283676 ("Revert "spi: atmel: Drop atmel_spi.h""). Second try dropping this was in 2020 with commit beeb34ac0cc6 ("spi: atmel: Drop atmel_spi.h"), but that only moved all the definitions into the source file and did not remove the header file. Currently all of the definitions in the header file are (still) contained in the source file, and the header file is include nowhere. Fixes: beeb34ac0cc6 ("spi: atmel: Drop atmel_spi.h") Signed-off-by: Alexander Dahl <ada@thorsis.com>
2025-01-14zynqmp_gqspi: update to log_debugIbai Erkiaga
Update recent parallel memory support code to move to log_debug instead of debug as per logging in U-Boot documentation Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com> Link: https://lore.kernel.org/r/20250107145110.2855213-1-ibai.erkiaga-elorza@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-12-25Merge tag 'v2025.01-rc5' into nextTom Rini
Prepare v2025.01-rc5
2024-12-23spi: mxc_spi: use proper clock for SPI busTim Harvey
The mxc_get_clock function is around for compatibility with older drivers that are not clock aware. In this case asking for the clk for MXC_CSPI_CLK does not take into account there are multiple SPI busses on modern IMX SoC's and it will return the clock for the first bus which may not be used or configured. In the case you are not using the first bus you will not get the proper clock. Fix this by obtaining the clock rate from the bus clock. This resolves an invalid SPI clock frequency configuration for SPI2 on a board where SPI1 is not used. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-12-11spi: renesas: Fix R-Car spellingMarek Vasut
The correct spelling is R-Car, including the dash, update the usage. Kconfig strings and comment changes only, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-11-29cadence_qspi: Refactor the flash reset functionalityVenkatesh Yadav Abbarapu
As the flash reset is handled in spi nor core, removing the flash reset functionality. As the configuration like tristate and hysterisis need to be enabled by the cdo. Handle the flash reset only for mini u-boot case. Rename the "cadence_qspi_versal_flash_reset" to generic name "cadence_qspi_flash_reset" as this can be used by other platforms as well. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20241108063537.13180-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-25spi: Fix missed rename from SPI_ADVANCE to SPI_STACKED_PARALLELDominik Wernberger
Fix missed rename from SPI_ADVANCE to SPI_STACKED_PARALLEL. This fixes an issue encountered while testing the Zynq-7000 QSPI parallel Flash implementation. Fixes: f896aa656774 ("mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLEL") Reviewed-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Dominik Wernberger <dominik.wernberger@gmx.de>
2024-11-19spi: cadence_qspi: Fix OSPI boot issueVenkatesh Yadav Abbarapu
Moving the hw_reset function from the controller driver to the NOR framework has caused the OSPI reset not to be triggered in the Cadence driver's probe function. As a result, reading the flash ID during SPI calibration is incorrect, and the CQSPI_REG_RD_DATA_CAPTURE is set with an invalid value.This makes it unable to read the flash ID properly. To solve this problem, it's suggested to skip SPI calibration and instead retrieve the read_delay directly from the device tree. Skipping SPI calibration doesn't bring harm since there's no need for the flash golden values stored during SPI calibration. Instead, they are now read during the spi_nor_read_id call in the NOR framework. Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20241114062045.17581-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-10mtd: spi-nor: Fix integer overflow in stacked memories supportMarek Vasut
The 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") adds new SPI bus flags, but also introduces a completely new set of SPI bus flags in another location. The existing flags field is type u8, while the new separate flags are BIT(8) and higher. Use of those new flags triggers integer overflow. Drop the newly introduced flags which were never used anywhere in the code. Move the one remaining flag which was used in the correct place and change it from BIT(8) to BIT(6) so it fits the u8 flags. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Addresses-Coverity-ID: 510804 Extra high-order bits Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2024-10-31mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLELMarek Vasut
The SPI_ADVANCE description does not explain what the switch does. It does not have anything to do with any advanced functionality, it only gates off support for stacked and parallel SPI NORs. Rename the Kconfig symbol, update description, and move it right next to Xilinx hardware as it seems to be specific to this hardware. Make sure the symbol is also protected by if DM_SPI in Kconfig. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-25spi: zynq_qspi: Add missing prototype for update_stripeVenkatesh Yadav Abbarapu
Add missing prototype to fix the sparse warning, warning: no previous prototype for 'update_stripe' [-Wmissing-prototypes]. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20241016044402.18052-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-10-11Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"Tom Rini
Simon Glass <sjg@chromium.org> says: When the SPL build-phase was first created it was designed to solve a particular problem (the need to init SDRAM so that U-Boot proper could be loaded). It has since expanded to become an important part of U-Boot, with three phases now present: TPL, VPL and SPL Due to this history, the term 'SPL' is used to mean both a particular phase (the one before U-Boot proper) and all the non-proper phases. This has become confusing. For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL' phases, not just SPL. So code which can only be compiled for actual SPL, for example, must use something like this: #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) In Makefiles we have similar issues. SPL_ has been used as a variable which expands to either SPL_ or nothing, to chose between options like CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was updated to support 'VPL_' as well. This series starts a change in terminology and usage to resolve the above issues: - The word 'xPL' is used instead of 'SPL' to mean a non-proper build - A new CONFIG_XPL_BUILD define indicates that the current build is an 'xPL' build - The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now defined for TPL and VPL phases - The existing SPL_ Makefile variable is renamed to SPL_ - The existing SPL_TPL Makefile variable is renamed to PHASE_ It should be noted that xpl_phase() can generally be used instead of the above CONFIGs without a code-space or run-time penalty. This series does not attempt to convert all of U-Boot to use this new terminology but it makes a start. In particular, renaming spl.h and common/spl seems like a bridge too far at this point. The series is fully bisectable. It has also been checked to ensure there are no code-size changes on any commit.
2024-10-11global: Rename SPL_TPL_ to PHASE_Simon Glass
Use PHASE_ as the symbol to select a particular XPL build. This means that SPL_TPL_ is no-longer set. Update the comment in bootstage to refer to this symbol, instead of SPL_ Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11log: global: Rename warn_non_spl()Simon Glass
This should now refer to xPL rather than SPL, so update it throughout the tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11xpl: Rename spl_phase() to xpl_phase()Simon Glass
Rename this function to indicate that it refers to any xPL phase. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-09Merge patch series "spi: Various Kconfig fixes"Tom Rini
John Watts <contact@jookia.org> says: I'm doing some SPI work so I tried to compile all the drivers on my sunxi board to try and avoid some regressions. This failed, so here are some fixes for this. Link: https://lore.kernel.org/r/20240427-spikconfig-v1-0-8a54772522f4@jookia.org Signed-off-by: Tom Rini <trini@konsulko.com>