projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-mmc
[oweals/u-boot.git]
/
drivers
/
spi
/
cf_spi.c
diff --git
a/drivers/spi/cf_spi.c
b/drivers/spi/cf_spi.c
index 722aafc73c35ab1d733338aa3df548d374e50a7f..a883da93688a1bc056b569ab859bdb6dae263dfa 100644
(file)
--- a/
drivers/spi/cf_spi.c
+++ b/
drivers/spi/cf_spi.c
@@
-49,6
+49,14
@@
extern void cfspi_release_bus(uint bus, uint cs);
DECLARE_GLOBAL_DATA_PTR;
DECLARE_GLOBAL_DATA_PTR;
+#ifndef CONFIG_SPI_IDLE_VAL
+#if defined(CONFIG_SPI_MMC)
+#define CONFIG_SPI_IDLE_VAL 0xFFFF
+#else
+#define CONFIG_SPI_IDLE_VAL 0x0
+#endif
+#endif
+
#if defined(CONFIG_CF_DSPI)
/* DSPI specific mode */
#define SPI_MODE_MOD 0x00200000
#if defined(CONFIG_CF_DSPI)
/* DSPI specific mode */
#define SPI_MODE_MOD 0x00200000
@@
-145,7
+153,7
@@
int cfspi_xfer(struct spi_slave *slave, uint bitlen, const void *dout,
}
if (din != NULL) {
}
if (din != NULL) {
- cfspi_tx(ctrl,
0
);
+ cfspi_tx(ctrl,
CONFIG_SPI_IDLE_VAL
);
if (cfslave->charbit == 16)
*spi_rd16++ = cfspi_rx();
else
if (cfslave->charbit == 16)
*spi_rd16++ = cfspi_rx();
else
@@
-169,7
+177,7
@@
int cfspi_xfer(struct spi_slave *slave, uint bitlen, const void *dout,
}
if (din != NULL) {
}
if (din != NULL) {
- cfspi_tx(ctrl,
0
);
+ cfspi_tx(ctrl,
CONFIG_SPI_IDLE_VAL
);
if (cfslave->charbit == 16)
*spi_rd16 = cfspi_rx();
else
if (cfslave->charbit == 16)
*spi_rd16 = cfspi_rx();
else
@@
-177,7
+185,7
@@
int cfspi_xfer(struct spi_slave *slave, uint bitlen, const void *dout,
}
} else {
/* dummy read */
}
} else {
/* dummy read */
- cfspi_tx(ctrl,
0
);
+ cfspi_tx(ctrl,
CONFIG_SPI_IDLE_VAL
);
cfspi_rx();
}
cfspi_rx();
}