diff --git a/util/sis/jedec.c b/util/sis/jedec.c index 73a399c43a..5947be18ac 100644 --- a/util/sis/jedec.c +++ b/util/sis/jedec.c @@ -29,7 +29,7 @@ int probe_jedec (struct flashchip * flash) { - char * bios = flash->virt_addr; + char * volatile bios = flash->virt_addr; unsigned char id1, id2; *(char *) (bios + 0x5555) = 0xAA; @@ -55,7 +55,7 @@ int probe_jedec (struct flashchip * flash) int erase_jedec (struct flashchip * flash) { - char * bios = flash->virt_addr; + char * volatile bios = flash->virt_addr; *(char *) (bios + 0x5555) = 0xAA; *(char *) (bios + 0x2AAA) = 0x55; diff --git a/util/sis/jedec.h b/util/sis/jedec.h index de9c3d65c0..a2a86ff365 100644 --- a/util/sis/jedec.h +++ b/util/sis/jedec.h @@ -2,7 +2,7 @@ extern int probe_jedec (struct flashchip * flash); extern int erase_jedec (struct flashchip * flash); extern int write_jedec (struct flashchip * flash, char * buf); -extern __inline__ void toggle_ready_jedec (char * dst) +extern __inline__ void toggle_ready_jedec (char * volatile dst) { unsigned int i = 0; char tmp1, tmp2; @@ -18,7 +18,7 @@ extern __inline__ void toggle_ready_jedec (char * dst) } } -extern __inline__ void data_polling_jedec (char * dst, char data) +extern __inline__ void data_polling_jedec (char * volatile dst, char data) { unsigned int i = 0; char tmp; @@ -33,7 +33,7 @@ extern __inline__ void data_polling_jedec (char * dst, char data) } } -extern __inline__ void protect_jedec (char * bios) +extern __inline__ void protect_jedec (char * volatile bios) { *(char *) (bios + 0x5555) = 0xAA; *(char *) (bios + 0x2AAA) = 0x55; @@ -42,7 +42,7 @@ extern __inline__ void protect_jedec (char * bios) usleep(200); } -extern __inline__ void write_page_jedec (char * bios, char * src, char * dst, +extern __inline__ void write_page_jedec (char * volatile bios, char * volatile src, char * volatile dst, int page_size) { int i;