diff options
Diffstat (limited to 'sst49lfxxxc.c')
-rw-r--r-- | sst49lfxxxc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c index 54897cc5..d744cca4 100644 --- a/sst49lfxxxc.c +++ b/sst49lfxxxc.c @@ -41,7 +41,7 @@ #define STATUS_ESS (1 << 6) #define STATUS_WSMS (1 << 7) -static __inline__ int write_lockbits_49lfxxxc(volatile uint8_t *bios, int size, +static __inline__ int write_lockbits_49lfxxxc(chipaddr bios, int size, unsigned char bits) { int i, left = size; @@ -68,7 +68,7 @@ static __inline__ int write_lockbits_49lfxxxc(volatile uint8_t *bios, int size, return 0; } -static __inline__ int erase_sector_49lfxxxc(volatile uint8_t *bios, +static __inline__ int erase_sector_49lfxxxc(chipaddr bios, unsigned long address) { unsigned char status; @@ -79,7 +79,7 @@ static __inline__ int erase_sector_49lfxxxc(volatile uint8_t *bios, do { status = chip_readb(bios); if (status & (STATUS_ESS | STATUS_BPS)) { - printf("sector erase FAILED at address=0x%08lx status=0x%01x\n", (unsigned long)bios + address, status); + printf("sector erase FAILED at address=0x%08lx status=0x%01x\n", bios + address, status); chip_writeb(CLEAR_STATUS, bios); return (-1); } @@ -88,9 +88,9 @@ static __inline__ int erase_sector_49lfxxxc(volatile uint8_t *bios, return 0; } -static __inline__ int write_sector_49lfxxxc(volatile uint8_t *bios, +static __inline__ int write_sector_49lfxxxc(chipaddr bios, uint8_t *src, - volatile uint8_t *dst, + chipaddr dst, unsigned int page_size) { int i; @@ -111,7 +111,7 @@ static __inline__ int write_sector_49lfxxxc(volatile uint8_t *bios, do { status = chip_readb(bios); if (status & (STATUS_ESS | STATUS_BPS)) { - printf("sector write FAILED at address=0x%08lx status=0x%01x\n", (unsigned long)dst, status); + printf("sector write FAILED at address=0x%08lx status=0x%01x\n", dst, status); chip_writeb(CLEAR_STATUS, bios); return (-1); } @@ -123,7 +123,7 @@ static __inline__ int write_sector_49lfxxxc(volatile uint8_t *bios, int probe_49lfxxxc(struct flashchip *flash) { - volatile uint8_t *bios = flash->virtual_memory; + chipaddr bios = flash->virtual_memory; uint8_t id1, id2; @@ -147,8 +147,8 @@ int probe_49lfxxxc(struct flashchip *flash) int erase_49lfxxxc(struct flashchip *flash) { - volatile uint8_t *bios = flash->virtual_memory; - volatile uint8_t *registers = flash->virtual_registers; + chipaddr bios = flash->virtual_memory; + chipaddr registers = flash->virtual_registers; int i; unsigned int total_size = flash->total_size * 1024; @@ -167,7 +167,7 @@ int write_49lfxxxc(struct flashchip *flash, uint8_t *buf) int i; int total_size = flash->total_size * 1024; int page_size = flash->page_size; - volatile uint8_t *bios = flash->virtual_memory; + chipaddr bios = flash->virtual_memory; write_lockbits_49lfxxxc(flash->virtual_registers, total_size, 0); printf("Programming page: "); |