2008-04-09 03:39:30     blackfin spi bus concurrency

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-04-09 03:39:30     blackfin spi bus concurrency

Denis Grigoriev (RUSSIAN FEDERATION)

Message: 53882   

Hi All! I have bf533 custom board with mtd dataflash enable_dma=0 and spi_mmc driver with enable_dma=1 connected to the spi bus.

Attempt to mount mmc card results dataflash data corruption.

 

I'm looking into svn trunk drivers/spi/spi_bfin5xx.c:

static void cs_active(..)

{

    u16 flag = read_FLAG(drv_data);

    flag |= chip->flag;

    flag &= ~(chip->flag << 8);

    write_FLAG(drv_data, flag);

}

static void cs_deactive(..)

{

    u16 flag = read_FLAG(drv_data);

    flag |= (chip->flag << 8);

    write_FLAG(drv_data, flag);

    ...

}

 

When spi_mmc dma transfer is started CS of dataflash is also affected. Why chip->flag is OR'ed with FLAG?

 

static void cs_active(..)

{

    write_FLAG(drv_data, chip->flag);

}

and

static void cs_deactive(..)

{

    write_FLAG(drv_data, 0xff00);

    ...

}

works much better for me!

QuoteReplyEditDelete

 

 

2008-04-15 06:14:33     Re: blackfin spi bus concurrency

Yi Li (CHINA)

Message: 54251    I don't know the details of this issue, but I will add a bug in the tracker so someone can have a look.

Attachments

    Outcomes