diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-04-15 14:28:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-04-16 14:50:44 +0200 |
commit | cfe1fb0bac63ffd45f41044f44860e2c34ef4cbe (patch) | |
tree | fb198db2802ba6ecdffed5f6ee79388c60c38886 /arch/arm/boards/at91sam9m10g45ek | |
parent | 59dbb4fe2c70fc79497f486c55c5fa785299b1c1 (diff) | |
download | barebox-cfe1fb0bac63ffd45f41044f44860e2c34ef4cbe.tar.gz barebox-cfe1fb0bac63ffd45f41044f44860e2c34ef4cbe.tar.xz |
at91sam9m10g45ek: add spi dataflash supprt
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/at91sam9m10g45ek')
-rw-r--r-- | arch/arm/boards/at91sam9m10g45ek/init.c | 18 |
1 files changed, 18 insertions, 0 deletions
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 <mach/at91sam9_smc.h> #include <gpio_keys.h> #include <readkey.h> +#include <spi/spi.h> /* * 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(); |