mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
Now that the defines are moved to header files we don't need this conditional compilation any more. Remove it. Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
@@ -42,6 +42,8 @@ int find_dev_and_part(const char *id, struct mtd_device **dev,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_NO_FLASH
|
#ifndef CONFIG_SYS_NO_FLASH
|
||||||
|
#include <flash.h>
|
||||||
|
#include <mtd/cfi_flash.h>
|
||||||
extern flash_info_t flash_info[]; /* info for FLASH chips */
|
extern flash_info_t flash_info[]; /* info for FLASH chips */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -417,11 +419,7 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)
|
|||||||
{
|
{
|
||||||
flash_info_t *info;
|
flash_info_t *info;
|
||||||
ulong bank;
|
ulong bank;
|
||||||
#ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
|
|
||||||
int s_first[CONFIG_SYS_MAX_FLASH_BANKS_DETECT], s_last[CONFIG_SYS_MAX_FLASH_BANKS_DETECT];
|
|
||||||
#else
|
|
||||||
int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS];
|
int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS];
|
||||||
#endif
|
|
||||||
int erased = 0;
|
int erased = 0;
|
||||||
int planned;
|
int planned;
|
||||||
int rcode = 0;
|
int rcode = 0;
|
||||||
@@ -635,11 +633,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
|
|||||||
{
|
{
|
||||||
flash_info_t *info;
|
flash_info_t *info;
|
||||||
ulong bank;
|
ulong bank;
|
||||||
#ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
|
|
||||||
int s_first[CONFIG_SYS_MAX_FLASH_BANKS_DETECT], s_last[CONFIG_SYS_MAX_FLASH_BANKS_DETECT];
|
|
||||||
#else
|
|
||||||
int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS];
|
int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS];
|
||||||
#endif
|
|
||||||
int protected, i;
|
int protected, i;
|
||||||
int planned;
|
int planned;
|
||||||
int rcode;
|
int rcode;
|
||||||
|
@@ -30,15 +30,7 @@
|
|||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/concat.h>
|
#include <linux/mtd/concat.h>
|
||||||
|
#include <mtd/cfi_flash.h>
|
||||||
/* use CONFIG_SYS_MAX_FLASH_BANKS_DETECT if defined */
|
|
||||||
#ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
|
|
||||||
# define CFI_MAX_FLASH_BANKS CONFIG_SYS_MAX_FLASH_BANKS_DETECT
|
|
||||||
#else
|
|
||||||
# define CFI_MAX_FLASH_BANKS CONFIG_SYS_MAX_FLASH_BANKS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern flash_info_t flash_info[];
|
|
||||||
|
|
||||||
static struct mtd_info cfi_mtd_info[CFI_MAX_FLASH_BANKS];
|
static struct mtd_info cfi_mtd_info[CFI_MAX_FLASH_BANKS];
|
||||||
static char cfi_mtd_names[CFI_MAX_FLASH_BANKS][16];
|
static char cfi_mtd_names[CFI_MAX_FLASH_BANKS][16];
|
||||||
|
Reference in New Issue
Block a user