X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fflash.h;h=70ab43519955ec8187f908a01dc67e69fd4de3b4;hb=b4af64fdfd5f014340bc78318706f31dd49856a0;hp=55c5bdd4b12983fde8c70bf49a474a5b0d64e1e1;hpb=c1b62ba9ca0e41fdd548cb3bb9af3b3f90d4a393;p=u-boot diff --git a/include/flash.h b/include/flash.h index 55c5bdd4b1..70ab435199 100644 --- a/include/flash.h +++ b/include/flash.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2000-2005 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _FLASH_H_ @@ -42,11 +41,16 @@ typedef struct { ushort cfi_offset; /* offset for cfi query */ ulong addr_unlock1; /* unlock address 1 for AMD flash roms */ ulong addr_unlock2; /* unlock address 2 for AMD flash roms */ + uchar sr_supported; /* status register supported */ const char *name; /* human-readable name */ #endif #ifdef CONFIG_MTD struct mtd_info *mtd; #endif +#ifdef CONFIG_CFI_FLASH /* DM-specific parts */ + struct udevice *dev; + phys_addr_t base; +#endif } flash_info_t; extern flash_info_t flash_info[]; /* info for FLASH chips */ @@ -81,7 +85,6 @@ typedef unsigned long flash_sect_t; /* Prototypes */ extern unsigned long flash_init (void); -extern void flash_protect_default(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); @@ -114,15 +117,11 @@ extern int jedec_flash_match(flash_info_t *info, ulong base); #define CFI_CMDSET_AMD_LEGACY 0xFFF0 #endif -#if defined(CONFIG_SYS_FLASH_CFI) -extern flash_info_t *flash_get_info(ulong base); -#endif - /*----------------------------------------------------------------------- * return codes from flash_write(): */ #define ERR_OK 0 -#define ERR_TIMOUT 1 +#define ERR_TIMEOUT 1 #define ERR_NOT_ERASED 2 #define ERR_PROTECTED 4 #define ERR_INVAL 8