Commit 5d3cce3b authored by David Woodhouse's avatar David Woodhouse

[MTD] [NOR] Clean up jedec_probe, remove unlock address arrays

This should have no functional effects -- we've been ignoring all but
the first address in the array for a long time, and using it only to
indicate which device types are supported.
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent ce37ab42
...@@ -194,8 +194,8 @@ enum uaddr { ...@@ -194,8 +194,8 @@ enum uaddr {
struct unlock_addr { struct unlock_addr {
u32 addr1; uint32_t addr1;
u32 addr2; uint32_t addr2;
}; };
...@@ -246,16 +246,16 @@ static const struct unlock_addr unlock_addrs[] = { ...@@ -246,16 +246,16 @@ static const struct unlock_addr unlock_addrs[] = {
} }
}; };
struct amd_flash_info { struct amd_flash_info {
const __u16 mfr_id;
const __u16 dev_id;
const char *name; const char *name;
const int DevSize; const uint16_t mfr_id;
const int NumEraseRegions; const uint16_t dev_id;
const int CmdSet; const uint8_t dev_size;
const __u8 uaddr[4]; /* unlock addrs for 8, 16, 32, 64 */ const uint8_t nr_regions;
const ulong regions[6]; const uint16_t cmd_set;
const uint32_t regions[6];
const uint8_t devtypes; /* Bitmask for x8, x16 etc. */
const uint8_t uaddr; /* unlock addrs for 8, 16, 32, 64 */
}; };
#define ERASEINFO(size,blocks) (size<<8)|(blocks-1) #define ERASEINFO(size,blocks) (size<<8)|(blocks-1)
...@@ -280,12 +280,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -280,12 +280,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F032B, .dev_id = AM29F032B,
.name = "AMD AM29F032B", .name = "AMD AM29F032B",
.uaddr = { .uaddr = MTD_UADDR_0x0555_0x02AA,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .devtypes = CFI_DEVICETYPE_X8,
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,64) ERASEINFO(0x10000,64)
} }
...@@ -293,13 +292,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -293,13 +292,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV160DT, .dev_id = AM29LV160DT,
.name = "AMD AM29LV160DT", .name = "AMD AM29LV160DT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,31), ERASEINFO(0x10000,31),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -310,13 +308,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -310,13 +308,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV160DB, .dev_id = AM29LV160DB,
.name = "AMD AM29LV160DB", .name = "AMD AM29LV160DB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -327,13 +324,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -327,13 +324,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV400BB, .dev_id = AM29LV400BB,
.name = "AMD AM29LV400BB", .name = "AMD AM29LV400BB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -344,13 +340,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -344,13 +340,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV400BT, .dev_id = AM29LV400BT,
.name = "AMD AM29LV400BT", .name = "AMD AM29LV400BT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,7), ERASEINFO(0x10000,7),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -361,13 +356,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -361,13 +356,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV800BB, .dev_id = AM29LV800BB,
.name = "AMD AM29LV800BB", .name = "AMD AM29LV800BB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -379,13 +373,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -379,13 +373,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29DL800BB, .dev_id = AM29DL800BB,
.name = "AMD AM29DL800BB", .name = "AMD AM29DL800BB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 6,
.NumEraseRegions= 6,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -398,13 +391,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -398,13 +391,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29DL800BT, .dev_id = AM29DL800BT,
.name = "AMD AM29DL800BT", .name = "AMD AM29DL800BT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 6,
.NumEraseRegions= 6,
.regions = { .regions = {
ERASEINFO(0x10000,14), ERASEINFO(0x10000,14),
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
...@@ -417,13 +409,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -417,13 +409,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F800BB, .dev_id = AM29F800BB,
.name = "AMD AM29F800BB", .name = "AMD AM29F800BB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -434,13 +425,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -434,13 +425,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV800BT, .dev_id = AM29LV800BT,
.name = "AMD AM29LV800BT", .name = "AMD AM29LV800BT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,15), ERASEINFO(0x10000,15),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -451,13 +441,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -451,13 +441,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F800BT, .dev_id = AM29F800BT,
.name = "AMD AM29F800BT", .name = "AMD AM29F800BT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,15), ERASEINFO(0x10000,15),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -468,12 +457,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -468,12 +457,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F017D, .dev_id = AM29F017D,
.name = "AMD AM29F017D", .name = "AMD AM29F017D",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_DONT_CARE /* x8 */ .uaddr = MTD_UADDR_DONT_CARE,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,32), ERASEINFO(0x10000,32),
} }
...@@ -481,12 +469,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -481,12 +469,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F016D, .dev_id = AM29F016D,
.name = "AMD AM29F016D", .name = "AMD AM29F016D",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,32), ERASEINFO(0x10000,32),
} }
...@@ -494,12 +481,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -494,12 +481,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F080, .dev_id = AM29F080,
.name = "AMD AM29F080", .name = "AMD AM29F080",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,16), ERASEINFO(0x10000,16),
} }
...@@ -507,12 +493,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -507,12 +493,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F040, .dev_id = AM29F040,
.name = "AMD AM29F040", .name = "AMD AM29F040",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -520,12 +505,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -520,12 +505,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29LV040B, .dev_id = AM29LV040B,
.name = "AMD AM29LV040B", .name = "AMD AM29LV040B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -533,12 +517,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -533,12 +517,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_AMD, .mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F002T, .dev_id = AM29F002T,
.name = "AMD AM29F002T", .name = "AMD AM29F002T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,3), ERASEINFO(0x10000,3),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -549,12 +532,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -549,12 +532,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ATMEL, .mfr_id = MANUFACTURER_ATMEL,
.dev_id = AT49BV512, .dev_id = AT49BV512,
.name = "Atmel AT49BV512", .name = "Atmel AT49BV512",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_64KiB,
.DevSize = SIZE_64KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,1) ERASEINFO(0x10000,1)
} }
...@@ -562,12 +544,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -562,12 +544,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ATMEL, .mfr_id = MANUFACTURER_ATMEL,
.dev_id = AT29LV512, .dev_id = AT29LV512,
.name = "Atmel AT29LV512", .name = "Atmel AT29LV512",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_64KiB,
.DevSize = SIZE_64KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x80,256), ERASEINFO(0x80,256),
ERASEINFO(0x80,256) ERASEINFO(0x80,256)
...@@ -576,13 +557,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -576,13 +557,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ATMEL, .mfr_id = MANUFACTURER_ATMEL,
.dev_id = AT49BV16X, .dev_id = AT49BV16X,
.name = "Atmel AT49BV16X", .name = "Atmel AT49BV16X",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x0AAA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x0AAA,
[1] = MTD_UADDR_0x0555_0x0AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x0AAA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000,8), ERASEINFO(0x02000,8),
ERASEINFO(0x10000,31) ERASEINFO(0x10000,31)
...@@ -591,13 +571,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -591,13 +571,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ATMEL, .mfr_id = MANUFACTURER_ATMEL,
.dev_id = AT49BV16XT, .dev_id = AT49BV16XT,
.name = "Atmel AT49BV16XT", .name = "Atmel AT49BV16XT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x0AAA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x0AAA,
[1] = MTD_UADDR_0x0555_0x0AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x0AAA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000,31), ERASEINFO(0x10000,31),
ERASEINFO(0x02000,8) ERASEINFO(0x02000,8)
...@@ -606,13 +585,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -606,13 +585,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ATMEL, .mfr_id = MANUFACTURER_ATMEL,
.dev_id = AT49BV32X, .dev_id = AT49BV32X,
.name = "Atmel AT49BV32X", .name = "Atmel AT49BV32X",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x0AAA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x0AAA,
[1] = MTD_UADDR_0x0555_0x0AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x0AAA ? */
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000,8), ERASEINFO(0x02000,8),
ERASEINFO(0x10000,63) ERASEINFO(0x10000,63)
...@@ -621,13 +599,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -621,13 +599,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ATMEL, .mfr_id = MANUFACTURER_ATMEL,
.dev_id = AT49BV32XT, .dev_id = AT49BV32XT,
.name = "Atmel AT49BV32XT", .name = "Atmel AT49BV32XT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x0AAA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x0AAA,
[1] = MTD_UADDR_0x0555_0x0AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x0AAA ? */
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000,63), ERASEINFO(0x10000,63),
ERASEINFO(0x02000,8) ERASEINFO(0x02000,8)
...@@ -636,12 +613,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -636,12 +613,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29F040C, .dev_id = MBM29F040C,
.name = "Fujitsu MBM29F040C", .name = "Fujitsu MBM29F040C",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8) ERASEINFO(0x10000,8)
} }
...@@ -649,13 +625,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -649,13 +625,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29F800BA, .dev_id = MBM29F800BA,
.name = "Fujitsu MBM29F800BA", .name = "Fujitsu MBM29F800BA",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -666,12 +641,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -666,12 +641,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV650UE, .dev_id = MBM29LV650UE,
.name = "Fujitsu MBM29LV650UE", .name = "Fujitsu MBM29LV650UE",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_DONT_CARE /* x16 */ .uaddr = MTD_UADDR_DONT_CARE,
}, .dev_size = SIZE_8MiB,
.DevSize = SIZE_8MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,128) ERASEINFO(0x10000,128)
} }
...@@ -679,13 +653,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -679,13 +653,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV320TE, .dev_id = MBM29LV320TE,
.name = "Fujitsu MBM29LV320TE", .name = "Fujitsu MBM29LV320TE",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000,63), ERASEINFO(0x10000,63),
ERASEINFO(0x02000,8) ERASEINFO(0x02000,8)
...@@ -694,13 +667,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -694,13 +667,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV320BE, .dev_id = MBM29LV320BE,
.name = "Fujitsu MBM29LV320BE", .name = "Fujitsu MBM29LV320BE",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000,8), ERASEINFO(0x02000,8),
ERASEINFO(0x10000,63) ERASEINFO(0x10000,63)
...@@ -709,13 +681,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -709,13 +681,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV160TE, .dev_id = MBM29LV160TE,
.name = "Fujitsu MBM29LV160TE", .name = "Fujitsu MBM29LV160TE",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,31), ERASEINFO(0x10000,31),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -726,13 +697,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -726,13 +697,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV160BE, .dev_id = MBM29LV160BE,
.name = "Fujitsu MBM29LV160BE", .name = "Fujitsu MBM29LV160BE",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -743,13 +713,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -743,13 +713,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV800BA, .dev_id = MBM29LV800BA,
.name = "Fujitsu MBM29LV800BA", .name = "Fujitsu MBM29LV800BA",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -760,13 +729,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -760,13 +729,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV800TA, .dev_id = MBM29LV800TA,
.name = "Fujitsu MBM29LV800TA", .name = "Fujitsu MBM29LV800TA",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,15), ERASEINFO(0x10000,15),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -777,13 +745,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -777,13 +745,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV400BC, .dev_id = MBM29LV400BC,
.name = "Fujitsu MBM29LV400BC", .name = "Fujitsu MBM29LV400BC",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -794,13 +761,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -794,13 +761,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_FUJITSU, .mfr_id = MANUFACTURER_FUJITSU,
.dev_id = MBM29LV400TC, .dev_id = MBM29LV400TC,
.name = "Fujitsu MBM29LV400TC", .name = "Fujitsu MBM29LV400TC",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,7), ERASEINFO(0x10000,7),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -811,12 +777,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -811,12 +777,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_HYUNDAI, .mfr_id = MANUFACTURER_HYUNDAI,
.dev_id = HY29F002T, .dev_id = HY29F002T,
.name = "Hyundai HY29F002T", .name = "Hyundai HY29F002T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,3), ERASEINFO(0x10000,3),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -827,12 +792,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -827,12 +792,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F004B3B, .dev_id = I28F004B3B,
.name = "Intel 28F004B3B", .name = "Intel 28F004B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 7), ERASEINFO(0x10000, 7),
...@@ -841,12 +805,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -841,12 +805,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F004B3T, .dev_id = I28F004B3T,
.name = "Intel 28F004B3T", .name = "Intel 28F004B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 7), ERASEINFO(0x10000, 7),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -855,13 +818,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -855,13 +818,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F400B3B, .dev_id = I28F400B3B,
.name = "Intel 28F400B3B", .name = "Intel 28F400B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ /* XX: Maybe MTD_UADDR_UNNECESSARY ? */
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 7), ERASEINFO(0x10000, 7),
...@@ -870,13 +832,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -870,13 +832,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F400B3T, .dev_id = I28F400B3T,
.name = "Intel 28F400B3T", .name = "Intel 28F400B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ /* XX: Maybe MTD_UADDR_UNNECESSARY ? */
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 7), ERASEINFO(0x10000, 7),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -885,12 +846,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -885,12 +846,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F008B3B, .dev_id = I28F008B3B,
.name = "Intel 28F008B3B", .name = "Intel 28F008B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 15), ERASEINFO(0x10000, 15),
...@@ -899,12 +859,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -899,12 +859,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F008B3T, .dev_id = I28F008B3T,
.name = "Intel 28F008B3T", .name = "Intel 28F008B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 15), ERASEINFO(0x10000, 15),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -913,12 +872,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -913,12 +872,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F008S5, .dev_id = I28F008S5,
.name = "Intel 28F008S5", .name = "Intel 28F008S5",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,16), ERASEINFO(0x10000,16),
} }
...@@ -926,12 +884,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -926,12 +884,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F016S5, .dev_id = I28F016S5,
.name = "Intel 28F016S5", .name = "Intel 28F016S5",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,32), ERASEINFO(0x10000,32),
} }
...@@ -939,12 +896,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -939,12 +896,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F008SA, .dev_id = I28F008SA,
.name = "Intel 28F008SA", .name = "Intel 28F008SA",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000, 16), ERASEINFO(0x10000, 16),
} }
...@@ -952,12 +908,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -952,12 +908,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F800B3B, .dev_id = I28F800B3B,
.name = "Intel 28F800B3B", .name = "Intel 28F800B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 15), ERASEINFO(0x10000, 15),
...@@ -966,12 +921,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -966,12 +921,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F800B3T, .dev_id = I28F800B3T,
.name = "Intel 28F800B3T", .name = "Intel 28F800B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 15), ERASEINFO(0x10000, 15),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -980,12 +934,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -980,12 +934,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F016B3B, .dev_id = I28F016B3B,
.name = "Intel 28F016B3B", .name = "Intel 28F016B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 31), ERASEINFO(0x10000, 31),
...@@ -994,12 +947,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -994,12 +947,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F016S3, .dev_id = I28F016S3,
.name = "Intel I28F016S3", .name = "Intel I28F016S3",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000, 32), ERASEINFO(0x10000, 32),
} }
...@@ -1007,12 +959,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1007,12 +959,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F016B3T, .dev_id = I28F016B3T,
.name = "Intel 28F016B3T", .name = "Intel 28F016B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 31), ERASEINFO(0x10000, 31),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -1021,12 +972,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1021,12 +972,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F160B3B, .dev_id = I28F160B3B,
.name = "Intel 28F160B3B", .name = "Intel 28F160B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 31), ERASEINFO(0x10000, 31),
...@@ -1035,12 +985,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1035,12 +985,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F160B3T, .dev_id = I28F160B3T,
.name = "Intel 28F160B3T", .name = "Intel 28F160B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 31), ERASEINFO(0x10000, 31),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -1049,12 +998,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1049,12 +998,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F320B3B, .dev_id = I28F320B3B,
.name = "Intel 28F320B3B", .name = "Intel 28F320B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 63), ERASEINFO(0x10000, 63),
...@@ -1063,12 +1011,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1063,12 +1011,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F320B3T, .dev_id = I28F320B3T,
.name = "Intel 28F320B3T", .name = "Intel 28F320B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 63), ERASEINFO(0x10000, 63),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -1077,12 +1024,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1077,12 +1024,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F640B3B, .dev_id = I28F640B3B,
.name = "Intel 28F640B3B", .name = "Intel 28F640B3B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_8MiB,
.DevSize = SIZE_8MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
ERASEINFO(0x10000, 127), ERASEINFO(0x10000, 127),
...@@ -1091,12 +1037,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1091,12 +1037,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I28F640B3T, .dev_id = I28F640B3T,
.name = "Intel 28F640B3T", .name = "Intel 28F640B3T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16,
[1] = MTD_UADDR_UNNECESSARY, /* x16 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_8MiB,
.DevSize = SIZE_8MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000, 127), ERASEINFO(0x10000, 127),
ERASEINFO(0x02000, 8), ERASEINFO(0x02000, 8),
...@@ -1105,12 +1050,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1105,12 +1050,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I82802AB, .dev_id = I82802AB,
.name = "Intel 82802AB", .name = "Intel 82802AB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -1118,12 +1062,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1118,12 +1062,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_INTEL, .mfr_id = MANUFACTURER_INTEL,
.dev_id = I82802AC, .dev_id = I82802AC,
.name = "Intel 82802AC", .name = "Intel 82802AC",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,16), ERASEINFO(0x10000,16),
} }
...@@ -1131,12 +1074,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1131,12 +1074,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29LV040C, .dev_id = MX29LV040C,
.name = "Macronix MX29LV040C", .name = "Macronix MX29LV040C",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -1144,13 +1086,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1144,13 +1086,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29LV160T, .dev_id = MX29LV160T,
.name = "MXIC MX29LV160T", .name = "MXIC MX29LV160T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,31), ERASEINFO(0x10000,31),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -1161,13 +1102,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1161,13 +1102,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_NEC, .mfr_id = MANUFACTURER_NEC,
.dev_id = UPD29F064115, .dev_id = UPD29F064115,
.name = "NEC uPD29F064115", .name = "NEC uPD29F064115",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_8MiB,
.DevSize = SIZE_8MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 3,
.NumEraseRegions= 3,
.regions = { .regions = {
ERASEINFO(0x2000,8), ERASEINFO(0x2000,8),
ERASEINFO(0x10000,126), ERASEINFO(0x10000,126),
...@@ -1177,13 +1117,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1177,13 +1117,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29LV160B, .dev_id = MX29LV160B,
.name = "MXIC MX29LV160B", .name = "MXIC MX29LV160B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -1194,12 +1133,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1194,12 +1133,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29F040, .dev_id = MX29F040,
.name = "Macronix MX29F040", .name = "Macronix MX29F040",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -1207,12 +1145,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1207,12 +1145,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29F016, .dev_id = MX29F016,
.name = "Macronix MX29F016", .name = "Macronix MX29F016",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,32), ERASEINFO(0x10000,32),
} }
...@@ -1220,12 +1157,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1220,12 +1157,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29F004T, .dev_id = MX29F004T,
.name = "Macronix MX29F004T", .name = "Macronix MX29F004T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,7), ERASEINFO(0x10000,7),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -1236,12 +1172,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1236,12 +1172,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29F004B, .dev_id = MX29F004B,
.name = "Macronix MX29F004B", .name = "Macronix MX29F004B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -1252,12 +1187,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1252,12 +1187,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_MACRONIX, .mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29F002T, .dev_id = MX29F002T,
.name = "Macronix MX29F002T", .name = "Macronix MX29F002T",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,3), ERASEINFO(0x10000,3),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -1268,12 +1202,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1268,12 +1202,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_PMC, .mfr_id = MANUFACTURER_PMC,
.dev_id = PM49FL002, .dev_id = PM49FL002,
.name = "PMC Pm49FL002", .name = "PMC Pm49FL002",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO( 0x01000, 64 ) ERASEINFO( 0x01000, 64 )
} }
...@@ -1281,12 +1214,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1281,12 +1214,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_PMC, .mfr_id = MANUFACTURER_PMC,
.dev_id = PM49FL004, .dev_id = PM49FL004,
.name = "PMC Pm49FL004", .name = "PMC Pm49FL004",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO( 0x01000, 128 ) ERASEINFO( 0x01000, 128 )
} }
...@@ -1294,12 +1226,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1294,12 +1226,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_PMC, .mfr_id = MANUFACTURER_PMC,
.dev_id = PM49FL008, .dev_id = PM49FL008,
.name = "PMC Pm49FL008", .name = "PMC Pm49FL008",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO( 0x01000, 256 ) ERASEINFO( 0x01000, 256 )
} }
...@@ -1307,12 +1238,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1307,12 +1238,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SHARP, .mfr_id = MANUFACTURER_SHARP,
.dev_id = LH28F640BF, .dev_id = LH28F640BF,
.name = "LH28F640BF", .name = "LH28F640BF",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_INTEL_STD,
.CmdSet = P_ID_INTEL_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x40000,16), ERASEINFO(0x40000,16),
} }
...@@ -1320,12 +1250,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1320,12 +1250,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST39LF512, .dev_id = SST39LF512,
.name = "SST 39LF512", .name = "SST 39LF512",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_64KiB,
.DevSize = SIZE_64KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,16), ERASEINFO(0x01000,16),
} }
...@@ -1333,12 +1262,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1333,12 +1262,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST39LF010, .dev_id = SST39LF010,
.name = "SST 39LF010", .name = "SST 39LF010",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_128KiB,
.DevSize = SIZE_128KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,32), ERASEINFO(0x01000,32),
} }
...@@ -1346,36 +1274,33 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1346,36 +1274,33 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST29EE020, .dev_id = SST29EE020,
.name = "SST 29EE020", .name = "SST 29EE020",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_SST_PAGE,
.CmdSet = P_ID_SST_PAGE, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = {ERASEINFO(0x01000,64), .regions = {ERASEINFO(0x01000,64),
} }
}, { }, {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST29LE020, .dev_id = SST29LE020,
.name = "SST 29LE020", .name = "SST 29LE020",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_SST_PAGE,
.CmdSet = P_ID_SST_PAGE, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = {ERASEINFO(0x01000,64), .regions = {ERASEINFO(0x01000,64),
} }
}, { }, {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST39LF020, .dev_id = SST39LF020,
.name = "SST 39LF020", .name = "SST 39LF020",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,64), ERASEINFO(0x01000,64),
} }
...@@ -1383,12 +1308,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1383,12 +1308,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST39LF040, .dev_id = SST39LF040,
.name = "SST 39LF040", .name = "SST 39LF040",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,128), ERASEINFO(0x01000,128),
} }
...@@ -1396,12 +1320,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1396,12 +1320,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST39SF010A, .dev_id = SST39SF010A,
.name = "SST 39SF010A", .name = "SST 39SF010A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_128KiB,
.DevSize = SIZE_128KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,32), ERASEINFO(0x01000,32),
} }
...@@ -1409,12 +1332,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1409,12 +1332,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST39SF020A, .dev_id = SST39SF020A,
.name = "SST 39SF020A", .name = "SST 39SF020A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,64), ERASEINFO(0x01000,64),
} }
...@@ -1422,12 +1344,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1422,12 +1344,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST49LF040B, .dev_id = SST49LF040B,
.name = "SST 49LF040B", .name = "SST 49LF040B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,128), ERASEINFO(0x01000,128),
} }
...@@ -1436,12 +1357,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1436,12 +1357,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST49LF004B, .dev_id = SST49LF004B,
.name = "SST 49LF004B", .name = "SST 49LF004B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,128), ERASEINFO(0x01000,128),
} }
...@@ -1449,12 +1369,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1449,12 +1369,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST49LF008A, .dev_id = SST49LF008A,
.name = "SST 49LF008A", .name = "SST 49LF008A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,256), ERASEINFO(0x01000,256),
} }
...@@ -1462,12 +1381,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1462,12 +1381,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST49LF030A, .dev_id = SST49LF030A,
.name = "SST 49LF030A", .name = "SST 49LF030A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,96), ERASEINFO(0x01000,96),
} }
...@@ -1475,12 +1393,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1475,12 +1393,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST49LF040A, .dev_id = SST49LF040A,
.name = "SST 49LF040A", .name = "SST 49LF040A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,128), ERASEINFO(0x01000,128),
} }
...@@ -1488,12 +1405,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1488,12 +1405,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
.dev_id = SST49LF080A, .dev_id = SST49LF080A,
.name = "SST 49LF080A", .name = "SST 49LF080A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x01000,256), ERASEINFO(0x01000,256),
} }
...@@ -1501,13 +1417,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1501,13 +1417,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, /* should be CFI */ .mfr_id = MANUFACTURER_SST, /* should be CFI */
.dev_id = SST39LF160, .dev_id = SST39LF160,
.name = "SST 39LF160", .name = "SST 39LF160",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
[1] = MTD_UADDR_0x5555_0x2AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x5555_0x2AAA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x1000,256), ERASEINFO(0x1000,256),
ERASEINFO(0x1000,256) ERASEINFO(0x1000,256)
...@@ -1516,44 +1431,26 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1516,44 +1431,26 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_SST, /* should be CFI */ .mfr_id = MANUFACTURER_SST, /* should be CFI */
.dev_id = SST39VF1601, .dev_id = SST39VF1601,
.name = "SST 39VF1601", .name = "SST 39VF1601",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
[1] = MTD_UADDR_0x5555_0x2AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x5555_0x2AAA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x1000,256), ERASEINFO(0x1000,256),
ERASEINFO(0x1000,256) ERASEINFO(0x1000,256)
} }
}, {
.mfr_id = MANUFACTURER_SST, /* should be CFI */
.dev_id = SST39VF1601,
.name = "SST 39VF1601",
.uaddr = {
[0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */
[1] = MTD_UADDR_0x5555_0x2AAA /* x16 */
},
.DevSize = SIZE_2MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 2,
.regions = {
ERASEINFO(0x1000,256),
ERASEINFO(0x1000,256)
}
}, { }, {
.mfr_id = MANUFACTURER_ST, .mfr_id = MANUFACTURER_ST,
.dev_id = M29F800AB, .dev_id = M29F800AB,
.name = "ST M29F800AB", .name = "ST M29F800AB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -1564,13 +1461,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1564,13 +1461,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */ .mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */
.dev_id = M29W800DT, .dev_id = M29W800DT,
.name = "ST M29W800DT", .name = "ST M29W800DT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
[1] = MTD_UADDR_0x5555_0x2AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x5555_0x2AAA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,15), ERASEINFO(0x10000,15),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -1581,13 +1477,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1581,13 +1477,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */ .mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */
.dev_id = M29W800DB, .dev_id = M29W800DB,
.name = "ST M29W800DB", .name = "ST M29W800DB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
[1] = MTD_UADDR_0x5555_0x2AAA /* x16 */ /* XX: Maybe MTD_UADDR_0x5555_0x2AAA ? */
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -1598,13 +1493,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1598,13 +1493,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */ .mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */
.dev_id = M29W160DT, .dev_id = M29W160DT,
.name = "ST M29W160DT", .name = "ST M29W160DT",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,31), ERASEINFO(0x10000,31),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -1615,13 +1509,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1615,13 +1509,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */ .mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */
.dev_id = M29W160DB, .dev_id = M29W160DB,
.name = "ST M29W160DB", .name = "ST M29W160DB",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA, /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -1632,12 +1525,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1632,12 +1525,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, .mfr_id = MANUFACTURER_ST,
.dev_id = M29W040B, .dev_id = M29W040B,
.name = "ST M29W040B", .name = "ST M29W040B",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0555_0x02AA /* x8 */ .uaddr = MTD_UADDR_0x0555_0x02AA,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -1645,12 +1537,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1645,12 +1537,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, .mfr_id = MANUFACTURER_ST,
.dev_id = M50FW040, .dev_id = M50FW040,
.name = "ST M50FW040", .name = "ST M50FW040",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_512KiB,
.DevSize = SIZE_512KiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,8), ERASEINFO(0x10000,8),
} }
...@@ -1658,12 +1549,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1658,12 +1549,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, .mfr_id = MANUFACTURER_ST,
.dev_id = M50FW080, .dev_id = M50FW080,
.name = "ST M50FW080", .name = "ST M50FW080",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,16), ERASEINFO(0x10000,16),
} }
...@@ -1671,12 +1561,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1671,12 +1561,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, .mfr_id = MANUFACTURER_ST,
.dev_id = M50FW016, .dev_id = M50FW016,
.name = "ST M50FW016", .name = "ST M50FW016",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,32), ERASEINFO(0x10000,32),
} }
...@@ -1684,12 +1573,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1684,12 +1573,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_ST, .mfr_id = MANUFACTURER_ST,
.dev_id = M50LPW080, .dev_id = M50LPW080,
.name = "ST M50LPW080", .name = "ST M50LPW080",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_UNNECESSARY, /* x8 */ .uaddr = MTD_UADDR_UNNECESSARY,
}, .dev_size = SIZE_1MiB,
.DevSize = SIZE_1MiB, .cmd_set = P_ID_INTEL_EXT,
.CmdSet = P_ID_INTEL_EXT, .nr_regions = 1,
.NumEraseRegions= 1,
.regions = { .regions = {
ERASEINFO(0x10000,16), ERASEINFO(0x10000,16),
} }
...@@ -1697,13 +1585,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1697,13 +1585,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_TOSHIBA, .mfr_id = MANUFACTURER_TOSHIBA,
.dev_id = TC58FVT160, .dev_id = TC58FVT160,
.name = "Toshiba TC58FVT160", .name = "Toshiba TC58FVT160",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000,31), ERASEINFO(0x10000,31),
ERASEINFO(0x08000,1), ERASEINFO(0x08000,1),
...@@ -1714,13 +1601,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1714,13 +1601,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_TOSHIBA, .mfr_id = MANUFACTURER_TOSHIBA,
.dev_id = TC58FVB160, .dev_id = TC58FVB160,
.name = "Toshiba TC58FVB160", .name = "Toshiba TC58FVB160",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_2MiB,
.DevSize = SIZE_2MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x04000,1), ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2), ERASEINFO(0x02000,2),
...@@ -1731,13 +1617,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1731,13 +1617,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_TOSHIBA, .mfr_id = MANUFACTURER_TOSHIBA,
.dev_id = TC58FVB321, .dev_id = TC58FVB321,
.name = "Toshiba TC58FVB321", .name = "Toshiba TC58FVB321",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000,8), ERASEINFO(0x02000,8),
ERASEINFO(0x10000,63) ERASEINFO(0x10000,63)
...@@ -1746,13 +1631,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1746,13 +1631,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_TOSHIBA, .mfr_id = MANUFACTURER_TOSHIBA,
.dev_id = TC58FVT321, .dev_id = TC58FVT321,
.name = "Toshiba TC58FVT321", .name = "Toshiba TC58FVT321",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_4MiB,
.DevSize = SIZE_4MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000,63), ERASEINFO(0x10000,63),
ERASEINFO(0x02000,8) ERASEINFO(0x02000,8)
...@@ -1761,13 +1645,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1761,13 +1645,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_TOSHIBA, .mfr_id = MANUFACTURER_TOSHIBA,
.dev_id = TC58FVB641, .dev_id = TC58FVB641,
.name = "Toshiba TC58FVB641", .name = "Toshiba TC58FVB641",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_8MiB,
.DevSize = SIZE_8MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x02000,8), ERASEINFO(0x02000,8),
ERASEINFO(0x10000,127) ERASEINFO(0x10000,127)
...@@ -1776,13 +1659,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1776,13 +1659,12 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_TOSHIBA, .mfr_id = MANUFACTURER_TOSHIBA,
.dev_id = TC58FVT641, .dev_id = TC58FVT641,
.name = "Toshiba TC58FVT641", .name = "Toshiba TC58FVT641",
.uaddr = { .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */ .uaddr = MTD_UADDR_0x0AAA_0x0555,
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */ /* XX: Maybe MTD_UADDR_0x0555_0x02AA ? */
}, .dev_size = SIZE_8MiB,
.DevSize = SIZE_8MiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 2,
.NumEraseRegions= 2,
.regions = { .regions = {
ERASEINFO(0x10000,127), ERASEINFO(0x10000,127),
ERASEINFO(0x02000,8) ERASEINFO(0x02000,8)
...@@ -1791,12 +1673,11 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1791,12 +1673,11 @@ static const struct amd_flash_info jedec_table[] = {
.mfr_id = MANUFACTURER_WINBOND, .mfr_id = MANUFACTURER_WINBOND,
.dev_id = W49V002A, .dev_id = W49V002A,
.name = "Winbond W49V002A", .name = "Winbond W49V002A",
.uaddr = { .devtypes = CFI_DEVICETYPE_X8,
[0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ .uaddr = MTD_UADDR_0x5555_0x2AAA,
}, .dev_size = SIZE_256KiB,
.DevSize = SIZE_256KiB, .cmd_set = P_ID_AMD_STD,
.CmdSet = P_ID_AMD_STD, .nr_regions = 4,
.NumEraseRegions= 4,
.regions = { .regions = {
ERASEINFO(0x10000, 3), ERASEINFO(0x10000, 3),
ERASEINFO(0x08000, 1), ERASEINFO(0x08000, 1),
...@@ -1809,12 +1690,12 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1809,12 +1690,12 @@ static const struct amd_flash_info jedec_table[] = {
static int cfi_jedec_setup(struct cfi_private *p_cfi, int index); static int cfi_jedec_setup(struct cfi_private *p_cfi, int index);
static int jedec_probe_chip(struct map_info *map, __u32 base, static int jedec_probe_chip(struct map_info *map, uint32_t base,
unsigned long *chip_map, struct cfi_private *cfi); unsigned long *chip_map, struct cfi_private *cfi);
static struct mtd_info *jedec_probe(struct map_info *map); static struct mtd_info *jedec_probe(struct map_info *map);
static inline u32 jedec_read_mfr(struct map_info *map, __u32 base, static inline u32 jedec_read_mfr(struct map_info *map, uint32_t base,
struct cfi_private *cfi) struct cfi_private *cfi)
{ {
map_word result; map_word result;
...@@ -1825,7 +1706,7 @@ static inline u32 jedec_read_mfr(struct map_info *map, __u32 base, ...@@ -1825,7 +1706,7 @@ static inline u32 jedec_read_mfr(struct map_info *map, __u32 base,
return result.x[0] & mask; return result.x[0] & mask;
} }
static inline u32 jedec_read_id(struct map_info *map, __u32 base, static inline u32 jedec_read_id(struct map_info *map, uint32_t base,
struct cfi_private *cfi) struct cfi_private *cfi)
{ {
map_word result; map_word result;
...@@ -1866,42 +1747,20 @@ static inline void jedec_reset(u32 base, struct map_info *map, ...@@ -1866,42 +1747,20 @@ static inline void jedec_reset(u32 base, struct map_info *map,
} }
static inline __u8 finfo_uaddr(const struct amd_flash_info *finfo, int device_type)
{
int uaddr_idx;
__u8 uaddr = MTD_UADDR_NOT_SUPPORTED;
switch ( device_type ) {
case CFI_DEVICETYPE_X8: uaddr_idx = 0; break;
case CFI_DEVICETYPE_X16: uaddr_idx = 1; break;
case CFI_DEVICETYPE_X32: uaddr_idx = 2; break;
default:
printk(KERN_NOTICE "MTD: %s(): unknown device_type %d\n",
__func__, device_type);
goto uaddr_done;
}
uaddr = finfo->uaddr[uaddr_idx];
if (uaddr != MTD_UADDR_NOT_SUPPORTED ) {
/* ASSERT("The unlock addresses for non-8-bit mode
are bollocks. We don't really need an array."); */
uaddr = finfo->uaddr[0];
}
uaddr_done:
return uaddr;
}
static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
{ {
int i,num_erase_regions; int i,num_erase_regions;
__u8 uaddr; uint8_t uaddr;
if (! (jedec_table[index].devtypes & p_cfi->device_type)) {
DEBUG(MTD_DEBUG_LEVEL1, "Rejecting potential %s with incompatible %d-bit device type\n",
jedec_table[index].name, 4 * (1<<p_cfi->device_type));
return 0;
}
printk("Found: %s\n",jedec_table[index].name); printk(KERN_INFO "Found: %s\n",jedec_table[index].name);
num_erase_regions = jedec_table[index].NumEraseRegions; num_erase_regions = jedec_table[index].nr_regions;
p_cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); p_cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
if (!p_cfi->cfiq) { if (!p_cfi->cfiq) {
...@@ -1911,9 +1770,9 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) ...@@ -1911,9 +1770,9 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
memset(p_cfi->cfiq,0,sizeof(struct cfi_ident)); memset(p_cfi->cfiq,0,sizeof(struct cfi_ident));
p_cfi->cfiq->P_ID = jedec_table[index].CmdSet; p_cfi->cfiq->P_ID = jedec_table[index].cmd_set;
p_cfi->cfiq->NumEraseRegions = jedec_table[index].NumEraseRegions; p_cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions;
p_cfi->cfiq->DevSize = jedec_table[index].DevSize; p_cfi->cfiq->DevSize = jedec_table[index].dev_size;
p_cfi->cfi_mode = CFI_MODE_JEDEC; p_cfi->cfi_mode = CFI_MODE_JEDEC;
for (i=0; i<num_erase_regions; i++){ for (i=0; i<num_erase_regions; i++){
...@@ -1925,11 +1784,7 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) ...@@ -1925,11 +1784,7 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
p_cfi->mfr = jedec_table[index].mfr_id; p_cfi->mfr = jedec_table[index].mfr_id;
p_cfi->id = jedec_table[index].dev_id; p_cfi->id = jedec_table[index].dev_id;
uaddr = finfo_uaddr(&jedec_table[index], p_cfi->device_type); uaddr = jedec_table[index].uaddr;
if ( uaddr == MTD_UADDR_NOT_SUPPORTED ) {
kfree( p_cfi->cfiq );
return 0;
}
p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1; p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1;
p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2; p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2;
...@@ -1945,14 +1800,14 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) ...@@ -1945,14 +1800,14 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
* be perfect - consequently there should be some module parameters that * be perfect - consequently there should be some module parameters that
* could be manually specified to force the chip info. * could be manually specified to force the chip info.
*/ */
static inline int jedec_match( __u32 base, static inline int jedec_match( uint32_t base,
struct map_info *map, struct map_info *map,
struct cfi_private *cfi, struct cfi_private *cfi,
const struct amd_flash_info *finfo ) const struct amd_flash_info *finfo )
{ {
int rc = 0; /* failure until all tests pass */ int rc = 0; /* failure until all tests pass */
u32 mfr, id; u32 mfr, id;
__u8 uaddr; uint8_t uaddr;
/* /*
* The IDs must match. For X16 and X32 devices operating in * The IDs must match. For X16 and X32 devices operating in
...@@ -1965,8 +1820,8 @@ static inline int jedec_match( __u32 base, ...@@ -1965,8 +1820,8 @@ static inline int jedec_match( __u32 base,
*/ */
switch (cfi->device_type) { switch (cfi->device_type) {
case CFI_DEVICETYPE_X8: case CFI_DEVICETYPE_X8:
mfr = (__u8)finfo->mfr_id; mfr = (uint8_t)finfo->mfr_id;
id = (__u8)finfo->dev_id; id = (uint8_t)finfo->dev_id;
/* bjd: it seems that if we do this, we can end up /* bjd: it seems that if we do this, we can end up
* detecting 16bit flashes as an 8bit device, even though * detecting 16bit flashes as an 8bit device, even though
...@@ -1979,12 +1834,12 @@ static inline int jedec_match( __u32 base, ...@@ -1979,12 +1834,12 @@ static inline int jedec_match( __u32 base,
} }
break; break;
case CFI_DEVICETYPE_X16: case CFI_DEVICETYPE_X16:
mfr = (__u16)finfo->mfr_id; mfr = (uint16_t)finfo->mfr_id;
id = (__u16)finfo->dev_id; id = (uint16_t)finfo->dev_id;
break; break;
case CFI_DEVICETYPE_X32: case CFI_DEVICETYPE_X32:
mfr = (__u16)finfo->mfr_id; mfr = (uint16_t)finfo->mfr_id;
id = (__u32)finfo->dev_id; id = (uint32_t)finfo->dev_id;
break; break;
default: default:
printk(KERN_WARNING printk(KERN_WARNING
...@@ -1999,19 +1854,19 @@ static inline int jedec_match( __u32 base, ...@@ -1999,19 +1854,19 @@ static inline int jedec_match( __u32 base,
/* the part size must fit in the memory window */ /* the part size must fit in the memory window */
DEBUG( MTD_DEBUG_LEVEL3, DEBUG( MTD_DEBUG_LEVEL3,
"MTD %s(): Check fit 0x%.8x + 0x%.8x = 0x%.8x\n", "MTD %s(): Check fit 0x%.8x + 0x%.8x = 0x%.8x\n",
__func__, base, 1 << finfo->DevSize, base + (1 << finfo->DevSize) ); __func__, base, 1 << finfo->dev_size, base + (1 << finfo->dev_size) );
if ( base + cfi_interleave(cfi) * ( 1 << finfo->DevSize ) > map->size ) { if ( base + cfi_interleave(cfi) * ( 1 << finfo->dev_size ) > map->size ) {
DEBUG( MTD_DEBUG_LEVEL3, DEBUG( MTD_DEBUG_LEVEL3,
"MTD %s(): 0x%.4x 0x%.4x %dKiB doesn't fit\n", "MTD %s(): 0x%.4x 0x%.4x %dKiB doesn't fit\n",
__func__, finfo->mfr_id, finfo->dev_id, __func__, finfo->mfr_id, finfo->dev_id,
1 << finfo->DevSize ); 1 << finfo->dev_size );
goto match_done; goto match_done;
} }
uaddr = finfo_uaddr(finfo, cfi->device_type); if (! (finfo->devtypes & cfi->device_type))
if ( uaddr == MTD_UADDR_NOT_SUPPORTED ) {
goto match_done; goto match_done;
}
uaddr = finfo->uaddr;
DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): check unlock addrs 0x%.4x 0x%.4x\n", DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): check unlock addrs 0x%.4x 0x%.4x\n",
__func__, cfi->addr_unlock1, cfi->addr_unlock2 ); __func__, cfi->addr_unlock1, cfi->addr_unlock2 );
...@@ -2096,19 +1951,11 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, ...@@ -2096,19 +1951,11 @@ static int jedec_probe_chip(struct map_info *map, __u32 base,
} }
/* Ensure the unlock addresses we try stay inside the map */ /* Ensure the unlock addresses we try stay inside the map */
probe_offset1 = cfi_build_cmd_addr( probe_offset1 = cfi_build_cmd_addr(cfi->addr_unlock1, cfi_interleave(cfi), cfi->device_type);
cfi->addr_unlock1, probe_offset2 = cfi_build_cmd_addr(cfi->addr_unlock1, cfi_interleave(cfi), cfi->device_type);
cfi_interleave(cfi),
cfi->device_type);
probe_offset2 = cfi_build_cmd_addr(
cfi->addr_unlock1,
cfi_interleave(cfi),
cfi->device_type);
if ( ((base + probe_offset1 + map_bankwidth(map)) >= map->size) || if ( ((base + probe_offset1 + map_bankwidth(map)) >= map->size) ||
((base + probe_offset2 + map_bankwidth(map)) >= map->size)) ((base + probe_offset2 + map_bankwidth(map)) >= map->size))
{
goto retry; goto retry;
}
/* Reset */ /* Reset */
jedec_reset(base, map, cfi); jedec_reset(base, map, cfi);
...@@ -2143,8 +1990,8 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, ...@@ -2143,8 +1990,8 @@ static int jedec_probe_chip(struct map_info *map, __u32 base,
} }
goto retry; goto retry;
} else { } else {
__u16 mfr; uint16_t mfr;
__u16 id; uint16_t id;
/* Make sure it is a chip of the same manufacturer and id */ /* Make sure it is a chip of the same manufacturer and id */
mfr = jedec_read_mfr(map, base, cfi); mfr = jedec_read_mfr(map, base, cfi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment