diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2003-09-12 22:41:53 +0000 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2003-09-12 22:41:53 +0000 |
commit | eaab50bb32edfe419eb472eacfdc82cbc3ecae8c (patch) | |
tree | 4ddad443cb40d4f090ba476bb48ddd47b98790a6 /m29f400bt.h | |
parent | ceec420c3db6c20c4b882e8bf3ad113db7fcd2de (diff) | |
download | flashrom-eaab50bb32edfe419eb472eacfdc82cbc3ecae8c.tar.gz flashrom-eaab50bb32edfe419eb472eacfdc82cbc3ecae8c.tar.bz2 flashrom-eaab50bb32edfe419eb472eacfdc82cbc3ecae8c.zip |
Changes from NIKI
Corresponding to coreboot v1 svn r873.
Diffstat (limited to 'm29f400bt.h')
-rw-r--r-- | m29f400bt.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/m29f400bt.h b/m29f400bt.h index a6458709..3d1799f4 100644 --- a/m29f400bt.h +++ b/m29f400bt.h @@ -1,8 +1,13 @@ +#ifndef __M29F400BT_H__ +#define __M29F400BT_H__ 1 + +#include <stdio.h> + extern int probe_m29f400bt (struct flashchip * flash); extern int erase_m29f400bt (struct flashchip * flash); extern int block_erase_m29f400bt (volatile char * bios, volatile char * dst); -extern int write_m29f400bt (struct flashchip * flash, char * buf); -extern int write_linuxbios_m29f400bt (struct flashchip * flash, char * buf); +extern int write_m29f400bt (struct flashchip * flash, unsigned char * buf); +extern int write_linuxbios_m29f400bt (struct flashchip * flash, unsigned char * buf); extern __inline__ void toggle_ready_m29f400bt (volatile char * dst) { @@ -20,7 +25,7 @@ extern __inline__ void toggle_ready_m29f400bt (volatile char * dst) } } -extern __inline__ void data_polling_m29f400bt (volatile char * dst, char data) +extern __inline__ void data_polling_m29f400bt (volatile char * dst, unsigned char data) { unsigned int i = 0; char tmp; @@ -59,9 +64,11 @@ extern __inline__ void write_page_m29f400bt (volatile char * bios, char * src, v //*(volatile char *) (bios) = 0xF0; //usleep(5); toggle_ready_m29f400bt(dst); - printf("Value in the flash at address %p = %#x, want %#x\n",dst-bios, *dst, *src); + printf("Value in the flash at address %p = %#x, want %#x\n",(char *)(dst-bios), *dst, *src); dst++; src++; } } + +#endif /* !__M29F400BT_H__ */ |