summaryrefslogtreecommitdiff
path: root/cpu/arm926ejs/at91sam9/spi.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-03-31 21:20:49 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-04-01 01:46:12 +0200
commit1762f13b4aab88b685b1722f17dada247945624b (patch)
treea10c4edd50cfc538c65ca3f4ee0d93f3cbc772c5 /cpu/arm926ejs/at91sam9/spi.c
parent761712188b353494defb2b644491ff73d0daaa6f (diff)
downloadu-boot-imx-1762f13b4aab88b685b1722f17dada247945624b.zip
u-boot-imx-1762f13b4aab88b685b1722f17dada247945624b.tar.gz
u-boot-imx-1762f13b4aab88b685b1722f17dada247945624b.tar.bz2
AT91SAM9: Move CONFIG_HAS_DATAFLASH to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'cpu/arm926ejs/at91sam9/spi.c')
-rw-r--r--cpu/arm926ejs/at91sam9/spi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cpu/arm926ejs/at91sam9/spi.c b/cpu/arm926ejs/at91sam9/spi.c
index c819608..c9fe6d8 100644
--- a/cpu/arm926ejs/at91sam9/spi.c
+++ b/cpu/arm926ejs/at91sam9/spi.c
@@ -26,7 +26,6 @@
#include <asm/arch/at91_pio.h>
#include <asm/arch/at91_spi.h>
-#ifdef CONFIG_HAS_DATAFLASH
#include <dataflash.h>
#define AT91_SPI_PCS0_DATAFLASH_CARD 0xE /* Chip Select 0: NPCS0%1110 */
@@ -85,6 +84,7 @@ void AT91F_SpiInit(void)
void AT91F_SpiEnable(int cs)
{
unsigned long mode;
+
switch (cs) {
case 0: /* Configure SPI CS0 for Serial DataFlash AT45DBxx */
mode = readl(AT91_BASE_SPI + AT91_SPI_MR);
@@ -116,12 +116,10 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc)
{
unsigned int timeout;
-
pDesc->state = BUSY;
writel(AT91_SPI_TXTDIS + AT91_SPI_RXTDIS, AT91_BASE_SPI + AT91_SPI_PTCR);
-
/* Initialize the Transmit and Receive Pointer */
writel((unsigned int)pDesc->rx_cmd_pt, AT91_BASE_SPI + AT91_SPI_RPR);
writel((unsigned int)pDesc->tx_cmd_pt, AT91_BASE_SPI + AT91_SPI_TPR);
@@ -157,4 +155,3 @@ unsigned int AT91F_SpiWrite(AT91PS_DataflashDesc pDesc)
return DATAFLASH_OK;
}
-#endif