Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184697
b: refs/heads/master
c: 14f7963
h: refs/heads/master
i:
  184695: f2cb328
v: v3
  • Loading branch information
Janusz Krzysztofik authored and Tony Lindgren committed Feb 15, 2010
1 parent 513da8f commit 1808c4a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c127c7dc1abb7f02dcfbbea173e7abb4f2d4585e
refs/heads/master: 14f796375b5c2bcc27986de12b6f769ec3827f36
44 changes: 22 additions & 22 deletions trunk/arch/arm/plat-omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,26 +636,26 @@ int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
mcbsp = id_to_mcbsp_ptr(id);
base = mcbsp->io_base;

writew(buf, base + OMAP_MCBSP_REG_DXR1);
OMAP_MCBSP_WRITE(base, DXR1, buf);
/* if frame sync error - clear the error */
if (readw(base + OMAP_MCBSP_REG_SPCR2) & XSYNC_ERR) {
if (OMAP_MCBSP_READ(base, SPCR2) & XSYNC_ERR) {
/* clear error */
writew(readw(base + OMAP_MCBSP_REG_SPCR2) & (~XSYNC_ERR),
base + OMAP_MCBSP_REG_SPCR2);
OMAP_MCBSP_WRITE(base, SPCR2,
OMAP_MCBSP_READ(base, SPCR2) & (~XSYNC_ERR));
/* resend */
return -1;
} else {
/* wait for transmit confirmation */
int attemps = 0;
while (!(readw(base + OMAP_MCBSP_REG_SPCR2) & XRDY)) {
while (!(OMAP_MCBSP_READ(base, SPCR2) & XRDY)) {
if (attemps++ > 1000) {
writew(readw(base + OMAP_MCBSP_REG_SPCR2) &
(~XRST),
base + OMAP_MCBSP_REG_SPCR2);
OMAP_MCBSP_WRITE(base, SPCR2,
OMAP_MCBSP_READ(base, SPCR2) &
(~XRST));
udelay(10);
writew(readw(base + OMAP_MCBSP_REG_SPCR2) |
(XRST),
base + OMAP_MCBSP_REG_SPCR2);
OMAP_MCBSP_WRITE(base, SPCR2,
OMAP_MCBSP_READ(base, SPCR2) |
(XRST));
udelay(10);
dev_err(mcbsp->dev, "Could not write to"
" McBSP%d Register\n", mcbsp->id);
Expand All @@ -681,32 +681,32 @@ int omap_mcbsp_pollread(unsigned int id, u16 *buf)

base = mcbsp->io_base;
/* if frame sync error - clear the error */
if (readw(base + OMAP_MCBSP_REG_SPCR1) & RSYNC_ERR) {
if (OMAP_MCBSP_READ(base, SPCR1) & RSYNC_ERR) {
/* clear error */
writew(readw(base + OMAP_MCBSP_REG_SPCR1) & (~RSYNC_ERR),
base + OMAP_MCBSP_REG_SPCR1);
OMAP_MCBSP_WRITE(base, SPCR1,
OMAP_MCBSP_READ(base, SPCR1) & (~RSYNC_ERR));
/* resend */
return -1;
} else {
/* wait for recieve confirmation */
int attemps = 0;
while (!(readw(base + OMAP_MCBSP_REG_SPCR1) & RRDY)) {
while (!(OMAP_MCBSP_READ(base, SPCR1) & RRDY)) {
if (attemps++ > 1000) {
writew(readw(base + OMAP_MCBSP_REG_SPCR1) &
(~RRST),
base + OMAP_MCBSP_REG_SPCR1);
OMAP_MCBSP_WRITE(base, SPCR1,
OMAP_MCBSP_READ(base, SPCR1) &
(~RRST));
udelay(10);
writew(readw(base + OMAP_MCBSP_REG_SPCR1) |
(RRST),
base + OMAP_MCBSP_REG_SPCR1);
OMAP_MCBSP_WRITE(base, SPCR1,
OMAP_MCBSP_READ(base, SPCR1) |
(RRST));
udelay(10);
dev_err(mcbsp->dev, "Could not read from"
" McBSP%d Register\n", mcbsp->id);
return -2;
}
}
}
*buf = readw(base + OMAP_MCBSP_REG_DRR1);
*buf = OMAP_MCBSP_READ(base, DRR1);

return 0;
}
Expand Down

0 comments on commit 1808c4a

Please sign in to comment.