diff options
author | Zhao Qiang <qiang.zhao@freescale.com> | 2015-11-29 21:48:57 -0500 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-12-22 18:12:56 -0500 |
commit | 7aa1aa6ecec2af19d9aa85430ce3e56119e21626 (patch) | |
tree | 0acc8cf320d38abb5bdb12ff8df6053dfa612dd0 /arch/powerpc/sysdev/qe_lib/usb.c | |
parent | 302c059f2e7bac7342f912bc77ff5bd6490c8edd (diff) |
QE: Move QE from arch/powerpc to drivers/soc
ls1 has qe and ls1 has arm cpu.
move qe from arch/powerpc to drivers/soc/fsl
to adapt to powerpc and arm
Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib/usb.c')
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/usb.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/usb.c b/arch/powerpc/sysdev/qe_lib/usb.c deleted file mode 100644 index 27f23bd15eb6..000000000000 --- a/arch/powerpc/sysdev/qe_lib/usb.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * QE USB routines | ||
3 | * | ||
4 | * Copyright 2006 Freescale Semiconductor, Inc. | ||
5 | * Shlomi Gridish <gridish@freescale.com> | ||
6 | * Jerry Huang <Chang-Ming.Huang@freescale.com> | ||
7 | * Copyright (c) MontaVista Software, Inc. 2008. | ||
8 | * Anton Vorontsov <avorontsov@ru.mvista.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/errno.h> | ||
18 | #include <linux/export.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <asm/immap_qe.h> | ||
21 | #include <asm/qe.h> | ||
22 | |||
23 | int qe_usb_clock_set(enum qe_clock clk, int rate) | ||
24 | { | ||
25 | struct qe_mux __iomem *mux = &qe_immr->qmx; | ||
26 | unsigned long flags; | ||
27 | u32 val; | ||
28 | |||
29 | switch (clk) { | ||
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; | ||
40 | default: | ||
41 | pr_err("%s: requested unknown clock %d\n", __func__, clk); | ||
42 | return -EINVAL; | ||
43 | } | ||
44 | |||
45 | if (qe_clock_is_brg(clk)) | ||
46 | qe_setbrg(clk, rate, 1); | ||
47 | |||
48 | spin_lock_irqsave(&cmxgcr_lock, flags); | ||
49 | |||
50 | clrsetbits_be32(&mux->cmxgcr, QE_CMXGCR_USBCS, val); | ||
51 | |||
52 | spin_unlock_irqrestore(&cmxgcr_lock, flags); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | EXPORT_SYMBOL(qe_usb_clock_set); | ||