target: don't swap MMU/no-MMU work areas
commitc6ac97cf3b95ad5a9582ad6e6ea159d9d2aa9e1b
authorDavid Brownell <dbrownell@users.sourceforge.net>
Fri, 6 Nov 2009 23:10:26 +0000 (6 15:10 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Fri, 6 Nov 2009 23:10:26 +0000 (6 15:10 -0800)
tree6d991f54410143e442275ee9567ada9325108a27
parent7de1c892cd9c59f135ff5fbeb4c070fa6ec795b2
target: don't swap MMU/no-MMU work areas

Resolve serious bug inserted by the "target: require working
area for physical/virtual addresses to be specified" patch.
It forced use of (invalid) virtual addresses when the MMU
was disabled, and vice versa.

Observed to break at least Cortex-M3, ARM926, ARM7TDMI whenever
work areas are used, such as during bulk writes to flash, DDR2,
SRAM, and so on.

Also, fix overlong lines and whitespace goofs.

[ Backport from mainline a9abfa7d06dbcfded97b7fb41f50d3581c24fbae ]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/target.c