git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
arch
/
arm
/
mach-sa1100
/
ssp.c
diff --git
a/arch/arm/mach-sa1100/ssp.c
b/arch/arm/mach-sa1100/ssp.c
index
5eba5fb
..
1604dad
100644
(file)
--- a/
arch/arm/mach-sa1100/ssp.c
+++ b/
arch/arm/mach-sa1100/ssp.c
@@
-23,8
+23,6
@@
#include <asm/hardware.h>
#include <asm/hardware/ssp.h>
#include <asm/hardware.h>
#include <asm/hardware/ssp.h>
-#define TIMEOUT 100000
-
static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned int status = Ser4SSSR;
static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned int status = Ser4SSSR;
@@
-49,27
+47,18
@@
static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
* The caller is expected to perform the necessary locking.
*
* Returns:
* The caller is expected to perform the necessary locking.
*
* Returns:
- * %-ETIMEDOUT timeout occurred
+ * %-ETIMEDOUT timeout occurred
(for future)
* 0 success
*/
int ssp_write_word(u16 data)
{
* 0 success
*/
int ssp_write_word(u16 data)
{
- int timeout = TIMEOUT;
-
- while (!(Ser4SSSR & SSSR_TNF)) {
- if (!--timeout)
- return -ETIMEDOUT;
+ while (!(Ser4SSSR & SSSR_TNF))
cpu_relax();
cpu_relax();
- }
Ser4SSDR = data;
Ser4SSDR = data;
- timeout = TIMEOUT;
- while (!(Ser4SSSR & SSSR_BSY)) {
- if (!--timeout)
- return -ETIMEDOUT;
+ while (!(Ser4SSSR & SSSR_BSY))
cpu_relax();
cpu_relax();
- }
return 0;
}
return 0;
}
@@
-86,22
+75,15
@@
int ssp_write_word(u16 data)
* The caller is expected to perform the necessary locking.
*
* Returns:
* The caller is expected to perform the necessary locking.
*
* Returns:
- * %-ETIMEDOUT timeout occurred
+ * %-ETIMEDOUT timeout occurred
(for future)
* 16-bit data success
*/
* 16-bit data success
*/
-int ssp_read_word(
u16 *data
)
+int ssp_read_word(
void
)
{
{
- int timeout = TIMEOUT;
-
- while (!(Ser4SSSR & SSSR_RNE)) {
- if (!--timeout)
- return -ETIMEDOUT;
+ while (!(Ser4SSSR & SSSR_RNE))
cpu_relax();
cpu_relax();
- }
-
- *data = (u16)Ser4SSDR;
- return
0
;
+ return
Ser4SSDR
;
}
/**
}
/**
@@
-111,26
+93,14
@@
int ssp_read_word(u16 *data)
* is empty.
*
* The caller is expected to perform the necessary locking.
* is empty.
*
* The caller is expected to perform the necessary locking.
- *
- * Returns:
- * %-ETIMEDOUT timeout occurred
- * 0 success
*/
*/
-
int
ssp_flush(void)
+
void
ssp_flush(void)
{
{
- int timeout = TIMEOUT * 2;
-
do {
while (Ser4SSSR & SSSR_RNE) {
do {
while (Ser4SSSR & SSSR_RNE) {
- if (!--timeout)
- return -ETIMEDOUT;
(void) Ser4SSDR;
}
(void) Ser4SSDR;
}
- if (!--timeout)
- return -ETIMEDOUT;
} while (Ser4SSSR & SSSR_BSY);
} while (Ser4SSSR & SSSR_BSY);
-
- return 0;
}
/**
}
/**