linux 2.6.29 port spi driver to s3c2440??????
linux-2.6.29
i have a s3c2440 board .i "make menuconfig" to enable the spi core and spi user mode driver
i get a error "no platform data supllied" so i "google" and find the code
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
in the kernel 2.6.22
"static struct spi_board_info s3c2410_spi_board[] = {
[0] = {
.modalias = "s3c2410_spi",
.platform_data = NULL,
.irq = IRQ_EINT1,
.chip_select = 0,
.max_speed_hz = 4000*1000,
},
};
static struct s3c2410_spi_info s3c2410_spi_platdata = {
.pin_cs = S3C2410_GPG2,
.board_info = s3c2410_spi_board,
.board_size = ARRAY_SIZE(s3c2410_spi_board),
};
/* end add */
static struct resource s3c_spi0_resource[] = {
[0] = {
.start = S3C24XX_PA_SPI,
.end = S3C24XX_PA_SPI + 0x1f,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SPI0,
.end = IRQ_SPI0,
.flags = IORESOURCE_IRQ,
}
};
static u64 s3c_device_spi0_dmamask = 0xffffffffUL;
struct platform_device s3c_device_spi0 = {
.name = "s3c2410-spi",
.id = 0,
.num_resources = ARRAY_SIZE(s3c_spi0_resource),
.resource = s3c_spi0_resource,
.dev = {
.dma_mask = &s3c_device_spi0_dmamask,
.coherent_dma_mask = 0xffffffffUL,
/* add by lfc */
.platform_data = &s3c2410_spi_platdata,
/* end add */
}
};
EXPORT_SYMBOL(s3c_device_spi0);"
////////////////////////////////////////////////////////////////////////////////////////////////////
but i found that in the kernel 2.6.29 the struct s3c2410_spi_info is different from the kernel 2.6.22
so i cant add the above codes to linux-2.6.29
and how can do it !!!