summaryrefslogtreecommitdiff
path: root/board/siemens
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-10-31 08:30:56 +0100
committerTom Rini <trini@ti.com>2014-11-17 08:47:16 -0500
commit50921cdc4474dafdcf19db54d7a669781ee5b70f (patch)
tree1ad1937dee3a604123f3d82629fd81c5a7c3da74 /board/siemens
parentf11dea4f3dbbfba5f5f1736f527ad4356d2d74a6 (diff)
downloadu-boot-imx-50921cdc4474dafdcf19db54d7a669781ee5b70f.zip
u-boot-imx-50921cdc4474dafdcf19db54d7a669781ee5b70f.tar.gz
u-boot-imx-50921cdc4474dafdcf19db54d7a669781ee5b70f.tar.bz2
arm, at91: add spi dataflash support for the taurus board
Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Bo Shen <voice.shen@atmel.com> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'board/siemens')
-rw-r--r--board/siemens/taurus/taurus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 673b302..76609c7 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -22,6 +22,8 @@
#include <asm/arch/gpio.h>
#include <asm/arch/at91sam9_sdramc.h>
#include <atmel_mci.h>
+#include <asm/arch/at91_spi.h>
+#include <spi.h>
#include <net.h>
#include <netdev.h>
@@ -127,6 +129,21 @@ int board_early_init_f(void)
return 0;
}
+int spi_cs_is_valid(unsigned int bus, unsigned int cs)
+{
+ return bus == 0 && cs == 0;
+}
+
+void spi_cs_activate(struct spi_slave *slave)
+{
+ at91_set_gpio_value(TAURUS_SPI_CS_PIN, 0);
+}
+
+void spi_cs_deactivate(struct spi_slave *slave)
+{
+ at91_set_gpio_value(TAURUS_SPI_CS_PIN, 1);
+}
+
int board_init(void)
{
/* adress of boot parameters */
@@ -139,6 +156,7 @@ int board_init(void)
#ifdef CONFIG_MACB
taurus_macb_hw_init();
#endif
+ at91_spi0_hw_init(TAURUS_SPI_MASK);
return 0;
}