Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175831
b: refs/heads/master
c: f856cf0
h: refs/heads/master
i:
  175829: 8615af4
  175827: d219197
  175823: b1c8e5f
v: v3
  • Loading branch information
Wolfram Sang authored and Grant Likely committed Nov 4, 2009
1 parent f2e16b7 commit cac2e4c
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 3c9059d79f5eea6b8b75ddac97693127c3c41db4
refs/heads/master: f856cf01787354fb3c8cde0a80de606f368b21ed
12 changes: 8 additions & 4 deletions trunk/drivers/spi/mpc52xx_psc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,13 @@ static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
struct mpc52xx_psc __iomem *psc = mps->psc;
struct mpc52xx_psc_fifo __iomem *fifo = mps->fifo;
u32 mclken_div;
int ret = 0;
int ret;

/* default sysclk is 512MHz */
mclken_div = (mps->sysclk ? mps->sysclk : 512000000) / MCLK;
mpc52xx_set_psc_clkdiv(psc_id, mclken_div);
ret = mpc52xx_set_psc_clkdiv(psc_id, mclken_div);
if (ret)
return ret;

/* Reset the PSC into a known state */
out_8(&psc->command, MPC52xx_PSC_RST_RX);
Expand All @@ -342,7 +344,7 @@ static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)

mps->bits_per_word = 8;

return ret;
return 0;
}

static irqreturn_t mpc52xx_psc_spi_isr(int irq, void *dev_id)
Expand Down Expand Up @@ -411,8 +413,10 @@ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
goto free_master;

ret = mpc52xx_psc_spi_port_config(master->bus_num, mps);
if (ret < 0)
if (ret < 0) {
dev_err(dev, "can't configure PSC! Is it capable of SPI?\n");
goto free_irq;
}

spin_lock_init(&mps->lock);
init_completion(&mps->done);
Expand Down

0 comments on commit cac2e4c

Please sign in to comment.