#include <common.h>
#include <debug_uart.h>
-#include <flash.h>
#include <init.h>
#include <net.h>
#include <vsprintf.h>
#include <version.h>
#ifdef CONFIG_MTD_NOR_FLASH
-extern flash_info_t flash_info[];
+#include <flash.h>
#endif
void lcd_show_board_info(void)
#include <command.h>
#include <env.h>
#include <env_internal.h>
-#include <flash.h>
#include <init.h>
#include <net.h>
#include <malloc.h>
#include <common.h>
#include <dm.h>
-#include <flash.h>
#include <fsl_validate.h>
#include <fsl_secboot_err.h>
#include <fsl_sfp.h>
* address
*/
#if defined(CONFIG_MPC85xx)
+#include <flash.h>
+
int get_csf_base_addr(u32 *csf_addr, u32 *flash_base_addr)
{
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
#include <command.h>
#include <env.h>
#include <env_internal.h>
-#include <flash.h>
#include <init.h>
#include <led.h>
#include <log.h>
#include <init.h>
#include <net.h>
#include <ns16550.h>
-#include <flash.h>
#include <nand.h>
#include <i2c.h>
#include <serial.h>
#include <common.h>
#include <dm.h>
#include <env.h>
-#include <flash.h>
#include <init.h>
#include <asm/global_data.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
-extern flash_info_t flash_info[]; /* FLASH chips info */
-
void local_bus_init (void);
ulong flash_get_size (ulong base, int banknum);
#include <cli.h>
#include <console.h>
#include <env.h>
+#ifdef CONFIG_TDX_CFG_BLOCK_IS_IN_NOR
#include <flash.h>
+#endif
#include <malloc.h>
#include <mmc.h>
#include <nand.h>
#if defined(CONFIG_CMD_IMLS)
#include <flash.h>
#include <mtd/cfi_flash.h>
-extern flash_info_t flash_info[]; /* info for FLASH chips */
#endif
#if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
# define DEBUGF(fmt, args...)
#endif
-#include <flash.h>
#ifndef CONFIG_MTD_NOR_FLASH
# define OFFSET_ADJUSTMENT 0
#else
+#include <flash.h>
# define OFFSET_ADJUSTMENT (flash_info[id.num].start[0])
#endif
#include <command.h>
#include <cros_ec.h>
#include <dm.h>
-#include <flash.h>
#include <log.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#ifdef CONFIG_MTD_NOR_FLASH
#include <flash.h>
#include <mtd/cfi_flash.h>
-extern flash_info_t flash_info[]; /* info for FLASH chips */
/*
* The user interface starts numbering for Flash banks with 1
#include <common.h>
#include <command.h>
#include <env.h>
+#if defined(CONFIG_CMD_FLASH)
#include <flash.h>
+#endif
#include <image.h>
#include <malloc.h>
#include <jffs2/jffs2.h>
if (type == MTD_DEV_TYPE_NOR) {
#if defined(CONFIG_CMD_FLASH)
if (num < CONFIG_SYS_MAX_FLASH_BANKS) {
- extern flash_info_t flash_info[];
*size = flash_info[num].size;
return 0;
static inline u32 get_part_sector_size_nor(struct mtdids *id, struct part_info *part)
{
#if defined(CONFIG_CMD_FLASH)
- extern flash_info_t flash_info[];
-
u32 end_phys, start_phys, sector_size = 0, size = 0;
int i;
flash_info_t *flash;
#include <efi_loader.h>
#include <env.h>
#include <exports.h>
+#ifdef CONFIG_MTD_NOR_FLASH
#include <flash.h>
+#endif
#include <image.h>
#include <lmb.h>
#include <mapmem.h>
#include <cli.h>
#include <command.h>
#include <console.h>
+#ifdef CONFIG_MTD_NOR_FLASH
#include <flash.h>
+#endif
#include <hash.h>
#include <log.h>
#include <mapmem.h>
#include <common.h>
#include <command.h>
#include <env.h>
-#include <flash.h>
#include <image.h>
#include <net.h>
#include <vsprintf.h>
#include <command.h>
#include <div64.h>
#include <dm.h>
-#include <flash.h>
#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <bootstage.h>
#include <cpu_func.h>
#include <exports.h>
+#ifdef CONFIG_MTD_NOR_FLASH
#include <flash.h>
+#endif
#include <hang.h>
#include <image.h>
#include <irq_func.h>
#include <mtd/cfi_flash.h>
-extern flash_info_t flash_info[]; /* info for FLASH chips */
-
/*-----------------------------------------------------------------------
* Functions
*/
#include <command.h>
#include <env.h>
-#include <flash.h>
#include <net.h>
#include <net/tftp.h>
#include <malloc.h>
#include <mapmem.h>
#include <dfu.h>
#include <errno.h>
-#include <mtd/cfi_flash.h>
#if defined(CONFIG_DFU_TFTP) || defined(CONFIG_UPDATE_TFTP)
/* env variable holding the location of the update file */
extern ulong tftp_timeout_ms;
extern int tftp_timeout_count_max;
#ifdef CONFIG_MTD_NOR_FLASH
-extern flash_info_t flash_info[];
+#include <flash.h>
+#include <mtd/cfi_flash.h>
static uchar *saved_prot_info;
#endif
static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
*/
#include <common.h>
-#include <flash.h>
#include <malloc.h>
#include <errno.h>
#include <div64.h>
#include <fastboot-internal.h>
#include <fb_mmc.h>
#include <fb_nand.h>
-#include <flash.h>
#include <part.h>
#include <stdlib.h>
#include <fastboot.h>
#include <fastboot-internal.h>
#include <fb_mmc.h>
-#include <flash.h>
#include <image-sparse.h>
#include <image.h>
#include <log.h>
#include <config.h>
#include <common.h>
#include <blk.h>
-#include <flash.h>
#include <fastboot.h>
#include <image-sparse.h>
#include <common.h>
#include <command.h>
#include <dm.h>
-#include <flash.h>
#include <i2c.h>
#include <cros_ec.h>
#include <fdtdec.h>
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
-#include <flash.h>
#include <log.h>
#include <spi.h>
#include <spi_flash.h>
*/
#include <common.h>
-#include <flash.h>
#include <malloc.h>
#include <linux/errno.h>
#include <linux/mtd/mtd.h>
*/
#include <common.h>
-#include <flash.h>
#include <log.h>
#include <watchdog.h>
#include <dm.h>
#include <command.h>
#include <env.h>
#include <env_internal.h>
-#include <flash.h>
#include <log.h>
#include <asm/global_data.h>
#include <linux/stddef.h>
#ifndef CONFIG_SPL_BUILD
# if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_FLASH)
+# include <flash.h>
# define CMD_SAVEENV
# elif defined(CONFIG_ENV_ADDR_REDUND)
# error CONFIG_ENV_ADDR_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_FLASH
#include <dm.h>
#include <env.h>
#include <env_internal.h>
-#include <flash.h>
#include <malloc.h>
#include <spi.h>
#include <spi_flash.h>
*/
#include <common.h>
-#include <flash.h>
#include <malloc.h>
#include <asm/byteorder.h>
#include <linux/stat.h>
/* CPU address space offset calculation macro, struct part_info offset is
* device address space offset, so we need to shift it by a device start address. */
#if defined(CONFIG_MTD_NOR_FLASH)
-extern flash_info_t flash_info[];
+#include <flash.h>
#define PART_OFFSET(x) ((ulong)x->offset + \
flash_info[x->dev->id->num].start[0])
#else
#include <common.h>
#include <config.h>
-#include <flash.h>
#include <malloc.h>
#include <div64.h>
#include <linux/compiler.h>
#if defined(CONFIG_CMD_FLASH)
+#include <flash.h>
+
/*
* Support for jffs2 on top of NOR-flash
*
u32 addr = off;
struct mtdids *id = current_part->dev->id;
- extern flash_info_t flash_info[];
flash_info_t *flash = &flash_info[id->num];
addr += flash->start[0];
#ifndef _FLASH_H_
#define _FLASH_H_
-#ifndef CONFIG_SYS_MAX_FLASH_SECT
-#define CONFIG_SYS_MAX_FLASH_SECT 512
-#endif
-
/*-----------------------------------------------------------------------
* FLASH Info: contains chip specific data, per FLASH bank
*/
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_cmd_reset(flash_info_t *info);
void flash_set_verbose(uint v);
/* common/flash.c */
phys_addr_t cfi_flash_bank_addr(int i);
unsigned long cfi_flash_bank_size(int i);
-void flash_cmd_reset(flash_info_t *info);
#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
void flash_write8(u8 value, void *addr);
#include <common.h>
#include <command.h>
+#ifdef CONFIG_SYS_DIRECT_FLASH_NFS
#include <flash.h>
+#endif
#include <image.h>
#include <log.h>
#include <net.h>
* Licensed under the GPL-2 or later.
*/
+#if CONFIG_POST & CONFIG_SYS_POST_FLASH
#include <common.h>
#include <malloc.h>
#include <post.h>
#include <flash.h>
-#if CONFIG_POST & CONFIG_SYS_POST_FLASH
/*
* This code will walk over the declared sectors erasing them,
# error "invalid flash block start/end"
#endif
-extern flash_info_t flash_info[];
-
static void *seed_src_data(void *ptr, ulong *old_len, ulong new_len)
{
unsigned char *p;