April 28, 2008

Status update - USB on Sam440

I have thought that fixing OHCI driver for endianess will be painful, since the OHCI chip works internally only in LittleEndian mode. Fixing it was like a fight with armor in form of preprocessor macros... But one day the war was over. The USB chip was, at least in theory, expected to work flawlessly.

It was not.

I have plugged the USB mouse and watched the debug. Wooha! OHCI root hub detected the change on one of it's ports. Great! The base USB class wanted to get on of mouse' descriptors, but it failed. It turned out that a local copy of transfer descriptor was in the data cache of CPU. Well, whatever. It may happen since AMCC440 does not maintain cache coherency. So, I did proper CacheClearE() and continued....


Two days later I was still fighting... Everything should work perfectly. The USB mouse got configured, my USB HID class knew what device it is. It was even able to parse the incoming reports. But there were none. Why oh why there are no reports from mouse???

Well, due to one mistake the OHCI chip was told that it should commit 0% (zero) for periodic transfers. Once fixed, USB mouse started to work. USB Stack is as usable as on a x86 architecture: USB - mice, keyboards, tablets and hubs are supposed to work. Additionally, I have fixed all cache issues in USB stack and enabled copy-back caching again.

You may see the PCITool app on sam440 - one of the very first programs I've started as soon as I could move the mouse pointer. Other Sam440 and AROS related screenshots may be found here.

I'm going to test AROS a bit this evening. As soon as everything will work as expected I will attempt to write the network driver for samantha.

Labels: ,

4 Comments:

Anonymous Anonymous said...

Hi Michael,

these are great news!

Keep goin' - you're the man

Ansi

12:45 PM  
Blogger pain said...

mmm I wonder how Tigger got his Efika port working...

1:41 PM  
Blogger pain said...

BTW... it could be great if you left the classic amiga memory map unmapped so access to that zone caused exceptions.

http://www.ntrautanen.fi/computers/hardware/misc/amiga_memory.htm

That way custom chip emulators like paula emulator "nalleh puh / puhderbaer" could be ported to AROS-PPC.

3:11 PM  
Blogger GonzoTech said...

Any hope of MIDI some day, or am i dreaming???

8:09 PM  

Post a Comment

<< Home