Subject: Re: [PATCH] [POWERPC] mpc8315: fix USB UTMI Host setup

From: Anton Vorontsov <[email-masked]>
Date: Mon, 14 Apr 2008 20:31:46 +0400

On Mon, Apr 14, 2008 at 10:22:46AM -0500, Kumar Gala wrote:
>
> On Apr 9, 2008, at 8:59 AM, Anton Vorontsov wrote:
>> Currently USB Host isn't functional on the MPC8315E boards, for two
>> reasons as described below.
>>
>> MPC8315 Reference Manual says:
>> "The USB DR unit must have the same clock ratio as the encryption core
>> unit, unless one of them has its clock disabled."
>>
>> The encryption core also drives I2C clock, so it is enabled and is  
>> equal
>> to 01. That means USBDRCM should be 01 here.
>>
>> Plus, according to MPC8315E-RDB schematics, USB unit consumes CLK_IN
>> clock from the 24.00MHz oscillator, which means we must adjust REFSEL
>> bits as well.
>
> Can you add a comment in the code about the fact that part of this fix  
> is board specific.

Heh, the whole 83xx/usb.c file is board(s) specific, not this particular
fix. :-/

So it doesn't need an explicit comment for this addition. It's just lucky
coincedence that all previous boards were using same (or similar) setup.
That is, it's perfectly possible that some custom MPC831XE board will use
USB setup different from MPC8313E-RDB or MPC8315E-RDB, and the whole thing
will break again. The same applies for MPC837X part of usb.c. There are
board-specific settings all over the place.