diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-07-28 08:13:25 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-07-28 08:13:25 +0000 |
commit | 91f4afa1108a35783e9d3d546fe8ea41dc87708f (patch) | |
tree | a94991ce77532b8767d5d3c6ac0e9ab58f4b9a2c /82802ab.c | |
parent | 1a227954f2c7d0a25d42bcea2ea0b901ceb0f464 (diff) | |
download | ast2050-flashrom-91f4afa1108a35783e9d3d546fe8ea41dc87708f.zip ast2050-flashrom-91f4afa1108a35783e9d3d546fe8ea41dc87708f.tar.gz |
Random whitespace and coding-style fixes
Also, indentation fixes, e.g. due to conversion to msg_*, use ARRAY_SIZE
where possible, wrap overly long line, etc.
Compile-tested. There should be no functional changes.
Corresponding to flashrom svn r1397.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to '82802ab.c')
-rw-r--r-- | 82802ab.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -29,7 +29,6 @@ #include "flash.h" #include "chipdrivers.h" -// I need that Berkeley bit-map printer void print_status_82802ab(uint8_t status) { msg_cdbg("%s", status & 0x80 ? "Ready:" : "Busy:"); @@ -44,8 +43,7 @@ void print_status_82802ab(uint8_t status) int probe_82802ab(struct flashchip *flash) { chipaddr bios = flash->virtual_memory; - uint8_t id1, id2; - uint8_t flashcontent1, flashcontent2; + uint8_t id1, id2, flashcontent1, flashcontent2; int shifted = (flash->feature_bits & FEATURE_ADDR_SHIFTED) != 0; /* Reset to get a clean state */ @@ -69,7 +67,10 @@ int probe_82802ab(struct flashchip *flash) if (!oddparity(id1)) msg_cdbg(", id1 parity violation"); - /* Read the product ID location again. We should now see normal flash contents. */ + /* + * Read the product ID location again. We should now see normal + * flash contents. + */ flashcontent1 = chip_readb(bios + (0x00 << shifted)); flashcontent2 = chip_readb(bios + (0x01 << shifted)); @@ -112,14 +113,13 @@ int unlock_82802ab(struct flashchip *flash) //chipaddr wrprotect = flash->virtual_registers + page + 2; for (i = 0; i < flash->total_size * 1024; i+= flash->page_size) - { chip_writeb(0, flash->virtual_registers + i + 2); - } return 0; } -int erase_block_82802ab(struct flashchip *flash, unsigned int page, unsigned int pagesize) +int erase_block_82802ab(struct flashchip *flash, unsigned int page, + unsigned int pagesize) { chipaddr bios = flash->virtual_memory; uint8_t status; @@ -178,7 +178,7 @@ int unlock_28f004s5(struct flashchip *flash) msg_cdbg("unlocked!\n"); can_unlock = 1; } - + /* Read block lock-bits */ for (i = 0; i < flash->total_size * 1024; i+= (64 * 1024)) { bcfg = chip_readb(bios + i + 2); // read block lock config |