summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-12-08pinctrl: rzg2l: Drop unnecessary scopePaul Barker
In rzg2l_pinconf_set(), there are no new variables defined in the case statement for PIN_CONFIG_INPUT_ENABLE so no additional scope is needed. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-08pinctrl: rzg2l: Support Ethernet TXC output enablePaul Barker
On the RZ/G2L SoC family, the direction of the Ethernet TXC/TX_CLK signal is selectable to support an Ethernet PHY operating in either MII or RGMII mode. By default, the signal is configured as an input and MII mode is supported. The ETH_MODE register can be modified to configure this signal as an output to support RGMII mode. As this signal is be default an input, and can optionally be switched to an output, it maps neatly onto an `output-enable` property in the device tree. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-08pinctrl: rzg2l: Support 2.5V PVDD for Ethernet interfacesPaul Barker
The Ethenet interfaces on the Renesas RZ/G2L SoC family can operate at multiple power supply voltages: 3.3V (default value), 2.5V and 1.8V. rzg2l_pinconf_set() is extended to support the 2.5V setting, with a check to ensure this is only used on Ethernet interfaces as it is not supported on the SD & QSPI interfaces. While we're modifying rzg2l_pinconf_set(), drop the unnecessary default value for pwr_reg as it is set in every branch of the following if condition. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-08net: ravb: Simplify max-speed handling in ravb_of_to_platPaul Barker
We can call dev_read_u32_default() instead of calling fdt_getprop() then fdt32_to_cpu(). Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-08clk: rzg2l: Ignore enable for core clocksPaul Barker
In the RZ/G2L family, core clocks are always on and can't be disabled. However, drivers which are shared with other SoCs may call clk_enable() or clk_enable_bulk() for a clock referenced in the device tree which happens to be a core clock on the RZ/G2L. To avoid the need for conditionals in these drivers, simply ignore attempts to enable a core clock. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-06rtc: CONFIGS_RTC_PL031 must depend on CONFIGS_DM_RTCHeinrich Schuchardt
Building qemu_arm64_defconfig with CONFIGS_DM_RTC=n and CONFIGS_RTC_PL031=y leads to a build failure. Adjust the vexpress64 configuration to avoid circular dependency. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-12-05power: regulator: replace dev_dbg() by dev_err() in regulator_post_bind()Patrice Chotard
To ease debugging, use dev_err() instead of dev_dbg() for alerting when regulator has nonunique value. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2024-12-05power: regulator: replace some debug() by dev_dbg()Patrice Chotard
Replace some debug() by dev_dbg() when dev variable is available/valid. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2024-12-03Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsungTom Rini
2024-12-02Revert "global_data: Drop spl_handoff"Simon Glass
This breaks chromebook_coral which says: Video: No video mode configured in FSP! This reverts commit 2e9313179a846b581c0fc3f6a49e19f3d343efa8. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-26mtd: rawnand: brcmnand: update log level messagesdavid regan
Update log level messages so that more critical messages can be logged to console and help the troubleshooting with field devices. This is a port of the upstream Linux patch to U-Boot. https://lore.kernel.org/linux-mtd/20240223034758.13753-4-william.zhang@broadcom.com/ Signed-off-by: david regan <dregan@broadcom.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: William Zhang <william.zhang@broadcom.com> Reviewed-by: Anand Gore <anand.gore@broadcom.com>
2024-11-26mtd: rawnand: brcmnand: Default bcmbca parameter_page_big_endian to zerodavid regan
Set parameter_page_big_endian to zero for bcmbca Signed-off-by: david regan <dregan@broadcom.com> Reviewed-by: William Zhang <william.zhang@broadcom.com> Reviewed-by: Anand Gore <anand.gore@broadcom.com>
2024-11-26mtd: nand: brcmnand: remove device specific nand driver filesdavid regan
These device specific nand driver files can be removed because they are now replaced by a common driver bcmbca_nand.c Signed-off-by: david regan <dregan@broadcom.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: William Zhang <william.zhang@broadcom.com> Reviewed-by: Anand Gore <anand.gore@broadcom.com>
2024-11-26Merge tag 'u-boot-dfu-20241126' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/23572 - Fastboot: - handle unknown partition type as "raw" - USB gadget: - Fix ci_udc gadget driver for Tegra 2 devices by not using USBADRA
2024-11-26usb: ci_udc: don't use "advance" feature when setting addressIon Agorria
In the older USB controllers like for example in ChipIdea controller used by the Tegra 2 the "USBADRA: Device Address Advance" bitflag does not exist, so the new device address set during SET_ADDRESS can't be deferred by hardware, which causes the host to not recognize the device and give an error. Instead store it until ep completes to apply the change into the hw register as Linux kernel does. This should fix regression on old and and be compatible with newer controllers. Inspired by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef15e5490edc7edf808d3477ab32e0e320792f65 Signed-off-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20241126072956.64778-2-clamor95@gmail.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-11-25Merge branch 'master-asix' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-usb - Fix two issues with the asix88179 driver
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-25eth: asix88179: packet drop when receiving large fragmented packetsKhoa Hoang
The ASIX 88179A drops packets when receiving fragmented packets larger than the MTU size due to an insufficient URB buffer size. This change synchronizes the URB buffer size with the configuration used in the Linux kernel, resolving the packet drop issue. To reproduce the issue, set the following configuration: CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=16352 Then, run the `tftp` command. It will fail with a timeout error: U-Boot> tftp zero.bin Using ax88179_eth device TFTP from server 10.0.0.196; our IP address is 10.0.0.18 Filename 'zero.bin' Load address: 0x10000000 Loading: T T T T T T T T T T T Retry count exceeded; starting again Signed-off-by: Khoa Hoang <admin@khoahoang.com> Reviewed-by: Marek Vasut <marex@denx.de>
2024-11-25eth: asix88179: Fix ASIX AX88179A PHY hangKhoa Hoang
The ASIX AX88179A locks up when the ADVERTISE_NPAGE bit is set in the MII_ADVERTISE register, suggesting that this feature may be broken or unsupported on this chip. In the Linux kernel, this bit is not set, and enabling it also causes the PHY to lock up and stay in a link-down state. Additionally, the AX88179 and AX88179A variants do not appear to support the ADVERTISE_LPACK bit, as setting it consistently reads back as 0. This patch removes the ADVERTISE_NPAGE and ADVERTISE_LPACK bits from the MII_ADVERTISE register configuration. It also resets the PHY before modifying the MII_ADVERTISE register, then restarts auto-negotiation, following the same flow used in the U-Boot asix.c driver. Signed-off-by: Khoa Hoang <admin@khoahoang.com> Reviewed-by: Marek Vasut <marex@denx.de>
2024-11-24Merge patch series "Fix device removal order for Apple dart iommu"Tom Rini
Janne Grunau <j@jannau.net> says: Starting with v2024.10 dev_iommu_dma_unmap calls during device removal trigger a NULL pointer dereference in the Apple dart iommu driver. The iommu device is removed before its user. The sparsely used DM_FLAG_VITAL flag is intended to describe this dependency. Add it to the driver. Adding this flag is unfortunately not enough since the boot routines except the arm one simply remove all drivers. Add and use a new function which calls dm_remove_devioce_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL); dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL); to ensure this order dependency is head consistently. Link: https://lore.kernel.org/r/20241123-iommu_apple_dart_ordering-v2-0-cc2ade6dde97@jannau.net
2024-11-24dm: Add dm_remove_devices_active() for ordered device removalJanne Grunau
This replaces dm_remove_devices_flags() calls in all boot implementations to ensure non vital devices are consistently removed first. All boot implementation except arch/arm/lib/bootm.c currently just call dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL). This can result in crashes when dependencies between devices exists. The driver model's design document describes DM_FLAG_VITAL as "indicates that the device is 'vital' to the operation of other devices". Device removal at boot should follow this. Instead of adding dm_remove_devices_flags() with (DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL) everywhere add dm_remove_devices_active() which does this. Fixes a NULL pointer deref in the apple dart IOMMU driver during EFI boot. The xhci-pci (driver which depends on the IOMMU to work) removes its mapping on removal. This explodes when the IOMMU device was removed first. dm_remove_devices_flags() is kept since it is used for testing of device_remove() calls in dm. Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-24iommu: apple: Mark device with DM_FLAG_VITALJanne Grunau
Avoids NULL pointer dereferences in apple_dart_unmap when the iommu device is removed before its user. U-boot's device model does not track dependencies between devices. Observed on a M1 Ultra Mac Studio with v2024.10. Acked-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-20Merge branch 'qcom-main' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-snapdragon CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/23474 - UFS support is enabled for SC7280 and SM8150 platforms. - Qualcomm dt-bindings headers are all dropped in favour of dts/upstream. - The SMMU driver now correctly handles stream ID 0 and is disabled in EL2. - Initial support for capsule updates (using the new dynamic UUIDs) is added for the RB3 Gen 2 board alongside a new SCSI backend for DFU. - CONFIG_PINCONF is enabled in qcom_defconfig. - The vqmmc supply is now enabled for sdcard support on boards that need it. - A quirk is added for reading GPIOs on the PM8550 PMIC
2024-11-20iommu: qcom-smmu: handle running in el2Caleb Connolly
We only need to configure the SMMU when running in EL1. In EL2 the hypervisor isn't running so peripherals can just do DMA as they wish. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20iommu: qcom-smmu: allow SID 0Caleb Connolly
It turns out this is a very real stream ID. Who woulda thought? Drop the 0 check on the SID, there's no reason for it to be there in the first place. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20dfu: add scsi backendCaleb Connolly
This is extremely similar to the MMC backend, but there are some notable differences. Works with a DFU string like scsi 4=u-boot-bin part 11 Where "4" is the SCSI dev number (sequential LUN across all SCSI devices) and "11" is the partition number. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Acked-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20phy: qcom: Add SM8150 to QMP UFS PHY driverJulius Lehmann
Copy PHY tables over from Linux to support SM8150 Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-11-20phy: qcom: ufs: add sc7280Caleb Connolly
Add configuration for the SC7280, copied from Linux 6.11 Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20phy: qcom: ufs: drop unused ufsphy_v2_regs_layoutNeil Armstrong
The ufsphy_v2_regs_layout is not used, drop it and fix: phy-qcom-qmp-ufs.c:87:27: warning: ‘ufsphy_v2_regs_layout’ defined but not used [-Wunused-const-variable=] Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20gpio: qcom_pmic: add again the quirk to skip GPIO configuration on PM8550Neil Armstrong
The qcom_pmic code is broken for new PMICs and should be fixed, without the QUIRK the code is broken and the GPIOs don't work anymore on SM8550 and SM8650 platforms. Partially revert the revert and only add the quirk on the PM8550 PMIC, making the buttons and MMC detect gpio work again. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20mmc: msm_sdhci: enable vqmmc at probe if availableNeil Armstrong
On earlier platforms, the vqmmc regulator was enabled by the previous bootloader, but on the newest (SM8650) it's not and we need vqmmc to be enabled in order to have the card to respond. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
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-19fastboot: properly handle unknown partition typeCaleb Connolly
In getvar_partition_type() we attempt to find a filesystem driver for the partition (of the list of driver enabled in U-Boot), on failure we return the error to fastboot and completely bail out of the operation. However, this should not be a failure, instead we should just default to "raw". This allows commands like "fastboot format:ext4 userdata" to work if userdata didn't already have an ext4 partition table (or if FS_EXT4 is disabled in U-Boot), as failing to determine the current partition type is not an error in this case. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20241113050607.1850472-1-caleb.connolly@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-11-15drivers: bootcount: Add ZynqMP specific bootcount supportVasileios Amoiridis
Add native support of the bootcount mechanism in the ZynqMP by utilising internal PMU registers. The Persistent Global Storage Registers of the Platform Management Unit can keep their value during reboot cycles unless there is a POR reset, making them appropriate for the bootcount mechanism. Signed-off-by: Vasileios Amoiridis <vasileios.amoiridis@cern.ch> Reviewed-by: Heiko Schocher <hs@denx.de> Link: https://lore.kernel.org/r/20241105132744.1572759-2-vassilisamir@gmail.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-11Merge patch series "Fix IOVA allocation in Apple dart iommu after global LMB ↵Tom Rini
mem map changes" Janne Grunau <j@jannau.net> says: The changes in "Make LMB memory map global and persistent" [1] break mapping DMA memory in the USB xHCI driver when using the apple_dart iommu present on Apple silicon systems. The IOVA space used by the u-boot driver (low 4GB) and physical memory do not overlap. The physical memory on this systems starts depending on the SoC either at 0x10_0000_0000 or 0x100_0000_0000. It make no sense to manage these distinct regions in a single LMB map. In addition every device has its own iommu and IO address space so sharing a single memory map between all iommu instances is not necessary. To fix this issue restore the used subset (add, alloc and free) of the previous pointer based LMB interface with "io_" as prefix. To ensure that low level lmb functions do not use the global LMB variable reorder lib/lmb.c so that the variable is not visible. Tested with patches from my "Fix device removal order for Apple dart iommu" series [2] to fix a separate issue. The cosmetic commit has two checkpatch warnings in existing code which I ignored. [1] https://lore.kernel.org/u-boot/20240826115940.3233167-1-sughosh.ganu@linaro.org/ [2] https://lore.kernel.org/u-boot/20241031-iommu_apple_dart_ordering-v1-0-8a6877946d6b@jannau.net/ Link: https://lore.kernel.org/r/20241111-io_lmb_apple_dart_iommu-v3-0-32c05da51d72@jannau.net Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-11iommu: apple: Manage IOVA separately from global LMB mem mapJanne Grunau
There is no overlap between the IOVA space managed by the iommu (here the 32-bit address space) and physical RAM on Apple silicon systems. The RAM starts at 0x10_0000_0000 or 0x100_0000_0000 so it's not possible to manage the IOVA with the global memory LMB and use 1:1 translation. In addition each device has its own iommu and does not need to share the address space with all other devices. This should not be problem for u-boot's limited use and hardware support. Restore the private per instance LMB IOVA map. Fixes: ed17a33fed2 ("lmb: make LMB memory map persistent and global") Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-11Merge tag 'u-boot-rockchip-20241111' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/23280 - Add board: rk3328: FriendlyElec NanoPi R2S Plus rk3568: Qnap TS433 rk3588: Cool Pi CM5 GenBook - Move rk3399_force_power_on_reset to TPL for puma board;
2024-11-11pinctrl: rockchip: allow to build for TPLQuentin Schulz
A later commit will make use of the pinctrl driver in TPL so let's add the ability to build the Rockchip pinctrl driver in TPL. Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.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-11-06driver: sifive ccache: enable TRUNKCLOCKGATE and REGIONCLOCKGATENick Hu
Enable the clock gating bit of ccache when the platform has the ccache0. Signed-off-by: Nick Hu <nick.hu@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-11-05pinctrl: exynos: fix type of count integerHenrik Grimler
unsigned int count is used to capture return of dev_read_string_count. When an error occurs dev_read_string_count returns -ve, which can hence not be handled correctly. Use int instead of unsigned int so that errors are detected. Fixes: 16ca80adc551 ("pinctrl: Add pinctrl driver support for Exynos7420 SoC") Signed-off-by: Henrik Grimler <henrik@grimler.se> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-11-04bios_emulator: fix first argument of pci_{read,write}_config_* function callsYuri Zaporozhets
When compiling for riscv64, a bunch of warning is produced for the file drivers/bios_emulator/besys.c. This patch fixes a portion of those warnings, caused by incorrect first argument to pci_{read,write}_config_* functions. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-04drivers/video/vesa: use MTRRs only on x86Yuri Zaporozhets
MTRR functionality is available only on x86, so this driver cannot be compiled on other architectures. Fix this with preprocessor directives. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-04bios_emulator: define the comment symbol for RISC-V assembler tooYuri Zaporozhets
The bios_emulator driver cannot be compiled for RISC-V because the x86emu.h header file doesn't define the comment symbol ("#") for the assembler. With this patch, use the same symbol as for e.g. x86. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-03dm: core: Add a function to see if a device existsSimon Glass
All the uclass functions for finding a device end up creating a uclass if it doesn't exist. Add a function which instead returns NULL in this case. This is useful when in the 'unbind' path, since we don't want to undo any unbinding which has already happened. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-03clk: renesas: Fix missing unbind on driver look up failureMarek Vasut
In case lists_driver_lookup_name("rst_gen3") fails, the clk_gen3 driver has to be unbound before erroring out. Reorder the function such that both clk_gen3 and rst_gen3 drivers are looked up first, if either look up fails then the function errors out right away. Second, the clk_gen3 is bound, if binding fails, the function still errors out right away because there is nothing to undo after either lists_driver_lookup_name() call. Finally, rst_gen3 is bound and if this binding fails, then that is the only place where clk_gen3 has to be unbound before erroring out. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-11-01scsi: fix disk capacity too small by one sectorJulius Lehmann
SCSI READ CAPACITY reports the address of the last block and the block size. The total number of blocks is thus last block address plus one. This also fixes the corresponding test case.
2024-10-31mtd: spi-nor: Guard SPI_STACKED_PARALLEL with DM_SPI checkTom Rini
While we want to compile the SPI_STACKED_PARALLEL code everywhere we can, it must first be guarded with an #if for DM_SPI as not all cases where we have this code built, such as in SPL, will have the relevant DM_SPI option enabled. Fixes: 43423cdc5dc1 ("mtd: spi-nor: Always build SPI_STACKED_PARALLEL code") Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-10-31Merge patch series "mtd: spi-nor: Remove recently added nor->addr_width == 3 ↵Tom Rini
test" Tom Rini <trini@konsulko.com> says: In the patch series "spi-nor: Add parallel and stacked memories support" a number of issues have since been raised about problems that now exist on a large number of previously working platforms. Marek Vasut has gone and identified a number of issues and this series is the starting point of attempting to address them and fix the problems with previously existing platforms. Link: https://patchwork.ozlabs.org/project/uboot/list/?series=429932&state=* Link: https://lore.kernel.org/r/20241026201741.171073-1-marek.vasut+renesas@mailbox.org
2024-10-31mtd: spi-nor: Always build SPI_STACKED_PARALLEL codeMarek Vasut
Prevent the code gated by SPI_STACKED_PARALLEL from bitrot by using if (CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL)) around it. That way, it is always at least compiled. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>