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>
34 case 0:
return QE_CR_SUBBLOCK_UCCSLOW1;
35 case 1:
return QE_CR_SUBBLOCK_UCCSLOW2;
36 case 2:
return QE_CR_SUBBLOCK_UCCSLOW3;
37 case 3:
return QE_CR_SUBBLOCK_UCCSLOW4;
38 case 4:
return QE_CR_SUBBLOCK_UCCSLOW5;
39 case 5:
return QE_CR_SUBBLOCK_UCCSLOW6;
40 case 6:
return QE_CR_SUBBLOCK_UCCSLOW7;
41 case 7:
return QE_CR_SUBBLOCK_UCCSLOW8;
42 default:
return QE_CR_SUBBLOCK_INVALID;
59 QE_CR_PROTOCOL_UNSPECIFIED, 0);
69 qe_issue_cmd(QE_STOP_TX,
id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
79 qe_issue_cmd(QE_RESTART_TX,
id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
85 struct ucc_slow *us_regs;
91 gumr_l =
in_be32(&us_regs->gumr_l);
92 if (mode & COMM_DIR_TX) {
93 gumr_l |= UCC_SLOW_GUMR_L_ENT;
96 if (mode & COMM_DIR_RX) {
97 gumr_l |= UCC_SLOW_GUMR_L_ENR;
106 struct ucc_slow *us_regs;
112 gumr_l =
in_be32(&us_regs->gumr_l);
113 if (mode & COMM_DIR_TX) {
114 gumr_l &= ~UCC_SLOW_GUMR_L_ENT;
117 if (mode & COMM_DIR_RX) {
118 gumr_l &= ~UCC_SLOW_GUMR_L_ENR;
133 struct ucc_slow __iomem *us_regs;
155 if ((!us_info->
rfw) &&
181 uccs->
p_ucce = (
u16 *) & (us_regs->ucce);
182 uccs->
p_uccm = (
u16 *) & (us_regs->uccm);
186 uccs->rx_discarded = 0;
213 INIT_LIST_HEAD(&uccs->
confQ);
265 gumr = us_info->
tcrc;
267 gumr |= UCC_SLOW_GUMR_H_CDP;
269 gumr |= UCC_SLOW_GUMR_H_CTSP;
271 gumr |= UCC_SLOW_GUMR_H_CDS;
273 gumr |= UCC_SLOW_GUMR_H_CTSS;
275 gumr |= UCC_SLOW_GUMR_H_TFL;
277 gumr |= UCC_SLOW_GUMR_H_RFW;
279 gumr |= UCC_SLOW_GUMR_H_TXSY;
281 gumr |= UCC_SLOW_GUMR_H_RTSM;
288 gumr |= UCC_SLOW_GUMR_L_TCI;
290 gumr |= UCC_SLOW_GUMR_L_RINV;
292 gumr |= UCC_SLOW_GUMR_L_TINV;
294 gumr |= UCC_SLOW_GUMR_L_TEND;
301 uccs->
us_pram->tbmr = UCC_BMR_BO_BE;
302 uccs->
us_pram->rbmr = UCC_BMR_BO_BE;
314 ucc_set_qe_mux_tsa(us_info->
ucc_num, us_info->
tsa);
347 command = QE_INIT_TX_RX;
349 command = QE_INIT_TX;
351 command = QE_INIT_RX;