-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 101654 b: refs/heads/master c: 5e41486 h: refs/heads/master v: v3
- Loading branch information
Anton Vorontsov
authored and
Kumar Gala
committed
Jun 10, 2008
1 parent
6c67827
commit ed7541d
Showing
6 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 83ff9dcf375c418ca3b98eb950711525ca1269e2 | ||
refs/heads/master: 5e41486c408eb4206aee09303631427f57771691 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,7 @@ config UCC | |
bool | ||
default y if UCC_FAST || UCC_SLOW | ||
|
||
config QE_USB | ||
bool | ||
help | ||
QE USB Host Controller support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* QE USB routines | ||
* | ||
* Copyright (c) Freescale Semicondutor, Inc. 2006. | ||
* Shlomi Gridish <gridish@freescale.com> | ||
* Jerry Huang <Chang-Ming.Huang@freescale.com> | ||
* Copyright (c) MontaVista Software, Inc. 2008. | ||
* Anton Vorontsov <avorontsov@ru.mvista.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/errno.h> | ||
#include <linux/io.h> | ||
#include <asm/immap_qe.h> | ||
#include <asm/qe.h> | ||
|
||
int qe_usb_clock_set(enum qe_clock clk, int rate) | ||
{ | ||
struct qe_mux __iomem *mux = &qe_immr->qmx; | ||
unsigned long flags; | ||
u32 val; | ||
|
||
switch (clk) { | ||
case QE_CLK3: val = QE_CMXGCR_USBCS_CLK3; break; | ||
case QE_CLK5: val = QE_CMXGCR_USBCS_CLK5; break; | ||
case QE_CLK7: val = QE_CMXGCR_USBCS_CLK7; break; | ||
case QE_CLK9: val = QE_CMXGCR_USBCS_CLK9; break; | ||
case QE_CLK13: val = QE_CMXGCR_USBCS_CLK13; break; | ||
case QE_CLK17: val = QE_CMXGCR_USBCS_CLK17; break; | ||
case QE_CLK19: val = QE_CMXGCR_USBCS_CLK19; break; | ||
case QE_CLK21: val = QE_CMXGCR_USBCS_CLK21; break; | ||
case QE_BRG9: val = QE_CMXGCR_USBCS_BRG9; break; | ||
case QE_BRG10: val = QE_CMXGCR_USBCS_BRG10; break; | ||
default: | ||
pr_err("%s: requested unknown clock %d\n", __func__, clk); | ||
return -EINVAL; | ||
} | ||
|
||
if (qe_clock_is_brg(clk)) | ||
qe_setbrg(clk, rate, 1); | ||
|
||
spin_lock_irqsave(&cmxgcr_lock, flags); | ||
|
||
clrsetbits_be32(&mux->cmxgcr, QE_CMXGCR_USBCS, val); | ||
|
||
spin_unlock_irqrestore(&cmxgcr_lock, flags); | ||
|
||
return 0; | ||
} | ||
EXPORT_SYMBOL(qe_usb_clock_set); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters