/Linux-v4.19/lib/ |
D | bch.c | 120 static void encode_bch_unaligned(struct bch_control *bch, in encode_bch_unaligned() argument 126 const int l = BCH_ECC_WORDS(bch)-1; in encode_bch_unaligned() 129 p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(*data++)) & 0xff); in encode_bch_unaligned() 141 static void load_ecc8(struct bch_control *bch, uint32_t *dst, in load_ecc8() argument 145 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in load_ecc8() 150 memcpy(pad, src, BCH_ECC_BYTES(bch)-4*nwords); in load_ecc8() 157 static void store_ecc8(struct bch_control *bch, uint8_t *dst, in store_ecc8() argument 161 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in store_ecc8() 173 memcpy(dst, pad, BCH_ECC_BYTES(bch)-4*nwords); in store_ecc8() 190 void encode_bch(struct bch_control *bch, const uint8_t *data, in encode_bch() argument [all …]
|
/Linux-v4.19/drivers/mtd/nand/raw/ |
D | jz4780_bch.c | 75 static void jz4780_bch_init(struct jz4780_bch *bch, in jz4780_bch_init() argument 81 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); in jz4780_bch_init() 86 writel(reg, bch->base + BCH_BHCNT); in jz4780_bch_init() 93 writel(reg, bch->base + BCH_BHCR); in jz4780_bch_init() 96 static void jz4780_bch_disable(struct jz4780_bch *bch) in jz4780_bch_disable() argument 98 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); in jz4780_bch_disable() 99 writel(BCH_BHCR_BCHE, bch->base + BCH_BHCCR); in jz4780_bch_disable() 102 static void jz4780_bch_write_data(struct jz4780_bch *bch, const void *buf, in jz4780_bch_write_data() argument 112 writel(*src32++, bch->base + BCH_BHDR); in jz4780_bch_write_data() 116 writeb(*src8++, bch->base + BCH_BHDR); in jz4780_bch_write_data() [all …]
|
D | nand_bch.c | 39 struct bch_control *bch; member 58 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc() 85 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data() 148 nbc->bch = init_bch(m, t, 0); in nand_bch_init() 149 if (!nbc->bch) in nand_bch_init() 153 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init() 155 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init() 201 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); in nand_bch_init() 224 free_bch(nbc->bch); in nand_bch_free()
|
D | jz4780_nand.c | 46 struct jz4780_bch *bch; member 144 return jz4780_bch_calculate(nfc->bch, ¶ms, dat, ecc_code); in jz4780_nand_ecc_calculate() 158 return jz4780_bch_correct(nfc->bch, ¶ms, dat, read_ecc); in jz4780_nand_ecc_correct() 172 if (!nfc->bch) { in jz4780_nand_attach_chip() 184 (nfc->bch) ? "hardware BCH" : "software ECC", in jz4780_nand_attach_chip() 363 nfc->bch = of_jz4780_bch_get(dev->of_node); in jz4780_nand_probe() 364 if (IS_ERR(nfc->bch)) in jz4780_nand_probe() 365 return PTR_ERR(nfc->bch); in jz4780_nand_probe() 375 if (nfc->bch) in jz4780_nand_probe() 376 jz4780_bch_release(nfc->bch); in jz4780_nand_probe() [all …]
|
D | jz4780_bch.h | 33 int jz4780_bch_calculate(struct jz4780_bch *bch, 36 int jz4780_bch_correct(struct jz4780_bch *bch, 40 void jz4780_bch_release(struct jz4780_bch *bch);
|
/Linux-v4.19/drivers/isdn/mISDN/ |
D | hwchannel.c | 48 struct bchannel *bch = container_of(ws, struct bchannel, workq); in bchannel_bh() local 52 if (test_and_clear_bit(FLG_RECVQUEUE, &bch->Flags)) { in bchannel_bh() 53 while ((skb = skb_dequeue(&bch->rqueue))) { in bchannel_bh() 54 bch->rcount--; in bchannel_bh() 55 if (likely(bch->ch.peer)) { in bchannel_bh() 56 err = bch->ch.recv(bch->ch.peer, skb); in bchannel_bh() 165 mISDN_ctrl_bchannel(struct bchannel *bch, struct mISDN_ctrl_req *cq) in mISDN_ctrl_bchannel() argument 176 memset(bch->fill, cq->p2 & 0xff, MISDN_BCH_FILL_SIZE); in mISDN_ctrl_bchannel() 177 test_and_set_bit(FLG_FILLEMPTY, &bch->Flags); in mISDN_ctrl_bchannel() 179 test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); in mISDN_ctrl_bchannel() [all …]
|
D | l1oip_core.c | 368 struct bchannel *bch; in l1oip_socket_recv() local 390 bch = hc->chan[channel].bch; in l1oip_socket_recv() 391 if (!dch && !bch) { in l1oip_socket_recv() 419 if (bch) { in l1oip_socket_recv() 449 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv() 1020 struct bchannel *bch; in open_bchannel() local 1028 bch = hc->chan[ch].bch; in open_bchannel() 1029 if (!bch) { in open_bchannel() 1034 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel() 1036 bch->ch.protocol = rq->protocol; in open_bchannel() [all …]
|
/Linux-v4.19/drivers/isdn/hardware/mISDN/ |
D | avmfritz.c | 143 struct bchannel bch[2]; member 154 card->bch[0].debug = debug; in _set_debug() 155 card->bch[1].debug = debug; in _set_debug() 263 if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) && in Sel_BCS() 264 (fc->bch[0].nr & channel)) in Sel_BCS() 265 return &fc->bch[0]; in Sel_BCS() 266 else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) && in Sel_BCS() 267 (fc->bch[1].nr & channel)) in Sel_BCS() 268 return &fc->bch[1]; in Sel_BCS() 288 write_ctrl(struct bchannel *bch, int which) { in write_ctrl() argument [all …]
|
D | mISDNisar.c | 82 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in send_mbox() 111 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in rcv_mbox() 188 u32 saved_debug = isar->ch[0].bch.debug; in load_firmware() 207 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO; in load_firmware() 294 isar->ch[0].bch.debug = saved_debug; in load_firmware() 406 isar->ch[0].bch.debug = saved_debug; in load_firmware() 418 _queue_data(&ch->bch.ch, PH_CONTROL_IND, status, 0, NULL, GFP_ATOMIC); in deliver_status() 432 if (test_bit(FLG_RX_OFF, &ch->bch.Flags)) { in isar_rcv_frame() 433 ch->bch.dropcnt += ch->is->clsb; in isar_rcv_frame() 437 switch (ch->bch.state) { in isar_rcv_frame() [all …]
|
D | netjet.c | 55 struct bchannel bch; member 109 card->bc[0].bch.debug = debug; in _set_debug() 110 card->bc[1].bch.debug = debug; in _set_debug() 190 struct tiger_hw *card = bc->bch.hw; in fill_mem() 194 bc->bch.nr, fill, cnt, idx, card->send.idx); in fill_mem() 195 if (bc->bch.nr & 2) { in fill_mem() 213 struct tiger_hw *card = bc->bch.hw; in mode_tiger() 216 bc->bch.nr, bc->bch.state, protocol); in mode_tiger() 219 if (bc->bch.state == ISDN_P_NONE) in mode_tiger() 222 bc->bch.state = protocol; in mode_tiger() [all …]
|
D | w6692.c | 61 struct bchannel bch; member 99 card->bc[0].bch.debug = debug; in _set_debug() 100 card->bc[1].bch.debug = debug; in _set_debug() 465 struct w6692_hw *card = wch->bch.hw; in W6692_empty_Bfifo() 470 if (unlikely(wch->bch.state == ISDN_P_NONE)) { in W6692_empty_Bfifo() 473 if (wch->bch.rx_skb) in W6692_empty_Bfifo() 474 skb_trim(wch->bch.rx_skb, 0); in W6692_empty_Bfifo() 477 if (test_bit(FLG_RX_OFF, &wch->bch.Flags)) { in W6692_empty_Bfifo() 478 wch->bch.dropcnt += count; in W6692_empty_Bfifo() 482 maxlen = bchannel_get_rxbuf(&wch->bch, count); in W6692_empty_Bfifo() [all …]
|
D | hfcpci.c | 148 struct bchannel bch[2]; member 322 if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) && in Sel_BCS() 323 (hc->bch[0].nr & channel)) in Sel_BCS() 324 return &hc->bch[0]; in Sel_BCS() 325 else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) && in Sel_BCS() 326 (hc->bch[1].nr & channel)) in Sel_BCS() 327 return &hc->bch[1]; in Sel_BCS() 380 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx() 394 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx() 406 hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz, in hfcpci_empty_bfifo() argument [all …]
|
D | mISDNipac.c | 901 pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr, in waitforCEC() 904 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); in waitforCEC() 921 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, in waitforXFW() 924 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); in waitforXFW() 944 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo() 945 if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) { in hscx_empty_fifo() 946 hscx->bch.dropcnt += count; in hscx_empty_fifo() 950 maxlen = bchannel_get_rxbuf(&hscx->bch, count); in hscx_empty_fifo() 953 if (hscx->bch.rx_skb) in hscx_empty_fifo() 954 skb_trim(hscx->bch.rx_skb, 0); in hscx_empty_fifo() [all …]
|
D | hfcsusb.c | 61 static int hfcsusb_setup_bch(struct bchannel *bch, int protocol); 62 static void deactivate_bchannel(struct bchannel *bch); 212 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hfcusb_l2l1B() local 213 struct hfcsusb *hw = bch->hw; in hfcusb_l2l1B() 224 ret = bchannel_senddata(bch, skb); in hfcusb_l2l1B() 233 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { in hfcusb_l2l1B() 234 hfcsusb_start_endpoint(hw, bch->nr - 1); in hfcusb_l2l1B() 235 ret = hfcsusb_setup_bch(bch, ch->protocol); in hfcusb_l2l1B() 243 deactivate_bchannel(bch); in hfcusb_l2l1B() 272 phi->bch[i].protocol = hw->bch[i].ch.protocol; in hfcsusb_ph_info() [all …]
|
D | hfcmulti.c | 858 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_on() local 866 if (!bch) in vpm_echocan_on() 873 recv_Bchannel_skb(bch, skb); in vpm_echocan_on() 890 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_off() local 899 if (!bch) in vpm_echocan_off() 906 recv_Bchannel_skb(bch, skb); in vpm_echocan_off() 1844 struct bchannel *bch = NULL; in hfcmulti_dtmf() local 1856 bch = hc->chan[ch].bch; in hfcmulti_dtmf() 1857 if (!bch) in hfcmulti_dtmf() 1861 if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) in hfcmulti_dtmf() [all …]
|
/Linux-v4.19/drivers/isdn/hisax/ |
D | hfc4s8s_l1.c | 383 struct hfc4s8s_btype *bch = ifc->priv; in bch_l2l1() local 384 struct hfc4s8s_l1 *l1 = bch->l1p; in bch_l2l1() 392 if (!l1->enabled || (bch->mode == L1_MODE_NULL)) { in bch_l2l1() 397 skb_queue_tail(&bch->tx_queue, skb); in bch_l2l1() 398 if (!bch->tx_skb && (bch->tx_cnt <= 0)) { in bch_l2l1() 400 ((bch->bchan == 1) ? 1 : 4); in bch_l2l1() 423 ((bch->bchan == in bch_l2l1() 427 ((bch->bchan == in bch_l2l1() 438 ((bch->bchan == in bch_l2l1() 449 (bch->bchan & 3); in bch_l2l1() [all …]
|
/Linux-v4.19/Documentation/devicetree/bindings/mtd/ |
D | ingenic,jz4780-nand.txt | 14 - ingenic,bch-controller: To make use of the hardware BCH controller, this 48 ingenic,bch-controller = <&bch>; 75 - compatible: Should be set to "ingenic,jz4780-bch". 81 bch: bch@134d0000 { 82 compatible = "ingenic,jz4780-bch";
|
D | gpmi-nand.txt | 13 - reg : should contain registers location and length for gpmi and bch. 14 - reg-names: Should contain the reg names "gpmi-nand" and "bch" 16 - interrupt-names : Should be "bch". 66 reg-names = "gpmi-nand", "bch"; 68 interrupt-names = "bch";
|
D | nvidia-tegra20-nand.txt | 28 Supported values with "hw" ECC mode are: "rs", "bch". 60 nand-ecc-algo = "bch";
|
/Linux-v4.19/include/linux/ |
D | bch.h | 70 void free_bch(struct bch_control *bch); 72 void encode_bch(struct bch_control *bch, const uint8_t *data, 75 int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len,
|
/Linux-v4.19/arch/mips/boot/dts/ingenic/ |
D | ci20.dts | 99 ingenic,bch-controller = <&bch>; 182 &bch {
|
D | jz4780.dtsi | 318 bch: bch@134d0000 { label 319 compatible = "ingenic,jz4780-bch";
|
/Linux-v4.19/arch/arm/boot/dts/ |
D | bcm5301x-nand-cs0-bch4.dtsi | 9 nand-ecc-algo = "bch";
|
D | bcm5301x-nand-cs0-bch1.dtsi | 11 nand-ecc-algo = "bch";
|
D | bcm5301x-nand-cs0-bch8.dtsi | 14 nand-ecc-algo = "bch";
|