arm: rpi: Enable USB, Ethernet, MMC, Video driver model on Raspberry Pi
Get series with b4
b4 am 20170405134155.GZ19897@bill-the-catVersions newest first · linked by author and title
- v4 Latest posting 2/20 of 17 patches 0 repliesNew
- v4 posting 1/21 of 17 patches 0 repliesSuperseded
Patches in v4 posting 2/2 No applies recorded yet
None of the 17 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [U-Boot] [PATCH v4 00/17] arm: rpi: Enable USB, Ethernet, MMC, Video driver model on Raspberry Pi
Quoted 69 lines · Simon Glass
Hi Tom,
Quoted 57 lines · Simon Glass
Hi Tom,
Quoted 20 lines · Simon Glass
Hi Tom,
Quoted 16 lines · Tom Rini
Quoted 13 lines · Simon Glass
Raspberry Pi uses a DWC2 USB controller and a SMSC USB Ethernet adaptor. Driver model support for these is available.
This series does the following:
- EnableCONFIG_DM_ETHandCONFIG_DM_USBon Raspberry Pi
- Convert the MMC driver to driver model
- Convert the video driver to driver model
- Fixes a driver model video bug which accessed beyond the frame buffer
- Fixes start-up of MMC with driver model (e.g. at present it does not supportenv_fat)
- Clean up a few loose endsWith Ethernet active the device list looks something like this:
Quoted 7 lines
Quoted 4 lines
There's something wrong with the ethernet changes, at least on RPi 3. The
test.pyTFTP test fails as the CRC32 on the file doesn't match, so something got corrupted along the way. I haven't thrown my monitor and USB keyboard on the Pi yet to try out the video parts. Thanks!OK, I will take a look at the
CONFIG_DM_ETHpatch. Feel free to pick up the other patches if you like.I have been able to repeat this. The problem (strangely) appears to be that
invalidate_dcache_range()does not work correctly. The symptom is that only the first half of the first block of file data is received (the rest is zeroes).There is something odd about this on armv8. For one thing it uses the same function for invalidate and flush, which clearly cannot work if the buffer has been modified by the CPU since it was last used. In fact we do this in the
dwc2.cdriver But armv7 doesn't have this problem and the problem repeated on rpi2. On the original rpi the problem does not occur.If I change the
invalidate_dcache_range()call intransfer_chunk()indrivers/usb/host/dwc2.ctoinvalidate_dcache_all()then everything works.If I put a
flush_dcache_range()call immediately after the call at the top (in the if (!in &&xfer_len) block) then it works. This is making sure that the CPU doesn't have that data cached.If I I try the tftpboot a second time it seems to work. In fact things settle down after a few block transfers and the rest of the file seems OK.
If I disable the cache ('dcache off') then it works.
Quoted 8 lines
I tried creating a new
invalidate_dcache_range()function on armv8 to use 'dc ivac' instead of 'dc civac' but no dice.I cannot really explain why it works correctly without DM for USB, or why rpi is unaffected.
So in summary there is definitely a bug somewhere, but I cannot see where exactly it is. Ideas welcome!
Quoted 6 lines
I forgot to mention that I can easily create a patch to make the dwc2 USB driver work, by using separate input and output buffers. That way the CPU will (likely) never cache incoming data and the clean/invalidate is fine. I've tested this and it seems to work.
But I must be missing something.
And you've since fixed it I believe and I'm testing that PR now. Can you re-spin this series when you have time? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170405/32e2a139/attachment.sig>