Files
Jon Lin 69059cd5f5 drivers: rkflash: Fixes compiler warnings
drivers/rkflash/nandc.c:393:31: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
error, forbidden warning:nandc.c:393
                        } while ((fl_reg.V6.tr_rdy == 0));
                                  ~~~~~~~~~~~~~~~~~^~~~
drivers/rkflash/nandc.c:393:31: note: remove extraneous parentheses around the comparison to silence this warning
                        } while ((fl_reg.V6.tr_rdy == 0));
                                 ~                 ^   ~
drivers/rkflash/nandc.c:393:31: note: use '=' to turn this equality comparison into an assignment
                        } while ((fl_reg.V6.tr_rdy == 0));

Change-Id: Ib4c422216c61191b924163fedfe1b83f1fd297df
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-03-22 15:30:39 +08:00

59 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2018 Rockchip Electronics Co. Ltd. */
#ifndef __RK_FLASH_API_H
#define __RK_FLASH_API_H
#ifdef CONFIG_RK_NANDC_NAND
#include "flash.h"
#endif
#ifdef CONFIG_RK_SFC_NAND
#include "sfc_nand.h"
#endif
#ifdef CONFIG_RK_SFC_NOR
#include "sfc_nor.h"
#endif
enum flash_con_type {
FLASH_CON_TYPE_NANDC = 0,
FLASH_CON_TYPE_SFC,
FLASH_CON_TYPE_MAX,
};
enum flash_type {
FLASH_TYPE_NANDC_NAND = 0,
FLASH_TYPE_SFC_NOR,
FLASH_TYPE_SFC_NAND,
FLASH_TYPE_MAX,
};
struct flash_boot_ops {
int (*init)(void __iomem *reg_addr);
int (*read)(u32 sec, u32 n_sec, void *p_data);
int (*write)(u32 sec, u32 n_sec, void *p_data);
u32 (*get_capacity)(void);
void (*deinit)(void);
int (*resume)(void __iomem *reg_addr);
int (*vendor_read)(u32 sec, u32 n_sec, void *p_data);
int (*vendor_write)(u32 sec, u32 n_sec, void *p_data);
int (*gc)(void);
int (*discard)(u32 sec, u32 n_sec);
};
#if IS_REACHABLE(CONFIG_RK_NANDC_NAND)
extern const struct flash_boot_ops nandc_nand_ops;
#endif
#ifdef CONFIG_RK_SFC_NOR
extern struct SFNOR_DEV *sfnor_dev;
extern const struct flash_boot_ops sfc_nor_ops;
#endif
#ifdef CONFIG_RK_SFC_NAND
extern struct SFNAND_DEV *sfnand_dev;
extern const struct flash_boot_ops sfc_nand_ops;
#endif
#endif