xmc4xxx: Correct some flash sector layouts
I think this may have been a typo/thinko from first implementation, but for the 4200 the layout is 8 16KB chunks and then 1 128KB chunk. We were previously only writing 240KB Signed-off-by: Jonathan Steinert <hachi@kuiki.net> Change-Id: Ic3cff75ba21f6bc6ac440dfb30e24c328c7cd47c Reviewed-on: https://review.openocd.org/c/openocd/+/9172 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Karl Palsson <karlp@tweak.au> Tested-by: jenkins
This commit is contained in:
committed by
Antonio Borneo
parent
165e578d2b
commit
914b855780
@@ -231,12 +231,12 @@ struct xmc4xxx_command_seq {
|
||||
};
|
||||
|
||||
/* Sector capacities. See section 8 of xmc4x00_rm */
|
||||
static const unsigned int sector_capacity_8[8] = {
|
||||
16, 16, 16, 16, 16, 16, 16, 128
|
||||
static const unsigned int sector_capacity_9[9] = {
|
||||
16, 16, 16, 16, 16, 16, 16, 16, 128
|
||||
};
|
||||
|
||||
static const unsigned int sector_capacity_9[9] = {
|
||||
16, 16, 16, 16, 16, 16, 16, 128, 256
|
||||
static const unsigned int sector_capacity_10[10] = {
|
||||
16, 16, 16, 16, 16, 16, 16, 16, 128, 256
|
||||
};
|
||||
|
||||
static const unsigned int sector_capacity_12[12] = {
|
||||
@@ -272,12 +272,12 @@ static int xmc4xxx_load_bank_layout(struct flash_bank *bank)
|
||||
LOG_DEBUG("%u sectors", bank->num_sectors);
|
||||
|
||||
switch (bank->num_sectors) {
|
||||
case 8:
|
||||
capacity = sector_capacity_8;
|
||||
break;
|
||||
case 9:
|
||||
capacity = sector_capacity_9;
|
||||
break;
|
||||
case 10:
|
||||
capacity = sector_capacity_10;
|
||||
break;
|
||||
case 12:
|
||||
capacity = sector_capacity_12;
|
||||
break;
|
||||
@@ -361,11 +361,11 @@ static int xmc4xxx_probe(struct flash_bank *bank)
|
||||
* we understand the type of controller we're dealing with */
|
||||
switch (flash_id) {
|
||||
case FLASH_ID_XMC4100_4200:
|
||||
bank->num_sectors = 8;
|
||||
bank->num_sectors = 9;
|
||||
LOG_DEBUG("XMC4xxx: XMC4100/4200 detected.");
|
||||
break;
|
||||
case FLASH_ID_XMC4400:
|
||||
bank->num_sectors = 9;
|
||||
bank->num_sectors = 10;
|
||||
LOG_DEBUG("XMC4xxx: XMC4400 detected.");
|
||||
break;
|
||||
case FLASH_ID_XMC4500:
|
||||
|
||||
Reference in New Issue
Block a user