mtd: rawnand: timings: Add mode information to the timings structure

Convert the timings union into a structure containing the mode and the
actual values. The values are still a union in prevision of the
addition of the NVDDR modes.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200428094302.14624-2-miquel.raynal@bootlin.com
This commit is contained in:
Miquel Raynal
2020-04-28 11:42:54 +02:00
parent 1617942a81
commit 83c411c29b
2 changed files with 13 additions and 3 deletions

View File

@@ -491,13 +491,17 @@ enum nand_data_interface_type {
/**
* struct nand_data_interface - NAND interface timing
* @type: type of the timing
* @timings: The timing, type according to @type
* @timings: The timing information
* @timings.mode: Timing mode as defined in the specification
* @timings.sdr: Use it when @type is %NAND_SDR_IFACE.
*/
struct nand_data_interface {
enum nand_data_interface_type type;
union {
struct nand_sdr_timings sdr;
struct nand_timings {
unsigned int mode;
union {
struct nand_sdr_timings sdr;
};
} timings;
};