diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-10-18 21:14:13 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-10-18 21:14:13 +0000 |
commit | 1aa329dcb0543dabe9b2eb538bb1ec1f183a10f9 (patch) | |
tree | 87e19016867a93a7048149aef73e425270e7b6c9 /util/flashrom/w39v080fa.c | |
parent | 582364d8089cb630e673eaee3710733b11d5125b (diff) |
Coding-style fixes for flashrom, partly indent-aided (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3669 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/w39v080fa.c')
-rw-r--r-- | util/flashrom/w39v080fa.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/util/flashrom/w39v080fa.c b/util/flashrom/w39v080fa.c index 2756859af6..66534ce911 100644 --- a/util/flashrom/w39v080fa.c +++ b/util/flashrom/w39v080fa.c @@ -57,10 +57,11 @@ static int unlock_block_winbond_fwhub(struct flashchip *flash, int offset) volatile uint8_t *wrprotect = flash->virtual_registers + offset + 2; uint8_t locking; - printf_debug("Trying to unlock block @0x%08x = 0x%02x\n", offset, *wrprotect); + printf_debug("Trying to unlock block @0x%08x = 0x%02x\n", offset, + *wrprotect); locking = *wrprotect; - switch (locking & 0x7 ) { + switch (locking & 0x7) { case 0: printf_debug("Full Access.\n"); return 0; @@ -99,7 +100,7 @@ int unlock_winbond_fwhub(struct flashchip *flash) int i, total_size = flash->total_size * 1024; volatile uint8_t *bios = flash->virtual_memory; uint8_t locking; - + /* Are there any hardware restrictions that we can't overcome? * If flashrom fail here, someone's got to check all those GPIOs. */ @@ -121,17 +122,17 @@ int unlock_winbond_fwhub(struct flashchip *flash) printf_debug("Lockout bits:\n"); - if (locking & (1<<2)) + if (locking & (1 << 2)) fprintf(stderr, "Error: hardware bootblock locking (#TBL).\n"); else printf_debug("No hardware bootblock locking (good!)\n"); - if (locking & (1<<3)) + if (locking & (1 << 3)) fprintf(stderr, "Error: hardware block locking (#WP).\n"); else printf_debug("No hardware block locking (good!)\n"); - if (locking & ((1<<2) | (1<<3))) + if (locking & ((1 << 2) | (1 << 3))) return -1; /* Unlock the complete chip */ @@ -142,7 +143,8 @@ int unlock_winbond_fwhub(struct flashchip *flash) return 0; } -static int erase_sector_winbond_fwhub(volatile uint8_t *bios, unsigned int sector) +static int erase_sector_winbond_fwhub(volatile uint8_t *bios, + unsigned int sector) { /* Remember: too much sleep can waste your day. */ @@ -167,7 +169,7 @@ int erase_winbond_fwhub(struct flashchip *flash) { int i, total_size = flash->total_size * 1024; volatile uint8_t *bios = flash->virtual_memory; - + unlock_winbond_fwhub(flash); printf("Erasing: "); @@ -197,7 +199,7 @@ int write_winbond_fwhub(struct flashchip *flash, uint8_t *buf) return -1; printf("Programming: "); - for (i = 0; i < total_size; i+=flash->page_size) { + for (i = 0; i < total_size; i += flash->page_size) { printf("0x%08x\b\b\b\b\b\b\b\b\b\b", i); write_sector_jedec(bios, buf + i, bios + i, flash->page_size); } @@ -205,4 +207,3 @@ int write_winbond_fwhub(struct flashchip *flash, uint8_t *buf) return 0; } - |