Searched refs:bch (Results 1 - 25 of 37) sorted by relevance

12

/linux-master/lib/
H A Dbch.c76 #include <linux/bch.h>
118 static u8 swap_bits(struct bch_control *bch, u8 in) argument
120 if (!bch->swap_bits)
129 static void bch_encode_unaligned(struct bch_control *bch, argument
135 const int l = BCH_ECC_WORDS(bch)-1;
138 u8 tmp = swap_bits(bch, *data++);
140 p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(tmp)) & 0xff);
152 static void load_ecc8(struct bch_control *bch, uint32_t *dst, argument
156 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1;
159 dst[i] = ((u32)swap_bits(bch, sr
174 store_ecc8(struct bch_control *bch, uint8_t *dst, const uint32_t *src) argument
207 bch_encode(struct bch_control *bch, const uint8_t *data, unsigned int len, uint8_t *ecc) argument
289 modulo(struct bch_control *bch, unsigned int v) argument
302 mod_s(struct bch_control *bch, unsigned int v) argument
328 gf_mul(struct bch_control *bch, unsigned int a, unsigned int b) argument
335 gf_sqr(struct bch_control *bch, unsigned int a) argument
340 gf_div(struct bch_control *bch, unsigned int a, unsigned int b) argument
347 gf_inv(struct bch_control *bch, unsigned int a) argument
352 a_pow(struct bch_control *bch, int i) argument
357 a_log(struct bch_control *bch, unsigned int x) argument
362 a_ilog(struct bch_control *bch, unsigned int x) argument
370 compute_syndromes(struct bch_control *bch, uint32_t *ecc, unsigned int *syn) argument
409 compute_error_locator_polynomial(struct bch_control *bch, const unsigned int *syn) argument
465 solve_linear_system(struct bch_control *bch, unsigned int *rows, unsigned int *sol, int nsol) argument
541 find_affine4_roots(struct bch_control *bch, unsigned int a, unsigned int b, unsigned int c, unsigned int *roots) argument
578 find_poly_deg1_roots(struct bch_control *bch, struct gf_poly *poly, unsigned int *roots) argument
593 find_poly_deg2_roots(struct bch_control *bch, struct gf_poly *poly, unsigned int *roots) argument
635 find_poly_deg3_roots(struct bch_control *bch, struct gf_poly *poly, unsigned int *roots) argument
668 find_poly_deg4_roots(struct bch_control *bch, struct gf_poly *poly, unsigned int *roots) argument
732 gf_poly_logrep(struct bch_control *bch, const struct gf_poly *a, int *rep) argument
745 gf_poly_mod(struct bch_control *bch, struct gf_poly *a, const struct gf_poly *b, int *rep) argument
781 gf_poly_div(struct bch_control *bch, struct gf_poly *a, const struct gf_poly *b, struct gf_poly *q) argument
799 gf_poly_gcd(struct bch_control *bch, struct gf_poly *a, struct gf_poly *b) argument
828 compute_trace_bk_mod(struct bch_control *bch, int k, const struct gf_poly *f, struct gf_poly *z, struct gf_poly *out) argument
871 factor_polynomial(struct bch_control *bch, int k, struct gf_poly *f, struct gf_poly **g, struct gf_poly **h) argument
907 find_poly_roots(struct bch_control *bch, unsigned int k, struct gf_poly *poly, unsigned int *roots) argument
947 chien_search(struct bch_control *bch, unsigned int len, struct gf_poly *p, unsigned int *roots) argument
1019 bch_decode(struct bch_control *bch, const uint8_t *data, unsigned int len, const uint8_t *recv_ecc, const uint8_t *calc_ecc, const unsigned int *syn, unsigned int *errloc) argument
1086 build_gf_tables(struct bch_control *bch, unsigned int poly) argument
1114 build_mod8_tables(struct bch_control *bch, const uint32_t *g) argument
1148 build_deg2_base(struct bch_control *bch) argument
1199 compute_generator_polynomial(struct bch_control *bch) argument
1291 struct bch_control *bch = NULL; local
1387 bch_free(struct bch_control *bch) argument
[all...]
/linux-master/drivers/mtd/nand/raw/ingenic/
H A Djz4725b_bch.c62 static inline void jz4725b_bch_config_set(struct ingenic_ecc *bch, u32 cfg) argument
64 writel(cfg, bch->base + BCH_BHCSR);
67 static inline void jz4725b_bch_config_clear(struct ingenic_ecc *bch, u32 cfg) argument
69 writel(cfg, bch->base + BCH_BHCCR);
72 static int jz4725b_bch_reset(struct ingenic_ecc *bch, argument
78 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT);
81 jz4725b_bch_config_clear(bch, 0x1f);
82 jz4725b_bch_config_set(bch, BCH_BHCR_BCHE);
85 jz4725b_bch_config_set(bch, BCH_BHCR_BSE
112 jz4725b_bch_disable(struct ingenic_ecc *bch) argument
121 jz4725b_bch_write_data(struct ingenic_ecc *bch, const u8 *buf, size_t size) argument
128 jz4725b_bch_read_parity(struct ingenic_ecc *bch, u8 *buf, size_t size) argument
158 jz4725b_bch_wait_complete(struct ingenic_ecc *bch, unsigned int irq, u32 *status) argument
183 jz4725b_calculate(struct ingenic_ecc *bch, struct ingenic_ecc_params *params, const u8 *buf, u8 *ecc_code) argument
214 jz4725b_correct(struct ingenic_ecc *bch, struct ingenic_ecc_params *params, u8 *buf, u8 *ecc_code) argument
[all...]
H A Djz4780_bch.c62 static void jz4780_bch_reset(struct ingenic_ecc *bch, argument
68 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT);
73 writel(reg, bch->base + BCH_BHCNT);
80 writel(reg, bch->base + BCH_BHCR);
83 static void jz4780_bch_disable(struct ingenic_ecc *bch) argument
85 writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT);
86 writel(BCH_BHCR_BCHE, bch->base + BCH_BHCCR);
89 static void jz4780_bch_write_data(struct ingenic_ecc *bch, cons argument
106 jz4780_bch_read_parity(struct ingenic_ecc *bch, void *buf, size_t size) argument
136 jz4780_bch_wait_complete(struct ingenic_ecc *bch, unsigned int irq, u32 *status) argument
160 jz4780_calculate(struct ingenic_ecc *bch, struct ingenic_ecc_params *params, const u8 *buf, u8 *ecc_code) argument
183 jz4780_correct(struct ingenic_ecc *bch, struct ingenic_ecc_params *params, u8 *buf, u8 *ecc_code) argument
234 struct ingenic_ecc *bch; local
[all...]
/linux-master/drivers/isdn/mISDN/
H A Dhwchannel.c39 struct bchannel *bch = container_of(ws, struct bchannel, workq); local
43 if (test_and_clear_bit(FLG_RECVQUEUE, &bch->Flags)) {
44 while ((skb = skb_dequeue(&bch->rqueue))) {
45 bch->rcount--;
46 if (likely(bch->ch.peer)) {
47 err = bch->ch.recv(bch->ch.peer, skb);
156 mISDN_ctrl_bchannel(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
167 memset(bch->fill, cq->p2 & 0xff, MISDN_BCH_FILL_SIZE);
168 test_and_set_bit(FLG_FILLEMPTY, &bch
249 recv_Bchannel(struct bchannel *bch, unsigned int id, bool force) argument
292 recv_Bchannel_skb(struct bchannel *bch, struct sk_buff *skb) argument
338 confirm_Bsend(struct bchannel *bch) argument
361 get_next_bframe(struct bchannel *bch) argument
470 bchannel_get_rxbuf(struct bchannel *bch, int reqlen) argument
[all...]
H A Dl1oip_core.c354 struct bchannel *bch; local
376 bch = hc->chan[channel].bch;
377 if (!dch && !bch) {
405 if (bch) {
435 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb);
1007 struct bchannel *bch; local
1015 bch = hc->chan[ch].bch;
1016 if (!bch) {
1088 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1173 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
1203 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1289 struct bchannel *bch; local
[all...]
H A Dl1oip.h34 struct bchannel *bch; member in struct:l1oip_chan
/linux-master/drivers/isdn/hardware/mISDN/
H A Davmfritz.c130 struct bchannel bch[2]; member in struct:fritzcard
141 card->bch[0].debug = debug;
142 card->bch[1].debug = debug;
250 if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) &&
251 (fc->bch[0].nr & channel))
252 return &fc->bch[0];
253 else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) &&
254 (fc->bch[1].nr & channel))
255 return &fc->bch[1];
275 write_ctrl(struct bchannel *bch, in argument
336 modehdlc(struct bchannel *bch, int protocol) argument
390 hdlc_empty_fifo(struct bchannel *bch, int count) argument
436 hdlc_fill_fifo(struct bchannel *bch) argument
507 HDLC_irq_xpr(struct bchannel *bch) argument
523 HDLC_irq(struct bchannel *bch, u32 stat) argument
599 struct bchannel *bch; local
682 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
830 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
838 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
897 struct bchannel *bch; local
[all...]
H A DmISDNisar.c68 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) {
97 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) {
174 u32 saved_debug = isar->ch[0].bch.debug;
193 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO;
280 isar->ch[0].bch.debug = saved_debug;
392 isar->ch[0].bch.debug = saved_debug;
404 _queue_data(&ch->bch.ch, PH_CONTROL_IND, status, 0, NULL, GFP_ATOMIC);
418 if (test_bit(FLG_RX_OFF, &ch->bch.Flags)) {
419 ch->bch.dropcnt += ch->is->clsb;
423 switch (ch->bch
1468 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1563 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
1571 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1637 struct bchannel *bch; local
[all...]
H A Dnetjet.c42 struct bchannel bch; member in struct:tiger_ch
96 card->bc[0].bch.debug = debug;
97 card->bc[1].bch.debug = debug;
177 struct tiger_hw *card = bc->bch.hw;
181 bc->bch.nr, fill, cnt, idx, card->send.idx);
182 if (bc->bch.nr & 2) {
200 struct tiger_hw *card = bc->bch.hw;
203 bc->bch.nr, bc->bch.state, protocol);
206 if (bc->bch
740 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
791 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
851 struct bchannel *bch; local
[all...]
H A Dhfcpci.c134 struct bchannel bch[2]; member in struct:hfc_pci
309 if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) &&
310 (hc->bch[0].nr & channel))
311 return &hc->bch[0];
312 else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) &&
313 (hc->bch[1].nr & channel))
314 return &hc->bch[1];
367 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL)
381 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL)
393 hfcpci_empty_bfifo(struct bchannel *bch, struc argument
534 hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz, struct bzfifo *txbz, u_char *bdata) argument
598 main_rec_hfcpci(struct bchannel *bch) argument
739 hfcpci_fill_fifo(struct bchannel *bch) argument
1117 tx_birq(struct bchannel *bch) argument
1145 struct bchannel *bch; local
1237 mode_hfcpci(struct bchannel *bch, int bc, int protocol) argument
1430 set_hfcpci_rxtest(struct bchannel *bch, int protocol, int chan) argument
1505 deactivate_bchannel(struct bchannel *bch) argument
1520 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
1527 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1664 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1932 struct bchannel *bch; local
2275 struct bchannel *bch; local
[all...]
H A Dw6692.c45 struct bchannel bch; member in struct:w6692_ch
83 card->bc[0].bch.debug = debug;
84 card->bc[1].bch.debug = debug;
447 struct w6692_hw *card = wch->bch.hw;
452 if (unlikely(wch->bch.state == ISDN_P_NONE)) {
455 if (wch->bch.rx_skb)
456 skb_trim(wch->bch.rx_skb, 0);
459 if (test_bit(FLG_RX_OFF, &wch->bch.Flags)) {
460 wch->bch.dropcnt += count;
464 maxlen = bchannel_get_rxbuf(&wch->bch, coun
933 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
981 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
989 struct bchannel *bch; local
1026 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
[all...]
H A DmISDNipac.c885 pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr,
888 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr);
905 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr,
908 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr);
928 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count);
929 if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) {
930 hscx->bch.dropcnt += count;
934 maxlen = bchannel_get_rxbuf(&hscx->bch, count);
937 if (hscx->bch.rx_skb)
938 skb_trim(hscx->bch
1333 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1380 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
1388 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
1481 struct bchannel *bch; local
[all...]
H A 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); local
199 struct hfcsusb *hw = bch->hw;
210 ret = bchannel_senddata(bch, skb);
219 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) {
220 hfcsusb_start_endpoint(hw, bch->nr - 1);
221 ret = hfcsusb_setup_bch(bch, ch->protocol);
229 deactivate_bchannel(bch);
251 phi = kzalloc(struct_size(phi, bch, dc
471 struct bchannel *bch; local
684 hfcsusb_setup_bch(struct bchannel *bch, int protocol) argument
796 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
1783 deactivate_bchannel(struct bchannel *bch) argument
1805 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
[all...]
H A Dhfcmulti.c813 struct bchannel *bch = hc->chan[ch].bch; local
821 if (!bch)
828 recv_Bchannel_skb(bch, skb);
845 struct bchannel *bch = hc->chan[ch].bch; local
854 if (!bch)
861 recv_Bchannel_skb(bch, skb);
1799 struct bchannel *bch = NULL; local
1811 bch
1908 struct bchannel *bch; local
2153 struct bchannel *bch; local
2602 struct bchannel *bch; local
3413 deactivate_bchannel(struct bchannel *bch) argument
3430 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
3525 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) argument
3657 struct bchannel *bch = container_of(ch, struct bchannel, ch); local
4059 struct bchannel *bch; local
4773 struct bchannel *bch; local
4847 struct bchannel *bch; local
[all...]
H A Dhfcsusb.h265 struct bchannel *bch; /* link to hfcsusb_t->bch */ member in struct:usb_fifo
274 struct bchannel bch[2]; member in struct:hfcsusb
H A Dspeedfax.c79 card->isar.ch[0].bch.debug = debug;
80 card->isar.ch[1].bch.debug = debug;
398 list_add(&card->isar.ch[i].bch.ch.list,
/linux-master/include/linux/
H A Dbch.h61 void bch_free(struct bch_control *bch);
63 void bch_encode(struct bch_control *bch, const uint8_t *data,
66 int bch_decode(struct bch_control *bch, const uint8_t *data, unsigned int len,
/linux-master/include/linux/mtd/
H A Dnand-ecc-sw-bch.h12 #include <linux/bch.h>
21 * @bch: BCH control structure
30 struct bch_control *bch; member in struct:nand_ecc_sw_bch_conf
/linux-master/drivers/mtd/nand/
H A DMakefile13 nandcore-$(CONFIG_MTD_NAND_ECC_SW_BCH) += ecc-sw-bch.o
H A Decc-sw-bch.c4 * using binary BCH codes. It relies on the generic BCH library lib/bch.c.
15 #include <linux/mtd/nand-ecc-sw-bch.h>
30 bch_encode(engine_conf->bch, buf, nand->ecc.ctx.conf.step_size, code);
57 count = bch_decode(engine_conf->bch, NULL, step_size, read_ecc,
86 bch_free(engine_conf->bch);
120 engine_conf->bch = bch_init(m, t, 0, false);
121 if (!engine_conf->bch)
140 bch_encode(engine_conf->bch, erased_page, eccsize,
148 if (engine_conf->bch->ecc_bytes != eccbytes) {
150 eccbytes, engine_conf->bch
[all...]
/linux-master/fs/xfs/
H A Dxfs_buf.c517 struct xfs_buf_cache *bch)
519 spin_lock_init(&bch->bc_lock);
520 return rhashtable_init(&bch->bc_hash, &xfs_buf_hash_params);
525 struct xfs_buf_cache *bch)
527 rhashtable_destroy(&bch->bc_hash);
590 struct xfs_buf_cache *bch,
599 bp = rhashtable_lookup(&bch->bc_hash, map, xfs_buf_hash_params);
624 struct xfs_buf_cache *bch,
655 spin_lock(&bch->bc_lock);
656 bp = rhashtable_lookup_get_insert_fast(&bch
516 xfs_buf_cache_init( struct xfs_buf_cache *bch) argument
524 xfs_buf_cache_destroy( struct xfs_buf_cache *bch) argument
589 xfs_buf_lookup( struct xfs_buf_cache *bch, struct xfs_buf_map *map, xfs_buf_flags_t flags, struct xfs_buf **bpp) argument
622 xfs_buf_find_insert( struct xfs_buftarg *btp, struct xfs_buf_cache *bch, struct xfs_perag *pag, struct xfs_buf_map *cmap, struct xfs_buf_map *map, int nmaps, xfs_buf_flags_t flags, struct xfs_buf **bpp) argument
724 struct xfs_buf_cache *bch; local
1063 struct xfs_buf_cache *bch = xfs_buftarg_buf_cache(btp, pag); local
[all...]
H A Dxfs_buf.h91 int xfs_buf_cache_init(struct xfs_buf_cache *bch);
92 void xfs_buf_cache_destroy(struct xfs_buf_cache *bch);
/linux-master/drivers/mtd/nand/raw/gpmi-nand/
H A Dgpmi-nand.h147 bool bch; member in struct:gpmi_nand_data
H A Dgpmi-nand.c21 #include "bch-regs.h"
25 #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch"
26 #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch"
703 /* use legacy bch geometry settings by default*/
706 dev_dbg(this->dev, "use legacy bch geometry\n");
714 dev_dbg(this->dev, "use large oob bch geometry\n");
721 dev_dbg(this->dev, "use minimum ecc bch geometry\n");
725 dev_err(this->dev, "none of the bch geometry setting works\n");
1037 * raw_len is the length to read/write including bch data which
1040 if (this->bch)
[all...]
/linux-master/drivers/mtd/nand/raw/
H A Darasan-nand-controller.c13 #include <linux/bch.h>
166 * @bch: BCH structure
187 struct bch_control *bch; member in struct:anand
463 bf = bch_decode(anand->bch, raw_buf, chip->ecc.size,
1186 anand->bch = bch_init(bch_gf_mag, ecc->strength, bch_prim_poly, true);
1187 if (!anand->bch)
1261 if (anand->bch)
1262 bch_free(anand->bch);

Completed in 211 milliseconds

12