From cfe1fb0bac63ffd45f41044f44860e2c34ef4cbe Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 15 Apr 2013 14:28:45 +0200 Subject: at91sam9m10g45ek: add spi dataflash supprt Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- arch/arm/boards/at91sam9m10g45ek/init.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arch/arm/boards/at91sam9m10g45ek') diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c index f32215deef..d9a2f1f28f 100644 --- a/arch/arm/boards/at91sam9m10g45ek/init.c +++ b/arch/arm/boards/at91sam9m10g45ek/init.c @@ -38,6 +38,7 @@ #include #include #include +#include /* * board revision encoding @@ -125,6 +126,22 @@ static void ek_add_device_mci(void) static void ek_add_device_mci(void) {} #endif +static const struct spi_board_info ek_spi_devices[] = { + { + .name = "mtd_dataflash", + .chip_select = 0, + .max_speed_hz = 15 * 1000 * 1000, + .bus_num = 0, + } +}; + +static void ek_add_device_spi(void) +{ + spi_register_board_info(ek_spi_devices, + ARRAY_SIZE(ek_spi_devices)); + at91_add_device_spi(0, NULL); +} + #ifdef CONFIG_LED_GPIO struct gpio_led ek_leds[] = { { @@ -281,6 +298,7 @@ static void ek_add_device_lcdc(void) {} static int at91sam9m10g45ek_devices_init(void) { ek_add_device_nand(); + ek_add_device_spi(); at91_add_device_eth(0, &macb_pdata); ek_add_device_mci(); ek_add_device_usb(); -- cgit v1.2.3