[#4034] spi_mmc affects dataflash
Submitted By: Yi Li
Open Date
2008-04-15 06:18:58 Close Date
2008-05-20 23:22:16
Priority:
Medium Assignee:
Bryan Wu
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
Custom
Processor:
BF533 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
N/A
Summary: spi_mmc affects dataflash
Details:
please refer to:
blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=26738
This question hasn't get answered for sometime. So tracking here hoping it is not lost.
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!
Follow-ups
--- Bryan Wu 2008-05-20 23:22:10
I don't think this is a bug. So rejected it and also gave some comments in the
forum.
Thanks
-Bryan
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found