int write_sector_jedec(volatile char *bios,
unsigned char *src,
- volatile unsigned char *dst, unsigned int page_size)
+ volatile unsigned char *dst,
+ unsigned int page_size)
{
int i;
volatile char *Temp;
for (i = 0; i < page_size; i++) {
if (*dst != 0xff) {
- printf("FATAL: dst %p not erased (val 0x%x\n", dst,
- *dst);
+ printf("FATAL: dst %p not erased (val 0x%x)\n",
+ dst, *dst);
return (-1);
}
/* transfer data from source to destination */
usleep(200);
}
-
#endif /* !__JEDEC_H__ */
#include "jedec.h"
#include "pm49fl004.h"
-#define AUTO_PGRM 0x10
-#define CHIP_ERASE 0x30
-#define RESET 0xFF
-#define READ_ID 0x90
-
static __inline__ int erase_block_49fl004(volatile unsigned char *bios,
unsigned long address)
{
#define AUTO_PG_ERASE1 0x20
#define AUTO_PG_ERASE2 0xD0
-#define AUTO_PGRM 0x10
-#define CHIP_ERASE 0x30
-#define RESET 0xFF
-#define READ_ID 0x90
static __inline__ int erase_sector_39sf020(volatile char *bios,
unsigned long address)
#include "jedec.h"
#include "sst49lf040.h"
-#define AUTO_PG_ERASE1 0x20
-#define AUTO_PG_ERASE2 0xD0
-#define AUTO_PGRM 0x10
-#define CHIP_ERASE 0x30
-#define RESET 0xFF
-#define READ_ID 0x90
-
-
int write_49lf040(struct flashchip *flash, unsigned char *buf)
{
int i;
#ifndef __SST49LF040_H__
#define __SST49LF040_H__ 1
-extern int probe_49lf040(struct flashchip *flash);
-extern int erase_49lf040(struct flashchip *flash);
extern int write_49lf040(struct flashchip *flash, unsigned char *buf);
#endif /* !__SST49LF040_H__ */
#ifndef __W49F002U_H__
#define __W49F002U_H__ 1
-extern int probe_49f002(struct flashchip *flash);
-extern int erase_49f002(struct flashchip *flash);
extern int write_49f002(struct flashchip *flash, unsigned char *buf);
#endif /* !__W49F002U_H__ */