u-boot-brain/drivers/mtd
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
..
nand mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages 2021-03-23 18:06:07 +05:30
onenand mtd: OneNAND: Set MTD type 2020-11-15 15:29:40 +05:30
spi sf: Support querying write-protect 2021-03-27 15:04:31 +13:00
ubi common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
ubispl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
altera_qspi.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
cfi_flash.c cfi_flash: Fix detection of 8-bit bus flash devices via address shift 2021-04-06 08:55:53 +02:00
cfi_mtd.c mtd: cfi_mtd: Use DMA for reads 2020-10-08 09:04:41 +02:00
hbmc-am654.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig mtd: fix typos in drivers/mtd/Kconfig, drivers/mtd/renesas_rpc_hf.c 2020-09-29 13:18:31 -04:00
Makefile mtd: remove drivers/mtd/mw_eeprom.c 2021-01-18 15:23:06 -05:00
mtd_uboot.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mtd-uclass.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mtdconcat.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.c mtd: misplaced log.h and dm/devres.h 2021-01-16 19:17:11 -05:00
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c mtd: mtdpart: use uint64_t instead of int for cur_off 2020-07-17 10:47:19 -04:00
pic32_flash.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
renesas_rpc_hf.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
st_smi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00