- convert spaces to tabs in at91sam7.[ch]
- add missing svn props git-svn-id: svn://svn.berlios.de/openocd/trunk@1009 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
c90c48b00b
commit
279affdb98
|
@ -85,7 +85,6 @@ flash_driver_t at91sam7_flash =
|
|||
.info = at91sam7_info
|
||||
};
|
||||
|
||||
|
||||
u32 MC_FMR[4] = { 0xFFFFFF60, 0xFFFFFF70, 0xFFFFFF80, 0xFFFFFF90 };
|
||||
u32 MC_FCR[4] = { 0xFFFFFF64, 0xFFFFFF74, 0xFFFFFF84, 0xFFFFFF94 };
|
||||
u32 MC_FSR[4] = { 0xFFFFFF68, 0xFFFFFF78, 0xFFFFFF88, 0xFFFFFF98 };
|
||||
|
@ -181,7 +180,7 @@ void at91sam7_read_clock_info(flash_bank_t *bank)
|
|||
at91sam7_info->mck_valid = 1;
|
||||
mainfreq = RC_FREQ / 16ul * (mcfr & 0xffff);
|
||||
/* Integer arithmetic should have sufficient precision
|
||||
as long as PLL is properly configured. */
|
||||
* as long as PLL is properly configured. */
|
||||
tmp = mainfreq / (pllr & CKGR_PLLR_DIV)*
|
||||
(((pllr & CKGR_PLLR_MUL) >> 16) + 1);
|
||||
}
|
||||
|
@ -320,7 +319,7 @@ int at91sam7_read_part_info(struct flash_bank_s *bank)
|
|||
|
||||
u16 bnk, sec;
|
||||
u16 arch;
|
||||
u32 cidr, status;
|
||||
u32 cidr;
|
||||
u8 banks_num;
|
||||
u16 num_nvmbits;
|
||||
u16 sectors_num;
|
||||
|
@ -629,8 +628,6 @@ int at91sam7_read_part_info(struct flash_bank_s *bank)
|
|||
|
||||
int at91sam7_erase_check(struct flash_bank_s *bank)
|
||||
{
|
||||
at91sam7_flash_bank_t *at91sam7_info = bank->driver_priv;
|
||||
|
||||
target_t *target = bank->target;
|
||||
u16 retval;
|
||||
u32 blank;
|
||||
|
@ -675,7 +672,6 @@ int at91sam7_erase_check(struct flash_bank_s *bank)
|
|||
buffer = malloc(bank->sectors[0].size);
|
||||
for (nSector=0; nSector<bank->num_sectors; nSector++)
|
||||
{
|
||||
|
||||
bank->sectors[nSector].is_erased = 1;
|
||||
retval = target->type->read_memory(target, bank->base+bank->sectors[nSector].offset, 4,
|
||||
bank->sectors[nSector].size/4, buffer);
|
||||
|
@ -971,7 +967,7 @@ int at91sam7_protect(struct flash_bank_s *bank, int set, int first, int last)
|
|||
cmd = CLB;
|
||||
|
||||
/* if we lock a page from one sector then entire sector will be locked, also,
|
||||
if we unlock a page from a locked sector, entire sector will be unlocked */
|
||||
* if we unlock a page from a locked sector, entire sector will be unlocked */
|
||||
pagen = sector * at91sam7_info->pages_per_sector;
|
||||
|
||||
if (at91sam7_flash_command(bank, cmd, pagen) != ERROR_OK)
|
||||
|
@ -1053,9 +1049,7 @@ int at91sam7_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
|
|||
int at91sam7_probe(struct flash_bank_s *bank)
|
||||
{
|
||||
/* we can't probe on an at91sam7
|
||||
* if this is an at91sam7, it has the configured flash
|
||||
*/
|
||||
at91sam7_flash_bank_t *at91sam7_info = bank->driver_priv;
|
||||
* if this is an at91sam7, it has the configured flash */
|
||||
int retval;
|
||||
|
||||
if (bank->target->state != TARGET_HALTED)
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "flash.h"
|
||||
#include "target.h"
|
||||
|
||||
|
||||
typedef struct at91sam7_flash_bank_s
|
||||
{
|
||||
/* chip id register */
|
||||
|
@ -58,8 +57,8 @@ typedef struct at91sam7_flash_bank_s
|
|||
u8 securitybit;
|
||||
|
||||
/* 0: not init
|
||||
1: fmcn for nvbits (1uS)
|
||||
2: fmcn for flash (1.5uS) */
|
||||
* 1: fmcn for nvbits (1uS)
|
||||
* 2: fmcn for flash (1.5uS) */
|
||||
u8 flashmode;
|
||||
|
||||
/* main clock status */
|
||||
|
|
|
@ -97,8 +97,6 @@ flash_driver_t *flash_drivers[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
|
||||
|
||||
flash_bank_t *flash_banks;
|
||||
static command_t *flash_cmd;
|
||||
|
||||
|
|
|
@ -563,11 +563,9 @@ int cortex_m3_resume(struct target_s *target, int current, u32 address, int hand
|
|||
if (debug_execution)
|
||||
{
|
||||
/* Disable interrupts */
|
||||
/*
|
||||
We disable interrupts in the PRIMASK register instead of masking with C_MASKINTS,
|
||||
This is probably the same inssue as Cortex-M3 Errata 377493:
|
||||
C_MASKINTS in parallel with disabled interrupts can cause local faults to not be taken.
|
||||
*/
|
||||
/* We disable interrupts in the PRIMASK register instead of masking with C_MASKINTS,
|
||||
* This is probably the same inssue as Cortex-M3 Errata 377493:
|
||||
* C_MASKINTS in parallel with disabled interrupts can cause local faults to not be taken. */
|
||||
buf_set_u32(armv7m->core_cache->reg_list[ARMV7M_PRIMASK].value, 0, 32, 1);
|
||||
/* Make sure we are in Thumb mode */
|
||||
buf_set_u32(armv7m->core_cache->reg_list[ARMV7M_xPSR].value, 0, 32,
|
||||
|
@ -765,7 +763,7 @@ int cortex_m3_assert_reset(target_t *target)
|
|||
|
||||
{
|
||||
/* I do not know why this is necessary, but it fixes strange effects
|
||||
(step/resume cause a NMI after reset) on LM3S6918 -- Michael Schwingen */
|
||||
* (step/resume cause a NMI after reset) on LM3S6918 -- Michael Schwingen */
|
||||
u32 tmp;
|
||||
ahbap_read_system_atomic_u32(swjdp, NVIC_AIRCR, &tmp );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue