u-boot-2016/drivers
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
..
adc dm: adc: Convert uclass to livetree 2017-06-01 07:03:13 -06:00
ata dma: import linux/dma-direction.h to consolidate enum dma_data_direction 2017-09-12 18:02:23 -04:00
bios_emulator bios_emulator: Fix cast for 64-bit compilation 2016-10-11 11:55:33 +08:00
block blk: Remove various places that do flush cache after read 2017-09-15 08:05:10 -04:00
bootcount cosmetic: bootcount: correct comment for used scratch register 2017-09-12 17:58:54 -04:00
clk dm: clk: add clk driver support for stm32h7 SoCs 2017-09-22 07:40:01 -04:00
core dm: core: add dev_read_addr_ptr() 2017-09-18 20:40:33 +02:00
cpu dm: core: Update device_bind_driver_to_node() to use ofnode 2017-06-01 07:03:08 -06:00
crypto crypto/fsl: fix obj-yy in Makefile 2017-09-04 09:02:07 -04:00
ddr armv8: ls1088a: Add NXP LS1088A SoC support 2017-09-11 08:00:13 -07:00
demo dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
dfu env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
dma imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
firmware dm: core: Rename of_device_is_compatible() 2017-06-01 07:03:06 -06:00
fpga fpga: xilinx: Avoid using local intermediate buffer 2017-08-02 09:11:52 +02:00
gpio rockchip: gpio: remove outdated/misleading comment 2017-09-18 20:40:35 +02:00
i2c rockchip: i2c: Convert to livetree 2017-09-18 20:40:35 +02:00
input env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
led dm: core: Update device_bind_driver_to_node() to use ofnode 2017-06-01 07:03:08 -06:00
mailbox dm: mailbox: Update uclass to support livetree 2017-06-01 07:03:15 -06:00
memory memory: Move TI_AEMIF config to KCONFIG 2016-04-18 17:11:43 -04:00
misc dm: misc: add stm32 rcc driver 2017-09-22 07:40:02 -04:00
mmc mmc: sti_sdhci: Use reset framework 2017-09-22 07:39:57 -04:00
mtd sf: bar: Clean BA24 Bank Address Register bit after read/write/erase operation 2017-09-27 13:31:59 +05:30
net nds32: ftmac100: Fix write mac addr fail problem. 2017-09-21 10:30:22 +08:00
nvme nvme: Remove dead codes in nvme_setup_io_queues() 2017-09-03 15:30:34 -04:00
pch dm: Use dm_scan_fdt_dev() directly where possible 2016-07-27 14:15:54 -06:00
pci pci: layerscape: Fixup iommu-map for LS208xA 2017-09-22 12:42:29 -07:00
pcmcia Kconfig; Drop CONFIG_IDE_TI_CARDBUS and associated driver 2017-08-11 15:41:51 -04:00
phy usb: phy: Add STi USB2 PHY 2017-09-22 07:39:57 -04:00
pinctrl pinctrl: stm32: add stm32h743-pinctrl compatible 2017-09-22 07:40:00 -04:00
power rockchip: rk8xx: remove unused header includes 2017-09-18 20:40:35 +02:00
pwm dm: tegra: pwm: Convert to livetree 2017-07-28 12:02:47 -06:00
qe blk: Remove various places that do flush cache after read 2017-09-15 08:05:10 -04:00
ram rockchip: rk3368: adjust DMC driver for 32/64bit-aware OF_PLATDATA 2017-09-18 20:40:38 +02:00
remoteproc dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
reset dm: reset: add stm32 reset driver 2017-09-22 07:40:01 -04:00
rtc env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
scsi blk: dm: make blk_create_device() take a number of block instead of a size 2017-09-11 21:43:58 -06:00
serial serial: stm32x7: add STM32H7 support 2017-09-22 07:40:01 -04:00
soc Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
sound dm: gpio: Add live tree support 2017-06-01 07:03:10 -06:00
spi spi: fsl_qspi: Copy 16 byte aligned data in TX FIFO 2017-09-25 15:45:15 +05:30
spmi dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
sysreset rockchip: enable rk322x sysreset driver 2017-09-18 20:40:32 +02:00
thermal thermal: imx: fix calculation 2017-05-18 11:23:31 +02:00
timer rockchip: timer: update for 32/64bit-aware OF_PLATDATA 2017-09-18 20:40:37 +02:00
tpm dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
usb usb: dwc3: Add dwc3 glue driver support for STi 2017-09-22 07:39:59 -04:00
video Merge branch 'next' of git://git.denx.de/u-boot-video 2017-09-21 07:51:20 -04:00
watchdog wdt: Update uclass to make clear that the timeout is in ms 2017-08-13 15:17:34 -04:00
Kconfig nvme: Add NVM Express driver support 2017-08-13 15:17:31 -04:00
Makefile Merge branch 'master' of git://git.denx.de/u-boot-rockchip 2017-08-14 10:40:01 -04:00