X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fdataflash.h;h=94f86b3a306c21ea5fd79b2e63035f0e7ffc1d14;hb=c5c59df04d6bb394209936c2a2c2a3054ead9150;hp=68f0324158cb7947e8c4cead634998818960cbc5;hpb=a1b215e2a2a013327693f2fb990957b746f26cf5;p=u-boot diff --git a/include/dataflash.h b/include/dataflash.h index 68f0324158..94f86b3a30 100644 --- a/include/dataflash.h +++ b/include/dataflash.h @@ -34,13 +34,12 @@ #define _DataFlash_h -#include #include "config.h" /*number of protected area*/ #define NB_DATAFLASH_AREA 5 -#ifdef CFG_NO_FLASH +#ifdef CONFIG_SYS_NO_FLASH /*----------------------------------------------------------------------- * return codes from flash_write(): @@ -66,7 +65,7 @@ * Set Environment according to label: */ # define FLAG_SETENV 0x80 -#endif /* CFG_NO_FLASH */ +#endif /* CONFIG_SYS_NO_FLASH */ /*define the area structure*/ typedef struct { @@ -130,10 +129,14 @@ typedef struct _AT91S_DATAFLASH_INFO { unsigned int id; /* device id */ } AT91S_DATAFLASH_INFO, *AT91PS_DATAFLASH_INFO; - +struct dataflash_addr { + unsigned long addr; + int cs; +}; /*-------------------------------------------------------------------------------------------------*/ - #define AT45DB161 0x2c +#define AT45DB021 0x14 +#define AT45DB081 0x24 #define AT45DB321 0x34 #define AT45DB642 0x3c #define AT45DB128 0x10 @@ -204,12 +207,15 @@ extern int addr2ram(ulong addr); extern int dataflash_real_protect (int flag, unsigned long start_addr, unsigned long end_addr); extern int addr_dataflash (unsigned long addr); extern int read_dataflash (unsigned long addr, unsigned long size, char *result); -extern int write_dataflash (unsigned long addr, unsigned long dest, unsigned long size); +extern int write_dataflash(unsigned long addr_dest, unsigned long addr_src, + unsigned long size); +extern int AT91F_DataflashInit(void); + extern void dataflash_print_info (void); extern void dataflash_perror (int err); +extern void AT91F_DataflashSetEnv (void); -#ifdef CONFIG_NEW_DF_PARTITION -extern int AT91F_DataflashSetEnv (void); #endif -#endif - +extern struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS]; +extern dataflash_protect_t area_list[NB_DATAFLASH_AREA]; +extern AT91S_DATAFLASH_INFO dataflash_info[]; #endif