u-boot-brain/drivers
Ilya Yanok ec50a8e389 cfi_flash: handle 'chip size exceeds address window' situation
On some boards we have flash mapped high in the address space with
considerably small window (say 0xFE000000 and 32MB). When we install
bigger chip (say 64MB) on such a board strange things happen
(flash_write() doesn't work at all, for ex). That's because cfi_flash
driver doesn't care about window size at all.
Of course, cleanest solution would probably be to just extend address
window to be able to map the whole flash but for legacy/compatibility
reasons some people prefer just truncate the flash size and never use
the upper part.
This patch adds an option for cfi_flash driver to handle this situation
properly. To achieve this we add the new function cfi_flash_bank_size()
which can be provided by the board code and weak-aliased to default
implementation that returns value from the CONFIG_SYS_FLASH_BANKS_SIZES
array if it's defined or 0 otherwise (the last case is added for
compatibility).
If non-zero flash bank size is provided and detected chip size is bigger
than provided address window size the warning will be displayed and
flash chip will be truncated.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>

Changed cfi_flash_bank_size() return type to unsigned long
to match caller function.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-23 21:04:49 +02:00
..
bios_emulator ati_radeon: Support PCI virtual not eq bus mapping. 2010-04-08 15:30:47 +02:00
block mvsata_ide: adjust port init sequence 2010-10-13 09:35:54 +02:00
dma powerpc/8xxx: Fix dma for 36bit addressing 2010-08-31 11:23:15 -05:00
fpga FPGA: fix support for non-Lattice devices 2010-10-18 21:32:14 +02:00
gpio Use common function to set GPIOs for MX3 and MX5 2010-09-29 11:24:30 +02:00
hwmon ds1621: Fix negative temperature readings 2010-10-06 23:01:22 +02:00
i2c ARMV7: OMAP: I2C driver: Restructure i2c_probe function 2010-10-20 15:28:48 +02:00
input Remove HMI10 board support 2010-09-19 21:28:25 +02:00
misc Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-10-13 20:59:47 +02:00
mmc PXA: pxa-regs.h cleanup 2010-10-19 22:46:22 +02:00
mtd cfi_flash: handle 'chip size exceeds address window' situation 2010-10-23 21:04:49 +02:00
net Fix compile warning in uli526x driver 2010-10-20 02:38:41 -05:00
pci powerpc/85xx & 86xx: Rework ft_fsl_pci_setup to not require aliases 2010-07-20 04:40:06 -05:00
pcmcia Remove HMI10 board support 2010-09-19 21:28:25 +02:00
power Prepare v2010.09-rc1 2010-09-10 00:16:19 +02:00
qe powerpc/fsl: Introduce common enum for PHY types 2010-10-20 02:27:18 -05:00
rtc ftrtc010.c : enhance code according to original datasheet 2010-10-20 21:46:30 +02:00
serial PXA: pxa-regs.h cleanup 2010-10-19 22:46:22 +02:00
spi Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-10-11 10:19:04 +02:00
twserial drivers/twserial: Add protocol driver for "three wire serial" interface. 2009-03-30 09:38:36 +02:00
usb USB: sync Queue Element Transfer Descriptor against EHCI spec 2010-10-20 00:23:57 +02:00
video Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-10-17 19:57:38 +02:00
watchdog Convert at91 watchdog driver to new SoC access 2010-04-03 15:24:27 -05:00