1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #include "internals.h"
4 
5 static int
6 sdtnqgama_choose_interface_config(struct nand_chip *chip,
7 				  struct nand_interface_config *iface)
8 {
9 	onfi_fill_interface_config(chip, iface, NAND_SDR_IFACE, 0);
10 
11 	return nand_choose_best_sdr_timings(chip, iface, NULL);
12 }
13 
14 static int sandisk_nand_init(struct nand_chip *chip)
15 {
16 	if (!strncmp("SDTNQGAMA", chip->parameters.model,
17 		     sizeof("SDTNQGAMA") - 1))
18 		chip->ops.choose_interface_config =
19 			&sdtnqgama_choose_interface_config;
20 
21 	return 0;
22 }
23 
24 const struct nand_manufacturer_ops sandisk_nand_manuf_ops = {
25 	.init = sandisk_nand_init,
26 };
27