Commit Graph

8 Commits (c550ad3d3a70b409a482896a77cfc890823d0221)

Author SHA1 Message Date
John Crispin a941b34008 ramips: use transfer_one instead of transfer_one_message on rt2880 spi
* use kernel buildin transfer_one_message. we only need to implement
transfer_one and set_cs function
* should support use gpio as cs pin
* deselected the spi device when setup and add debug info
* only reset device when first driver probe

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47579
9 years ago
John Crispin 95aa28da81 ramips: move rt2880 spi clock and reset init code to spi_prepare_message
before spi transfer. use spi_prepare_message to setup spi hardware. it
will setup MSB, spi mode and speed
remove sys_freq member and speed check code

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47578
9 years ago
John Crispin a58dec6275 ramips: improve rt2880 spi setup
* check clock rate, SPI mode, and word sizes
* setup spi polarity
* enable spi1 hw if need

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47577
9 years ago
John Crispin 2ce886f149 ramips: clean up rt2880 spi probe/remove
* fill struct according to the member order
* add error clean up
* set min/max spi speed. so we don't need to check again

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47576
9 years ago
John Crispin bf89d139e1 ramips: improve rt2880 spi wait ready function
use loops_per_jiffy, spi clock speed and write bytes to get the
spi loop count. if loop to 0 than spi operation timeout.
remove usleep. we only write 1 byte to spi device. use busy loop
would be better.

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47575
9 years ago
John Crispin 702c480dfe ramips: remove rt2880 spi lock and clean bit operation
Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47574
9 years ago
John Crispin 13fbd6fea7 ramips: add rt2880/mt7620 spi register defines
Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47573
9 years ago
John Crispin 654bc380ec ralink: add 3.18 support
keep default as 3.14, mt7621 gic need to be ported to 3.18

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44349
10 years ago