diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2011-06-28 08:49:14 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-07-04 12:52:49 -0400 |
commit | aa353169226ddc1ea4f07d6946b61dd0b0a7313d (patch) | |
tree | c5eb344e59fa4dda7af71962a7e0ad85f651be03 /arch/arm/mach-s3c2410/mach-qt2410.c | |
parent | 932036ce03f6c853a17005bced1e82b23f6378c0 (diff) |
mach-qt2410: convert to spi_gpio
Rather than the deprecated spi_s3c24xx_gpio driver.
Only compile tested. Notice that the board support seems quite broken
as the spi_s3c24xx_gpio platform device name was misspelled and there
is no struct spi_board_info defined, but this atleast didn't make it
any worse.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-qt2410.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-qt2410.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index e8f49feef28c..f44f77531b1e 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/serial_core.h> | 33 | #include <linux/serial_core.h> |
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/spi/spi_bitbang.h> | 35 | #include <linux/spi/spi_gpio.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/mtd/mtd.h> | 37 | #include <linux/mtd/mtd.h> |
38 | #include <linux/mtd/nand.h> | 38 | #include <linux/mtd/nand.h> |
@@ -53,8 +53,6 @@ | |||
53 | #include <mach/fb.h> | 53 | #include <mach/fb.h> |
54 | #include <plat/nand.h> | 54 | #include <plat/nand.h> |
55 | #include <plat/udc.h> | 55 | #include <plat/udc.h> |
56 | #include <mach/spi.h> | ||
57 | #include <mach/spi-gpio.h> | ||
58 | #include <plat/iic.h> | 56 | #include <plat/iic.h> |
59 | 57 | ||
60 | #include <plat/common-smdk.h> | 58 | #include <plat/common-smdk.h> |
@@ -216,32 +214,16 @@ static struct platform_device qt2410_led = { | |||
216 | 214 | ||
217 | /* SPI */ | 215 | /* SPI */ |
218 | 216 | ||
219 | static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs) | 217 | static struct spi_gpio_platform_data spi_gpio_cfg = { |
220 | { | 218 | .sck = S3C2410_GPG(7), |
221 | switch (cs) { | 219 | .mosi = S3C2410_GPG(6), |
222 | case BITBANG_CS_ACTIVE: | 220 | .miso = S3C2410_GPG(5), |
223 | gpio_set_value(S3C2410_GPB(5), 0); | ||
224 | break; | ||
225 | case BITBANG_CS_INACTIVE: | ||
226 | gpio_set_value(S3C2410_GPB(5), 1); | ||
227 | break; | ||
228 | } | ||
229 | } | ||
230 | |||
231 | static struct s3c2410_spigpio_info spi_gpio_cfg = { | ||
232 | .pin_clk = S3C2410_GPG(7), | ||
233 | .pin_mosi = S3C2410_GPG(6), | ||
234 | .pin_miso = S3C2410_GPG(5), | ||
235 | .chip_select = &spi_gpio_cs, | ||
236 | }; | 221 | }; |
237 | 222 | ||
238 | |||
239 | static struct platform_device qt2410_spi = { | 223 | static struct platform_device qt2410_spi = { |
240 | .name = "s3c24xx-spi-gpio", | 224 | .name = "spi-gpio", |
241 | .id = 1, | 225 | .id = 1, |
242 | .dev = { | 226 | .dev.platform_data = &spi_gpio_cfg, |
243 | .platform_data = &spi_gpio_cfg, | ||
244 | }, | ||
245 | }; | 227 | }; |
246 | 228 | ||
247 | /* Board devices */ | 229 | /* Board devices */ |