diff options
author | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2013-09-12 08:28:56 +0000 |
---|---|---|
committer | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2013-09-12 08:28:56 +0000 |
commit | cd280f80004d68e10e59a80b5bb25add22c91377 (patch) | |
tree | 6e759d9d533e8d1bd7e736607c411232412b18f8 /flashchips.c | |
parent | 98c3a934c393710f4233718de12289f464967a99 (diff) | |
download | flashrom-cd280f80004d68e10e59a80b5bb25add22c91377.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.
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1736 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flashchips.c')
-rw-r--r-- | flashchips.c | 36 |
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 */ |