Home
last modified time | relevance | path

Searched refs:bch (Results 1 – 25 of 28) sorted by relevance

12

/drivers/isdn/mISDN/
Dhwchannel.c39 struct bchannel *bch = container_of(ws, struct bchannel, workq); in bchannel_bh() local
43 if (test_and_clear_bit(FLG_RECVQUEUE, &bch->Flags)) { in bchannel_bh()
44 while ((skb = skb_dequeue(&bch->rqueue))) { in bchannel_bh()
45 bch->rcount--; in bchannel_bh()
46 if (likely(bch->ch.peer)) { in bchannel_bh()
47 err = bch->ch.recv(bch->ch.peer, skb); in bchannel_bh()
156 mISDN_ctrl_bchannel(struct bchannel *bch, struct mISDN_ctrl_req *cq) in mISDN_ctrl_bchannel() argument
167 memset(bch->fill, cq->p2 & 0xff, MISDN_BCH_FILL_SIZE); in mISDN_ctrl_bchannel()
168 test_and_set_bit(FLG_FILLEMPTY, &bch->Flags); in mISDN_ctrl_bchannel()
170 test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); in mISDN_ctrl_bchannel()
[all …]
Dl1oip_core.c354 struct bchannel *bch; in l1oip_socket_recv() local
376 bch = hc->chan[channel].bch; in l1oip_socket_recv()
377 if (!dch && !bch) { in l1oip_socket_recv()
405 if (bch) { in l1oip_socket_recv()
435 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv()
1005 struct bchannel *bch; in open_bchannel() local
1013 bch = hc->chan[ch].bch; in open_bchannel()
1014 if (!bch) { in open_bchannel()
1019 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1021 bch->ch.protocol = rq->protocol; in open_bchannel()
[all …]
Dl1oip.h34 struct bchannel *bch; member
/drivers/mtd/nand/raw/ingenic/
Djz4725b_bch.c62 static inline void jz4725b_bch_config_set(struct ingenic_ecc *bch, u32 cfg) in jz4725b_bch_config_set() argument
64 writel(cfg, bch->base + BCH_BHCSR); in jz4725b_bch_config_set()
67 static inline void jz4725b_bch_config_clear(struct ingenic_ecc *bch, u32 cfg) in jz4725b_bch_config_clear() argument
69 writel(cfg, bch->base + BCH_BHCCR); in jz4725b_bch_config_clear()
72 static int jz4725b_bch_reset(struct ingenic_ecc *bch, in jz4725b_bch_reset() argument
78 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); in jz4725b_bch_reset()
81 jz4725b_bch_config_clear(bch, 0x1f); in jz4725b_bch_reset()
82 jz4725b_bch_config_set(bch, BCH_BHCR_BCHE); in jz4725b_bch_reset()
85 jz4725b_bch_config_set(bch, BCH_BHCR_BSEL); in jz4725b_bch_reset()
87 jz4725b_bch_config_clear(bch, BCH_BHCR_BSEL); in jz4725b_bch_reset()
[all …]
Djz4780_bch.c62 static void jz4780_bch_reset(struct ingenic_ecc *bch, in jz4780_bch_reset() argument
68 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); in jz4780_bch_reset()
73 writel(reg, bch->base + BCH_BHCNT); in jz4780_bch_reset()
80 writel(reg, bch->base + BCH_BHCR); in jz4780_bch_reset()
83 static void jz4780_bch_disable(struct ingenic_ecc *bch) in jz4780_bch_disable() argument
85 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); in jz4780_bch_disable()
86 writel(BCH_BHCR_BCHE, bch->base + BCH_BHCCR); in jz4780_bch_disable()
89 static void jz4780_bch_write_data(struct ingenic_ecc *bch, const void *buf, in jz4780_bch_write_data() argument
99 writel(*src32++, bch->base + BCH_BHDR); in jz4780_bch_write_data()
103 writeb(*src8++, bch->base + BCH_BHDR); in jz4780_bch_write_data()
[all …]
DKconfig32 will be called jz4725b-bch.
42 will be called jz4780-bch.
/drivers/isdn/hardware/mISDN/
Davmfritz.c130 struct bchannel bch[2]; member
141 card->bch[0].debug = debug; in _set_debug()
142 card->bch[1].debug = debug; in _set_debug()
250 if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) && in Sel_BCS()
251 (fc->bch[0].nr & channel)) in Sel_BCS()
252 return &fc->bch[0]; in Sel_BCS()
253 else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) && in Sel_BCS()
254 (fc->bch[1].nr & channel)) in Sel_BCS()
255 return &fc->bch[1]; in Sel_BCS()
275 write_ctrl(struct bchannel *bch, int which) { in write_ctrl() argument
[all …]
DmISDNisar.c69 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in send_mbox()
98 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in rcv_mbox()
175 u32 saved_debug = isar->ch[0].bch.debug; in load_firmware()
194 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO; in load_firmware()
281 isar->ch[0].bch.debug = saved_debug; in load_firmware()
393 isar->ch[0].bch.debug = saved_debug; in load_firmware()
405 _queue_data(&ch->bch.ch, PH_CONTROL_IND, status, 0, NULL, GFP_ATOMIC); in deliver_status()
419 if (test_bit(FLG_RX_OFF, &ch->bch.Flags)) { in isar_rcv_frame()
420 ch->bch.dropcnt += ch->is->clsb; in isar_rcv_frame()
424 switch (ch->bch.state) { in isar_rcv_frame()
[all …]
Dnetjet.c42 struct bchannel bch; member
96 card->bc[0].bch.debug = debug; in _set_debug()
97 card->bc[1].bch.debug = debug; in _set_debug()
177 struct tiger_hw *card = bc->bch.hw; in fill_mem()
181 bc->bch.nr, fill, cnt, idx, card->send.idx); in fill_mem()
182 if (bc->bch.nr & 2) { in fill_mem()
200 struct tiger_hw *card = bc->bch.hw; in mode_tiger()
203 bc->bch.nr, bc->bch.state, protocol); in mode_tiger()
206 if (bc->bch.state == ISDN_P_NONE) in mode_tiger()
209 bc->bch.state = protocol; in mode_tiger()
[all …]
Dw6692.c45 struct bchannel bch; member
83 card->bc[0].bch.debug = debug; in _set_debug()
84 card->bc[1].bch.debug = debug; in _set_debug()
447 struct w6692_hw *card = wch->bch.hw; in W6692_empty_Bfifo()
452 if (unlikely(wch->bch.state == ISDN_P_NONE)) { in W6692_empty_Bfifo()
455 if (wch->bch.rx_skb) in W6692_empty_Bfifo()
456 skb_trim(wch->bch.rx_skb, 0); in W6692_empty_Bfifo()
459 if (test_bit(FLG_RX_OFF, &wch->bch.Flags)) { in W6692_empty_Bfifo()
460 wch->bch.dropcnt += count; in W6692_empty_Bfifo()
464 maxlen = bchannel_get_rxbuf(&wch->bch, count); in W6692_empty_Bfifo()
[all …]
Dhfcpci.c134 struct bchannel bch[2]; member
308 if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) && in Sel_BCS()
309 (hc->bch[0].nr & channel)) in Sel_BCS()
310 return &hc->bch[0]; in Sel_BCS()
311 else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) && in Sel_BCS()
312 (hc->bch[1].nr & channel)) in Sel_BCS()
313 return &hc->bch[1]; in Sel_BCS()
366 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
380 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
392 hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz, in hfcpci_empty_bfifo() argument
[all …]
DmISDNipac.c885 pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr, in waitforCEC()
888 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); in waitforCEC()
905 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, in waitforXFW()
908 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); in waitforXFW()
928 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
929 if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) { in hscx_empty_fifo()
930 hscx->bch.dropcnt += count; in hscx_empty_fifo()
934 maxlen = bchannel_get_rxbuf(&hscx->bch, count); in hscx_empty_fifo()
937 if (hscx->bch.rx_skb) in hscx_empty_fifo()
938 skb_trim(hscx->bch.rx_skb, 0); in hscx_empty_fifo()
[all …]
Dhfcsusb.c47 static int hfcsusb_setup_bch(struct bchannel *bch, int protocol);
48 static void deactivate_bchannel(struct bchannel *bch);
198 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hfcusb_l2l1B() local
199 struct hfcsusb *hw = bch->hw; in hfcusb_l2l1B()
210 ret = bchannel_senddata(bch, skb); in hfcusb_l2l1B()
219 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { in hfcusb_l2l1B()
220 hfcsusb_start_endpoint(hw, bch->nr - 1); in hfcusb_l2l1B()
221 ret = hfcsusb_setup_bch(bch, ch->protocol); in hfcusb_l2l1B()
229 deactivate_bchannel(bch); in hfcusb_l2l1B()
251 phi = kzalloc(struct_size(phi, bch, dch->dev.nrbchan), GFP_ATOMIC); in hfcsusb_ph_info()
[all …]
Dhfcmulti.c844 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_on() local
852 if (!bch) in vpm_echocan_on()
859 recv_Bchannel_skb(bch, skb); in vpm_echocan_on()
876 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_off() local
885 if (!bch) in vpm_echocan_off()
892 recv_Bchannel_skb(bch, skb); in vpm_echocan_off()
1830 struct bchannel *bch = NULL; in hfcmulti_dtmf() local
1842 bch = hc->chan[ch].bch; in hfcmulti_dtmf()
1843 if (!bch) in hfcmulti_dtmf()
1847 if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) in hfcmulti_dtmf()
[all …]
Dhfcsusb.h265 struct bchannel *bch; /* link to hfcsusb_t->bch */ member
274 struct bchannel bch[2]; member
Dspeedfax.c79 card->isar.ch[0].bch.debug = debug; in _set_debug()
80 card->isar.ch[1].bch.debug = debug; in _set_debug()
398 list_add(&card->isar.ch[i].bch.ch.list, in setup_instance()
Disar.h16 struct bchannel bch; member
Dipac.h47 struct bchannel bch; member
/drivers/mtd/nand/raw/
Dnand_bch.c26 struct bch_control *bch; member
44 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
70 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
133 nbc->bch = init_bch(m, t, 0); in nand_bch_init()
134 if (!nbc->bch) in nand_bch_init()
138 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init()
140 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init()
185 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); in nand_bch_init()
208 free_bch(nbc->bch); in nand_bch_free()
Dmeson_nand.c59 #define CMDRWGEN(cmd_dir, ran, bch, short_mode, page_size, pages) \ argument
63 ((bch) << 14) | \
125 u32 bch; member
188 #define MESON_ECC_DATA(b, s) { .bch = (b), .strength = (s)}
271 u32 bch = meson_chip->bch_mode, cmd; in meson_nfc_cmd_access() local
285 cmd = CMDRWGEN(DMA_DIR(dir), scrambler, bch, in meson_nfc_cmd_access()
1149 meson_chip->bch_mode = meson_ecc[i].bch; in meson_nand_bch_mode()
Dnandsim.c99 static unsigned int bch; variable
131 module_param(bch, uint, 0400);
165 MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should "
2183 if (!bch) in ns_attach_chip()
2193 eccbytes = ((bch * 13) + 7) / 8; in ns_attach_chip()
2202 NS_ERR("Invalid BCH value %u\n", bch); in ns_attach_chip()
2209 chip->ecc.strength = bch; in ns_attach_chip()
2212 NS_INFO("Using %u-bit/%u bytes BCH ECC\n", bch, chip->ecc.size); in ns_attach_chip()
/drivers/mtd/nand/raw/gpmi-nand/
Dgpmi-nand.c801 if (this->bch) in gpmi_raw_len_to_len()
1462 this->bch = true; in gpmi_ecc_read_page()
1556 this->bch = true; in gpmi_ecc_read_subpage()
1581 this->bch = true; in gpmi_ecc_write_page()
2325 if (this->bch) { in gpmi_chain_data_read()
2340 if (!this->bch) in gpmi_chain_data_read()
2371 if (this->bch) { in gpmi_chain_data_write()
2383 (this->bch ? MXS_DMA_CTRL_WAIT4END : 0)); in gpmi_chain_data_write()
2387 if (!this->bch) in gpmi_chain_data_write()
2492 if (this->bch) { in gpmi_nfc_exec_op()
[all …]
Dgpmi-nand.h143 bool bch; member
/drivers/mtd/devices/
Ddocg3.h267 struct bch_control *bch; member
Ddocg3.c650 numerrs = decode_bch(docg3->cascade->bch, NULL, in doc_ecc_bch_fix_data()
1987 cascade->bch = init_bch(DOC_ECC_BCH_M, DOC_ECC_BCH_T, in docg3_probe()
1989 if (!cascade->bch) in docg3_probe()
2024 free_bch(cascade->bch); in docg3_probe()
2048 free_bch(docg3->cascade->bch); in docg3_release()

12