Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187411
b: refs/heads/master
c: 75497d9
h: refs/heads/master
i:
  187409: 24acf5f
  187407: b663fad
v: v3
  • Loading branch information
Ben Dooks committed Jan 21, 2010
1 parent f2491a8 commit 85163a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: bd548e5ef21ac2ff18b262a905543d7a2340fb87
refs/heads/master: 75497d96b2094d325594b46d5e5f12b2396c4d51
15 changes: 9 additions & 6 deletions trunk/arch/arm/plat-s3c64xx/dev-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <mach/gpio.h>

#include <plat/spi-clocks.h>

#include <plat/s3c64xx-spi.h>
#include <plat/gpio-bank-c.h>
#include <plat/gpio-cfg.h>
Expand Down Expand Up @@ -154,6 +155,8 @@ EXPORT_SYMBOL(s3c64xx_device_spi1);

void __init s3c64xx_spi_set_info(int cntrlr, int src_clk_nr, int num_cs)
{
struct s3c64xx_spi_info *pd;

/* Reject invalid configuration */
if (!num_cs || src_clk_nr < 0
|| src_clk_nr > S3C64XX_SPI_SRCCLK_48M) {
Expand All @@ -163,18 +166,18 @@ void __init s3c64xx_spi_set_info(int cntrlr, int src_clk_nr, int num_cs)

switch (cntrlr) {
case 0:
s3c64xx_spi0_pdata.num_cs = num_cs;
s3c64xx_spi0_pdata.src_clk_nr = src_clk_nr;
s3c64xx_spi0_pdata.src_clk_name = spi_src_clks[src_clk_nr];
pd = &s3c64xx_spi0_pdata;
break;
case 1:
s3c64xx_spi1_pdata.num_cs = num_cs;
s3c64xx_spi1_pdata.src_clk_nr = src_clk_nr;
s3c64xx_spi1_pdata.src_clk_name = spi_src_clks[src_clk_nr];
pd = &s3c64xx_spi1_pdata;
break;
default:
printk(KERN_ERR "%s: Invalid SPI controller(%d)\n",
__func__, cntrlr);
return;
}

pd->num_cs = num_cs;
pd->src_clk_nr = src_clk_nr;
pd->src_clk_name = spi_src_clks[src_clk_nr];
}

0 comments on commit 85163a5

Please sign in to comment.