drivers: rkflash: remove unuse struct define

Change-Id: Ia53cf4fb1bc7c5227fbb7d2e26ec9c580c46f478
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2019-10-24 21:16:56 +08:00
committed by Tao Huang
parent 3cb2d16219
commit c222309ca5
7 changed files with 13 additions and 25 deletions

View File

@@ -217,7 +217,7 @@ static u32 flash_read_page(u8 cs, u32 page_addr, u32 *p_data, u32 *p_spare)
__func__, page_addr, ret);
}
rkflash_print_dio("%s %x %x retry=%x\n",
__func__, page_addr, p_data[0], i);
__func__, page_addr, p_data[0], i);
return ret;
}
@@ -329,7 +329,7 @@ static void flash_die_info_init(void)
nand_para.blk_per_plane;
}
static void flash_print_info(void)
static void flash_show_info(void)
{
rkflash_print_info("No.0 FLASH ID: %x %x %x %x %x %x\n",
nand_para.nand_id[0],
@@ -427,7 +427,7 @@ u32 nandc_flash_init(void __iomem *nandc_addr)
{
u32 cs;
rkflash_print_info("...%s enter...\n", __func__);
rkflash_print_error("...%s enter...\n", __func__);
g_nand_idb_res_blk_num = MAX_IDB_RESERVED_BLOCK;
g_nand_ecc_en = 0;
@@ -483,7 +483,7 @@ u32 nandc_flash_init(void __iomem *nandc_addr)
}
flash_die_info_init();
flash_bch_sel(nand_para.ecc_bits);
flash_print_info();
flash_show_info();
flash_ftl_ops_init();
return 0;

View File

@@ -120,16 +120,6 @@ struct NAND_PARA_INFO_T {
u8 reversd2[6]; /* 32 bytes */
};
struct FLASH_INFO_T {
u16 block_size;
u8 ecc_bits;
u32 flash_size;
u16 page_size;
u8 access_time;
u8 manufacturer_name;
u8 flash_mask;
};
extern struct nand_phy_info g_nand_phy_info;
extern struct nand_ops g_nand_ops;
extern void __iomem *nandc_base;

View File

@@ -57,12 +57,6 @@ void rksfc_dma_unmap_single(unsigned long ptr, int size, int dir)
#endif
}
int rksfc_get_reg_addr(unsigned long *p_sfc_addr)
{
*p_sfc_addr = (unsigned long)g_sfc_info.reg_base;
return 0;
}
static irqreturn_t rksfc_interrupt(int irq, void *dev_id)
{
sfc_clean_irq();

View File

@@ -184,7 +184,6 @@ int sfc_init(void __iomem *reg_addr);
int sfc_request(u32 sfcmd, u32 sfctrl, u32 addr, void *data);
u16 sfc_get_version(void);
void sfc_clean_irq(void);
int rksfc_get_reg_addr(unsigned long *p_sfc_addr);
void sfc_handle_irq(void);
unsigned long rksfc_dma_map_single(unsigned long ptr, int size, int dir);
void rksfc_dma_unmap_single(unsigned long ptr, int size, int dir);

View File

@@ -707,8 +707,8 @@ u32 sfc_nand_init(void)
u8 status, id_byte[8];
sfc_nand_read_id(id_byte);
rkflash_print_info("sfc_nand id: %x %x %x\n",
id_byte[0], id_byte[1], id_byte[2]);
rkflash_print_error("sfc_nand id: %x %x %x\n",
id_byte[0], id_byte[1], id_byte[2]);
if (id_byte[0] == 0xFF || id_byte[0] == 0x00)
return FTL_NO_FLASH;
@@ -764,3 +764,7 @@ struct SFNAND_DEV *sfc_nand_get_private_dev(void)
return &sfc_nand_dev;
}
struct nand_info *sfc_nand_get_nand_info(void)
{
return p_nand_info;
}

View File

@@ -128,5 +128,6 @@ u32 sfc_nand_check_bad_block(u8 cs, u32 addr);
u32 sfc_nand_mark_bad_block(u8 cs, u32 addr);
void sfc_nand_ftl_ops_init(void);
struct SFNAND_DEV *sfc_nand_get_private_dev(void);
struct nand_info *sfc_nand_get_nand_info(void);
#endif

View File

@@ -574,8 +574,8 @@ int snor_init(struct SFNOR_DEV *p_dev)
memset(p_dev, 0, sizeof(struct SFNOR_DEV));
snor_read_id(id_byte);
rkflash_print_info("sfc nor id: %x %x %x\n",
id_byte[0], id_byte[1], id_byte[2]);
rkflash_print_error("sfc nor id: %x %x %x\n",
id_byte[0], id_byte[1], id_byte[2]);
if (0xFF == id_byte[0] || 0x00 == id_byte[0])
return SFC_ERROR;