From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 07 Sep 2010 23:27:03 +0200 Subject: [U-Boot] [PATCH 7/8] PXA: Balloon3 board support In-Reply-To: <20100907211713.58309153798@gemini.denx.de> References: <1281415810-31363-2-git-send-email-marek.vasut@gmail.com> <1282296691-15910-7-git-send-email-marek.vasut@gmail.com> <20100907211713.58309153798@gemini.denx.de> Message-ID: <1283894823.7386.2.camel@konomi> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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@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