/linux/drivers/mtd/nand/raw/ |
H A D | denali_dt.c | 86 int nsels, i, ret; in denali_dt_chip_init() local 88 nsels = of_property_count_u32_elems(chip_np, "reg"); in denali_dt_chip_init() 89 if (nsels < 0) in denali_dt_chip_init() 90 return nsels; in denali_dt_chip_init() 92 dchip = devm_kzalloc(denali->dev, struct_size(dchip, sels, nsels), in denali_dt_chip_init() 97 dchip->nsels = nsels; in denali_dt_chip_init() 99 for (i = 0; i < nsels; i++) { in denali_dt_chip_init()
|
H A D | denali_pci.c | 36 int nsels, ret, i; in denali_pci_probe() local 95 nsels = denali->nbanks; in denali_pci_probe() 97 dchip = devm_kzalloc(denali->dev, struct_size(dchip, sels, nsels), in denali_pci_probe() 106 dchip->nsels = nsels; in denali_pci_probe() 108 for (i = 0; i < nsels; i++) in denali_pci_probe()
|
H A D | rockchip-nand-controller.c | 161 u8 nsels; member 162 u8 sels[] __counted_by(nsels); 1109 int nsels; in rk_nfc_nand_chip_init() local 1114 if (!of_get_property(np, "reg", &nsels)) in rk_nfc_nand_chip_init() 1116 nsels /= sizeof(u32); in rk_nfc_nand_chip_init() 1117 if (!nsels || nsels > NFC_MAX_NSELS) { in rk_nfc_nand_chip_init() 1118 dev_err(dev, "invalid reg property size %d\n", nsels); in rk_nfc_nand_chip_init() 1122 rknand = devm_kzalloc(dev, struct_size(rknand, sels, nsels), in rk_nfc_nand_chip_init() 1127 rknand->nsels = nsels; in rk_nfc_nand_chip_init() 1128 for (i = 0; i < nsels; i++) { in rk_nfc_nand_chip_init() [all …]
|
H A D | renesas-nand-controller.c | 203 unsigned int nsels; member 213 struct rnand_chip_sel sels[] __counted_by(nsels); 1203 int nsels, ret, i; in rnandc_chip_init() local 1206 nsels = of_property_count_elems_of_size(np, "reg", sizeof(u32)); in rnandc_chip_init() 1207 if (nsels <= 0) { in rnandc_chip_init() 1208 ret = (nsels < 0) ? nsels : -EINVAL; in rnandc_chip_init() 1214 rnand = devm_kzalloc(rnandc->dev, struct_size(rnand, sels, nsels), in rnandc_chip_init() 1219 rnand->nsels = nsels; in rnandc_chip_init() 1222 for (i = 0; i < nsels; i++) { in rnandc_chip_init() 1257 ret = nand_scan(chip, rnand->nsels); in rnandc_chip_init()
|
H A D | mtk_nand.c | 132 int nsels; member 133 u8 sels[] __counted_by(nsels); 1345 int nsels; in mtk_nfc_nand_chip_init() local 1350 if (!of_get_property(np, "reg", &nsels)) in mtk_nfc_nand_chip_init() 1353 nsels /= sizeof(u32); in mtk_nfc_nand_chip_init() 1354 if (!nsels || nsels > MTK_NAND_MAX_NSELS) { in mtk_nfc_nand_chip_init() 1355 dev_err(dev, "invalid reg property size %d\n", nsels); in mtk_nfc_nand_chip_init() 1359 chip = devm_kzalloc(dev, struct_size(chip, sels, nsels), in mtk_nfc_nand_chip_init() 1364 chip->nsels = nsels; in mtk_nfc_nand_chip_init() 1365 for (i = 0; i < nsels; i++) { in mtk_nfc_nand_chip_init() [all …]
|
H A D | meson_nand.c | 137 u32 nsels; member 138 u8 sels[] __counted_by(nsels); 269 if (chip < 0 || WARN_ON_ONCE(chip >= meson_chip->nsels)) in meson_nfc_select_chip() 1392 u32 tmp, nsels; in meson_nfc_nand_chip_init() local 1395 nsels = of_property_count_elems_of_size(np, "reg", sizeof(u32)); in meson_nfc_nand_chip_init() 1396 if (!nsels || nsels > MAX_CE_NUM) { in meson_nfc_nand_chip_init() 1401 meson_chip = devm_kzalloc(dev, struct_size(meson_chip, sels, nsels), in meson_nfc_nand_chip_init() 1406 meson_chip->nsels = nsels; in meson_nfc_nand_chip_init() 1408 for (i = 0; i < nsels; i++) { in meson_nfc_nand_chip_init() 1442 ret = nand_scan(nand, nsels); in meson_nfc_nand_chip_init()
|
H A D | sunxi_nand.c | 199 int nsels; member 200 struct sunxi_nand_chip_sel sels[] __counted_by(nsels); 423 if (cs >= sunxi_nand->nsels) in sunxi_nfc_select_chip() 1944 int nsels; in sunxi_nand_chip_init() local 1949 if (!of_get_property(np, "reg", &nsels)) in sunxi_nand_chip_init() 1952 nsels /= sizeof(u32); in sunxi_nand_chip_init() 1953 if (!nsels) { in sunxi_nand_chip_init() 1958 sunxi_nand = devm_kzalloc(dev, struct_size(sunxi_nand, sels, nsels), in sunxi_nand_chip_init() 1963 sunxi_nand->nsels = nsels; in sunxi_nand_chip_init() 1965 for (i = 0; i < nsels; i++) { in sunxi_nand_chip_init() [all …]
|
H A D | denali.h | 330 unsigned int nsels; member 331 struct denali_chip_sel sels[] __counted_by(nsels);
|
H A D | marvell_nand.c | 347 unsigned int nsels; member 348 struct marvell_nand_chip_sel sels[] __counted_by(nsels); 2607 int nsels, ret, i; in marvell_nand_chip_init() local 2620 nsels = 1; in marvell_nand_chip_init() 2622 nsels = of_property_count_elems_of_size(np, "reg", sizeof(u32)); in marvell_nand_chip_init() 2623 if (nsels <= 0) { in marvell_nand_chip_init() 2631 struct_size(marvell_nand, sels, nsels), in marvell_nand_chip_init() 2638 marvell_nand->nsels = nsels; in marvell_nand_chip_init() 2641 for (i = 0; i < nsels; i++) { in marvell_nand_chip_init() 2734 ret = nand_scan(chip, marvell_nand->nsels); in marvell_nand_chip_init()
|
H A D | cadence-nand-controller.c | 511 u8 nsels; member 531 u8 cs[] __counted_by(nsels); 2743 int nsels, ret, i; in cadence_nand_chip_init() local 2746 nsels = of_property_count_elems_of_size(np, "reg", sizeof(u32)); in cadence_nand_chip_init() 2747 if (nsels <= 0) { in cadence_nand_chip_init() 2754 (nsels * sizeof(u8)), in cadence_nand_chip_init() 2761 cdns_chip->nsels = nsels; in cadence_nand_chip_init() 2763 for (i = 0; i < nsels; i++) { in cadence_nand_chip_init() 2802 ret = nand_scan(chip, cdns_chip->nsels); in cadence_nand_chip_init()
|
H A D | tegra_nand.c | 1072 int nsels, nchips = of_get_child_count(np); in tegra_nand_chips_init() local 1086 nsels = of_property_count_elems_of_size(np_nand, "reg", sizeof(u32)); in tegra_nand_chips_init() 1087 if (nsels != 1) { in tegra_nand_chips_init()
|
H A D | denali.c | 1190 for (i = 0; i < dchip->nsels; i++) { in denali_chip_init() 1208 for (j = 0; j < dchip2->nsels; j++) { in denali_chip_init() 1251 ret = nand_scan(chip, dchip->nsels); in denali_chip_init()
|