u-boot/common/spl
Vaishnav Achath cd2f9031e4 spl: spl_spi: add spi_nor_remove() to soft reset flash
On probe, the SPI NOR core will put a flash in 8D mode if it
supports it. But Linux as of now expects to get the flash in
1S mode. Handing the flash to Linux in Octal DTR mode means
the kernel will fail to detect the flash.

This commit adds an option to soft reset the flash after
spl_spi_load_image() so that the flash can be reset to 1S mode
and subsequent spi-nor probe in Linux does not fail, since
spl_spi_load_image() performs spi_flash_probe() the remove is
added after completion loading images in spi_flash_probe() itself.

Tested on J721E EVM with 5.10 Linux kernel.

Linux spi-nor probe without the fix:
root@j7-evm:~# dmesg | grep spi-nor
[    4.928023] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    4.934938] spi-nor: probe of spi0.0 failed with error -2

Linux spi-nor probe with the fix:
root@j7-evm:~# dmesg | grep spi-nor
[    4.904484] spi-nor spi0.0: mt35xu512aba (65536 Kbytes)

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2022-07-18 19:15:19 +05:30
..
Kconfig spl: allow using nand base without standard nand driver 2022-07-13 23:03:37 +02:00
Kconfig.nxp spl: Move all VPL, TPL and PowerPC specific CONFIG options to separate files 2022-06-06 12:09:29 -04:00
Kconfig.tpl spl: binman: Disable u_boot_any symbols for i.MX8M boards 2022-06-28 03:09:52 +01:00
Kconfig.vpl spl: binman: Disable u_boot_any symbols for i.MX8M boards 2022-06-28 03:09:52 +01:00
Makefile spl: Rename Kconfig SPL_LEGACY_IMAGE_SUPPORT to SPL_LEGACY_IMAGE_FORMAT 2022-05-11 09:22:24 -04:00
spl.c spl: binman: Check at runtime if binman symbols were filled in 2022-06-28 03:09:52 +01:00
spl_atf.c spl: atf: add support for LOAD_IMAGE_V2 2020-12-04 16:09:06 -05:00
spl_bootrom.c spl: pass args to board_return_to_bootrom 2019-10-08 16:35:16 +02:00
spl_dfu.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
spl_ext.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_fat.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_fit.c tools: Pass the key blob around 2022-01-26 08:50:44 -07:00
spl_legacy.c spl: spl_legacy: fix the use of SPL_COPY_PAYLOAD_ONLY 2022-07-13 23:03:37 +02:00
spl_mmc.c Convert CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR et al to Kconfig 2022-06-06 12:09:29 -04:00
spl_nand.c spl: nand: support loading legacy image with payload compressed 2022-07-13 23:03:37 +02:00
spl_net.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_nor.c Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig 2022-06-06 12:09:29 -04:00
spl_onenand.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_opensbi.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
spl_optee.S Rockchip-focused changes for v2018.11-rc2: 2018-10-05 13:40:42 -04:00
spl_ram.c spl: binman: Fix use of undeclared u_boot_any symbols 2022-06-28 03:09:52 +01:00
spl_sata.c Convert CONFIG_SPL_FS_LOAD_PAYLOAD_NAME et al to Kconfig 2022-06-06 12:09:00 -04:00
spl_sdp.c spl: sdp: Pass the USB index to board_usb_init() 2022-07-14 16:13:11 +02:00
spl_semihosting.c spl: Add semihosting boot method 2022-04-01 15:03:13 -04:00
spl_spi.c spl: spl_spi: add spi_nor_remove() to soft reset flash 2022-07-18 19:15:19 +05:30
spl_ubi.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_usb.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_xip.c Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig 2022-06-06 12:09:29 -04:00
spl_ymodem.c spl: ymodem: Fix buffer overflow during Image copy 2022-02-03 12:15:33 -05:00