Browse Source

ls2k spi sample at the same time.

Change-Id: I6c5e6b5c19718604f8368e20765c84afd6b37661
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
QiaoChong 6 years ago
committed by Chong Qiao
parent
commit
d5bc3043f1
  1. 4
      Targets/LS2K/dev/spi_w.c

4
Targets/LS2K/dev/spi_w.c

@ -47,7 +47,7 @@ void spi_initw()
#else #else
d=4; d=4;
#endif #endif
SET_SPI(SPER, 0x04|((d>>2)&3)); //spre:01 SET_SPI(SPER, 0x00|((d>>2)&3)); //spre:01
SET_SPI(SPCR, 0x50|(d&3)); SET_SPI(SPCR, 0x50|(d&3));
SET_SPI(SOFTCS,0xff); SET_SPI(SOFTCS,0xff);
} }
@ -691,7 +691,7 @@ struct spi_device spi_nand =
{ {
.dev = &ls1x_spi0, .dev = &ls1x_spi0,
.chip_select = 1, .chip_select = 1,
.max_speed_hz = 20000000, .max_speed_hz = 100000000,
}; };
struct spi_device spi_nand1 = struct spi_device spi_nand1 =

Loading…
Cancel
Save