Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264233
b: refs/heads/master
c: 373b0eb
h: refs/heads/master
i:
  264231: c8f7f51
v: v3
  • Loading branch information
Tomoya MORINAGA authored and Grant Likely committed Oct 4, 2011
1 parent 33d0dd9 commit 5f69f5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: 8b7aa961a815dad389525dcd1c36a44c249b1760
refs/heads/master: 373b0eb64b9c97a14720896dcfdebfa3268b1991
19 changes: 11 additions & 8 deletions trunk/drivers/spi/spi-topcliff-pch.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,19 @@ static void pch_spi_handler_sub(struct pch_spi_data *data, u32 reg_spsr_val,

/* if transfer complete interrupt */
if (reg_spsr_val & SPSR_FI_BIT) {
if (tx_index < bpw_len)
if ((tx_index == bpw_len) && (rx_index == tx_index)) {
/* disable interrupts */
pch_spi_setclr_reg(data->master, PCH_SPCR, 0, PCH_ALL);

/* transfer is completed;
inform pch_spi_process_messages */
data->transfer_complete = true;
data->transfer_active = false;
wake_up(&data->wait);
} else {
dev_err(&data->master->dev,
"%s : Transfer is not completed", __func__);
/* disable interrupts */
pch_spi_setclr_reg(data->master, PCH_SPCR, 0, PCH_ALL);

/* transfer is completed;inform pch_spi_process_messages */
data->transfer_complete = true;
data->transfer_active = false;
wake_up(&data->wait);
}
}
}

Expand Down

0 comments on commit 5f69f5d

Please sign in to comment.