- added support for AT91SAM7A3 flash (patch from andre renaud, thanks)

- fix trunk build for mac os x (patch from Lauri Leukkunen, thanks)
- added check for host endianness, defines WORDS_BIGENDIAN on a big-endian host (e.g. mac os-x)
- fixed bug where endianness of memory accesses could be swapped on BE hosts
- added space for zero termination of ftd2xx_layout string (from Magnus Ludin, tahnks)


git-svn-id: svn://svn.berlios.de/openocd/trunk@73 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
drath
2006-06-23 07:54:01 +00:00
parent 1f76f69999
commit ef139a3a5e
9 changed files with 137 additions and 30 deletions

View File

@@ -244,7 +244,8 @@ int at91sam7_read_part_info(struct flash_bank_s *bank)
at91sam7_info->lockbits = status>>16;
at91sam7_info->securitybit = (status>>4)&0x01;
if (at91sam7_info->cidr_arch == 0x70 ) {
if (at91sam7_info->cidr_arch == 0x70 )
{
at91sam7_info->num_nvmbits = 2;
at91sam7_info->nvmbits = (status>>8)&0x03;
bank->base = 0x100000;
@@ -281,7 +282,8 @@ int at91sam7_read_part_info(struct flash_bank_s *bank)
return ERROR_OK;
}
if (at91sam7_info->cidr_arch == 0x71 ) {
if (at91sam7_info->cidr_arch == 0x71 )
{
at91sam7_info->num_nvmbits = 2;
at91sam7_info->nvmbits = (status>>8)&0x03;
bank->base = 0x100000;
@@ -304,7 +306,8 @@ int at91sam7_read_part_info(struct flash_bank_s *bank)
return ERROR_OK;
}
if (at91sam7_info->cidr_arch == 0x75 ) {
if (at91sam7_info->cidr_arch == 0x75 )
{
at91sam7_info->num_nvmbits = 3;
at91sam7_info->nvmbits = (status>>8)&0x07;
bank->base = 0x100000;
@@ -327,11 +330,26 @@ int at91sam7_read_part_info(struct flash_bank_s *bank)
return ERROR_OK;
}
if (at91sam7_info->cidr_arch != 0x70 )
if (at91sam7_info->cidr_arch == 0x60 )
{
WARNING("at91sam7 flash only tested for AT91SAM7Sxx series");
at91sam7_info->num_nvmbits = 3;
at91sam7_info->nvmbits = (status>>8)&0x07;
bank->base = 0x100000;
bank->bus_width = 4;
if (bank->size == 0x40000) /* AT91SAM7A3 */
{
at91sam7_info->num_lockbits = 16;
at91sam7_info->pagesize = 256;
at91sam7_info->pages_in_lockregion = 64;
at91sam7_info->num_pages = 16*64;
}
return ERROR_OK;
}
return ERROR_OK;
WARNING("at91sam7 flash only tested for AT91SAM7Sxx series");
return ERROR_OK;
}
int at91sam7_erase_check(struct flash_bank_s *bank)
@@ -377,7 +395,7 @@ int at91sam7_protect_check(struct flash_bank_s *bank)
int at91sam7_register_commands(struct command_context_s *cmd_ctx)
{
command_t *at91sam7_cmd = register_command(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, NULL);
command_t *at91sam7_cmd = register_command(cmd_ctx, NULL, "at91sam7", NULL, COMMAND_ANY, "at91sam7 specific commands");
return ERROR_OK;
}