case 256 * 1024:
bank->num_sectors = 15;
break;
- case 512 * 1024:
case 500 * 1024:
bank->num_sectors = 27;
break;
+ case 512 * 1024:
+ case 504 * 1024:
+ bank->num_sectors = 28;
+ break;
default:
LOG_ERROR("BUG: unknown bank->size encountered");
exit(-1);
for (i = 0; i < bank->num_sectors; i++)
{
- if ((i >= 0) && (i < 8))
+ if (i < 8)
{
bank->sectors[i].offset = offset;
bank->sectors[i].size = 4 * 1024;
bank->sectors[i].is_erased = -1;
bank->sectors[i].is_protected = 1;
}
- if ((i >= 8) && (i < 22))
+ else if (i < 22)
{
bank->sectors[i].offset = offset;
bank->sectors[i].size = 32 * 1024;
bank->sectors[i].is_erased = -1;
bank->sectors[i].is_protected = 1;
}
- if ((i >= 22) && (i < 27))
+ else if (i < 28)
{
bank->sectors[i].offset = offset;
bank->sectors[i].size = 4 * 1024;