@@ -773,7 +773,7 @@ int nand_soft_waitrdy(struct nand_chip *chip, unsigned long timeout_ms)
773773 return - ENOTSUPP ;
774774
775775 /* Wait tWB before polling the STATUS reg. */
776- timings = nand_get_sdr_timings (& chip -> data_interface );
776+ timings = nand_get_sdr_timings (nand_get_interface_config ( chip ) );
777777 ndelay (PSEC_TO_NSEC (timings -> tWB_max ));
778778
779779 ret = nand_status_op (chip , NULL );
@@ -1119,9 +1119,9 @@ static int nand_sp_exec_read_page_op(struct nand_chip *chip, unsigned int page,
11191119 unsigned int offset_in_page , void * buf ,
11201120 unsigned int len )
11211121{
1122- struct mtd_info * mtd = nand_to_mtd (chip );
11231122 const struct nand_sdr_timings * sdr =
1124- nand_get_sdr_timings (& chip -> data_interface );
1123+ nand_get_sdr_timings (nand_get_interface_config (chip ));
1124+ struct mtd_info * mtd = nand_to_mtd (chip );
11251125 u8 addrs [4 ];
11261126 struct nand_op_instr instrs [] = {
11271127 NAND_OP_CMD (NAND_CMD_READ0 , 0 ),
@@ -1163,7 +1163,7 @@ static int nand_lp_exec_read_page_op(struct nand_chip *chip, unsigned int page,
11631163 unsigned int len )
11641164{
11651165 const struct nand_sdr_timings * sdr =
1166- nand_get_sdr_timings (& chip -> data_interface );
1166+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
11671167 u8 addrs [5 ];
11681168 struct nand_op_instr instrs [] = {
11691169 NAND_OP_CMD (NAND_CMD_READ0 , 0 ),
@@ -1260,7 +1260,7 @@ int nand_read_param_page_op(struct nand_chip *chip, u8 page, void *buf,
12601260
12611261 if (nand_has_exec_op (chip )) {
12621262 const struct nand_sdr_timings * sdr =
1263- nand_get_sdr_timings (& chip -> data_interface );
1263+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
12641264 struct nand_op_instr instrs [] = {
12651265 NAND_OP_CMD (NAND_CMD_PARAM , 0 ),
12661266 NAND_OP_ADDR (1 , & page , PSEC_TO_NSEC (sdr -> tWB_max )),
@@ -1315,7 +1315,7 @@ int nand_change_read_column_op(struct nand_chip *chip,
13151315
13161316 if (nand_has_exec_op (chip )) {
13171317 const struct nand_sdr_timings * sdr =
1318- nand_get_sdr_timings (& chip -> data_interface );
1318+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
13191319 u8 addrs [2 ] = {};
13201320 struct nand_op_instr instrs [] = {
13211321 NAND_OP_CMD (NAND_CMD_RNDOUT , 0 ),
@@ -1389,9 +1389,9 @@ static int nand_exec_prog_page_op(struct nand_chip *chip, unsigned int page,
13891389 unsigned int offset_in_page , const void * buf ,
13901390 unsigned int len , bool prog )
13911391{
1392- struct mtd_info * mtd = nand_to_mtd (chip );
13931392 const struct nand_sdr_timings * sdr =
1394- nand_get_sdr_timings (& chip -> data_interface );
1393+ nand_get_sdr_timings (nand_get_interface_config (chip ));
1394+ struct mtd_info * mtd = nand_to_mtd (chip );
13951395 u8 addrs [5 ] = {};
13961396 struct nand_op_instr instrs [] = {
13971397 /*
@@ -1514,7 +1514,7 @@ int nand_prog_page_end_op(struct nand_chip *chip)
15141514
15151515 if (nand_has_exec_op (chip )) {
15161516 const struct nand_sdr_timings * sdr =
1517- nand_get_sdr_timings (& chip -> data_interface );
1517+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
15181518 struct nand_op_instr instrs [] = {
15191519 NAND_OP_CMD (NAND_CMD_PAGEPROG ,
15201520 PSEC_TO_NSEC (sdr -> tWB_max )),
@@ -1621,7 +1621,7 @@ int nand_change_write_column_op(struct nand_chip *chip,
16211621
16221622 if (nand_has_exec_op (chip )) {
16231623 const struct nand_sdr_timings * sdr =
1624- nand_get_sdr_timings (& chip -> data_interface );
1624+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
16251625 u8 addrs [2 ];
16261626 struct nand_op_instr instrs [] = {
16271627 NAND_OP_CMD (NAND_CMD_RNDIN , 0 ),
@@ -1676,7 +1676,7 @@ int nand_readid_op(struct nand_chip *chip, u8 addr, void *buf,
16761676
16771677 if (nand_has_exec_op (chip )) {
16781678 const struct nand_sdr_timings * sdr =
1679- nand_get_sdr_timings (& chip -> data_interface );
1679+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
16801680 struct nand_op_instr instrs [] = {
16811681 NAND_OP_CMD (NAND_CMD_READID , 0 ),
16821682 NAND_OP_ADDR (1 , & addr , PSEC_TO_NSEC (sdr -> tADL_min )),
@@ -1715,7 +1715,7 @@ int nand_status_op(struct nand_chip *chip, u8 *status)
17151715{
17161716 if (nand_has_exec_op (chip )) {
17171717 const struct nand_sdr_timings * sdr =
1718- nand_get_sdr_timings (& chip -> data_interface );
1718+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
17191719 struct nand_op_instr instrs [] = {
17201720 NAND_OP_CMD (NAND_CMD_STATUS ,
17211721 PSEC_TO_NSEC (sdr -> tADL_min )),
@@ -1784,7 +1784,7 @@ int nand_erase_op(struct nand_chip *chip, unsigned int eraseblock)
17841784
17851785 if (nand_has_exec_op (chip )) {
17861786 const struct nand_sdr_timings * sdr =
1787- nand_get_sdr_timings (& chip -> data_interface );
1787+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
17881788 u8 addrs [3 ] = { page , page >> 8 , page >> 16 };
17891789 struct nand_op_instr instrs [] = {
17901790 NAND_OP_CMD (NAND_CMD_ERASE1 , 0 ),
@@ -1843,7 +1843,7 @@ static int nand_set_features_op(struct nand_chip *chip, u8 feature,
18431843
18441844 if (nand_has_exec_op (chip )) {
18451845 const struct nand_sdr_timings * sdr =
1846- nand_get_sdr_timings (& chip -> data_interface );
1846+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
18471847 struct nand_op_instr instrs [] = {
18481848 NAND_OP_CMD (NAND_CMD_SET_FEATURES , 0 ),
18491849 NAND_OP_ADDR (1 , & feature , PSEC_TO_NSEC (sdr -> tADL_min )),
@@ -1890,7 +1890,7 @@ static int nand_get_features_op(struct nand_chip *chip, u8 feature,
18901890
18911891 if (nand_has_exec_op (chip )) {
18921892 const struct nand_sdr_timings * sdr =
1893- nand_get_sdr_timings (& chip -> data_interface );
1893+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
18941894 struct nand_op_instr instrs [] = {
18951895 NAND_OP_CMD (NAND_CMD_GET_FEATURES , 0 ),
18961896 NAND_OP_ADDR (1 , & feature , PSEC_TO_NSEC (sdr -> tWB_max )),
@@ -1947,7 +1947,7 @@ int nand_reset_op(struct nand_chip *chip)
19471947{
19481948 if (nand_has_exec_op (chip )) {
19491949 const struct nand_sdr_timings * sdr =
1950- nand_get_sdr_timings (& chip -> data_interface );
1950+ nand_get_sdr_timings (nand_get_interface_config ( chip ) );
19511951 struct nand_op_instr instrs [] = {
19521952 NAND_OP_CMD (NAND_CMD_RESET , PSEC_TO_NSEC (sdr -> tWB_max )),
19531953 NAND_OP_WAIT_RDY (PSEC_TO_MSEC (sdr -> tRST_max ), 0 ),
@@ -3226,7 +3226,7 @@ static void nand_wait_readrdy(struct nand_chip *chip)
32263226 if (!(chip -> options & NAND_NEED_READRDY ))
32273227 return ;
32283228
3229- sdr = nand_get_sdr_timings (& chip -> data_interface );
3229+ sdr = nand_get_sdr_timings (nand_get_interface_config ( chip ) );
32303230 WARN_ON (nand_wait_rdy_op (chip , PSEC_TO_MSEC (sdr -> tR_max ), 0 ));
32313231}
32323232
0 commit comments