diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/dev-spi.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/dev-spi.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c index 405e62128917..82db072cb836 100644 --- a/arch/arm/mach-s3c64xx/dev-spi.c +++ b/arch/arm/mach-s3c64xx/dev-spi.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <mach/dma.h> | 17 | #include <mach/dma.h> |
18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
19 | #include <mach/gpio-bank-c.h> | ||
20 | #include <mach/spi-clocks.h> | 19 | #include <mach/spi-clocks.h> |
21 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
22 | 21 | ||
@@ -40,23 +39,15 @@ static char *spi_src_clks[] = { | |||
40 | */ | 39 | */ |
41 | static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) | 40 | static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) |
42 | { | 41 | { |
42 | unsigned int base; | ||
43 | |||
43 | switch (pdev->id) { | 44 | switch (pdev->id) { |
44 | case 0: | 45 | case 0: |
45 | s3c_gpio_cfgpin(S3C64XX_GPC(0), S3C64XX_GPC0_SPI_MISO0); | 46 | base = S3C64XX_GPC(0); |
46 | s3c_gpio_cfgpin(S3C64XX_GPC(1), S3C64XX_GPC1_SPI_CLKO); | ||
47 | s3c_gpio_cfgpin(S3C64XX_GPC(2), S3C64XX_GPC2_SPI_MOSIO); | ||
48 | s3c_gpio_setpull(S3C64XX_GPC(0), S3C_GPIO_PULL_UP); | ||
49 | s3c_gpio_setpull(S3C64XX_GPC(1), S3C_GPIO_PULL_UP); | ||
50 | s3c_gpio_setpull(S3C64XX_GPC(2), S3C_GPIO_PULL_UP); | ||
51 | break; | 47 | break; |
52 | 48 | ||
53 | case 1: | 49 | case 1: |
54 | s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_SPI_MISO1); | 50 | base = S3C64XX_GPC(4); |
55 | s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_SPI_CLK1); | ||
56 | s3c_gpio_cfgpin(S3C64XX_GPC(6), S3C64XX_GPC6_SPI_MOSI1); | ||
57 | s3c_gpio_setpull(S3C64XX_GPC(4), S3C_GPIO_PULL_UP); | ||
58 | s3c_gpio_setpull(S3C64XX_GPC(5), S3C_GPIO_PULL_UP); | ||
59 | s3c_gpio_setpull(S3C64XX_GPC(6), S3C_GPIO_PULL_UP); | ||
60 | break; | 51 | break; |
61 | 52 | ||
62 | default: | 53 | default: |
@@ -64,6 +55,9 @@ static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) | |||
64 | return -EINVAL; | 55 | return -EINVAL; |
65 | } | 56 | } |
66 | 57 | ||
58 | s3c_gpio_cfgall_range(base, 3, | ||
59 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
60 | |||
67 | return 0; | 61 | return 0; |
68 | } | 62 | } |
69 | 63 | ||