> > diff --git a/arch/arm/mach-davinci/include/mach/spi.h > b/arch/arm/mach-davinci/include/mach/spi.h > > index 910efbf..10c39d8 100644 > > --- a/arch/arm/mach-davinci/include/mach/spi.h > > +++ b/arch/arm/mach-davinci/include/mach/spi.h > > @@ -19,26 +19,39 @@ > > #ifndef __ARCH_ARM_DAVINCI_SPI_H > > #define __ARCH_ARM_DAVINCI_SPI_H > > > > +#define SPI_INTERN_CS 0xFF > > + > > +/* resource flags for IORESOURCE_DMA resources */ > > +#define IORESOURCE_DMA_RX_CHAN 0x01 > > +#define IORESOURCE_DMA_TX_CHAN 0x02 > > +#define IORESOURCE_DMA_EVENT_Q 0x04 > > + > > enum { > > - SPI_VERSION_1, /* For DM355/DM365/DM6467 */ > > + SPI_VERSION_1, /* For DM355/DM365/DM6467*/ > > Above line in the patch is not required.
Right. > > + > > + davinci_spi->version = pdata->version; > > + > > + davinci_spi->bitbang.flags = SPI_NO_CS | SPI_LSB_FIRST > | SPI_LOOP; > > + if (davinci_spi->version == SPI_VERSION_2) > > + davinci_spi->bitbang.flags |= SPI_READY; > > + > > + dma_rx_chan = davinci_spi_get_dma_by_flag(pdev, > IORESOURCE_DMA_RX_CHAN); > > + dma_tx_chan = davinci_spi_get_dma_by_flag(pdev, > IORESOURCE_DMA_TX_CHAN); > > + dma_eventq = davinci_spi_get_dma_by_flag(pdev, > IORESOURCE_DMA_EVENT_Q); > > + davinci_spi->dma_channels.dma_rx_channel = -1; > > + davinci_spi->dma_channels.dma_rx_sync_dev = dma_rx_chan; > > + davinci_spi->dma_channels.dma_tx_channel = -1; > > + davinci_spi->dma_channels.dma_tx_sync_dev = dma_tx_chan; > > + davinci_spi->dma_channels.dummy_param_slot = -1; > > + davinci_spi->dma_channels.eventq = dma_eventq; > > Can the above configurations be done only in case if DMA mode? DMA mode is selected on a per-device basis. This initialization is for the controller, so it needs to be prepared to handle DMA if a device uses it. If DMA is not required, no DMA resource need be assigned to the controller. > Some way of informing the user about the mode in which the driver is > working is desirable. Yes, I'll try to come up with something. _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source