From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 28 Sep 2011 17:21:55 +0200 Subject: [U-Boot] [PATCH v8 2/4] EHCI: add callback ehci_fixup In-Reply-To: <1317222169-18312-1-git-send-email-fermata7@gmail.com> References: <1317162078-8041-1-git-send-email-fermata7@gmail.com> <1317222169-18312-1-git-send-email-fermata7@gmail.com> Message-ID: <1317223315.3682.5.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 > Add callback to ehci_hcd.c to prepare > for solving the problem with VBUS reset on Efika. > > Signed-off-by: Jana Rapava > Cc: Marek Vasut > Cc: Remy Bohmer > Cc: Stefano Babic > > Acked-by: Marek Vasut > --- > Changes for v1: >? ? ? - split into patchset >? ? ? - add callback ehci_fixup > Changes for v2: >? ? ? ? ? - make this the second patch in series >? ? ? ? ? - add comment to alias ehci_fixup >? ? ? ? ? - no actual changes > Changes for v3: >? ? ? ? ? ? - no actual changes >? ? ? ? ? ? - make the comment a sentence >? ? ? ? ? ? - rebase patch on top of u-boot-imx/next > Changes for v4: >? ? ? ? ? ? ? - no actual changes >? ? ? ? ? ? ? - change the versioning of changelog >? ? ? ? ? ? ? from per patchset to per patch >? ? ? ? ? ? ? - fix the appearance of comment > Changes for v5: > ??? - no actual changes > ??? - reword the comment > >? drivers/usb/host/ehci-hcd.c |? ? 14 +++++++++++++- >? 1 files changed, 13 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > index bdadd46..fb64f23 100644 > --- a/drivers/usb/host/ehci-hcd.c > +++ b/drivers/usb/host/ehci-hcd.c > @@ -536,6 +536,18 @@ static inline int min3(int a, int b, int c) >? ??? return a; >? } >? > +inline void __ehci_fixup(uint32_t *status_reg, uint32_t *reg_ref) > +{ > +??? wait_ms(50); > +} > + > +/* > + * This is an alias to __ehci_fixup __ehci_fixup() and why do you break the line there so early? > + * unless user provides other definition of ehci_fixup function. > + */ > +void ehci_fixup(uint32_t *status_reg, uint32_t *reg_ref) > +??? __attribute__((weak, alias("__ehci_fixup"))); > + >? int >? ehci_submit_root(struct usb_device *dev, unsigned long pipe, void > *buffer, ??? ??? int length, struct devrequest *req) > @@ -709,7 +721,7 @@ ehci_submit_root(struct usb_device *dev, unsigned > long pipe, void *buffer, ??? ??? ??? ??? * usb 2.0 specification say 50 ms resets on >? ??? ??? ??? ??? * root >? ??? ??? ??? ??? */ > -??? ??? ??? ??? wait_ms(50); > +??? ??? ??? ??? ehci_fixup(status_reg, ®); >? ??? ??? ??? ??? /* terminate the reset */ >? ??? ??? ??? ??? ehci_writel(status_reg, reg & ~EHCI_PS_PR); >? ??? ??? ??? ??? /* > -- > 1.7.6.3 >