u-boot-brain/drivers
Jagannadha Sutradharudu Teki 53879b1738 cfi_flash: Fix detection of 8-bit bus flash devices via address shift
We had a problem detecting 8/16bit flash devices connected only via
8bits to the SoC for quite a while. Commit 239cb9d9
[mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support] finally
fixed this 8-bit bus support. But also broke some other boards using
this cfi driver. So this patch had to be reverted.

I spotted a different, simpler approach for this 8-bit bus support
on the barebox mailing list posted by
Oleksij Rempel <bug-track@fisher-privat.net>:

http://www.spinics.net/lists/u-boot-v2/msg14687.html

Here the commit text:

"
Many cfi chips support 16 and 8 bit modes. Most important
difference is use of so called "Q15/A-1" pin. In 16bit mode this
pin is used for data IO. In 8bit mode, it is an address input
which add one more least significant bit (LSB). In this case
we should shift all adresses by one:
For example 0xaa << 1 = 0x154
"

This patch now is a port of this barebox patch to U-Boot.

Along with the change w.r.t from barebox,
Some flash chips can support multiple bus widths, override the
interface width and limit it to the port width.

Tested on 16-bit Spansion flash on sequoia.
Tested 8-bit flashes like 256M29EW, 512M29EW.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Cc: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: York Sun <york.sun@nxp.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-04-06 08:55:53 +02:00
..
adc adc: meson-saradc: add support for getting reference voltage value 2021-02-18 11:37:26 +01:00
ata ahci: mediatek: fix undefined reference of dev_err 2021-03-19 10:35:19 -04:00
axi dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
bios_emulator common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
block sandbox: Provide a way to bind fixed/removeable devices 2021-03-27 15:04:31 +13:00
bootcount common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
bus bus: ti-sysc: change in a normal driver 2021-03-22 19:23:27 +13:00
button button: adc: fix treshold typo 2021-03-08 10:32:34 +01:00
cache common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
clk Xilinx changes for v2021.07 2021-03-31 09:47:30 -04:00
core dm: core: Use separate priv/plat data region 2021-03-26 17:03:09 +13:00
cpu common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
crypto common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ddr arm: mvebu: a38x: Remove dead code ARMADA_39X 2021-03-12 07:44:21 +01:00
demo common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
dfu dfu: dfu_sf: avoid double free of SPI device 2021-03-25 20:15:30 +01:00
dma dma: bcm6348: incorrect buffer allocation 2021-01-18 15:23:06 -05:00
fastboot fastboot: add UUU command UCmd and ACmd support 2021-02-26 15:30:55 +01:00
firmware scmi: cosmetic: reorder include files 2021-03-11 17:03:19 +01:00
fpga arm: socfpga: Move Stratix10 and Agilex to use TARGET_SOCFPGA_SOC64 2021-03-08 10:59:10 +08:00
gpio x86: Probe device if needed in intel_gpio_xlate() 2021-03-27 13:59:36 +13:00
hwspinlock common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
i2c Revert "sandbox: Disable I2C emulators in SPL" 2021-03-26 17:03:08 +13:00
input common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
led dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
mailbox common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
memory memory: stm32-fmc2: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
misc sandbox: cros_ec: Only write EC state when the EC is probed 2021-03-27 15:04:31 +13:00
mmc Prepare v2021.04-rc5 2021-03-29 18:00:21 -04:00
mtd cfi_flash: Fix detection of 8-bit bus flash devices via address shift 2021-04-06 08:55:53 +02:00
mux dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
net net: gem: Fix setting PCS auto-negotiation state 2021-03-30 09:18:47 +02:00
nvme nvme: Elaborate on cache maintenance operation in get/set_features 2021-03-19 10:36:55 -04:00
pch dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pci Prepare v2021.04-rc5 2021-03-29 18:00:21 -04:00
pci_endpoint common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
phy Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
pinctrl First set of u-boot-atmel features for 2021.07 cycle 2021-03-30 11:24:09 -04:00
power power: pmic: remove pmic_max8997/8 files 2021-02-23 15:43:13 +09:00
pwm common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
qe common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ram common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
remoteproc Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
reset common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
rng rng: iproc_rng200: Enable support for RPi4 armv7 2021-03-02 13:53:48 +01:00
rtc Prepare v2021.04-rc5 2021-03-29 18:00:21 -04:00
scsi dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial x86: Make coreboot sysinfo available to any x86 board 2021-03-27 13:59:37 +13:00
smem Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
soc dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
sound tegra: i2c: Drop LOG_DEBUG 2021-03-27 13:59:36 +13:00
spi Xilinx changes for v2021.07 2021-03-31 09:47:30 -04:00
spmi common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sysinfo dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sysreset Prepare v2021.04-rc4 2021-03-15 12:15:38 -04:00
tee drivers: tee: sandbox: SCP03 control emulator 2021-03-14 11:50:13 -04:00
thermal thermal: imx_tmu: enable monitoring and default alert/critical 2021-03-01 10:21:36 +01:00
timer cpu: Rename SPL_CPU_SUPPORT to SPL_CPU 2021-03-27 15:04:31 +13:00
tpm tpm: Correct warning on 32-bit build 2021-03-13 13:14:52 -05:00
ufs dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
usb usb: mtu3: flush cache for next GPD 2021-03-10 11:48:09 +01:00
video x86: video: Allow coreboot video to be used on any x86 board 2021-03-27 15:04:30 +13:00
virtio virtio: Fix VirtIO BLK driver dependency 2021-03-05 10:25:43 +05:30
w1 w1: mxc: fix build 2021-01-23 11:30:31 +01:00
w1-eeprom dm: treewide: Rename 'platdata' variables to just 'plat' 2020-12-13 16:51:08 -07:00
watchdog reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
xen common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
Kconfig board: Rename uclass to sysinfo 2020-11-06 10:18:20 +08:00
Makefile cpu: Rename SPL_CPU_SUPPORT to SPL_CPU 2021-03-27 15:04:31 +13:00