Merge pull request #677 from peter-harliman/fix-spicfg-dm365

[Bsp] Fix missing spiconfig set in dm365
This commit is contained in:
Bernard Xiong 2016-11-10 06:14:03 +08:00 committed by GitHub
commit 5a1eb1dec9
1 changed files with 3 additions and 0 deletions

View File

@ -320,6 +320,9 @@ static int davinci_spi_setup_transfer(struct rt_spi_device *spi,
u8 chip_select = (u8)spi->parent.user_data; u8 chip_select = (u8)spi->parent.user_data;
dspi = spi->bus->parent.user_data; dspi = spi->bus->parent.user_data;
spicfg = (struct davinci_spi_config *)dspi->controller_data;
if (!spicfg)
spicfg = &davinci_spi_default_cfg;
bits_per_word = cfg->data_width; bits_per_word = cfg->data_width;
hz = cfg->max_hz; hz = cfg->max_hz;