1 --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
2 +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
4 #include <linux/serial.h>
6 #include <linux/serial_8250.h>
7 +#include <linux/spi/spi.h>
8 +#include <linux/spi/spi_gpio.h>
10 #include <asm/setup.h>
11 #include <asm/memory.h>
12 @@ -146,9 +148,37 @@ static struct platform_device gtwx5715_f
13 .resource = >wx5715_flash_resource,
16 +static struct spi_gpio_platform_data gtwx5715_spi_platform_data = {
17 + .sck = GTWX5715_KSSPI_CLOCK,
18 + .mosi = GTWX5715_KSSPI_TXD,
19 + .miso = GTWX5715_KSSPI_RXD,
20 + .num_chipselect = 1,
23 +static struct platform_device gtwx5715_spi_device = {
27 + .platform_data = >wx5715_spi_platform_data,
31 +static struct spi_board_info gtwx5715_spi_devices[] __initdata = {
33 + .modalias = "spi-ks8995",
34 + .max_speed_hz = 5000000,
38 + .controller_data = (void *)GTWX5715_KSSPI_SELECT,
43 static struct platform_device *gtwx5715_devices[] __initdata = {
44 >wx5715_uart_device,
46 + >wx5715_spi_device,
49 static void __init gtwx5715_init(void)
50 @@ -158,6 +188,7 @@ static void __init gtwx5715_init(void)
51 gtwx5715_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
52 gtwx5715_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_8M - 1;
54 + spi_register_board_info(gtwx5715_spi_devices, ARRAY_SIZE(gtwx5715_spi_devices));
55 platform_add_devices(gtwx5715_devices, ARRAY_SIZE(gtwx5715_devices));