projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd3d356
)
spi:improve spi read of full duplex
author
lyx
<lyx@rock-chips.com>
Sat, 25 Sep 2010 06:42:20 +0000
(23:42 -0700)
committer
lyx
<lyx@rock-chips.com>
Sat, 25 Sep 2010 06:47:27 +0000
(23:47 -0700)
1.write 0 to spi send bufer only once, or spi may receive unexpect data
drivers/spi/rk2818_spim.c
patch
|
blob
|
history
diff --git
a/drivers/spi/rk2818_spim.c
b/drivers/spi/rk2818_spim.c
index d5f408efa714d868708cbe6d5d1c1621e2f05569..2136feca7994140e5272537b713aa3ed6b030999 100755
(executable)
--- a/
drivers/spi/rk2818_spim.c
+++ b/
drivers/spi/rk2818_spim.c
@@
-744,8
+744,8
@@
static void do_read(struct rk2818_spi *dws)
spi_enable_chip(dws, 0);
rk2818_writew(dws, SPIM_CTRLR1, dws->rx_end-dws->rx-1);
spi_enable_chip(dws, 1);
+ rk2818_writew(dws, SPIM_DR0, 0);
while (1) {
- rk2818_writew(dws, SPIM_DR0, 0);
if (dws->read(dws))
break;
if (count ++ == 0x20) {