X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Ffiles%2Farch%2Fmips%2Far71xx%2Fmach-ap83.c;h=4ebdc61ce513abeefd5139cfea021cf1012c99f2;hp=df9421cc72778af8adb281b1c1ed8fce03bc39bb;hb=66ccdc6dbd45939dabceb521c9cadc188e632398;hpb=b193a7b32adb2b20cfd7dca796c35d05cd2e31b7 diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c index df9421cc7..4ebdc61ce 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c @@ -11,6 +11,8 @@ #include #include +#include +#include #include #include @@ -23,6 +25,11 @@ #define AP83_GPIO_BTN_JUMPSTART 12 #define AP83_GPIO_BTN_RESET 21 +#define AP83_GPIO_VSC7385_CS 1 +#define AP83_GPIO_VSC7385_MISO 3 +#define AP83_GPIO_VSC7385_MOSI 16 +#define AP83_GPIO_VSC7385_SCK 17 + static struct gpio_led ap83_leds_gpio[] __initdata = { { .name = "ap83:green:jumpstart", @@ -57,6 +64,21 @@ static struct gpio_button ap83_gpio_buttons[] __initdata = { } }; +static struct spi_gpio_platform_data ap83_spi_data = { + .miso = AP83_GPIO_VSC7385_MISO, + .mosi = AP83_GPIO_VSC7385_MOSI, + .sck = AP83_GPIO_VSC7385_SCK, + .num_chipselect = 1, +}; + +static struct platform_device ap83_spi_device = { + .name = "spi_gpio", + .id = 0, + .dev = { + .platform_data = &ap83_spi_data, + } +}; + static void __init ap83_setup(void) { ar71xx_add_device_mdio(0xfffffffe); @@ -82,6 +104,8 @@ static void __init ap83_setup(void) ar71xx_add_device_usb(); ar91xx_add_device_wmac(); + + platform_device_register(&ap83_spi_device); } MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup);