X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fflash.h;h=3bf6b22399ec920809a2d510174c9e997d9291ee;hb=8e8059ccc55a3725046e628c87450dbc41e1a504;hp=807800b524e9abfafabfb132f7523a9a71cd76e3;hpb=c1c6e4a9da674bce5980d82f8a70a56e023e58c3;p=oweals%2Fu-boot.git diff --git a/include/flash.h b/include/flash.h index 807800b524..3bf6b22399 100644 --- a/include/flash.h +++ b/include/flash.h @@ -84,20 +84,20 @@ typedef unsigned long flash_sect_t; /* Prototypes */ -extern unsigned long flash_init (void); -extern void flash_print_info (flash_info_t *); -extern int flash_erase (flash_info_t *, int, int); -extern int flash_sect_erase (ulong addr_first, ulong addr_last); -extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last); -extern int flash_sect_roundb (ulong *addr); -extern unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect); -extern void flash_set_verbose(uint); +unsigned long flash_init(void); +void flash_print_info(flash_info_t *info); +int flash_erase(flash_info_t *info, int s_first, int s_last); +int flash_sect_erase(ulong addr_first, ulong addr_last); +int flash_sect_protect(int flag, ulong addr_first, ulong addr_last); +int flash_sect_roundb(ulong *addr); +unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect); +void flash_set_verbose(uint v); /* common/flash.c */ -extern void flash_protect (int flag, ulong from, ulong to, flash_info_t *info); -extern int flash_write (char *, ulong, ulong); -extern flash_info_t *addr2info (ulong); -extern int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt); +void flash_protect(int flag, ulong from, ulong to, flash_info_t *info); +int flash_write(char *src, ulong addr, ulong cnt); +flash_info_t *addr2info(ulong addr); +int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt); /* drivers/mtd/cfi_mtd.c */ #ifdef CONFIG_FLASH_CFI_MTD @@ -117,6 +117,13 @@ extern int jedec_flash_match(flash_info_t *info, ulong base); #define CFI_CMDSET_AMD_LEGACY 0xFFF0 #endif +/** + * flash_perror() - Print a flash error + * + * @err: Error number of message to print (ERR_... as below) + */ +void flash_perror(int err); + /*----------------------------------------------------------------------- * return codes from flash_write(): */