All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	SH-Linux <linux-sh@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers
Date: Wed, 21 May 2014 08:16:45 +0000	[thread overview]
Message-ID: <537C60ED.9090300@renesas.com> (raw)
In-Reply-To: <5594897.Dm70JHoDO1@wuerfel>


(2014/05/21 17:04), Arnd Bergmann wrote:
> On Wednesday 21 May 2014 16:54:00 Yoshihiro Shimoda wrote:
>>
>> (2014/05/20 19:11), Arnd Bergmann wrote:
>>> On Monday 19 May 2014 19:08:05 Yoshihiro Shimoda wrote:
>>>>
>>>>  #include "xhci.h"
>>>>  #include "xhci-mvebu.h"
>>>> +#include "xhci-rcar.h"
>>>>
>>>>  static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
>>>>  {
>>>> @@ -39,6 +40,12 @@ static int xhci_plat_setup(struct usb_hcd *hcd)
>>>>
>>>>  static int xhci_plat_start(struct usb_hcd *hcd)
>>>>  {
>>>> +    struct device_node *of_node = hcd->self.controller->of_node;
>>>> +
>>>> +    if (of_device_is_compatible(of_node, "renesas,r8a7790-xhci") ||
>>>> +        of_device_is_compatible(of_node, "renesas,r8a7790-xhci"))
>>>> +            xhci_rcar_start(hcd);
>>>> +
>>>>      return xhci_run(hcd);
>>>>  }
>>>>
>>>> @@ -165,6 +172,15 @@ static int xhci_plat_probe(struct platform_device *pdev)
>>>>                      goto unmap_registers;
>>>>      }
>>>>
>>>> +    if (of_device_is_compatible(pdev->dev.of_node,
>>>> +                                "renesas,r8a7790-xhci") ||
>>>> +        of_device_is_compatible(pdev->dev.of_node,
>>>> +                                "renesas,r8a7791-xhci")) {
>>>> +            ret = xhci_rcar_init_quirk(pdev);
>>>> +            if (ret)
>>>> +                    goto disable_clk;
>>>> +    }
>>>> +
>>>>      ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
>>>>      if (ret)
>>>>              goto disable_clk;
>>>> @@ -270,6 +286,8 @@ static const struct of_device_id usb_xhci_of_match[] = {
>>>>      { .compatible = "xhci-platform" },
>>>>      { .compatible = "marvell,armada-375-xhci"},
>>>>      { .compatible = "marvell,armada-380-xhci"},
>>>> +    { .compatible = "renesas,r8a7790-xhci"},
>>>> +    { .compatible = "renesas,r8a7791-xhci"},
>>>>      { },
>>>>  };
>>>>  MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
>>>
>>> Like the drivers before, this is way more than a quirk, and deserves to
>>> be its own driver. It would be better to have an abstract way to split
>>> out soc specific xhci front-ends and export functions from the xhci-platform
>>> code.
>>
>> Thank you for your comment. But, I couldn't understand your comment...
>> Did you mean that xhci-rcar.c should call of_device_is_compatible(of_node, "renesas,...")?
>> If so, I will modify this patch.
> 
> 
> What I mean is that there should be a separate module that contains all the
> renesas specific code, and that module should register a platform driver
> that contains the match table for its own IDs.
> 
> Then instead of having a common xhci_plat_probe() that gets called as the
> ->probe() callback of the driver, you have a rcar_xhci_probe() function
> that calls into common helper functions exported by the base driver, just
> as we do things for all other drivers. See ehci or ahci for instance.

Thank you very much for the prompt reply!
I will see ehci and ahci drivers.

Best regards,
Yoshihiro Shimoda

> 
> 	Arnd
> 

-- 
Yoshihiro Shimoda
EC No.

WARNING: multiple messages have this Message-ID (diff)
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	SH-Linux <linux-sh@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers
Date: Wed, 21 May 2014 17:16:45 +0900	[thread overview]
Message-ID: <537C60ED.9090300@renesas.com> (raw)
In-Reply-To: <5594897.Dm70JHoDO1@wuerfel>


(2014/05/21 17:04), Arnd Bergmann wrote:
> On Wednesday 21 May 2014 16:54:00 Yoshihiro Shimoda wrote:
>>
>> (2014/05/20 19:11), Arnd Bergmann wrote:
>>> On Monday 19 May 2014 19:08:05 Yoshihiro Shimoda wrote:
>>>>
>>>>  #include "xhci.h"
>>>>  #include "xhci-mvebu.h"
>>>> +#include "xhci-rcar.h"
>>>>
>>>>  static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
>>>>  {
>>>> @@ -39,6 +40,12 @@ static int xhci_plat_setup(struct usb_hcd *hcd)
>>>>
>>>>  static int xhci_plat_start(struct usb_hcd *hcd)
>>>>  {
>>>> +    struct device_node *of_node = hcd->self.controller->of_node;
>>>> +
>>>> +    if (of_device_is_compatible(of_node, "renesas,r8a7790-xhci") ||
>>>> +        of_device_is_compatible(of_node, "renesas,r8a7790-xhci"))
>>>> +            xhci_rcar_start(hcd);
>>>> +
>>>>      return xhci_run(hcd);
>>>>  }
>>>>
>>>> @@ -165,6 +172,15 @@ static int xhci_plat_probe(struct platform_device *pdev)
>>>>                      goto unmap_registers;
>>>>      }
>>>>
>>>> +    if (of_device_is_compatible(pdev->dev.of_node,
>>>> +                                "renesas,r8a7790-xhci") ||
>>>> +        of_device_is_compatible(pdev->dev.of_node,
>>>> +                                "renesas,r8a7791-xhci")) {
>>>> +            ret = xhci_rcar_init_quirk(pdev);
>>>> +            if (ret)
>>>> +                    goto disable_clk;
>>>> +    }
>>>> +
>>>>      ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
>>>>      if (ret)
>>>>              goto disable_clk;
>>>> @@ -270,6 +286,8 @@ static const struct of_device_id usb_xhci_of_match[] = {
>>>>      { .compatible = "xhci-platform" },
>>>>      { .compatible = "marvell,armada-375-xhci"},
>>>>      { .compatible = "marvell,armada-380-xhci"},
>>>> +    { .compatible = "renesas,r8a7790-xhci"},
>>>> +    { .compatible = "renesas,r8a7791-xhci"},
>>>>      { },
>>>>  };
>>>>  MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
>>>
>>> Like the drivers before, this is way more than a quirk, and deserves to
>>> be its own driver. It would be better to have an abstract way to split
>>> out soc specific xhci front-ends and export functions from the xhci-platform
>>> code.
>>
>> Thank you for your comment. But, I couldn't understand your comment...
>> Did you mean that xhci-rcar.c should call of_device_is_compatible(of_node, "renesas,...")?
>> If so, I will modify this patch.
> 
> 
> What I mean is that there should be a separate module that contains all the
> renesas specific code, and that module should register a platform driver
> that contains the match table for its own IDs.
> 
> Then instead of having a common xhci_plat_probe() that gets called as the
> ->probe() callback of the driver, you have a rcar_xhci_probe() function
> that calls into common helper functions exported by the base driver, just
> as we do things for all other drivers. See ehci or ahci for instance.

Thank you very much for the prompt reply!
I will see ehci and ahci drivers.

Best regards,
Yoshihiro Shimoda

> 
> 	Arnd
> 

-- 
Yoshihiro Shimoda
EC No.

  reply	other threads:[~2014-05-21  8:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 10:08 [PATCH 2/3] usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers Yoshihiro Shimoda
2014-05-19 10:08 ` Yoshihiro Shimoda
     [not found] ` <5379D805.3070002-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-05-19 10:21   ` Magnus Damm
2014-05-19 10:21     ` Magnus Damm
2014-05-20  9:34     ` Yoshihiro Shimoda
2014-05-20  9:34       ` Yoshihiro Shimoda
2014-05-19 11:58 ` Geert Uytterhoeven
2014-05-19 11:58   ` Geert Uytterhoeven
2014-05-20  9:35   ` Yoshihiro Shimoda
2014-05-20  9:35     ` Yoshihiro Shimoda
     [not found]     ` <537B21CA.6080702-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-05-20 10:14       ` Geert Uytterhoeven
2014-05-20 10:14         ` Geert Uytterhoeven
2014-05-21  7:54         ` Yoshihiro Shimoda
2014-05-21  7:54           ` Yoshihiro Shimoda
2014-05-19 12:14 ` Sergei Shtylyov
2014-05-19 12:14   ` Sergei Shtylyov
2014-05-20  9:35   ` Yoshihiro Shimoda
2014-05-20  9:35     ` Yoshihiro Shimoda
2014-05-20 10:11 ` Arnd Bergmann
2014-05-20 10:11   ` Arnd Bergmann
2014-05-21  7:54   ` Yoshihiro Shimoda
2014-05-21  7:54     ` Yoshihiro Shimoda
     [not found]     ` <537C5B98.7060401-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-05-21  8:04       ` Arnd Bergmann
2014-05-21  8:04         ` Arnd Bergmann
2014-05-21  8:16         ` Yoshihiro Shimoda [this message]
2014-05-21  8:16           ` Yoshihiro Shimoda

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=537C60ED.9090300@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mathias.nyman@intel.com \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.