SUPERH platform development
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2 2/9] ehci-platform: add pre_setup() method to platform data
Date: Mon, 08 Apr 2013 21:26:42 +0000	[thread overview]
Message-ID: <20130408212642.GA25235@kroah.com> (raw)
In-Reply-To: <201304090120.00626.sergei.shtylyov@cogentembedded.com>

On Tue, Apr 09, 2013 at 01:20:00AM +0400, Sergei Shtylyov wrote:
> Sometimes there is a need  to initialize some non-standard registers mapped to
> the EHCI region before accessing the standard EHCI registers.  Add pre_setup()
> method with 'struct usb_hcd *' parameter to be called just before ehci_setup()
> to the 'ehci-platform'  driver's platform data for this purpose...
> 
> Suggested-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> Changes since the original posting:
> - changed init() method to pre_setup() with different parameters abd call site.
> 
>  drivers/usb/host/ehci-platform.c |    6 ++++++
>  include/linux/usb/ehci_pdriver.h |    3 +++
>  2 files changed, 9 insertions(+)
> 
> Index: renesas/drivers/usb/host/ehci-platform.c
> =================================> --- renesas.orig/drivers/usb/host/ehci-platform.c
> +++ renesas/drivers/usb/host/ehci-platform.c
> @@ -46,6 +46,12 @@ static int ehci_platform_reset(struct us
>  	ehci->big_endian_desc = pdata->big_endian_desc;
>  	ehci->big_endian_mmio = pdata->big_endian_mmio;
>  
> +	if (pdata->pre_setup) {
> +		retval = pdata->pre_setup(hcd);
> +		if (retval < 0)
> +			return retval;
> +	}
> +
>  	ehci->caps = hcd->regs + pdata->caps_offset;
>  	retval = ehci_setup(hcd);
>  	if (retval)
> Index: renesas/include/linux/usb/ehci_pdriver.h
> =================================> --- renesas.orig/include/linux/usb/ehci_pdriver.h
> +++ renesas/include/linux/usb/ehci_pdriver.h
> @@ -19,6 +19,8 @@
>  #ifndef __USB_CORE_EHCI_PDRIVER_H
>  #define __USB_CORE_EHCI_PDRIVER_H
>  
> +#include <linux/usb/hcd.h>

This isn't needed in the .h file, right?  Only the .c file, if it hasn't
already included it (hint, I bet it has...)

thanks,

greg k-h

  reply	other threads:[~2013-04-08 21:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 21:20 [PATCH v2 2/9] ehci-platform: add pre_setup() method to platform data Sergei Shtylyov
2013-04-08 21:26 ` Greg KH [this message]
2013-04-08 21:51 ` Sergei Shtylyov
2013-04-08 22:04 ` Sergei Shtylyov
2013-04-08 22:07 ` Greg KH
2013-04-08 22:08 ` Sergei Shtylyov
2013-04-08 23:42 ` Greg KH
2013-04-09 12:55 ` Sergei Shtylyov
2013-04-09 15:27 ` Alan Stern
2013-04-09 16:54 ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130408212642.GA25235@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox