AnsweredAssumed Answered

how to config mx53 qsb's ecspi into single burst mode?

Question asked by Chern Charley on May 23, 2013
Latest reply on Jun 26, 2013 by Yixing Kong
Branched to a new discussion

Hi guys~

 

Can anybody tell me how to config mx53's ecspi into single burst mode?

I use bsp linux 2.6.35.3.

I have read that iMX53RM.pdf, and know that should be config the register ECSPIx_CONFIGREG[11–8] SS CTL filed.

But it seens doesn't work out.When I read data from the spi port, it just block.

 

and I found there is a bug in mxc_spi.c. if we transfer a null data to spi port, the kernel will be crash down. So I use the

code commented.

 

static void spi_put_tx_data(void *base, unsigned int count,

                struct mxc_spi *master_drv_data)

{

    unsigned int ctrl_reg;

    unsigned int data = 0;

    int i = 0;

 

    /* Perform Tx transaction */

    for (i = 0; i < count; i++) {

        data = master_drv_data->transfer.tx_get(master_drv_data);

        __raw_writel(data, base + MXC_CSPITXDATA);

    }

/*    for (i = 0; i < count; i++) {*/

/*        if(master_drv_data->transfer.tx_buf != NULL)*/

/*        {*/

/*            data = master_drv_data->transfer.tx_get(master_drv_data);*/

/*            __raw_writel(data, base + MXC_CSPITXDATA);*/

/*        }*/

/*        else*/

/*        {*/

/*            __raw_writel(0xFF, base + MXC_CSPITXDATA);*/

/*        }*/

/*    }*/


.....

Outcomes