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:
parent
1617942a81
commit
83c411c29b
|
@ -16,6 +16,7 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
|
|||
/* Mode 0 */
|
||||
{
|
||||
.type = NAND_SDR_IFACE,
|
||||
.timings.mode = 0,
|
||||
.timings.sdr = {
|
||||
.tCCS_min = 500000,
|
||||
.tR_max = 200000000,
|
||||
|
@ -58,6 +59,7 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
|
|||
/* Mode 1 */
|
||||
{
|
||||
.type = NAND_SDR_IFACE,
|
||||
.timings.mode = 1,
|
||||
.timings.sdr = {
|
||||
.tCCS_min = 500000,
|
||||
.tR_max = 200000000,
|
||||
|
@ -100,6 +102,7 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
|
|||
/* Mode 2 */
|
||||
{
|
||||
.type = NAND_SDR_IFACE,
|
||||
.timings.mode = 2,
|
||||
.timings.sdr = {
|
||||
.tCCS_min = 500000,
|
||||
.tR_max = 200000000,
|
||||
|
@ -142,6 +145,7 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
|
|||
/* Mode 3 */
|
||||
{
|
||||
.type = NAND_SDR_IFACE,
|
||||
.timings.mode = 3,
|
||||
.timings.sdr = {
|
||||
.tCCS_min = 500000,
|
||||
.tR_max = 200000000,
|
||||
|
@ -184,6 +188,7 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
|
|||
/* Mode 4 */
|
||||
{
|
||||
.type = NAND_SDR_IFACE,
|
||||
.timings.mode = 4,
|
||||
.timings.sdr = {
|
||||
.tCCS_min = 500000,
|
||||
.tR_max = 200000000,
|
||||
|
@ -226,6 +231,7 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
|
|||
/* Mode 5 */
|
||||
{
|
||||
.type = NAND_SDR_IFACE,
|
||||
.timings.mode = 5,
|
||||
.timings.sdr = {
|
||||
.tCCS_min = 500000,
|
||||
.tR_max = 200000000,
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue