summaryrefslogtreecommitdiffstats
path: root/flashchips.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-09-12 08:28:56 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-09-12 08:28:56 +0000
commitfaac94d9852b43d230b76d175249f7032c3e9ce7 (patch)
tree6e759d9d533e8d1bd7e736607c411232412b18f8 /flashchips.c
parentf15d79a5e01721ab6492f227c132eec3706cbe63 (diff)
downloadflashrom-faac94d9852b43d230b76d175249f7032c3e9ce7.zip
flashrom-faac94d9852b43d230b76d175249f7032c3e9ce7.tar.gz
Cleanup ST M50 driver
There are two locking strategies used by this umbrella family, one uniform and one that matches the sector layout of the chip. Refactor the functions involved and rename the overly complicated file to just stm50.c and the functions accordingly. This fixes unlocking of some of the non-uniform chips and gets rid of the abuse of page_size. Corresponding to flashrom svn r1736. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'flashchips.c')
-rw-r--r--flashchips.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/flashchips.c b/flashchips.c
index 83855fc..396f026 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -11008,7 +11008,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FLW040A,
.total_size = 512,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_UNTESTED,
.probe = probe_82802ab,
@@ -11028,8 +11028,8 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
.write = write_82802ab,
+ .unlock = unlock_stm50_uniform,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -11041,7 +11041,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FLW040B,
.total_size = 512,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_UNTESTED,
.probe = probe_82802ab,
@@ -11061,8 +11061,8 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
.write = write_82802ab,
+ .unlock = unlock_stm50_uniform,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
},
@@ -11074,7 +11074,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FLW080A,
.total_size = 1024,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_OK_PRE,
.probe = probe_82802ab,
@@ -11094,7 +11094,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_nonuniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
@@ -11107,7 +11107,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FLW080B,
.total_size = 1024,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_UNTESTED,
.probe = probe_82802ab,
@@ -11127,7 +11127,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_nonuniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
@@ -11140,7 +11140,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FW002,
.total_size = 256,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_UNTESTED,
.probe = probe_82802ab,
@@ -11157,7 +11157,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_nonuniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
@@ -11170,7 +11170,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FW016,
.total_size = 2048,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_UNTESTED,
.probe = probe_82802ab,
@@ -11182,7 +11182,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_uniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
@@ -11195,7 +11195,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FW040,
.total_size = 512,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_OK_PR,
.probe = probe_82802ab,
@@ -11207,7 +11207,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_uniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
@@ -11220,7 +11220,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50FW080,
.total_size = 1024,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_OK_PREW,
.probe = probe_82802ab,
@@ -11232,7 +11232,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_uniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
@@ -11245,7 +11245,7 @@ const struct flashchip flashchips[] = {
.manufacture_id = ST_ID,
.model_id = ST_M50LPW116,
.total_size = 2048,
- .page_size = 64 * 1024,
+ .page_size = 0,
.feature_bits = FEATURE_REGISTERMAP,
.tested = TEST_UNTESTED,
.probe = probe_82802ab,
@@ -11263,7 +11263,7 @@ const struct flashchip flashchips[] = {
.block_erase = erase_block_82802ab,
}
},
- .unlock = unlock_stm50flw0x0x,
+ .unlock = unlock_stm50_nonuniform,
.write = write_82802ab,
.read = read_memmapped,
.voltage = {3000, 3600}, /* Also has 12V fast program & erase */
OpenPOWER on IntegriCloud