2008-04-11 06:25:33     usb2.0 SD-Reader can't work on bf527?

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

2008-04-11 06:25:33     usb2.0 SD-Reader can't work on bf527?

zc liang (CHINA)

Message: 54087    Has anyone test usb2.0 device on bf527?

I saw the svn log of 2008R1:

 

-Michael

 

Revision 4349

Author cooloney

Date 2008-02-26 06:01:23 -0500 (Tue, 26 Feb 2008)

Log Message

Workaround for USB bugs

 

- [#3789] USB-IDE

- [#3806] 30G iPod

- [#3790] [#3807] USB to CF/SD card reader

 

So I svn up my project from 2008R1 yesterday and my revision is 4580.

Following is the test info:

usb 1-1: new high speed USB device using musb_hdrc and address 3

usb 1-1: configuration #1 chosen from 1 choice

scsi1 : SCSI emulation for USB Mass Storage devices

scsi 1:0:0:0: Direct-Access     USB 2.0  SD/MMC Reader         PQ: 0 ANSI: 0 CCS

sd 1:0:0:0: [sda] 249344 512-byte hardware sectors (128 MB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Assuming drive cache: write through

sd 1:0:0:0: [sda] 249344 512-byte hardware sectors (128 MB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Assuming drive cache: write through

sda: sda1

sd 1:0:0:0: [sda] Attached SCSI removable disk

sd 1:0:0:0: Attached scsi generic sg0 type 0

 

root:~> mount /dev/sda1 /mnt/

root:~> time cp /mnt/uImage /dev/null

usb 1-1: reset high speed USB device using musb_hdrc and address 3

usb 1-1: device descriptor read/64, error -110

usb 1-1: device descriptor read/64, error -110

usb 1-1: reset high speed USB device using musb_hdrc and address 3

 

I know someone test usb2.0 ok on bf548.Have anybody test usb2.0 on bf527?

Please tell me.

QuoteReplyEditDelete

 

 

2008-04-13 19:40:39     Re: usb2.0 SD-Reader can't work on bf527?

Robin Getz (UNITED STATES)

Message: 54157    ZC:

 

It depends in which version of BF527 you have - there is an anomaly in 0.0 & 0.1 (05000380 Data Read From L3 Memory by USB DMA May be Corrupted) which there is not a workaround for in the kernel driver. So, you will need something newer than that.

 

-Robin

QuoteReplyEditDelete

 

 

2008-04-13 21:24:42     Re: usb2.0 SD-Reader can't work on bf527?

zc liang (CHINA)

Message: 54163    My BF527 version is 0.0 .Do you mean that 0.1 version is workable for usb2.0?

I use the dma mode,and the usb1.1 test well.Why?

  | |     <M> Inventra Highspeed Dual Role Controller (TI, ADI, ...)                 | | 

  | |     ---   Blackfin BF54x, BF525 and BF527 high speed USB support               | | 

  | |           Driver Mode (USB Host)  --->                                         | | 

  | |     [ ]   Disable DMA (always use PIO)                                         | | 

  | |     (0)   Logging Level (0 - none / 3 - annoying / ... )

 

musb_hdrc: version 6.0, ?dma?, host, debug=0

musb_hdrc: USB Host mode controller at ffc03800 using PIO, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

root:~> usb 1-1: new high speed USB device using musb_hdrc and address 2

usb 1-1: configuration #1 chosen from 1 choice

scsi0 : SCSI emulation for USB Mass Storage devices

scsi 0:0:0:0: Direct-Access              Newman      MP3       PQ: 0 ANSI: 0 CCS

sd 0:0:0:0: [sda] 245248 512-byte hardware sectors (126 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Assuming drive cache: write through

sd 0:0:0:0: [sda] 245248 512-byte hardware sectors (126 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Assuming drive cache: write through

sda: sda1

sd 0:0:0:0: [sda] Attached SCSI removable disk

sd 0:0:0:0: Attached scsi generic sg0 type 0

 

root:~> mount /dev/sda1 /mnt/

root:~> ls /mnt/

root:~> mkdir /mnt/test

root:~> sync

root:~> time dd if=/dev/zero of=/mnt/test/20m bs=1M count=20

20+0 records in

20+0 records out

real    0m 6.53s

user    0m 0.00s

sys     0m 1.37s

root:~> sync

root:~> time dd if=/dev/zero of=/mnt/test/50M bs=1M count=50

50+0 records in

50+0 records out

real    0m 20.72s

user    0m 0.00s

sys     0m 3.59s

QuoteReplyEditDelete

 

 

2008-04-13 22:08:31     Re: usb2.0 SD-Reader can't work on bf527?

Robin Getz (UNITED STATES)

Message: 54166    ZC:

 

What I said was:

 

>there is an anomaly in 0.0 & 0.1  which there is not a workaround for in the kernel driver.

 

The anomaly will only show up in certain cases - if you don't run into those cases with full speed or low speed devices - that is great, but it doesn't effect the fact that the anomaly exists, and there isn't anything we are going to do about it, except wait for fixed silicon.

 

Robin

QuoteReplyEditDelete

 

 

2008-04-13 22:16:14     Re: usb2.0 SD-Reader can't work on bf527?

zc liang (CHINA)

Message: 54167    I saw that  there is an anomaly in both 0.0 and  0.1.

 

05000380

DESCRIPTION:

Data read from L3 memory by the USB DMA Controller may have repeated or missing values.

WORKAROUND:

Use a Memory DMA to move data from L3 to L1 memory before accessing the data with the USB DMA controller.

For USB DMAs to/from L1:

If the Core and USB DMA controller are accessing different L1 data banks, or different sub-banks within the same L1 data bank, there

won't be any further elements to this workaround. However, if the Core and the USB DMA controller are performing accesses within the

same L1 data bank and sub-bank, make sure to use 32-bit-aligned addresses (e.g., the start address of the USB DMA transfer to/from L1

memory should be 0x0, 0x4, 0x8, 0xC in the least significant nibble). Note that there is no restriction on the packet size transferred that is

imposed by this workaround.

APPLIES TO REVISION(S):

0.0, 0.1

 

So they should be same for that bug.

Is there still not a workaound for that bug in the new kernel?

 

Have anyone work well for usb2.0 in bf527 0.0 or 0.1?

QuoteReplyEditDelete

 

 

2008-04-13 22:22:00     Re: usb2.0 SD-Reader can't work on bf527?

zc liang (CHINA)

Message: 54168    So we can't do anything just wait for someone fix it??

QuoteReplyEditDelete

 

 

2008-04-13 22:53:36     Re: usb2.0 SD-Reader can't work on bf527?

Mike Frysinger (UNITED STATES)

Message: 54170    you have all the source code ... you could debug it yourself

 

or you could try a BF548-EZKIT with 0.1 silicon and see if it has the same problem

QuoteReplyEditDelete

 

 

2008-04-14 02:42:13     Re: usb2.0 SD-Reader can't work on bf527?

zc liang (CHINA)

Message: 54178    I am planing to debug it myself this week if noone do that.

QuoteReplyEditDelete

 

 

2008-04-14 08:10:30     Re: usb2.0 SD-Reader can't work on bf527?

Robin Getz (UNITED STATES)

Message: 54199    ZC:

 

You asked:

>Is there still not a workaound for that bug in the new kernel?

 

I had already said (twice)

>there is an anomaly in 0.0 & 0.1 which there is not a workaround for in the kernel driver

 

That means there is no workaround in the kernel.

 

We are unlikely to work on (or accept) patches to common code to try to fix broken silicon which is scheduled to be fixed soon.

 

-Robin

QuoteReplyEditDelete

 

 

2008-04-15 05:35:22     Re: usb2.0 SD-Reader can't work on bf527?

zc liang (CHINA)

Message: 54249    I think you are right.The rev0.2 bf527 will come out soon and I hope it would fix the bug.

I use an dma_memcpy to move data from L3 to L1  before usb dma controller access it.But there is no effect.

I still can't use SD reader,but can use a 1.1 usb device.

QuoteReplyEditDelete

 

 

2008-04-15 06:56:39     Re: usb2.0 SD-Reader can't work on bf527?

Robin Getz (UNITED STATES)

Message: 54264    ZC:

 

Like Mike said - the best thing to do would be to borrow a BF548 from someone, and try it out on that hardware.

 

-Robin

Attachments

    Outcomes