[PATCH v2 1/2] spi: spi-imx: enable dma support for escpi controller

Shawn Guo shawn.guo at linaro.org
Wed Jan 15 01:17:27 EST 2014


On Tue, Jan 14, 2014 at 03:52:01PM -0600, Frank Li wrote:
> >> @@ -778,6 +1158,56 @@ spi_imx_unprepare_message(struct spi_master *master, struct spi_message *msg)
> >>       return 0;
> >>  }
> >>
> >> +static int spi_imx_sdma_init(struct spi_imx_data *spi_imx)
> >> +{
> >> +     struct dma_slave_config slave_config = {};
> >> +     struct device *dev = spi_imx->dev;
> >> +     int ret;
> >> +
> >> +
> >> +     /* Prepare for TX : */
> >> +     spi_imx->dma_chan_tx = dma_request_slave_channel(dev, "tx");
> >> +     if (!spi_imx->dma_chan_tx) {
> >> +             dev_err(dev, "cannot get the TX DMA channel!\n");
> >
> > So we will see this error message for each type of imx spi device,
> > though the driver only supports DMA for imx51-ecspi.
> >
> > Shawn
> 
> How to handle this one? change to devinfo? Or check check if imx51-ecspi?

I think we should check device type and only initialize DMA for
imx51-ecspi type of devices.

Shawn




More information about the linux-arm-kernel mailing list