Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251870
b: refs/heads/master
c: 8a33a37
h: refs/heads/master
v: v3
  • Loading branch information
Alek Du authored and Grant Likely committed Mar 31, 2011
1 parent a11fc5d commit f0392a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 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: de6efe0a966cf86b3c4039a610b2d4157db707f2
refs/heads/master: 8a33a373e5ffb6040c58ff41ea48ba21d5f8b5e9
15 changes: 1 addition & 14 deletions trunk/drivers/spi/dw_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,6 @@ static void wait_till_not_busy(struct dw_spi *dws)
"DW SPI: Status keeps busy for 5000us after a read/write!\n");
}

static void flush(struct dw_spi *dws)
{
while (dw_readw(dws, sr) & SR_RF_NOT_EMPT) {
dw_readw(dws, dr);
cpu_relax();
}

wait_till_not_busy(dws);
}


static int dw_writer(struct dw_spi *dws)
{
u16 txw = 0;
Expand Down Expand Up @@ -297,8 +286,7 @@ static void giveback(struct dw_spi *dws)

static void int_error_stop(struct dw_spi *dws, const char *msg)
{
/* Stop and reset hw */
flush(dws);
/* Stop the hw */
spi_enable_chip(dws, 0);

dev_err(&dws->master->dev, "%s\n", msg);
Expand Down Expand Up @@ -800,7 +788,6 @@ static void spi_hw_init(struct dw_spi *dws)
spi_enable_chip(dws, 0);
spi_mask_intr(dws, 0xff);
spi_enable_chip(dws, 1);
flush(dws);

/*
* Try to detect the FIFO depth if not set by interface driver,
Expand Down

0 comments on commit f0392a5

Please sign in to comment.