add volatile
This commit is contained in:
parent
4de5a4baf2
commit
7fb118653a
2 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue