This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J5-Eco: SPI enabling DMA mode of transmission and receiving

Other Parts Discussed in Thread: SYSCONFIG

Hi,

How to configure SPI[1]  for DMA mode of transmission ? 

Below is my configuration for SPI[1] driver kernel version 2.6.37:

#define TI81XX_MCSPI2_BASE 0x481A0000 ------------base address of SPI[1] peripheral configuration register

static struct omap2_mcspi_device_config spidev_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1, /* 0: slave, 1: master */
};

static struct spi_board_info ti811x_spi1_info[] = {
{
.modalias = "spidev",
.bus_num = 2,
.chip_select = 0,
.max_speed_hz = 25000000,
.mode = SPI_MODE_1,
.controller_data = &spidev_mcspi_config,
},
};

spi_register_board_info(ti811x_spi1_info,
ARRAY_SIZE(ti811x_spi1_info));

static inline void ti81xx_mcspi_fixup(void)
{
omap2_mcspi1_resources[0].start = TI81XX_MCSPI1_BASE;
omap2_mcspi1_resources[0].end = TI81XX_MCSPI1_BASE + 0xff;
omap2_mcspi2_resources[0].start = TI81XX_MCSPI2_BASE;
omap2_mcspi2_resources[0].end = TI81XX_MCSPI2_BASE + 0xff;

if (cpu_is_ti814x()) {
omap2_mcspi2_resources[0].start = TI814X_MCSPI2_BASE;
omap2_mcspi2_resources[0].end = TI814X_MCSPI2_BASE + 0xff;
#ifdef CONFIG_ARCH_TI814X
omap2_mcspi3_resources[0].start = TI814X_MCSPI3_BASE;
omap2_mcspi3_resources[0].end = TI814X_MCSPI3_BASE + 0xff;
omap2_mcspi4_resources[0].start = TI814X_MCSPI4_BASE;
omap2_mcspi4_resources[0].end = TI814X_MCSPI4_BASE + 0xff;
#endif
}
}

static void omap_init_mcspi(void)
{
if (cpu_is_omap44xx())
omap4_mcspi_fixup();

if (cpu_is_ti81xx()){

ti81xx_mcspi_fixup();
platform_device_register(&omap2_mcspi2);

}

if (cpu_is_ti816x())
omap2_mcspi2_init();

if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx() ||
cpu_is_ti814x())
omap2_mcspi3_init();

if (cpu_is_omap343x() || cpu_is_omap44xx() || cpu_is_ti814x())
omap2_mcspi4_init();
}