aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/mach-qt2410.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-qt2410.c')
-rw-r--r--arch/arm/mach-s3c2410/mach-qt2410.c34
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
219static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs) 217static 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
231static 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
239static struct platform_device qt2410_spi = { 223static 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 */