Antonio Borneo [Mon, 14 Jun 2010 04:31:13 +0000 (12:31 +0800)]
helper: remove helper membuf
Helper is now unused. Can be removed.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Mon, 14 Jun 2010 04:22:10 +0000 (12:22 +0800)]
nor/at91sam3: replace helper membuf
Helper ./src/helper/membuf.c is only used in at91sam3.c
1) Replace membuf with LOG_*
2) The original code in sam3_GetDetails() invalidates
all the buffered output of sam3_GetInfo(). The new
code skips sam3_GetInfo() if its output should not
be printed.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Øyvind Harboe [Wed, 16 Jun 2010 06:33:32 +0000 (08:33 +0200)]
build: enable -Wshadow by default
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 06:27:50 +0000 (08:27 +0200)]
gdb: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 06:24:51 +0000 (08:24 +0200)]
gdb: clean up error handling in step/continue
if step/continue fails, then the error should be
reported to the calling fn.
The calling fn decides if the connection has to be
aborted or if packet processing can continue.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 06:19:25 +0000 (08:19 +0200)]
xsvf: -Wshadow warning fixes
I think this fixed an error message where the error
message would show the *previous* uc code rather than
the current unsupported uc code.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 06:17:27 +0000 (08:17 +0200)]
svf: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 05:42:41 +0000 (07:42 +0200)]
mflash: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 05:41:43 +0000 (07:41 +0200)]
arm_io: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 16 Jun 2010 05:39:46 +0000 (07:39 +0200)]
nand: when verify failed, it didn't return an error
when the verify failed, it didn't return an error,
which breaks e.g. tcl scripts that rely on this for
exceptions to work.
Found by -Wshadow
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 22:08:58 +0000 (00:08 +0200)]
tms470: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 22:07:59 +0000 (00:07 +0200)]
str9xpec: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 22:05:58 +0000 (00:05 +0200)]
str9x: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 22:04:23 +0000 (00:04 +0200)]
oops... backup file snuck in, remove it.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 22:02:58 +0000 (00:02 +0200)]
str7x: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 22:00:57 +0000 (00:00 +0200)]
stm32x: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:59:21 +0000 (23:59 +0200)]
stellaris: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:58:19 +0000 (23:58 +0200)]
lpc2900: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:53:36 +0000 (23:53 +0200)]
lpc2000: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:32:47 +0000 (23:32 +0200)]
ecos flash: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:31:36 +0000 (23:31 +0200)]
at91sam7: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:29:08 +0000 (23:29 +0200)]
flash: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:27:08 +0000 (23:27 +0200)]
mips_ejtag: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:26:16 +0000 (23:26 +0200)]
mips32_pracc: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:25:32 +0000 (23:25 +0200)]
mips_m4k: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:24:47 +0000 (23:24 +0200)]
mips32: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:23:16 +0000 (23:23 +0200)]
cortex_a8: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:22:24 +0000 (23:22 +0200)]
arm11_dbgtap: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:20:00 +0000 (23:20 +0200)]
arm926ejs: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:18:44 +0000 (23:18 +0200)]
arm920t: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:17:00 +0000 (23:17 +0200)]
arm720t: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:15:50 +0000 (23:15 +0200)]
adi_v5_jtag: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:14:41 +0000 (23:14 +0200)]
arm_adi: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:14:20 +0000 (23:14 +0200)]
arm_simulator: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:09:12 +0000 (23:09 +0200)]
arm_dpm: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:07:45 +0000 (23:07 +0200)]
target: -Wshdaow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:04:22 +0000 (23:04 +0200)]
breakpoint: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:02:46 +0000 (23:02 +0200)]
zy1000: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 21:01:42 +0000 (23:01 +0200)]
fileio: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 15 Jun 2010 20:47:52 +0000 (22:47 +0200)]
jim: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 20:29:41 +0000 (22:29 +0200)]
jim: more jim -Wshadow fixes that should be straightforward
this bunch was a bit less obvious, but looked
straightforward.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 20:24:22 +0000 (22:24 +0200)]
jim: -Wshadow fixes
this batch of fixes should be pretty straightforward
rename of 'index' and an 'i' local variable shadowing.
'index' conflicts with a global name.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Thomas Koeller [Tue, 15 Jun 2010 08:37:05 +0000 (10:37 +0200)]
DM36x: pll & clock setup
Added a function 'pll_v03_setup' to set up PLLs and clock
dividers on DM365 and DM368.
Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
michal smulski [Mon, 14 Jun 2010 22:13:09 +0000 (15:13 -0700)]
arm1136 scripts
Here is a patch to fix a startup in C100 (arm1136). Basically make sure
that UART is configured before using it.
Michal
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 09:51:25 +0000 (11:51 +0200)]
-Wshadow fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 13:42:39 +0000 (15:42 +0200)]
cfi: add LOG_ERROR() in case of unsupported intel erase algorithm
found by code inspection. There are many other places in
CFI where LOG_ERROR() should be called similarly...
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 10:08:46 +0000 (12:08 +0200)]
flash: fix bug in error propagation of flash write_image
when a write/unlock/erase failed during write_image, then
an error was not propagated back up so e.g. flash write
image from tcl scripts would not throw an exception.
Also flash filling speed was printed even when the
operation failed. Output is now less confusing.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 10:10:35 +0000 (12:10 +0200)]
helper: fix -Wshadow warning in number parsing
use obtuse local variable names in macros to avoid
interfering with global name space
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 07:47:33 +0000 (09:47 +0200)]
cfi: fix gaffe introduced in previous version
flash probe broke w/in last commit.
ecc8041c0f4c30a7310c0f8414a5261ee7a090ca
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 14 Jun 2010 07:30:37 +0000 (09:30 +0200)]
target: fix retval gaffe in mwX commands
failure to write to memory was not propagated.
This is an interesting case of broken error handling:
with exceptions we wouldn't have had this at all,
and I also wonder if there is a GCC option to warn
about these kinds of potential bugs.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Antonio Borneo [Sat, 12 Jun 2010 10:35:06 +0000 (18:35 +0800)]
TARGET: removed unused parameters
Parameters "domain" and "ap" of function armv4_5_mmu_translate_va()
are not used.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 12 Jun 2010 03:58:50 +0000 (11:58 +0800)]
TARGET: removed unsed parameter
Parameter "type" of function armv4_5_mmu_translate_va()
is now not used.
Remove the parameter and the "enum" listing its values.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 12 Jun 2010 03:46:56 +0000 (11:46 +0800)]
TARGET: fix handling return code of MMU translation
Function armv4_5_mmu_translate_va() now properly signals
errors in the return value.
Remove former error handling by setting variable "type" to
value "-1".
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 12 Jun 2010 03:07:47 +0000 (11:07 +0800)]
TARGET/ARM920T: fix return value
Function arm920t_write_memory() default return value
should be ERROR_OK.
All cases of local errors are handled immediately and
not further propagated.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 12 Jun 2010 03:01:24 +0000 (11:01 +0800)]
TARGET/ARM920T: fix compile warning
Commit
0538081246fafbfb74d554bb1b758412534aa254
introduces a compile time warning:
arm920t.c: In function ‘arm920t_write_memory’:
arm920t.c:567: warning: ‘retval’ may be used uninitialized in this function
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Øyvind Harboe [Fri, 11 Jun 2010 06:10:39 +0000 (08:10 +0200)]
flash: add error handling to get_flash_by_addr/name
autoprobing can fail and this error has to be
reported up the call stack.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 10 Jun 2010 14:18:14 +0000 (16:18 +0200)]
arm mmu: error propagation added for address translation
The return value for MMU translation was a mess, either
error or value.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 10 Jun 2010 13:27:35 +0000 (15:27 +0200)]
cfi: fix error propagation
any read/write operation to memory can fail.
block write algorithm error propagation was broken
in that it would continue after an error was reported
writing data to ram or the algorithm failing.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Thomas Koeller [Thu, 10 Jun 2010 14:54:25 +0000 (16:54 +0200)]
jtag: added mising header
Distributions created by 'make dist' were incomplete due to a
missing header file.
Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Øyvind Harboe [Wed, 9 Jun 2010 15:12:52 +0000 (17:12 +0200)]
flash: add error message if image is too big for flash
replaced assert() w/error message if the image is
too big.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 9 Jun 2010 14:01:10 +0000 (16:01 +0200)]
flash: flash erase_address takes unsigned arguments
fixed bug where address was parsed as a signed, rather
than unsigned it.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 7 Jun 2010 14:14:51 +0000 (16:14 +0200)]
zy1000: fix optimisation gaffe
DCC optimisation was broken on targets w/multiple TAP's.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 6 May 2010 11:37:56 +0000 (13:37 +0200)]
zy1000: added watchdog server
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 5 May 2010 14:18:50 +0000 (16:18 +0200)]
cfi: fix GDB keep alive bug
Long running CFI writes could cause GDB timeout.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 5 May 2010 17:00:21 +0000 (19:00 +0200)]
verify: display up to 128 diff's
Showing up to 128 differences.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 7 Jun 2010 13:14:04 +0000 (15:14 +0200)]
gdb-server: fix error reporting bugs
GDB and OpenOCD has two different error number
spaces and no mapping exists between them.
If a specific error number is to be reported
to GDB then this has to be done at the calling
site, rather than as a generic routine that
tries to map "retval" to GDB error number speak.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Sat, 5 Jun 2010 09:30:49 +0000 (11:30 +0200)]
jtag: rename JTAG_MOVESTATE to JTAG_TLR_RESET
JTAG_MOVESTATE is misleading, this cmd is only used
for reset.
JTAG_PATHMOVE should be used otherwise.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
gcembed [Tue, 1 Jun 2010 11:48:22 +0000 (13:48 +0200)]
stm32 : change returned value of mass_erase function
Hello,
"stm32x mass_erase" return ERROR_OK even if something goes wrong.
Here is a summary of changes :
* in stm32x_mass_erase : return ERROR_FLASH_OPERATION_FAILED when error
detected in FLASH_SR register;
* in COMMAND_HANDLER(stm32x_handle_mass_erase_command) : return the
returned value of stm32x_mass_erase().
I don't know if there is reason to always return ERROR_OK ?
Gaëtan
Spencer Oliver [Thu, 3 Jun 2010 09:20:06 +0000 (10:20 +0100)]
NEWS: updates
Add new features since 0.4.0 release.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Jon Povey [Mon, 31 May 2010 02:56:42 +0000 (11:56 +0900)]
etm: print something when trace buffer empty
ETM analyze produced no output when the trace buffer was empty.
This patch provides users with a clue.
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Spencer Oliver [Sat, 29 May 2010 14:43:42 +0000 (15:43 +0100)]
nor: fix memory leaks during probe
Fix similar memory leaks as per commit:
ef72484b785ec7462a0415afea679d08b864c7fb
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Mon, 24 May 2010 11:32:58 +0000 (12:32 +0100)]
flash: virtual driver update for get_flash_bank_by_name_noprobe
Make sure we do not probe a flash when getting info.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Mon, 24 May 2010 11:30:29 +0000 (12:30 +0100)]
nor: add get_flash_bank_by_name autoprobe
When a flash cmd is called using the flash name the autoprobe
function is not called. autoprobe is called if flash_command_get_bank
falls through to get_flash_bank_by_num.
This makes both get_flash_bank_by_name and get_flash_bank_by_num
behave the same.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Mon, 24 May 2010 10:43:09 +0000 (11:43 +0100)]
cfg: add pic32 virtual banks
make use of the new virtual bank flash driver.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Mon, 24 May 2010 10:41:50 +0000 (11:41 +0100)]
flash: add virtual flash bank driver
This adds a virtual flash bank driver that allows virtual banks to
be defined that refer to an existing flash bank.
For example the real address for bank0 on the pic32 is 0x1fc00000
but the user program will either be in kseg0 (0xbfc00000) or
kseg1 (0x9fc00000).
This also means that gdb will be aware of all the read only flash
addresses.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Antonio Borneo [Wed, 26 May 2010 02:04:03 +0000 (10:04 +0800)]
NOR/CFI: fix memory leak; check malloc return value
Every time command "flash probe #" is executed, memory
structures are re-allocated without preventive free()
of former areas, causing memory leak.
Also, memory allocation does not check return value,
determining segmentation fault in case of out of memory.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Freddie Chopin [Sat, 22 May 2010 07:51:07 +0000 (09:51 +0200)]
There are no variants of arm7tdmi target
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Freddie Chopin [Fri, 21 May 2010 16:02:58 +0000 (18:02 +0200)]
All LPC2xxx chips are little endian and that cannot be changed - update config scripts
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Freddie Chopin [Fri, 21 May 2010 15:57:10 +0000 (17:57 +0200)]
add correct CPUTAPID value for LPC2129
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Freddie Chopin [Fri, 21 May 2010 15:52:25 +0000 (17:52 +0200)]
Update "flash bank" helper comments for LPC2xxx chips
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Freddie Chopin [Fri, 21 May 2010 15:46:40 +0000 (17:46 +0200)]
LPC23xx and LPC24xx after reset run on internal 4MHz RC oscillator, so "flash bank" parameter should be 4000 (not 12000)
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Øyvind Harboe [Fri, 21 May 2010 11:56:05 +0000 (13:56 +0200)]
at91sam9260: use RCLK
It might be possible to get this target going without
RCLK, but it would require more careful analysis and
usage of the reset events.
Enable fast memory accesses.
Tested on an at91sam9260 custom board w/external DRAM
and flash.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Spencer Oliver [Fri, 21 May 2010 10:45:40 +0000 (11:45 +0100)]
cfg: update stm32 performance stick config
- As this is a complete unit, including jtag we might as welli nclude
the jtag cfg.
- Add missing id for the str750 that is also in the jtag chain.
- Reduce jtag startup speed to 500kHz.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Fri, 21 May 2010 10:43:17 +0000 (11:43 +0100)]
arm_adi_v5: correct ahbap_debugport_init mem-ap id (bug #23)
We request a id register read at the end of ahbap_debugport_init
but we never actually run the queue. In some cases this causes a
segfault.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Jon Povey [Fri, 21 May 2010 03:34:46 +0000 (12:34 +0900)]
board: dm355evm.cfg SDTIMR0/1 minor naming fix
Register name fix; ref. TI document sprueh7d
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
gcembed [Thu, 20 May 2010 06:25:09 +0000 (08:25 +0200)]
nand : Add Freescale iMX27 nand flash controller support
This patch add support of iMX27 nand flash controller. This is based on
driver for imx31 nand flash controller.
OOB functionality is not fully working. As in mx31 controller, mx2 NFC
has a bug that swap two bytes between SPARE and MAIN buffer.
I used this driver for several months and no problems appear.
Gary Carlson [Wed, 19 May 2010 03:59:07 +0000 (20:59 -0700)]
reset: fix reset halt bug
I was finally able to figure out the cause of this problem. There are two
parts to the patch. The first patch modifies the configuration file I
originally generated for the Atmel AT91SAM9G20 board and achieves the
following:
+++ Splits the reset-init handler into a reset-start handler for some of the
initial configuration activities and keeps the remainder in the reset-init
handler as was the case before. This was the real issue that was causing
the timing problems I identified before. This solution was confirmed with
an o-scope on actual target hardware.
+++ Adds a new instruction in the reset-start handler to disable fast memory
accesses in the reset-start handler. When the target jtag clock is started
out at 2 kHz during system clock initialization, memory writes (i.e.
register write to enable external reset pin -- basically to RSTC_MR) are
naturally slow and cause GDB keep-alive issues (refer to PATCH 2/2 for
additional fixes).
+++ Modifies the configuration file to use srst_only reset action. The
reset-start/reset-init handler split also now allows the correct behavior to
be used in the configuration file (previously had to use both SRST and TRST
even though only SRST is actually used and connected on the evaluation
board).
+++ Adds external NandFlash configuration support to take advantage of flash
driver added earlier. Doesn't fix any bugs but adds functionality that was
marked as TBD before and thrown in when I did other work on the
configuration file.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Gary Carlson [Wed, 19 May 2010 03:59:00 +0000 (20:59 -0700)]
target: slow targets could cause GDB to time out
This second half of the patch is proposed to clean up some GDB keep alive
issues on arm7_9 targets that start up with very slow clocks. If an attempt
is made to write to key registers on the processor with a slow jtag speed,
GDB timeout warnings appear on the console (at least mine) when "reset halt"
or "reset init" commands are issued from the gdb client:
*** BEFORE PATCH ***
(gdb) monitor reset init
fast memory access is disabled
2 kHz
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not
sent! (1026). Workaround: increase "set remotetimeout" in GDB
JTAG tap: at91sam9g20.cpu tap/device found: 0x0792603f (mfg: 0x01f, part:
0x7926, ver: 0x0)
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not
sent! (1027). Workaround: increase "set remotetimeout" in GDB
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not
sent! (1006). Workaround: increase "set remotetimeout" in GDB
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not
sent! (1006). Workaround: increase "set remotetimeout" in GDB
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not
sent! (1006). Workaround: increase "set remotetimeout" in GDB
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not
sent! (1004). Workaround: increase "set remotetimeout" in GDB
RCLK - adaptive
dcc downloads are enabled
fast memory access is enabled
NAND flash device 'NAND 256MiB 3,3V 8-bit' found
(gdb)
I added additional keep alive steps in areas that troubleshooting revealed
were causing problems. I only did this however for non-fast write memory
accesses. I don't think most people would be using fast memory accesses to
write to memory when the jtag and system clocks are slow anyway.
If you disagree with my feeling, think there is a more elegant way to handle
the problem, or think the patch will cause other unforeseen problems with
other targets, let me know. As you can see below, the patch does eliminate
the problem on my development station and I suspect that it will benefit
others.
*** AFTER PATCH ***
(gdb) monitor reset init
fast memory access is disabled
2 kHz
JTAG tap: at91sam9g20.cpu tap/device found: 0x0792603f (mfg: 0x01f, part:
0x7926, ver: 0x0)
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
RCLK - adaptive
dcc downloads are enabled
fast memory access is enabled
NAND flash device 'NAND 256MiB 3,3V 8-bit' found
(gdb)
Gary Carlson
Gary Carlson, MSEE
Principal Engineer
Carlson-Minot Inc.
Øyvind Harboe [Tue, 18 May 2010 10:34:12 +0000 (12:34 +0200)]
jim: fix bug in tcl "puts"
tcl "puts" didn't work because the logging code sensored strings
that did not include a '\n'. The correct thing is to sensor
empty strings, which are used to keep gdb connection alive.
The tcl "puts" code broke apart strings which do contain '\n' in
order to implement the -nonewline argument, which is how it
got hurt by the bug in log.c
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 18 May 2010 10:10:24 +0000 (12:10 +0200)]
zy1000: fix false positive warning about unitialized local variable
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Marc Pignat [Tue, 18 May 2010 09:38:01 +0000 (11:38 +0200)]
at91rm9200 : reset_config should go to the board config file
Let other boards do other things with srst and trst.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Jon Povey [Mon, 17 May 2010 07:16:22 +0000 (16:16 +0900)]
NAND/davinci: Fix segfault for hwecc4_infix reads
Page reads using hwecc4_infix layout segfaulted for check_bad_blocks because
the read assumed a valid data buffer, which check_bad_blocks does not use
(it only passes a 6 byte buffer for the start of OOB).
This version copes with undersized or missing data or oob buffers and uses
random read commands within the page to skip unwanted areas of data/OOB for
speed.
NOTE: Running check_bad_blocks with this layout will be reading infix
OOB locations, not manufacturer bad block markers. This means that if you
check blocks written in infix layout they will appear good, but manufacturer-
marked bad blocks may also appear good.
If you want to scan for manufactuer-marked bad blocks, you need to enable
raw_access before running check_bad_blocks, or use the non-infix layout.
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
CC: David Brownell <dbrownell@users.sourceforge.net>
Jon Povey [Mon, 17 May 2010 07:15:35 +0000 (16:15 +0900)]
NAND: catch read errors when building BBT
nand_build_bbt() was ignoring the return value from nand_read_page() and
blindly continuing.
It now passes the return value up to the caller if the read fails.
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Spencer Oliver [Mon, 17 May 2010 09:17:21 +0000 (10:17 +0100)]
gdbserver: gdb cmds returning failure on success
The gdb_memory_map cmd for example fell through and returned
ERROR_COMMAND_SYNTAX_ERROR on success - behaviour is now as expected.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Jon Povey [Thu, 13 May 2010 03:20:20 +0000 (12:20 +0900)]
Change kb/s to KiB/s in messages about kibibytes
Change download rate messages about kibibytes from "kb/s" to "KiB/s" units.
See: http://en.wikipedia.org/wiki/Data_rate_units
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Antonio Borneo [Tue, 11 May 2010 03:48:09 +0000 (11:48 +0800)]
NOR/CFI: minor code cleanup
Remove few LOG_DEBUG() messages, together with code and
variables required to build such messages.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Tue, 11 May 2010 03:35:28 +0000 (11:35 +0800)]
NOR/CFI: add cfi_read() implementation
Final step to force bus_width size during CFI flash
read.
Added CFI specific implementation cfi_read() that uses
only accesses at bus_width size.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Tue, 11 May 2010 03:16:33 +0000 (11:16 +0800)]
NOR: add read() callback to struct flash_driver
Final target is to force bus_width size during CFI flash
read.
In this first step I need to replace default flash read
with flash specific implementation.
This patch introduces:
- flash_driver_read() layer;
- default_flash_read(), backward compatible;
- read() callback in struct flash_driver;
- proper initialization in every flash_driver instance.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Mon, 10 May 2010 09:07:28 +0000 (17:07 +0800)]
NOR/TCL: fix typo in error message
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 7 May 2010 09:04:32 +0000 (17:04 +0800)]
NOR: fix comment for Doxygen
Either bus_width and chip_width are in bytes.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>