summaryrefslogtreecommitdiff
path: root/82802ab.c
diff options
context:
space:
mode:
authoruwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2007-08-23 16:08:21 +0000
committeruwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2007-08-23 16:08:21 +0000
commit4e3d1ebdce084d0723c4aeb29e83abc2d6dd32d7 (patch)
tree1645417f11a24ea1a316a7959246f5c4af75e789 /82802ab.c
parent9823fd2c92e2bbb5f6374c9b6f6c1330424f6e69 (diff)
downloadflashrom-4e3d1ebdce084d0723c4aeb29e83abc2d6dd32d7.tar.gz
Original v2 revision: 2748
Cosmetic fixes (trivial). Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@130 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to '82802ab.c')
-rw-r--r--82802ab.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/82802ab.c b/82802ab.c
index 1c98f5c..2784d7a 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -77,7 +77,6 @@ int probe_82802ab(struct flashchip *flash)
uint8_t wait_82802ab(volatile uint8_t *bios)
{
-
uint8_t status;
uint8_t id1, id2;
@@ -100,9 +99,10 @@ uint8_t wait_82802ab(volatile uint8_t *bios)
*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
*(volatile uint8_t *)(bios + 0x5555) = 0xF0;
- return status;
+ return status;
}
+
int erase_82802ab_block(struct flashchip *flash, int offset)
{
volatile uint8_t *bios = flash->virtual_memory + offset;
@@ -126,8 +126,10 @@ int erase_82802ab_block(struct flashchip *flash, int offset)
status = wait_82802ab(flash->virtual_memory);
//print_82802ab_status(status);
printf("DONE BLOCK 0x%x\n", offset);
- return (0);
+
+ return 0;
}
+
int erase_82802ab(struct flashchip *flash)
{
int i;
@@ -138,7 +140,8 @@ int erase_82802ab(struct flashchip *flash)
for (i = 0; i < total_size; i += flash->page_size)
erase_82802ab_block(flash, i);
printf("DONE ERASE\n");
- return (0);
+
+ return 0;
}
void write_page_82802ab(volatile uint8_t *bios, uint8_t *src,
@@ -152,7 +155,6 @@ void write_page_82802ab(volatile uint8_t *bios, uint8_t *src,
*dst++ = *src++;
wait_82802ab(bios);
}
-
}
int write_82802ab(struct flashchip *flash, uint8_t *buf)
@@ -176,5 +178,6 @@ int write_82802ab(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
protect_jedec(bios);
- return (0);
+
+ return 0;
}