Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107549
b: refs/heads/master
c: 5aa6cf3
h: refs/heads/master
i:
  107547: b775822
v: v3
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Aug 4, 2008
1 parent 8e23d9c commit 2ecab9a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 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: 1a3f7d98e5f50f21ce6fb1406a35531d9596c5c6
refs/heads/master: 5aa6cf302c2758702348aab7457e516d3a5121b9
25 changes: 15 additions & 10 deletions trunk/drivers/spi/spi_s3c24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,19 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev)
return IRQ_HANDLED;
}

static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw)
{
/* for the moment, permanently enable the clock */

clk_enable(hw->clk);

/* program defaults into the registers */

writeb(0xff, hw->regs + S3C2410_SPPRE);
writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);
}

static int __init s3c24xx_spi_probe(struct platform_device *pdev)
{
struct s3c2410_spi_info *pdata;
Expand Down Expand Up @@ -327,15 +340,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
goto err_no_clk;
}

/* for the moment, permanently enable the clock */

clk_enable(hw->clk);

/* program defaults into the registers */

writeb(0xff, hw->regs + S3C2410_SPPRE);
writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);
s3c24xx_spi_initialsetup(hw);

/* setup any gpio we can */

Expand Down Expand Up @@ -415,7 +420,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
{
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);

clk_enable(hw->clk);
s3c24xx_spi_initialsetup(hw);
return 0;
}

Expand Down

0 comments on commit 2ecab9a

Please sign in to comment.