Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142557
b: refs/heads/master
c: aaaf939
h: refs/heads/master
i:
  142555: d29941a
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Apr 7, 2009
1 parent 6786554 commit 7fd11e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 11d6f5995137ba4dc49e9337185ac0a8753f8f69
refs/heads/master: aaaf939c573b783398b6af863576322256352f64
12 changes: 11 additions & 1 deletion trunk/drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
struct driver_data *drv_data = dev_id;
struct chip_data *chip = drv_data->cur_chip;
struct spi_message *msg = drv_data->cur_msg;
unsigned long timeout;
unsigned short dmastat = get_dma_curr_irqstat(drv_data->dma_channel);
u16 spistat = read_STAT(drv_data);

Expand All @@ -582,8 +583,17 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
cpu_relax();
}

dev_dbg(&drv_data->pdev->dev,
"in dma_irq_handler dmastat:0x%x spistat:0x%x\n",
dmastat, read_STAT(drv_data));

timeout = jiffies + HZ;
while (!(read_STAT(drv_data) & SPIF))
cpu_relax();
if (!time_before(jiffies, timeout)) {
dev_warn(&drv_data->pdev->dev, "timeout waiting for SPIF");
break;
} else
cpu_relax();

if ((dmastat & DMA_ERR) && (spistat & RBSY)) {
msg->state = ERROR_STATE;
Expand Down

0 comments on commit 7fd11e5

Please sign in to comment.