@@ -1012,10 +1012,8 @@ static int nand_setup_interface(struct nand_chip *chip, int chipnr)
1012
1012
* @iface: the interface configuration (can eventually be updated)
1013
1013
* @spec_timings: specific timings, when not fitting the ONFI specification
1014
1014
*
1015
- * If specific timings are provided, use them. Otherwise, try to retrieve
1016
- * supported timing modes from ONFI information. Finally, if the NAND chip does
1017
- * not follow the ONFI specification, rely on the ->default_timing_mode
1018
- * specified in the nand_ids table.
1015
+ * If specific timings are provided, use them. Otherwise, retrieve supported
1016
+ * timing modes from ONFI information.
1019
1017
*/
1020
1018
int nand_choose_best_sdr_timings (struct nand_chip * chip ,
1021
1019
struct nand_interface_config * iface ,
@@ -1038,15 +1036,8 @@ int nand_choose_best_sdr_timings(struct nand_chip *chip,
1038
1036
1039
1037
/* Fallback to slower modes */
1040
1038
best_mode = iface -> timings .mode ;
1041
- } else {
1042
- if (chip -> parameters .onfi ) {
1043
- unsigned int onfi_modes ;
1044
-
1045
- onfi_modes = chip -> parameters .onfi -> async_timing_mode ;
1046
- best_mode = fls (onfi_modes ) - 1 ;
1047
- } else {
1048
- best_mode = chip -> onfi_timing_mode_default ;
1049
- }
1039
+ } else if (chip -> parameters .onfi ) {
1040
+ best_mode = fls (chip -> parameters .onfi -> async_timing_mode ) - 1 ;
1050
1041
}
1051
1042
1052
1043
for (mode = best_mode ; mode >= 0 ; mode -- ) {
@@ -4767,8 +4758,6 @@ static bool find_full_id_nand(struct nand_chip *chip,
4767
4758
chip -> options |= type -> options ;
4768
4759
chip -> base .eccreq .strength = NAND_ECC_STRENGTH (type );
4769
4760
chip -> base .eccreq .step_size = NAND_ECC_STEP (type );
4770
- chip -> onfi_timing_mode_default =
4771
- type -> onfi_timing_mode_default ;
4772
4761
4773
4762
chip -> parameters .model = kstrdup (type -> name , GFP_KERNEL );
4774
4763
if (!chip -> parameters .model )
0 commit comments