u-boot/drivers/mtd/spi
Lukasz Majewski ca1ac16da0 sf: bar: Clean BA24 Bank Address Register bit after read/write/erase operation
The content of Bank Address Register (BAR) is volatile. It is cleared
after power cycle or reset command (RESET F0h).

Some memories (like e.g. s25fl256s) use it to access memory larger than
0x1000000 (16 MiB).

The problem shows up when one:

1. Reads/writes/erases memory > 16 MiB
2. Calls "reset" u-boot command (which is not causing BAR to be cleared)

In the above scenario, the SoC ROM sends 0x000000 address to read SPL.
Unfortunately, the BA24 bit is still set and hence it receives content
from 0x1000000 (16 MiB) memory address.
As a result the SoC aborts and we hang. Only power cycle can take the
SoC out of this state.

How to reproduce/test:

sf probe; sf erase 0x1200000 0x800000; reset
sf probe; sf erase 0x1200000 0x800000; sf write 0x11000000 0x1200000 0x800000; reset
sf probe; sf read 0x11000000 0x1200000 0x800000; reset

Signed-off-by: Lukasz Majewski <lukma@denx.de>
[Fixed comment text on clean_bar function]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-09-27 13:31:59 +05:30
..
fsl_espi_spl.c spi: Move freescale-specific code into a private header 2016-10-06 15:07:35 -04:00
Kconfig arm: zynq: Move CONFIG_SF_DUAL_FLASH to defconfig 2017-06-20 16:42:13 +02:00
Makefile sf: Rename sf_params.c to spi_flash_ids.c 2016-11-18 13:04:54 +05:30
sandbox.c dm: sandbox: spi: Convert driver to support livetree 2017-06-01 07:03:16 -06:00
sf-uclass.c dm: core: Add flags parameter to device_remove() 2017-04-04 20:15:10 -06:00
sf.c spi: Remove dual flash options/flags 2016-11-19 08:41:44 +05:30
sf_dataflash.c mtd: spi: sf_dataflash: Add print message while erase error 2017-08-08 12:34:27 +05:30
sf_internal.h Revert "sf: Fix quad bit set for micron devices" 2016-12-15 18:33:16 +01:00
sf_mtd.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
sf_probe.c spi: Correct two error return values 2016-02-26 08:53:10 -07:00
spi_flash.c sf: bar: Clean BA24 Bank Address Register bit after read/write/erase operation 2017-09-27 13:31:59 +05:30
spi_flash_ids.c Fix s25fl256s position in spi_flash_ids list 2017-09-25 13:00:34 +05:30
sunxi_spi_spl.c SPL: SPI: sunxi: add SPL FIT image support 2017-09-27 12:45:32 +05:30