diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-08-23 16:08:21 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-08-23 16:08:21 +0000 |
commit | ba9ce9f7f986ba2a3f4d88b7cb53e0704b7d2708 (patch) | |
tree | 9ad9be681febfa96ecca8a7ee024f52f96d2b66f /util/flashrom/msys_doc.c | |
parent | 0a6bb9106263eead0dd35d68be90ab52223488d5 (diff) |
Cosmetic fixes (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@2748 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/msys_doc.c')
-rw-r--r-- | util/flashrom/msys_doc.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/util/flashrom/msys_doc.c b/util/flashrom/msys_doc.c index b91c73a115..74301da9b2 100644 --- a/util/flashrom/msys_doc.c +++ b/util/flashrom/msys_doc.c @@ -134,23 +134,23 @@ int probe_md2802(struct flashchip *flash) && id_0x55 == 0x55 && id_0xAA == 0xaa #endif /* !MSYSTEMS_DOC_NO_55AA_CHECKING */ ) { - return (1); + return 1; } - return (0); -} /* int probe_md2802(struct flashchip *flash) */ + return 0; +} int read_md2802(struct flashchip *flash, uint8_t *buf) { - - return (0); -} /* int read_md2802(struct flashchip *flash, uint8_t *buf) */ + return 0; +} int erase_md2802(struct flashchip *flash) { volatile uint8_t *bios = flash->virtual_memory; - return (1); + return 1; + *(volatile uint8_t *)(bios + 0x5555) = 0xAA; *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; *(volatile uint8_t *)(bios + 0x5555) = 0x80; @@ -158,7 +158,7 @@ int erase_md2802(struct flashchip *flash) *(volatile uint8_t *)(bios + 0x5555) = 0xAA; *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; *(volatile uint8_t *)(bios + 0x5555) = 0x10; -} /* int erase_md2802(struct flashchip *flash) */ +} int write_md2802(struct flashchip *flash, uint8_t *buf) { @@ -192,6 +192,7 @@ int write_md2802(struct flashchip *flash, uint8_t *buf) 0: ready -1: timeout expired */ + static int doc_wait(volatile uint8_t *bios, int timeout) { int i = 20; @@ -210,8 +211,8 @@ static int doc_wait(volatile uint8_t *bios, int timeout) return (-1); } - return (0); -} /* static int doc_wait(volatile uint8_t *bios, int timeout) */ + return 0; +} static uint8_t doc_read_docstatus(volatile uint8_t *bios) { @@ -219,7 +220,7 @@ static uint8_t doc_read_docstatus(volatile uint8_t *bios) doc_read_2nop(bios); return (doc_read(bios, _DOCStatus)); -} /* static uint8_t doc_read_docstatus(volatile uint8_t *bios) */ +} static uint8_t doc_read_chipid(volatile uint8_t *bios) { @@ -227,7 +228,7 @@ static uint8_t doc_read_chipid(volatile uint8_t *bios) doc_read_2nop(bios); return (doc_read(bios, _ChipID)); -} /* static uint8_t doc_read_chipid(volatile uint8_t *bios) */ +} static uint8_t doc_read_cdsncontrol(volatile uint8_t *bios) { @@ -240,11 +241,11 @@ static uint8_t doc_read_cdsncontrol(volatile uint8_t *bios) value = doc_read(bios, _CDSNControl); doc_read_2nop(bios); - return (value); -} /* static uint8_t doc_read_chipid(volatile char *bios) */ + return value; +} static void doc_write_cdsncontrol(volatile uint8_t *bios, uint8_t data) { doc_write(data, bios, _CDSNControl); doc_read_4nop(bios); -} /* static void doc_write_chipid(volatile char *bios, uint8_t data) */ +} |