Home
last modified time | relevance | path

Searched refs:nfc (Results 1 – 25 of 148) sorted by relevance

123456

/linux-6.12.1/drivers/mtd/nand/raw/
Dmxic_nand.c184 static int mxic_nfc_clk_enable(struct mxic_nand_ctlr *nfc) in mxic_nfc_clk_enable() argument
188 ret = clk_prepare_enable(nfc->ps_clk); in mxic_nfc_clk_enable()
192 ret = clk_prepare_enable(nfc->send_clk); in mxic_nfc_clk_enable()
196 ret = clk_prepare_enable(nfc->send_dly_clk); in mxic_nfc_clk_enable()
203 clk_disable_unprepare(nfc->send_clk); in mxic_nfc_clk_enable()
205 clk_disable_unprepare(nfc->ps_clk); in mxic_nfc_clk_enable()
210 static void mxic_nfc_clk_disable(struct mxic_nand_ctlr *nfc) in mxic_nfc_clk_disable() argument
212 clk_disable_unprepare(nfc->send_clk); in mxic_nfc_clk_disable()
213 clk_disable_unprepare(nfc->send_dly_clk); in mxic_nfc_clk_disable()
214 clk_disable_unprepare(nfc->ps_clk); in mxic_nfc_clk_disable()
[all …]
Drockchip-nand-controller.c226 struct rk_nfc *nfc = nand_get_controller_data(chip); in rk_nfc_data_ptr() local
228 return nfc->page_buf + i * rk_nfc_data_len(chip); in rk_nfc_data_ptr()
233 struct rk_nfc *nfc = nand_get_controller_data(chip); in rk_nfc_oob_ptr() local
235 return nfc->page_buf + i * rk_nfc_data_len(chip) + chip->ecc.size; in rk_nfc_oob_ptr()
240 struct rk_nfc *nfc = nand_get_controller_data(chip); in rk_nfc_hw_ecc_setup() local
244 if (strength == nfc->cfg->ecc_strengths[i]) { in rk_nfc_hw_ecc_setup()
245 reg = nfc->cfg->ecc_cfgs[i]; in rk_nfc_hw_ecc_setup()
253 writel(reg, nfc->regs + nfc->cfg->bchctl_off); in rk_nfc_hw_ecc_setup()
256 nfc->cur_ecc = strength; in rk_nfc_hw_ecc_setup()
263 struct rk_nfc *nfc = nand_get_controller_data(chip); in rk_nfc_select_chip() local
[all …]
Dvf610_nfc.c174 static inline u32 vf610_nfc_read(struct vf610_nfc *nfc, uint reg) in vf610_nfc_read() argument
176 return readl(nfc->regs + reg); in vf610_nfc_read()
179 static inline void vf610_nfc_write(struct vf610_nfc *nfc, uint reg, u32 val) in vf610_nfc_write() argument
181 writel(val, nfc->regs + reg); in vf610_nfc_write()
184 static inline void vf610_nfc_set(struct vf610_nfc *nfc, uint reg, u32 bits) in vf610_nfc_set() argument
186 vf610_nfc_write(nfc, reg, vf610_nfc_read(nfc, reg) | bits); in vf610_nfc_set()
189 static inline void vf610_nfc_clear(struct vf610_nfc *nfc, uint reg, u32 bits) in vf610_nfc_clear() argument
191 vf610_nfc_write(nfc, reg, vf610_nfc_read(nfc, reg) & ~bits); in vf610_nfc_clear()
194 static inline void vf610_nfc_set_field(struct vf610_nfc *nfc, u32 reg, in vf610_nfc_set_field() argument
197 vf610_nfc_write(nfc, reg, in vf610_nfc_set_field()
[all …]
Dstm32_fmc2_nand.c251 int (*set_cdev)(struct stm32_fmc2_nfc *nfc);
294 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_timings_init() local
300 regmap_update_bits(nfc->regmap, FMC2_PCR, in stm32_fmc2_nfc_timings_init()
310 regmap_write(nfc->regmap, FMC2_PMEM, pmem); in stm32_fmc2_nfc_timings_init()
317 regmap_write(nfc->regmap, FMC2_PATT, patt); in stm32_fmc2_nfc_timings_init()
322 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_setup() local
344 regmap_update_bits(nfc->regmap, FMC2_PCR, pcr_mask, pcr); in stm32_fmc2_nfc_setup()
349 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_select_chip() local
354 if (nand->cs_used[chipnr] == nfc->cs_sel) in stm32_fmc2_nfc_select_chip()
357 nfc->cs_sel = nand->cs_used[chipnr]; in stm32_fmc2_nfc_select_chip()
[all …]
Dmtk_nand.c216 struct mtk_nfc *nfc = nand_get_controller_data(chip); in mtk_data_ptr() local
218 return nfc->buffer + i * mtk_data_len(chip); in mtk_data_ptr()
223 struct mtk_nfc *nfc = nand_get_controller_data(chip); in mtk_oob_ptr() local
225 return nfc->buffer + i * mtk_data_len(chip) + chip->ecc.size; in mtk_oob_ptr()
228 static inline void nfi_writel(struct mtk_nfc *nfc, u32 val, u32 reg) in nfi_writel() argument
230 writel(val, nfc->regs + reg); in nfi_writel()
233 static inline void nfi_writew(struct mtk_nfc *nfc, u16 val, u32 reg) in nfi_writew() argument
235 writew(val, nfc->regs + reg); in nfi_writew()
238 static inline void nfi_writeb(struct mtk_nfc *nfc, u8 val, u32 reg) in nfi_writeb() argument
240 writeb(val, nfc->regs + reg); in nfi_writeb()
[all …]
Dmeson_nand.c266 struct meson_nfc *nfc = nand_get_controller_data(nand); in meson_nfc_select_chip() local
272 nfc->param.chip_select = meson_chip->sels[chip] ? NAND_CE1 : NAND_CE0; in meson_nfc_select_chip()
273 nfc->param.rb_select = nfc->param.chip_select; in meson_nfc_select_chip()
274 nfc->timing.twb = meson_chip->twb; in meson_nfc_select_chip()
275 nfc->timing.tadl = meson_chip->tadl; in meson_nfc_select_chip()
276 nfc->timing.tbers_max = meson_chip->tbers_max; in meson_nfc_select_chip()
278 if (nfc->clk_rate != meson_chip->clk_rate) { in meson_nfc_select_chip()
279 ret = clk_set_rate(nfc->nand_clk, meson_chip->clk_rate); in meson_nfc_select_chip()
281 dev_err(nfc->dev, "failed to set clock rate\n"); in meson_nfc_select_chip()
284 nfc->clk_rate = meson_chip->clk_rate; in meson_nfc_select_chip()
[all …]
Darasan-nand-controller.c234 static int anfc_wait_for_event(struct arasan_nfc *nfc, unsigned int event) in anfc_wait_for_event() argument
239 ret = readl_relaxed_poll_timeout(nfc->base + INTR_STS_REG, val, in anfc_wait_for_event()
243 dev_err(nfc->dev, "Timeout waiting for event 0x%x\n", event); in anfc_wait_for_event()
247 writel_relaxed(event, nfc->base + INTR_STS_REG); in anfc_wait_for_event()
252 static int anfc_wait_for_rb(struct arasan_nfc *nfc, struct nand_chip *chip, in anfc_wait_for_rb() argument
260 ret = readl_relaxed_poll_timeout(nfc->base + READY_STS_REG, val, in anfc_wait_for_rb()
264 dev_err(nfc->dev, "Timeout waiting for R/B 0x%x\n", in anfc_wait_for_rb()
265 readl_relaxed(nfc->base + READY_STS_REG)); in anfc_wait_for_rb()
272 static void anfc_trigger_op(struct arasan_nfc *nfc, struct anfc_op *nfc_op) in anfc_trigger_op() argument
274 writel_relaxed(nfc_op->pkt_reg, nfc->base + PKT_REG); in anfc_trigger_op()
[all …]
Dpl35x-nand-controller.c214 static void pl35x_smc_update_regs(struct pl35x_nandc *nfc) in pl35x_smc_update_regs() argument
218 nfc->conf_regs + PL35X_SMC_DIRECT_CMD); in pl35x_smc_update_regs()
221 static int pl35x_smc_set_buswidth(struct pl35x_nandc *nfc, unsigned int bw) in pl35x_smc_set_buswidth() argument
226 writel(bw, nfc->conf_regs + PL35X_SMC_OPMODE); in pl35x_smc_set_buswidth()
227 pl35x_smc_update_regs(nfc); in pl35x_smc_set_buswidth()
232 static void pl35x_smc_clear_irq(struct pl35x_nandc *nfc) in pl35x_smc_clear_irq() argument
235 nfc->conf_regs + PL35X_SMC_MEMC_CFG_CLR); in pl35x_smc_clear_irq()
238 static int pl35x_smc_wait_for_irq(struct pl35x_nandc *nfc) in pl35x_smc_wait_for_irq() argument
243 ret = readl_poll_timeout(nfc->conf_regs + PL35X_SMC_MEMC_STATUS, reg, in pl35x_smc_wait_for_irq()
247 dev_err(nfc->dev, in pl35x_smc_wait_for_irq()
[all …]
Dmarvell_nand.c516 static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask) in marvell_nfc_disable_int() argument
521 reg = readl_relaxed(nfc->regs + NDCR); in marvell_nfc_disable_int()
522 writel_relaxed(reg | int_mask, nfc->regs + NDCR); in marvell_nfc_disable_int()
525 static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask) in marvell_nfc_enable_int() argument
530 reg = readl_relaxed(nfc->regs + NDCR); in marvell_nfc_enable_int()
531 writel_relaxed(reg & ~int_mask, nfc->regs + NDCR); in marvell_nfc_enable_int()
534 static u32 marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask) in marvell_nfc_clear_int() argument
538 reg = readl_relaxed(nfc->regs + NDSR); in marvell_nfc_clear_int()
539 writel_relaxed(int_mask, nfc->regs + NDSR); in marvell_nfc_clear_int()
547 struct marvell_nfc *nfc = to_marvell_nfc(chip->controller); in marvell_nfc_force_byte_access() local
[all …]
Dsunxi_nand.c262 struct sunxi_nfc *nfc = dev_id; in sunxi_nfc_interrupt() local
263 u32 st = readl(nfc->regs + NFC_REG_ST); in sunxi_nfc_interrupt()
264 u32 ien = readl(nfc->regs + NFC_REG_INT); in sunxi_nfc_interrupt()
270 complete(&nfc->complete); in sunxi_nfc_interrupt()
272 writel(st & NFC_INT_MASK, nfc->regs + NFC_REG_ST); in sunxi_nfc_interrupt()
273 writel(~st & ien & NFC_INT_MASK, nfc->regs + NFC_REG_INT); in sunxi_nfc_interrupt()
278 static int sunxi_nfc_wait_events(struct sunxi_nfc *nfc, u32 events, in sunxi_nfc_wait_events() argument
290 init_completion(&nfc->complete); in sunxi_nfc_wait_events()
292 writel(events, nfc->regs + NFC_REG_INT); in sunxi_nfc_wait_events()
294 ret = wait_for_completion_timeout(&nfc->complete, in sunxi_nfc_wait_events()
[all …]
/linux-6.12.1/drivers/mtd/nand/raw/ingenic/
Dingenic_nand_drv.c152 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_calculate() local
166 return ingenic_ecc_calculate(nfc->ecc, &params, dat, ecc_code); in ingenic_nand_ecc_calculate()
173 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_correct() local
180 return ingenic_ecc_correct(nfc->ecc, &params, dat, read_ecc); in ingenic_nand_ecc_correct()
186 struct ingenic_nfc *nfc = to_ingenic_nfc(chip->controller); in ingenic_nand_attach_chip() local
199 if (!nfc->ecc) { in ingenic_nand_attach_chip()
200 dev_err(nfc->dev, "HW ECC selected, but ECC controller not found\n"); in ingenic_nand_attach_chip()
209 dev_info(nfc->dev, "using %s (strength %d, size %d, bytes %d)\n", in ingenic_nand_attach_chip()
210 (nfc->ecc) ? "hardware ECC" : "software ECC", in ingenic_nand_attach_chip()
214 dev_info(nfc->dev, "not using ECC\n"); in ingenic_nand_attach_chip()
[all …]
/linux-6.12.1/Documentation/driver-api/mei/
Dnfc.rst18 "drivers/nfc/mei_phy" -> cl_nfc [lhead=bus];
19 "drivers/nfc/microread/mei" -> cl_nfc;
20 "drivers/nfc/microread/mei" -> "drivers/nfc/mei_phy";
21 "drivers/nfc/pn544/mei" -> cl_nfc;
22 "drivers/nfc/pn544/mei" -> "drivers/nfc/mei_phy";
23 "net/nfc" -> "drivers/nfc/microread/mei";
24 "net/nfc" -> "drivers/nfc/pn544/mei";
25 "neard" -> "net/nfc";
26 cl_nfc [label="mei/bus(nfc)"];
27 me_cl_nfc [label="me fw (nfc)"];
/linux-6.12.1/drivers/nfc/
DKconfig25 This adds support to use an mei bus nfc device. Select this if you
63 source "drivers/nfc/fdp/Kconfig"
64 source "drivers/nfc/pn544/Kconfig"
65 source "drivers/nfc/pn533/Kconfig"
66 source "drivers/nfc/microread/Kconfig"
67 source "drivers/nfc/nfcmrvl/Kconfig"
68 source "drivers/nfc/st21nfca/Kconfig"
69 source "drivers/nfc/st-nci/Kconfig"
70 source "drivers/nfc/nxp-nci/Kconfig"
71 source "drivers/nfc/s3fwrn5/Kconfig"
[all …]
/linux-6.12.1/drivers/net/ethernet/hisilicon/hns3/hns3_common/
Dhclge_comm_rss.c154 struct ethtool_rxnfc *nfc) in hclge_comm_set_rss_tuple() argument
160 if (nfc->data & in hclge_comm_set_rss_tuple()
168 ret = hclge_comm_init_rss_tuple_cmd(rss_cfg, nfc, ae_dev, req); in hclge_comm_set_rss_tuple()
425 static u8 hclge_comm_get_rss_hash_bits(struct ethtool_rxnfc *nfc) in hclge_comm_get_rss_hash_bits() argument
427 u8 hash_sets = nfc->data & RXH_L4_B_0_1 ? HCLGE_COMM_S_PORT_BIT : 0; in hclge_comm_get_rss_hash_bits()
429 if (nfc->data & RXH_L4_B_2_3) in hclge_comm_get_rss_hash_bits()
434 if (nfc->data & RXH_IP_SRC) in hclge_comm_get_rss_hash_bits()
439 if (nfc->data & RXH_IP_DST) in hclge_comm_get_rss_hash_bits()
444 if (nfc->flow_type == SCTP_V4_FLOW || nfc->flow_type == SCTP_V6_FLOW) in hclge_comm_get_rss_hash_bits()
451 struct ethtool_rxnfc *nfc, in hclge_comm_init_rss_tuple_cmd() argument
[all …]
/linux-6.12.1/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_ethtool.c573 struct ethtool_rxnfc *nfc) in otx2_get_rss_hash_opts() argument
582 nfc->data = RXH_IP_SRC | RXH_IP_DST; in otx2_get_rss_hash_opts()
584 nfc->data |= RXH_VLAN; in otx2_get_rss_hash_opts()
586 switch (nfc->flow_type) { in otx2_get_rss_hash_opts()
590 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
595 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
600 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
605 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
623 struct ethtool_rxnfc *nfc) in otx2_set_rss_hash_opts() argument
636 if (!(nfc->data & RXH_IP_SRC) || !(nfc->data & RXH_IP_DST)) in otx2_set_rss_hash_opts()
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/mtd/
Dvf610-nfc.txt7 - compatible: Should be set to "fsl,vf610-nfc".
27 - compatible: Should be set to "fsl,vf610-nfc-cs".
39 nfc: nand@400e0000 {
40 compatible = "fsl,vf610-nfc";
46 clock-names = "nfc";
51 compatible = "fsl,vf610-nfc-nandcs";
Datmel-nand.txt21 - atmel,nfc-io: phandle to the NFC IO block. Only required for sama5d3
23 - atmel,nfc-sram: phandle to the NFC SRAM block. Only required for sama5d3
65 nfc_io: nfc-io@70000000 {
66 compatible = "atmel,sama5d3-nfc-io", "syscon";
91 atmel,nfc-sram = <&nfc_sram>;
92 atmel,nfc-io = <&nfc_io>;
153 - compatible : "atmel,sama5d3-nfc".
216 nfc@70000000 {
217 compatible = "atmel,sama5d3-nfc";
Dhisi504-nand.txt5 - compatible: Should be "hisilicon,504-nfc".
9 - interrupts: Interrupt number for nfc.
30 compatible = "hisilicon,504-nfc";
/linux-6.12.1/net/nfc/
DKconfig15 be called nfc.
31 source "net/nfc/nci/Kconfig"
32 source "net/nfc/hci/Kconfig"
34 source "drivers/nfc/Kconfig"
DMakefile6 obj-$(CONFIG_NFC) += nfc.o
11 nfc-objs := core.o netlink.o af_nfc.o rawsock.o llcp_core.o llcp_commands.o \
/linux-6.12.1/drivers/net/dsa/
Dbcm_sf2_cfp.c1065 struct ethtool_rxnfc *nfc) in bcm_sf2_cfp_rule_get() argument
1069 rule = bcm_sf2_cfp_rule_find(priv, port, nfc->fs.location); in bcm_sf2_cfp_rule_get()
1073 memcpy(&nfc->fs, &rule->fs, sizeof(rule->fs)); in bcm_sf2_cfp_rule_get()
1075 bcm_sf2_invert_masks(&nfc->fs); in bcm_sf2_cfp_rule_get()
1078 nfc->data = bcm_sf2_cfp_rule_size(priv); in bcm_sf2_cfp_rule_get()
1085 int port, struct ethtool_rxnfc *nfc, in bcm_sf2_cfp_rule_get_all() argument
1096 nfc->data = bcm_sf2_cfp_rule_size(priv); in bcm_sf2_cfp_rule_get_all()
1097 nfc->rule_cnt = rules_cnt; in bcm_sf2_cfp_rule_get_all()
1103 struct ethtool_rxnfc *nfc, u32 *rule_locs) in bcm_sf2_get_rxnfc() argument
1111 switch (nfc->cmd) { in bcm_sf2_get_rxnfc()
[all …]
/linux-6.12.1/drivers/net/ethernet/mellanox/mlx5/core/
Den_fs_ethtool.c896 struct ethtool_rxnfc *nfc) in mlx5e_set_rss_hash_opt() argument
904 if (nfc->flow_type & FLOW_RSS) in mlx5e_set_rss_hash_opt()
905 rss_idx = nfc->rss_context; in mlx5e_set_rss_hash_opt()
907 flow_type = flow_type_mask(nfc->flow_type); in mlx5e_set_rss_hash_opt()
922 if (nfc->data & ~(RXH_IP_SRC | RXH_IP_DST | in mlx5e_set_rss_hash_opt()
926 if (nfc->data & RXH_IP_SRC) in mlx5e_set_rss_hash_opt()
928 if (nfc->data & RXH_IP_DST) in mlx5e_set_rss_hash_opt()
930 if (nfc->data & RXH_L4_B_0_1) in mlx5e_set_rss_hash_opt()
932 if (nfc->data & RXH_L4_B_2_3) in mlx5e_set_rss_hash_opt()
943 struct ethtool_rxnfc *nfc) in mlx5e_get_rss_hash_opt() argument
[all …]
/linux-6.12.1/drivers/net/vmxnet3/
Dvmxnet3_ethtool.c904 struct ethtool_rxnfc *nfc) in vmxnet3_set_rss_hash_opt() argument
911 if (nfc->data & ~(RXH_IP_SRC | RXH_IP_DST | in vmxnet3_set_rss_hash_opt()
915 switch (nfc->flow_type) { in vmxnet3_set_rss_hash_opt()
918 if (!(nfc->data & RXH_IP_SRC) || in vmxnet3_set_rss_hash_opt()
919 !(nfc->data & RXH_IP_DST) || in vmxnet3_set_rss_hash_opt()
920 !(nfc->data & RXH_L4_B_0_1) || in vmxnet3_set_rss_hash_opt()
921 !(nfc->data & RXH_L4_B_2_3)) in vmxnet3_set_rss_hash_opt()
925 if (!(nfc->data & RXH_IP_SRC) || in vmxnet3_set_rss_hash_opt()
926 !(nfc->data & RXH_IP_DST)) in vmxnet3_set_rss_hash_opt()
928 switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) { in vmxnet3_set_rss_hash_opt()
[all …]
/linux-6.12.1/Documentation/driver-api/nfc/
Dindex.rst10 nfc-hci
11 nfc-pn544
/linux-6.12.1/drivers/net/ethernet/intel/fm10k/
Dfm10k_ethtool.c757 struct ethtool_rxnfc *nfc) in fm10k_set_rss_hash_opt() argument
767 if (nfc->data & ~(RXH_IP_SRC | RXH_IP_DST | in fm10k_set_rss_hash_opt()
771 switch (nfc->flow_type) { in fm10k_set_rss_hash_opt()
774 if (!(nfc->data & RXH_IP_SRC) || in fm10k_set_rss_hash_opt()
775 !(nfc->data & RXH_IP_DST) || in fm10k_set_rss_hash_opt()
776 !(nfc->data & RXH_L4_B_0_1) || in fm10k_set_rss_hash_opt()
777 !(nfc->data & RXH_L4_B_2_3)) in fm10k_set_rss_hash_opt()
781 if (!(nfc->data & RXH_IP_SRC) || in fm10k_set_rss_hash_opt()
782 !(nfc->data & RXH_IP_DST)) in fm10k_set_rss_hash_opt()
784 switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) { in fm10k_set_rss_hash_opt()
[all …]

123456