hello,
I want to turn off the over current protection support in the usb host. I
looks like even if I turn it off in PDD, it's somehow turned back on again
in MDD. how can I tell the MDD that I am not supporting over current
protection?

Re: pxa270 mainstone 2, ce5.0 usb host by Carl

Carl
Mon May 12 13:59:54 PDT 2008

On May 12, 5:37 am, "mobilevil" <some...@somewhere.com> wrote:
> hello,
> I want to turn off the over current protection support in the usb host. I
> looks like even if I turn it off in PDD, it's somehow turned back on again
> in MDD. how can I tell the MDD that I am not supporting over current
> protection?

Its not in the MDD, but in the PXA support code. I ended up moving
\public\csp_pxa27x\oak\pxa27x\hcd\bul_ohci.cpp into the platform
driver directory and adding the following the following code to
SOhcdPdd::OHCI_Reset(). I also created my own routine in ms2_ohci2.cpp
called HasOCProtection().

// Do we have over current protection?
if ( !HasOCProtection(0) )
{
m_pDCUSBOHCIReg->uhcrhda |= XLLP_USBOHCI_UHCRHDA_NOCP;
}

I also seem to remember that the polarity of the OC signal was
important even though it was disabled. Hence I also added some code so
the polarity could be set.

if ( OCPolarity(0) == 1 )
m_pDCUSBOHCIReg->uhchr &= ~XLLP_USBOHCI_UHCHR_PSPL; // bit = 0
means power (ie. over-current) sense polarity is active high
else
m_pDCUSBOHCIReg->uhchr |= XLLP_USBOHCI_UHCHR_PSPL; // bit = 1
means power (ie. over-current) sense polarity is active low

This worked for us anyway.
Carl




Re: pxa270 mainstone 2, ce5.0 usb host by mobilevil

mobilevil
Mon May 12 21:05:28 PDT 2008


yes i found the polarity is important too!
thanks for your infor!!

"Carl" <msg4carl@gmail.com> wrote in message
news:d4dda280-e8b5-4540-aac7-cbd7f5f86390@u12g2000prd.googlegroups.com...
> On May 12, 5:37 am, "mobilevil" <some...@somewhere.com> wrote:
>> hello,
>> I want to turn off the over current protection support in the usb host.
>> I
>> looks like even if I turn it off in PDD, it's somehow turned back on
>> again
>> in MDD. how can I tell the MDD that I am not supporting over current
>> protection?
>
> Its not in the MDD, but in the PXA support code. I ended up moving
> \public\csp_pxa27x\oak\pxa27x\hcd\bul_ohci.cpp into the platform
> driver directory and adding the following the following code to
> SOhcdPdd::OHCI_Reset(). I also created my own routine in ms2_ohci2.cpp
> called HasOCProtection().
>
> // Do we have over current protection?
> if ( !HasOCProtection(0) )
> {
> m_pDCUSBOHCIReg->uhcrhda |= XLLP_USBOHCI_UHCRHDA_NOCP;
> }
>
> I also seem to remember that the polarity of the OC signal was
> important even though it was disabled. Hence I also added some code so
> the polarity could be set.
>
> if ( OCPolarity(0) == 1 )
> m_pDCUSBOHCIReg->uhchr &= ~XLLP_USBOHCI_UHCHR_PSPL; // bit = 0
> means power (ie. over-current) sense polarity is active high
> else
> m_pDCUSBOHCIReg->uhchr |= XLLP_USBOHCI_UHCHR_PSPL; // bit = 1
> means power (ie. over-current) sense polarity is active low
>
> This worked for us anyway.
> Carl
>
>
>