From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 5 Aug 2015 15:10:19 +0200 Subject: [U-Boot] [PATCH v4 5/5] usb: lpc32xx: add host USB driver In-Reply-To: <4F172219764C784B84C2C1FF44E7DFB103009012@003FCH1MPN2-041.003f.mgd2.msft.net> References: <1438722282-3736-6-git-send-email-slemieux.tyco@gmail.com> <201508042333.39962.marex@denx.de> <4F172219764C784B84C2C1FF44E7DFB103009012@003FCH1MPN2-041.003f.mgd2.msft.net> Message-ID: <201508051510.19769.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday, August 05, 2015 at 12:54:38 PM, LEMIEUX, SYLVAIN wrote: > Hi Marek, > > Is it OK to only submit the patch that need to be update as a new > version or I always have to resubmit the complete set of patches? It's OK to submit just the patch, see "Sending updated patch versions" at http://www.denx.de/wiki/U-Boot/Patches#General_Patch_Submission_Rules > See comments and question below. > > > Sylvain > > > -----Original Message----- > > From: Marek Vasut [mailto:marex at denx.de] > > > > On Tuesday, August 04, 2015 at 11:04:42 PM, slemieux.tyco at gmail.com wrote: > > > From: Sylvain Lemieux > > > > > > Incorporate USB driver from legacy LPCLinux NXP BSP. > > > The files taken from the legacy patch are: > > > - lpc32xx USB driver > > > - lpc3250 header file USB registers definition. > > > > > > The legacy driver was updated and clean-up as part > > > of the integration with the latest u-boot. > > > > > > Signed-off-by: Sylvain Lemieux > > > --- > > > > Hi! > > > > > +static int wait_for_bit(void *reg, const uint32_t mask, bool set) > > > +{ > > > + unsigned int timeout = 1000000; > > > + uint32_t val; > > > + > > > + while (--timeout) { > > > > Where did the get_timer() stuff disappear ? :'-( > > I reused the "wait_for_bit()" from " drivers/usb/host/dwc2.c"; > this implement does not use "get_timer()". > > Should I update this driver implementation of "wait_for_bit()" to use > "get_timer()" or keep it the same as the implementation from "dwc2.c"? If you feel like it, that'd be nice. Sorry for not being explicit about keeping the get_timer() . > > > + val = readl(reg); > > > + if (!set) > > > + val = ~val; > > > + > > > + if ((val & mask) == mask) > > > + return 0; > > > + > > > + udelay(1); > > > + } > > > + > > > + debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n", > > > + __func__, reg, mask, set); > > > + > > > + return -ETIMEDOUT; > > > +} > > [...]