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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

692 Views
cherncharley
Contributor I

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);*/

/*        }*/

/*    }*/


.....

Labels (1)
Tags (3)
0 Kudos
1 Reply

407 Views
YixingKong
Senior Contributor IV

This burst mode is something that the current BSP does not support. You would have to implement this feature by yourselves.

Regards,

Yixing

0 Kudos