mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
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>
This commit is contained in:
parent
f11dea4f3d
commit
50921cdc44
2 changed files with 28 additions and 0 deletions
|
@ -22,6 +22,8 @@
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
#include <asm/arch/at91sam9_sdramc.h>
|
#include <asm/arch/at91sam9_sdramc.h>
|
||||||
#include <atmel_mci.h>
|
#include <atmel_mci.h>
|
||||||
|
#include <asm/arch/at91_spi.h>
|
||||||
|
#include <spi.h>
|
||||||
|
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
|
@ -127,6 +129,21 @@ int board_early_init_f(void)
|
||||||
return 0;
|
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)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
/* adress of boot parameters */
|
/* adress of boot parameters */
|
||||||
|
@ -139,6 +156,7 @@ int board_init(void)
|
||||||
#ifdef CONFIG_MACB
|
#ifdef CONFIG_MACB
|
||||||
taurus_macb_hw_init();
|
taurus_macb_hw_init();
|
||||||
#endif
|
#endif
|
||||||
|
at91_spi0_hw_init(TAURUS_SPI_MASK);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,16 @@
|
||||||
#define CONFIG_USB_STORAGE
|
#define CONFIG_USB_STORAGE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* SPI EEPROM */
|
||||||
|
#define CONFIG_SPI
|
||||||
|
#define CONFIG_CMD_SPI
|
||||||
|
#define CONFIG_CMD_SF
|
||||||
|
#define CONFIG_SPI_FLASH
|
||||||
|
#define CONFIG_ATMEL_SPI
|
||||||
|
#define CONFIG_SPI_FLASH_STMICRO
|
||||||
|
#define TAURUS_SPI_MASK (1 << 4)
|
||||||
|
#define TAURUS_SPI_CS_PIN AT91_PIN_PA3
|
||||||
|
|
||||||
/* load address */
|
/* load address */
|
||||||
#define CONFIG_SYS_LOAD_ADDR 0x22000000
|
#define CONFIG_SYS_LOAD_ADDR 0x22000000
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue