mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
mtd: nand: add onfi_* stubs in case ONFI_DETECTION is disabled
Add stubs to the header in case CONFIG_SYS_NAND_ONFI_DETECTION is disabled. This is much easier than adding around #ifdef to the caller side. Also, I removed the #ifdef around onfi_params. In Linux, onfi_params and jedec_params are unified as union. It will be the right thing to do. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
ed3986ca30
commit
4c61f79b5e
1 changed files with 15 additions and 2 deletions
|
@ -741,9 +741,7 @@ struct nand_chip {
|
||||||
|
|
||||||
int onfi_version;
|
int onfi_version;
|
||||||
int jedec_version;
|
int jedec_version;
|
||||||
#ifdef CONFIG_SYS_NAND_ONFI_DETECTION
|
|
||||||
struct nand_onfi_params onfi_params;
|
struct nand_onfi_params onfi_params;
|
||||||
#endif
|
|
||||||
struct nand_jedec_params jedec_params;
|
struct nand_jedec_params jedec_params;
|
||||||
|
|
||||||
int read_retries;
|
int read_retries;
|
||||||
|
@ -1001,6 +999,21 @@ static inline int onfi_get_sync_timing_mode(struct nand_chip *chip)
|
||||||
return ONFI_TIMING_MODE_UNKNOWN;
|
return ONFI_TIMING_MODE_UNKNOWN;
|
||||||
return le16_to_cpu(chip->onfi_params.src_sync_timing_mode);
|
return le16_to_cpu(chip->onfi_params.src_sync_timing_mode);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline int onfi_feature(struct nand_chip *chip)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int onfi_get_async_timing_mode(struct nand_chip *chip)
|
||||||
|
{
|
||||||
|
return ONFI_TIMING_MODE_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int onfi_get_sync_timing_mode(struct nand_chip *chip)
|
||||||
|
{
|
||||||
|
return ONFI_TIMING_MODE_UNKNOWN;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue