Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299758
b: refs/heads/master
c: 488e1a9
h: refs/heads/master
v: v3
  • Loading branch information
Scott Jiang authored and Grant Likely committed Apr 27, 2012
1 parent 5086844 commit ec512cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 22ac3e82e1d3e5cad92538fe4ab51906cb220444
refs/heads/master: 488e1a9de27f0a299fc185f0b5c67246a3f0c6c9
7 changes: 3 additions & 4 deletions trunk/drivers/spi/spi-bfin-sport.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,15 @@ static void
bfin_sport_spi_restore_state(struct bfin_sport_spi_master_data *drv_data)
{
struct bfin_sport_spi_slave_data *chip = drv_data->cur_chip;
unsigned int bits = (drv_data->ops == &bfin_sport_transfer_ops_u8 ? 7 : 15);

bfin_sport_spi_disable(drv_data);
dev_dbg(drv_data->dev, "restoring spi ctl state\n");

bfin_write(&drv_data->regs->tcr1, chip->ctl_reg);
bfin_write(&drv_data->regs->tcr2, bits);
bfin_write(&drv_data->regs->tclkdiv, chip->baud);
bfin_write(&drv_data->regs->tfsdiv, bits);
SSYNC();

bfin_write(&drv_data->regs->rcr1, chip->ctl_reg & ~(ITCLK | ITFS));
bfin_write(&drv_data->regs->rcr2, bits);
SSYNC();

bfin_sport_spi_cs_active(chip);
Expand Down Expand Up @@ -425,6 +421,9 @@ bfin_sport_spi_pump_transfers(unsigned long data)
drv_data->ops = &bfin_sport_transfer_ops_u8;
else
drv_data->ops = &bfin_sport_transfer_ops_u16;
bfin_write(&drv_data->regs->tcr2, bits_per_word - 1);
bfin_write(&drv_data->regs->tfsdiv, bits_per_word - 1);
bfin_write(&drv_data->regs->rcr2, bits_per_word - 1);

drv_data->state = RUNNING_STATE;

Expand Down

0 comments on commit ec512cc

Please sign in to comment.