Spencer Oliver
3d834bdab7
stm32: add stm32 xl family flash support
...
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-23 12:11:14 +00:00
Spencer Oliver
83e5aaf577
stm32: add dual flash bank support
...
This patch adds the initial dual flash bank support for devices such
as the stm32xl family.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-23 12:11:13 +00:00
Paul Richards
5787853bc1
Fix for segfault in handle_nand_dump_command.
2010-12-15 14:14:02 +01:00
Øyvind Harboe
969b1e66dd
stm32: fix unprotect
...
the unprotect fn in stm32 needs to unprotect more sectors
than was requested aligned to some boundary.
Print warning when this happens.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-12-15 09:48:37 +01:00
Øyvind Harboe
39dbb516a4
flash: clarify protect documentation
...
some chips unprotect more than the range asked for. The
protect fn, must unprotect/protect minimally the range given.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-12-15 09:48:37 +01:00
Spencer Oliver
cbf48bed6a
contrib: add source to the cfi flash loaders
...
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 19:37:39 +00:00
Spencer Oliver
ae68ddc25e
cfi: disable buffer writes for M29W128G
...
For some reason buffer writes for the M29W128G do not work reliably,
so disable them.
See:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=504a3e72208fc6a65924426ff5693982590bccdc
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 13:36:09 +00:00
Spencer Oliver
26ba6ea511
cfi: allow optional buffer write support
...
Some flash's do not support buffer writes, so we now check
they are supported before trying to use them.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 13:36:09 +00:00
Spencer Oliver
fe4fe623d5
cfi: calculate correct timeouts
...
The existing code used incorrect timeout values for the various cfi
operations. We now calculate the timeouts and convert to
msecs if necessary.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 13:36:08 +00:00
Spencer Oliver
b4ee2864e4
cfi: prefix string hex output
...
Add hex prefix so we know output is not decimal.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 13:36:07 +00:00
Spencer Oliver
6165f14ee2
cfi: add time format to cfi query output
...
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 13:36:07 +00:00
Spencer Oliver
b3052b614c
cfi: whitespace and long line cleanup
...
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-12-10 13:36:06 +00:00
Rolf Meeser
f2a1b7f3af
Fix sector layout for 504-KiB LPC2000 devices
2010-12-04 09:35:33 +01:00
Rolf Meeser
40a93104d5
lpc2900.c: Improve debug output for device probing
2010-12-01 08:48:02 +01:00
Rolf Meeser
71031bcf7f
lpc2900.c: Add support for new device LPC2926
2010-12-01 08:47:57 +01:00
Rolf Meeser
1bd87f5dba
LPC2900: Avoid false positive reprobing if first probing fails
2010-12-01 08:47:51 +01:00
Antonio Borneo
1892a2b510
FLASH/NOR: Rename spearsmi.c to stmsmi.c
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-23 08:37:35 +01:00
Antonio Borneo
42082f7c23
FLASH/NOR: rename from spearsmi to stmsmi
...
STMicroelectronics controller SMI is not SPEAr specific.
Rename it and change name to every symbol in the code.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-23 08:37:34 +01:00
Antonio Borneo
4bbdf966d4
STR750: Add SMI interface support
...
Modified spearsmi driver to include support for STR75x
Added missing initialization in tcl file for STR750
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-23 08:37:31 +01:00
Antonio Borneo
e6fc371e2e
NOR/SPEARSMI: fix segfault
...
If flash chip is not listed in the table, or if no flash is
connected, pointer must be properly initialized.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-23 08:37:28 +01:00
Øyvind Harboe
8902789f0d
flash: iterating over an address range now handles multiple banks
...
e.g. flash erase_address now works across an address
range that spans multiple flash chips.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-11-22 11:16:40 +01:00
Spencer Oliver
838cd58e24
build: add common.mk
...
Rather than specifying common makefile variables move
them all to a common.mk.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-11-18 14:05:56 +00:00
Antonio Borneo
ab263fafbb
FLASH/NOR: Remove useless file tms470.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:43 +01:00
Antonio Borneo
29d7031fe3
FLASH/NOR: Remove useless file str9xpec.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:39 +01:00
Antonio Borneo
7bbd6c7683
FLASH/NOR: Remove useless file str9x.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:38 +01:00
Antonio Borneo
d16dbaa0fc
FLASH/NOR: Remove useless file str7x.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:36 +01:00
Antonio Borneo
5d09972931
FLASH/NOR: Remove useless file stm32x.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:35 +01:00
Antonio Borneo
f1f8d9a6c9
FLASH/NOR: Remove useless file stellaris.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:33 +01:00
Antonio Borneo
f5ae179519
FLASH/NOR: Remove useless file pic32mx.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:19 +01:00
Antonio Borneo
4cc3597944
FLASH/NOR: Remove useless file lpc288x.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:07 +01:00
Antonio Borneo
fb7c709804
FLASH/NOR: Remove useless file lpc2000.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:02:03 +01:00
Antonio Borneo
28bbe4e983
FLASH/NOR: Remove useless file avrf.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 17:01:59 +01:00
Øyvind Harboe
2b546fdc45
flash: fix bug with multiple back-to-back flash chips
...
flash programming via flash write_image or gdb load would
produce a bogus error message that the flash chip was to
small.
The solution is to limit the current flash programming
run to the current chip.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-11-17 16:56:28 +01:00
Antonio Borneo
52558354e6
FLASH/NOR: Remove useless file at91sam7.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 08:55:39 +01:00
Antonio Borneo
d213e1a12c
FLASH/NOR: Remove useless file at91sam3.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 08:55:35 +01:00
Antonio Borneo
c5414f95b6
FLASH/NOR: Remove useless file spearsmi.h
...
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 08:55:31 +01:00
Antonio Borneo
49f42ab51d
NOR/SPEARSMI: Add comments about SPI
...
SMI interface hides the real SPI bus between SPEAr and
external flash.
Added comments to highlight the SPI operation, to help a
future rework in SPI generic and SPEAr specific drivers.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-17 08:55:08 +01:00
Antonio Borneo
e7a8de1762
NOR/SPEAr: Add support for Serial NOR
...
Add support and documentation for STMicroelectronics
SPEAr Serial Memory Interface (SMI).
Code tested on SPEAr3xx only.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com >
2010-11-16 09:16:11 +01:00
Freddie Chopin
015bf55944
Add comments and tiny improvements to STM32 flash loader algorithm
...
Add comments to assembly flash loader for STM32. Add tiny improvement in
size of the algorithm (40 vs 48 bytes) and tiny speed improvement (~1.5%,
as time is wasted on waiting for end of operation anyway).
Signed-off-by: Freddie Chopin <freddie_chopin@op.pl >
2010-11-15 09:17:14 +01:00
Øyvind Harboe
fc4e001de3
stm32: return early upon block write failure
...
only if we do not have enough ram do we continue.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-11-09 08:12:51 +01:00
Øyvind Harboe
6ef3d4ccfe
stm32: return error when failing to read
...
add missing error handling.
Output warning when assuming maximum flash size in the
family when failing to read.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-11-09 08:12:25 +01:00
Øyvind Harboe
49a231f38d
stm32: add error propagation on writes
...
catch problems earlier.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-11-09 08:05:55 +01:00
Øyvind Harboe
e774df7f69
stm32: sharpen error handling for timeouts
...
delete lots of crud by handling this all in one spot.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-11-09 08:05:55 +01:00
Spencer Oliver
4617cd0f91
src: add loader src description
...
- add comment where to find the various loaders src files.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net >
2010-10-28 10:08:16 +01:00
Øyvind Harboe
3931b99d14
fileio: fileio_size() can now fail
...
Part of making the fileio API more robust.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-09-29 18:56:07 +02:00
Øyvind Harboe
3a693ef526
fileio: refactor struct fileio to be an opaque structure
...
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-09-29 08:43:27 +02:00
Øyvind Harboe
45e5d1d90a
flash: fix error handling
...
memory leaks and missing check on memory allocation.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-09-27 16:46:13 +02:00
Øyvind Harboe
19167a7af6
image: fix spelling mistake
...
struct imageection => struct imagesection
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-09-27 16:29:51 +02:00
Øyvind Harboe
22911a3aed
flash: fix error handling
...
sensible error must be reported at failure site
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-09-21 22:17:38 +02:00
Øyvind Harboe
9aafd42853
embeddedice: fix error handling
...
error is now reported at failure site.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com >
2010-09-21 22:17:38 +02:00