[U-Boot] [PATCH 7/8] PXA: Balloon3 board support

Marek Vasut marek.vasut.n900 at gmail.com
Tue Sep 7 23:27:03 CEST 2010


N900 mailclient is stupid ... Bear with it please.
----- Původní zpráva -----
> Dear Marek Vasut,
> 
> In message <1282296691-15910-7-git-send-email-marek.vasut at gmail.com> you
> wrote:
> > The following hardware is currently supported:
> > - UART
> > - USB Host
> > - FPGA
> ...
> > +int usb_board_init(void)
> > +{
> > +    UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
> > +        ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
> > +
> > +    UHCHR |= UHCHR_FSBIR;
> > +
> > +    while (UHCHR & UHCHR_FSBIR);
> > +
> > +    UHCHR &= ~UHCHR_SSE;
> > +    UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
> > +
> > +    /* Clear any OTG Pin Hold */
> > +    if (PSSR & PSSR_OTGPH)
> > +        PSSR |= PSSR_OTGPH;
> > +
> > +    UHCRHDA &= ~(0x200);
> > +    UHCRHDA |= 0x100;
> > +
> > +    /* Set port power control mask bits, only 3 ports. */
> > +    UHCRHDB |= (0x7<<17);
> > +
> > +    /* enable port 2 */
> > +    UP2OCR |= UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
> 
> Why aren't you using I/O accessors here?
> 

Hey Wolfgang,

we already discussed this somewhere. Check how arch/arm/include/mach-pxa/pxa-regs.h is done. It's ripped off the linux kernel. We already came to a conclusion that it needs to be reworked (remove the _REG() macro crud and use io accessors).

Though I'd like to propose if we could get this stuff in prior to reworking pxa-regs.h as the change will be very intrusive. To have a stable revision where the boards work in case something went wrong.

> > +void usb_board_stop(void)
> > +{
> > +    UHCHR |= UHCHR_FHR;
> > +    udelay(11);
> > +    UHCHR &= ~UHCHR_FHR;
> > +
> > +    UHCCOMS |= 1;
> > +    udelay(10);
> > +
> > +    CKEN &= ~CKEN10_USBHOST;
> 
> And here, and so on?
> 
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH,         MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Don't tell me how hard you work.   Tell me how much you get done.
>                                                                                                           -- James J. Ling



More information about the U-Boot mailing list