/* Flash controller configuration values */
#define FLASH_ID_XMC4500 0xA2
+#define FLASH_ID_XMC4700_4800 0x92
#define FLASH_ID_XMC4100_4200 0x9C
#define FLASH_ID_XMC4400 0x9F
};
/* Sector capacities. See section 8 of xmc4x00_rm */
-static unsigned int sector_capacity_8[] = {
+static const unsigned int sector_capacity_8[8] = {
16, 16, 16, 16, 16, 16, 16, 128
};
-static unsigned int sector_capacity_9[] = {
+static const unsigned int sector_capacity_9[9] = {
16, 16, 16, 16, 16, 16, 16, 128, 256
};
-static unsigned int sector_capacity_12[] = {
+static const unsigned int sector_capacity_12[12] = {
16, 16, 16, 16, 16, 16, 16, 16, 128, 256, 256, 256
};
+static const unsigned int sector_capacity_16[16] = {
+ 16, 16, 16, 16, 16, 16, 16, 16, 128, 256, 256, 256, 256, 256, 256, 256
+};
+
static int xmc4xxx_write_command_sequence(struct flash_bank *bank,
struct xmc4xxx_command_seq *seq,
int seq_len)
static int xmc4xxx_load_bank_layout(struct flash_bank *bank)
{
- unsigned int *capacity = NULL;
+ const unsigned int *capacity = NULL;
/* At this point, we know which flash controller ID we're
* talking to and simply need to fill out the bank structure accordingly */
case 12:
capacity = sector_capacity_12;
break;
+ case 16:
+ capacity = sector_capacity_16;
+ break;
default:
LOG_ERROR("Unexpected number of sectors, %d\n",
bank->num_sectors);
bank->num_sectors = 12;
LOG_DEBUG("XMC4xxx: XMC4500 detected.");
break;
+ case FLASH_ID_XMC4700_4800:
+ bank->num_sectors = 16;
+ LOG_DEBUG("XMC4xxx: XMC4700/4800 detected.");
+ break;
default:
LOG_ERROR("XMC4xxx: Unexpected flash ID. got %02" PRIx8,
flash_id);
break;
}
break;
+ case 0x700:
+ dev_str = "XMC4700";
+
+ switch (rev_id) {
+ case 0x1:
+ rev_str = "EES-AA";
+ break;
+ }
+ break;
+ case 0x800:
+ dev_str = "XMC4800";
+
+ switch (rev_id) {
+ case 0x1:
+ rev_str = "EES-AA";
+ break;
+ }
+ break;
default:
snprintf(buf, buf_size,