- 积分
- 4207
贡献13181
飞刀1102 FD
注册时间2012-10-18
在线时间763 小时
|
您好;您说的这个问题我们这边仔细测试了下,可以通过修改驱动来解决,方法如下 :修改/drivers/spi/spi_imx.c
185行左右,带+的就是另外增加的
#define SPI_IMX2_3_CONFIG_SCLKPOL(cs) (1 << ((cs) + 4))
#define SPI_IMX2_3_CONFIG_SBBCTRL(cs) (1 << ((cs) + 8))
#define SPI_IMX2_3_CONFIG_SSBPOL(cs) (1 << ((cs) + 12))
+#define SPI_IMX2_3_CONFIG_SCLKCTL(cs) (1 << ((cs) + 20))
#define SPI_IMX2_3_INT 0x10
275行左右,-号是去掉的,+号是增加的
static int __maybe_unused spi_imx2_3_config(struct spi_imx_data *spi_imx, cfg |= SPI_IMX2_3_CONFIG_SBBCTRL(config->cs);
if (config->mode & SPI_CPHA)
cfg |= SPI_IMX2_3_CONFIG_SCLKPHA(config->cs);
if (config->mode & SPI_CPOL)
- cfg |= SPI_IMX2_3_CONFIG_SCLKPOL(config->cs);
+ cfg |= SPI_IMX2_3_CONFIG_SCLKPOL(config->cs) | SPI_IMX2_3_CONFIG_SCLKCTL(config->cs);
if (config->mode & SPI_CS_HIGH) cfg |= SPI_IMX2_3_CONFIG_SSBPOL(config->cs);
有问题可以直接给我们发邮件或者拨打技术支持电话。 |
|