16 #include <linux/kernel.h>
17 #include <linux/errno.h>
18 #include <linux/export.h>
25 struct qe_mux __iomem *mux = &
qe_immr->qmx;
30 case QE_CLK3: val = QE_CMXGCR_USBCS_CLK3;
break;
31 case QE_CLK5: val = QE_CMXGCR_USBCS_CLK5;
break;
32 case QE_CLK7: val = QE_CMXGCR_USBCS_CLK7;
break;
33 case QE_CLK9: val = QE_CMXGCR_USBCS_CLK9;
break;
34 case QE_CLK13: val = QE_CMXGCR_USBCS_CLK13;
break;
35 case QE_CLK17: val = QE_CMXGCR_USBCS_CLK17;
break;
36 case QE_CLK19: val = QE_CMXGCR_USBCS_CLK19;
break;
37 case QE_CLK21: val = QE_CMXGCR_USBCS_CLK21;
break;
38 case QE_BRG9: val = QE_CMXGCR_USBCS_BRG9;
break;
39 case QE_BRG10: val = QE_CMXGCR_USBCS_BRG10;
break;
41 pr_err(
"%s: requested unknown clock %d\n", __func__, clk);
45 if (qe_clock_is_brg(clk))
50 clrsetbits_be32(&mux->cmxgcr, QE_CMXGCR_USBCS, val);
52 spin_unlock_irqrestore(&cmxgcr_lock, flags);