15 #include <linux/kernel.h>
17 #include <linux/errno.h>
18 #include <linux/slab.h>
19 #include <linux/stddef.h>
22 #include <linux/export.h>
78 case 0:
return QE_CR_SUBBLOCK_UCCFAST1;
79 case 1:
return QE_CR_SUBBLOCK_UCCFAST2;
80 case 2:
return QE_CR_SUBBLOCK_UCCFAST3;
81 case 3:
return QE_CR_SUBBLOCK_UCCFAST4;
82 case 4:
return QE_CR_SUBBLOCK_UCCFAST5;
83 case 5:
return QE_CR_SUBBLOCK_UCCFAST6;
84 case 6:
return QE_CR_SUBBLOCK_UCCFAST7;
85 case 7:
return QE_CR_SUBBLOCK_UCCFAST8;
86 default:
return QE_CR_SUBBLOCK_INVALID;
99 struct ucc_fast __iomem *uf_regs;
105 gumr =
in_be32(&uf_regs->gumr);
106 if (mode & COMM_DIR_TX) {
107 gumr |= UCC_FAST_GUMR_ENT;
110 if (mode & COMM_DIR_RX) {
111 gumr |= UCC_FAST_GUMR_ENR;
120 struct ucc_fast __iomem *uf_regs;
126 gumr =
in_be32(&uf_regs->gumr);
127 if (mode & COMM_DIR_TX) {
128 gumr &= ~UCC_FAST_GUMR_ENT;
131 if (mode & COMM_DIR_RX) {
132 gumr &= ~UCC_FAST_GUMR_ENR;
142 struct ucc_fast __iomem *uf_regs;
220 uccf->
p_ucce = &uf_regs->ucce;
221 uccf->
p_uccm = &uf_regs->uccm;
222 #ifdef CONFIG_UGETH_TX_ON_DEMAND
223 uccf->p_utodr = &uf_regs->utodr;
228 uccf->rx_discarded = 0;
245 gumr |= UCC_FAST_GUMR_TCI;
247 gumr |= UCC_FAST_GUMR_CDP;
249 gumr |= UCC_FAST_GUMR_CTSP;
251 gumr |= UCC_FAST_GUMR_CDS;
253 gumr |= UCC_FAST_GUMR_CTSS;
255 gumr |= UCC_FAST_GUMR_TXSY;
257 gumr |= UCC_FAST_GUMR_RSYN;
258 gumr |= uf_info->
synl;
260 gumr |= UCC_FAST_GUMR_RTSM;
261 gumr |= uf_info->
renc;
263 gumr |= UCC_FAST_GUMR_REVD;
264 gumr |= uf_info->
tenc;
265 gumr |= uf_info->
tcrc;
266 gumr |= uf_info->
mode;
282 qe_muram_alloc(uf_info->
urfs +
310 ucc_set_qe_mux_tsa(uf_info->
ucc_num, uf_info->
tsa);
314 if ((uf_info->
rx_clock != QE_CLK_NONE) &&
323 if ((uf_info->
tx_clock != QE_CLK_NONE) &&
341 out_be32(&uf_regs->ucce, 0xffffffff);