Re: Re: [PATCH-SR9700] Merge USB 1.1 Ethernet Adapter SR9700 DeviceDriver into the Linux Kernel

2013-08-22 Thread Simon Horman
On Wed, Aug 21, 2013 at 06:02:45PM +0800, liujunliang_ljl wrote:
 Dear Ben :
 
   1,  please give me email address of David Miller, and Thanks a 
 lot.

You can find him in the MAINTAINERS file.
He should also show up if you use scripts/get_maintainer.pl
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] Add USBHS support to Lager

2013-10-07 Thread Simon Horman
On Tue, Oct 08, 2013 at 03:27:00AM +0400, Valentine Barshak wrote:
 This patch set adds internal USB PHY support to RCAR Gen2 SoC, and
 also enables USBHS for the Lager board.
 
 The patches apply fine to the renesas-devel-20131004 tag of the renesas.git.
 
 The first patch also applies fine to the usb.git at kernel.org.
 It adds RCAR Gen2 phy driver, which is used to configure the shared USB
 channels 0/2 and to control USBHS internal PHY.
 All the drivers that use the shared USB channels (USBHS/USBSS/PCI USB host)
 should acquire the USB phy first to set proper channel configuration.
 
 The other two patches add USBHS support to Lager board, which requires
 RCAR Gen2 phy driver.

Hi Morimoto-san,

I could you review this series?

My assumption is that in the current form the first patch will
go through the USB tree while the latter patches will subsequently
go through (my) renesas tree.

 Valentine Barshak (3):
   usb: phy: Add RCAR Gen2 USB phy
   arm: shmobile: r8a7790: Add USBHS clock support
   arm: shmobile: lager: Add USBHS support
 
  arch/arm/mach-shmobile/board-lager.c| 106 +
  arch/arm/mach-shmobile/clock-r8a7790.c  |   4 +
  drivers/usb/phy/Kconfig |  14 ++
  drivers/usb/phy/Makefile|   1 +
  drivers/usb/phy/phy-rcar-gen2-usb.c | 271 
 
  include/linux/platform_data/usb-rcar-gen2-phy.h |  22 ++
  6 files changed, 418 insertions(+)
  create mode 100644 drivers/usb/phy/phy-rcar-gen2-usb.c
  create mode 100644 include/linux/platform_data/usb-rcar-gen2-phy.h
 
 -- 
 1.8.3.1
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] Add USBHS support to Lager (take 2)

2013-10-08 Thread Simon Horman
On Tue, Oct 08, 2013 at 11:43:24PM +0400, Valentine Barshak wrote:
 This patch set adds internal USB PHY support to RCAR Gen2 SoC, and
 also enables USBHS for the Lager board. It has been updated, based
 on the comments to the previous version.
 
 The patches apply fine to the renesas-devel-20131008 tag of the renesas.git.
 The first patch also applies fine to the usb.git at kernel.org.
 It adds RCAR Gen2 phy driver which is used to configure the shared USB
 channels 0/2 and to control USBHS internal PHY.
 All the drivers that use the shared USB channels (USBHS/USBSS/PCI USB host)
 should acquire the USB phy first to set proper channel configuration.
 
 The other two patches add USBHS support to Lager board, which requires
 RCAR Gen2 phy driver.
 
 Changes from previous version:
 * use-counting and clock handling done in the usb_phy_init/shutdown
   callbacks only;
 * a minor typo in the comments fixed;
 * phy clean up moved to __rcar_gen2_usb_phy_shutdown function;
 * usb_phy_init/shutdown called from usbhs_power_ctrl callback
   to allow renesas_usbhs driver disable USB PHY completely
   when it is not needed.

Hi Morimoto-san,

I could you review this revised series?

My assumption is that in the current form the first patch will
go through the USB tree while the latter patches will subsequently
go through (my) renesas tree.

 Valentine Barshak (3):
   usb: phy: Add RCAR Gen2 USB phy
   arm: shmobile: r8a7790: Add USBHS clock support
   arm: shmobile: lager: Add USBHS support
 
  arch/arm/mach-shmobile/board-lager.c| 106 ++
  arch/arm/mach-shmobile/clock-r8a7790.c  |   4 +
  drivers/usb/phy/Kconfig |  13 ++
  drivers/usb/phy/Makefile|   1 +
  drivers/usb/phy/phy-rcar-gen2-usb.c | 255 
 
  include/linux/platform_data/usb-rcar-gen2-phy.h |  22 ++
  6 files changed, 401 insertions(+)
  create mode 100644 drivers/usb/phy/phy-rcar-gen2-usb.c
  create mode 100644 include/linux/platform_data/usb-rcar-gen2-phy.h
 
 -- 
 1.8.3.1
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] Add USBHS support to Lager (take 2)

2013-10-08 Thread Simon Horman
On Tue, Oct 08, 2013 at 07:09:36PM -0700, Kuninori Morimoto wrote:
 
 Hi
 
  This patch set adds internal USB PHY support to RCAR Gen2 SoC, and
  also enables USBHS for the Lager board. It has been updated, based
  on the comments to the previous version.
  
  The patches apply fine to the renesas-devel-20131008 tag of the renesas.git.
  The first patch also applies fine to the usb.git at kernel.org.
  It adds RCAR Gen2 phy driver which is used to configure the shared USB
  channels 0/2 and to control USBHS internal PHY.
  All the drivers that use the shared USB channels (USBHS/USBSS/PCI USB host)
  should acquire the USB phy first to set proper channel configuration.
  
  The other two patches add USBHS support to Lager board, which requires
  RCAR Gen2 phy driver.
  
  Changes from previous version:
  * use-counting and clock handling done in the usb_phy_init/shutdown
callbacks only;
  * a minor typo in the comments fixed;
  * phy clean up moved to __rcar_gen2_usb_phy_shutdown function;
  * usb_phy_init/shutdown called from usbhs_power_ctrl callback
to allow renesas_usbhs driver disable USB PHY completely
when it is not needed.
  
  Valentine Barshak (3):
usb: phy: Add RCAR Gen2 USB phy
arm: shmobile: r8a7790: Add USBHS clock support
arm: shmobile: lager: Add USBHS support
  
   arch/arm/mach-shmobile/board-lager.c| 106 ++
   arch/arm/mach-shmobile/clock-r8a7790.c  |   4 +
   drivers/usb/phy/Kconfig |  13 ++
   drivers/usb/phy/Makefile|   1 +
   drivers/usb/phy/phy-rcar-gen2-usb.c | 255 
  
   include/linux/platform_data/usb-rcar-gen2-phy.h |  22 ++
   6 files changed, 401 insertions(+)
   create mode 100644 drivers/usb/phy/phy-rcar-gen2-usb.c
   create mode 100644 include/linux/platform_data/usb-rcar-gen2-phy.h
 
 For all patches
 
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
 
 # I think we can implement usb_phy_xxx() method
 # in renesas_usbhs driver someday.

Hi Felipe,

could you consider taking the first patch of this series?
And if so, could you provide a branch that I can use
as a base for the other changes in the series?

Thanks
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] arm: shmobile: r8a7790: Add USBHS clock support

2013-10-28 Thread Simon Horman
On Thu, Oct 10, 2013 at 02:14:46AM +0400, Valentine Barshak wrote:
 This adds USBHS clock support.
 
 Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
 ---
  arch/arm/mach-shmobile/clock-r8a7790.c | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c 
 b/arch/arm/mach-shmobile/clock-r8a7790.c
 index a64f965..161d44e 100644
 --- a/arch/arm/mach-shmobile/clock-r8a7790.c
 +++ b/arch/arm/mach-shmobile/clock-r8a7790.c
 @@ -186,6 +186,7 @@ enum {
   MSTP813,
   MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
   MSTP717, MSTP716,
 + MSTP704,
   MSTP522,
   MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304,
   MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202,
 @@ -208,6 +209,7 @@ static struct clk mstp_clks[MSTP_NR] = {
   [MSTP720] = SH_CLK_MSTP32(p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
   [MSTP717] = SH_CLK_MSTP32(zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
   [MSTP716] = SH_CLK_MSTP32(zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */
 + [MSTP704] = SH_CLK_MSTP32(mp_clk, SMSTPCR7, 4, 0), /* HSUSB */
   [MSTP522] = SH_CLK_MSTP32(extal_clk, SMSTPCR5, 22, 0), /* Thermal */
   [MSTP315] = SH_CLK_MSTP32(div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* 
 MMC0 */
   [MSTP314] = SH_CLK_MSTP32(div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* 
 SDHI0 */
 @@ -296,6 +298,8 @@ static struct clk_lookup lookups[] = {
   CLKDEV_DEV_ID(ee22.mmcif, mstp_clks[MSTP305]),
   CLKDEV_DEV_ID(sh_mmcif.1, mstp_clks[MSTP305]),
   CLKDEV_DEV_ID(sh_cmt.0, mstp_clks[MSTP124]),
 + CLKDEV_DEV_ID(renesas_usbhs, mstp_clks[MSTP704]),
 + CLKDEV_ICK_ID(usbhs, usb_phy_rcar_gen2, mstp_clks[MSTP704]),
  };
  
  #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31)   \

Thanks, I have queued this up.
It should appear in the next push of the devel branch of the renesas tree.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] arm: shmobile: lager: Add USBHS support

2013-10-28 Thread Simon Horman
On Thu, Oct 10, 2013 at 02:14:47AM +0400, Valentine Barshak wrote:
 This adds USBHS PHY and registers USBHS device if the driver is enabled.
 
 Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com

Thanks,

I notice that Felipe Balbi's has merged the first patch of this series and
that it is present in linux-next though not in v3.12-rc7. My assumption is
that means it will appear in v3.13-rc1 but not v3.12.

With this in mind my current plan is to wait for v3.13-rc1, rebase my
branches, and then queue-up this patch for v3.14.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: phy: phy-rcar-gen2-usb: Fix phy initialization

2013-10-28 Thread Simon Horman
On Fri, Oct 25, 2013 at 09:07:12PM +0400, Valentine Barshak wrote:
 Add missing USB UGCTRL2 register offset.
 
 Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com

This seems reasonable to me.

Acked-by: Simon Horman horms+rene...@verge.net.au

Felipe, please consider applying this change.

 ---
  drivers/usb/phy/phy-rcar-gen2-usb.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c 
 b/drivers/usb/phy/phy-rcar-gen2-usb.c
 index a99a695..db3ab34 100644
 --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
 +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
 @@ -107,10 +107,10 @@ static void __rcar_gen2_usb_phy_init(struct 
 rcar_gen2_usb_phy_priv *priv)
   clk_prepare_enable(priv-clk);
  
   /* Set USB channels in the USBHS UGCTRL2 register */
 - val = ioread32(priv-base);
 + val = ioread32(priv-base + USBHS_UGCTRL2_REG);
   val = ~(USBHS_UGCTRL2_USB0_HS | USBHS_UGCTRL2_USB2_SS);
   val |= priv-ugctrl2;
 - iowrite32(val, priv-base);
 + iowrite32(val, priv-base + USBHS_UGCTRL2_REG);
  }
  
  /* Shutdown USB channels */
 -- 
 1.8.3.1
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 3/6] usb: otg: utils: change the phy lib to support multiple PHYs of same type

2013-01-16 Thread Simon Horman
On Wed, Jan 16, 2013 at 08:30:59PM +0530, Kishon Vijay Abraham I wrote:
 In order to add support for multipe PHY's of the same type, the API's
 for adding PHY and getting PHY has been changed. Now the binding
 information of the PHY and controller should be done in platform file
 using usb_bind_phy API. And for getting a PHY, the device pointer of the
 USB controller and an index should be passed. Based on the binding
 information that is added in the platform file, get_phy will return the
 approappropriate PHY.
 
 Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
 ---
  arch/arm/mach-shmobile/board-marzen.c |2 +-

Modification to the above file:

Acked-by: Simon Horman horms+rene...@verge.net.au
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/8] rcar-phy: remove EHCI internal buffer setup

2013-04-04 Thread Simon Horman
On Fri, Apr 05, 2013 at 03:03:55AM +0400, Sergei Shtylyov wrote:
 Now that the EHCI internal buffer setup is done by the platform code, we  can
 remove  such code from this driver as it never really belonged here.  We also
 no longer need the 2nd memory region now (2nd EHCI controller is simply 
 missing
 in e.g. R8A7778 SoC).

I wonder if this patch could be split into a driver patch
followed by an SoC patch. Or vice versa.

 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
 
 ---
  arch/arm/mach-shmobile/setup-r8a7779.c |5 -
  drivers/usb/phy/rcar-phy.c |   28 
  2 files changed, 4 insertions(+), 29 deletions(-)
 
 Index: renesas/arch/arm/mach-shmobile/setup-r8a7779.c
 ===
 --- renesas.orig/arch/arm/mach-shmobile/setup-r8a7779.c
 +++ renesas/arch/arm/mach-shmobile/setup-r8a7779.c
 @@ -405,11 +405,6 @@ static struct resource usb_phy_resources
   .end= 0xffe70900 - 1,
   .flags  = IORESOURCE_MEM,
   },
 - [1] = {
 - .start  = 0xfff7,
 - .end= 0xfff70900 - 1,
 - .flags  = IORESOURCE_MEM,
 - },
  };
  
  static struct platform_device usb_phy_device = {
 Index: renesas/drivers/usb/phy/rcar-phy.c
 ===
 --- renesas.orig/drivers/usb/phy/rcar-phy.c
 +++ renesas/drivers/usb/phy/rcar-phy.c
 @@ -23,8 +23,6 @@
  #define USBEH0   0x080C
  #define USBOH0   0x081C
  #define USBCTL0  0x0858
 -#define EIIBC1   0x0094
 -#define EIIBC2   0x009C
  
  /* USBPCTRL1 */
  #define PHY_RST  (1  2)
 @@ -40,7 +38,6 @@ struct rcar_usb_phy_priv {
   spinlock_t lock;
  
   void __iomem *reg0;
 - void __iomem *reg1;
   int counter;
  };
  
 @@ -59,7 +56,6 @@ static int rcar_usb_phy_init(struct usb_
   struct rcar_usb_phy_priv *priv = usb_phy_to_priv(phy);
   struct device *dev = phy-dev;
   void __iomem *reg0 = priv-reg0;
 - void __iomem *reg1 = priv-reg1;
   int i;
   u32 val;
   unsigned long flags;
 @@ -97,19 +93,6 @@ static int rcar_usb_phy_init(struct usb_
   iowrite32(0x, (reg0 + USBPCTRL0));
  
   /*
 -  * EHCI IP internal buffer setting
 -  * EHCI IP internal buffer enable
 -  *
 -  * These are recommended value of a datasheet
 -  * see [USB :: EHCI internal buffer setting]
 -  */
 - iowrite32(0x00ff0040, (reg0 + EIIBC1));
 - iowrite32(0x00ff0040, (reg1 + EIIBC1));
 -
 - iowrite32(0x0001, (reg0 + EIIBC2));
 - iowrite32(0x0001, (reg1 + EIIBC2));
 -
 - /*
* Bus alignment settings
*/
  
 @@ -145,14 +128,13 @@ static void rcar_usb_phy_shutdown(struct
  static int rcar_usb_phy_probe(struct platform_device *pdev)
  {
   struct rcar_usb_phy_priv *priv;
 - struct resource *res0, *res1;
 + struct resource *res0;
   struct device *dev = pdev-dev;
 - void __iomem *reg0, *reg1;
 + void __iomem *reg0;
   int ret;
  
   res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 - res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 - if (!res0 || !res1) {
 + if (!res0) {
   dev_err(dev, Not enough platform resources\n);
   return -EINVAL;
   }
 @@ -164,8 +146,7 @@ static int rcar_usb_phy_probe(struct pla
* this driver can't use devm_request_and_ioremap(dev, res) here
*/
   reg0 = devm_ioremap_nocache(dev, res0-start, resource_size(res0));
 - reg1 = devm_ioremap_nocache(dev, res1-start, resource_size(res1));
 - if (!reg0 || !reg1) {
 + if (!reg0) {
   dev_err(dev, ioremap error\n);
   return -ENOMEM;
   }
 @@ -177,7 +158,6 @@ static int rcar_usb_phy_probe(struct pla
   }
  
   priv-reg0  = reg0;
 - priv-reg1  = reg1;
   priv-counter   = 0;
   priv-phy.dev   = dev;
   priv-phy.label = dev_name(dev);
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] rcar-phy: correct base address

2013-04-04 Thread Simon Horman
On Fri, Apr 05, 2013 at 03:05:14AM +0400, Sergei Shtylyov wrote:
 The memory region that is used by the driver overlaps EHCI and OHCI register
 regions for absolutely no reason now  -- fix it by adding offset of 0x800 to
 the base address, changing the register #define's accordingly. This has extra
 positive effect that we now can use devm_ioremap_resource().
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com

As per my comment regarding patch 4, I wonder if this
could be split into a driver patch and an SoC patch.

 
 ---
  arch/arm/mach-shmobile/setup-r8a7779.c |2 +-
  drivers/usb/phy/rcar-phy.c |   28 ++--
  2 files changed, 11 insertions(+), 19 deletions(-)
 
 Index: renesas/arch/arm/mach-shmobile/setup-r8a7779.c
 ===
 --- renesas.orig/arch/arm/mach-shmobile/setup-r8a7779.c
 +++ renesas/arch/arm/mach-shmobile/setup-r8a7779.c
 @@ -401,7 +401,7 @@ static struct platform_device sata_devic
  /* USB PHY */
  static struct resource usb_phy_resources[] = {
   [0] = {
 - .start  = 0xffe7,
 + .start  = 0xffe70800,
   .end= 0xffe70900 - 1,
   .flags  = IORESOURCE_MEM,
   },
 Index: renesas/drivers/usb/phy/rcar-phy.c
 ===
 --- renesas.orig/drivers/usb/phy/rcar-phy.c
 +++ renesas/drivers/usb/phy/rcar-phy.c
 @@ -16,13 +16,13 @@
  #include linux/spinlock.h
  #include linux/module.h
  
 -/* USBH common register */
 -#define USBPCTRL00x0800
 -#define USBPCTRL10x0804
 -#define USBST0x0808
 -#define USBEH0   0x080C
 -#define USBOH0   0x081C
 -#define USBCTL0  0x0858
 +/* REGS block */
 +#define USBPCTRL00x00
 +#define USBPCTRL10x04
 +#define USBST0x08
 +#define USBEH0   0x0C
 +#define USBOH0   0x1C
 +#define USBCTL0  0x58
  
  /* USBPCTRL1 */
  #define PHY_RST  (1  2)
 @@ -139,17 +139,9 @@ static int rcar_usb_phy_probe(struct pla
   return -EINVAL;
   }
  
 - /*
 -  * CAUTION
 -  *
 -  * Because this phy address is also mapped under OHCI/EHCI address area,
 -  * this driver can't use devm_request_and_ioremap(dev, res) here
 -  */
 - reg0 = devm_ioremap_nocache(dev, res0-start, resource_size(res0));
 - if (!reg0) {
 - dev_err(dev, ioremap error\n);
 - return -ENOMEM;
 - }
 + reg0 = devm_ioremap_resource(dev, res0);
 + if (IS_ERR(reg0))
 + return PTR_ERR(reg0);
  
   priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   if (!priv) {
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/8] ARM: shmobile: Marzen: pass platform data to USB PHY device

2013-04-04 Thread Simon Horman
On Fri, Apr 05, 2013 at 03:10:38AM +0400, Sergei Shtylyov wrote:
 Since we're now going to setup the USBPCTRL0 register using the USB PHY 
 device's
 platform data, we now need a way to pass those platform data from the board 
 file
 to the device which is situated in setup-r8a7779.c -- and what I'm suggesting 
 is
 r8a7779_add_usb_phy_device() that will register USB PHY platform device with 
 the
 passed platform data using platform_device_register_resndata() call; creating
 this function involves deletion of 'usb_phy_device' from r8a7779_devices_dt[],
 so that it will no longer be registered for the generic R8A7779 machine (where
 we can't provide the platform data anyway), hence EHCI/OHCI drivers will fail
 to load as well.
 
 For the Marzen board, this new function will be called from marzen_init() to
 register the USB PHY device early enough.

As per my comment regarding patch 1, I wonder if this could
be split into an SoC patch and a board patch.

 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
 
 ---
  arch/arm/mach-shmobile/board-marzen.c |5 +
  arch/arm/mach-shmobile/include/mach/r8a7779.h |2 ++
  arch/arm/mach-shmobile/setup-r8a7779.c|   16 
  3 files changed, 15 insertions(+), 8 deletions(-)
 
 Index: renesas/arch/arm/mach-shmobile/board-marzen.c
 ===
 --- renesas.orig/arch/arm/mach-shmobile/board-marzen.c
 +++ renesas/arch/arm/mach-shmobile/board-marzen.c
 @@ -56,6 +56,10 @@ static struct regulator_consumer_supply 
   REGULATOR_SUPPLY(vdd33a, smsc911x),
  };
  
 +static struct rcar_phy_platform_data usb_phy_platform_data = {
 + .usbpctrl0  = 0,
 +};
 +
  /* SMSC LAN89218 */
  static struct resource smsc911x_resources[] = {
   [0] = {
 @@ -230,6 +234,7 @@ static void __init marzen_init(void)
   r8a7779_pinmux_init();
  
   r8a7779_add_standard_devices();
 + r8a7779_add_usb_phy_device(usb_phy_platform_data);
   platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
  }
  
 Index: renesas/arch/arm/mach-shmobile/include/mach/r8a7779.h
 ===
 --- renesas.orig/arch/arm/mach-shmobile/include/mach/r8a7779.h
 +++ renesas/arch/arm/mach-shmobile/include/mach/r8a7779.h
 @@ -4,6 +4,7 @@
  #include linux/sh_clk.h
  #include linux/pm_domain.h
  #include linux/sh_eth.h
 +#include linux/usb/rcar-phy.h
  
  struct platform_device;
  
 @@ -33,6 +34,7 @@ extern void r8a7779_add_early_devices(vo
  extern void r8a7779_add_standard_devices(void);
  extern void r8a7779_add_standard_devices_dt(void);
  extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata);
 +extern void r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata);
  extern void r8a7779_init_late(void);
  extern void r8a7779_clock_init(void);
  extern void r8a7779_pinmux_init(void);
 Index: renesas/arch/arm/mach-shmobile/setup-r8a7779.c
 ===
 --- renesas.orig/arch/arm/mach-shmobile/setup-r8a7779.c
 +++ renesas/arch/arm/mach-shmobile/setup-r8a7779.c
 @@ -407,13 +407,6 @@ static struct resource usb_phy_resources
   },
  };
  
 -static struct platform_device usb_phy_device = {
 - .name   = rcar_usb_phy,
 - .id = -1,
 - .resource   = usb_phy_resources,
 - .num_resources  = ARRAY_SIZE(usb_phy_resources),
 -};
 -
  /* USB */
  static struct usb_phy *phy;
  
 @@ -586,7 +579,6 @@ static struct platform_device *r8a7779_d
   scif5_device,
   tmu00_device,
   tmu01_device,
 - usb_phy_device,
  };
  
  static struct platform_device *r8a7779_standard_devices[] __initdata = {
 @@ -621,6 +613,14 @@ void __init r8a7779_add_ether_device(str
 pdata, sizeof(*pdata));
  }
  
 +void __init r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata)
 +{
 + platform_device_register_resndata(platform_bus, rcar_usb_phy, -1,
 +   usb_phy_resources,
 +   ARRAY_SIZE(usb_phy_resources),
 +   pdata, sizeof(*pdata));
 +}
 +
  /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
  void __init __weak r8a7779_register_twd(void) { }
  
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/8] Reorganize R8A7779/Marzen USB code

2013-04-07 Thread Simon Horman
On Sat, Apr 06, 2013 at 02:35:34AM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 04/05/2013 08:40 PM, Sergei Shtylyov wrote:
 
 
 Here's the set of 4 patches against the Simon Horman's
 'renesas.git' repo,
 'renesas-next-20130404v2' tag and the 2 Ether patches I've
 reposted yesterday.
 It was created to fix the shortcomings in the R8A7779/Marzen
 USB platform code
 and R8A7779 USB common PHY driver, and so spans both
 arch/arm/mach-shmobile/
 and drivers/usb/ subtrees (some patches have to touch both subtrees).
 The patches were conceived with the complete bisectability
 goal in mind.
 
 [1/8] ARM: shmobile:Marzen: move USB EHCI, OHCI, and PHY
 devices to R8A7779 code
 [2/8] ehci-platform: add init() method to platform data
 [3/8] ARM: shmobile: R8A7779: setup EHCI internal buffer
 [4/8] rcar-phy: remove EHCI internal buffer setup
 [5/8] rcar-phy: correct base address
 [6/8] rcar-phy: add platform data
 [7/8] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [8/8] rcar-phy: handle platform data
 
 I'm not sure thru which tree this patchset should be
 merged, however it turns
 out that it's too late now to push it thru Felipe Balbi's USB
 tree for 3.10, so
 maybe the patchset can be merged thru Simon's tree with
 Felipe's and Alan
 Stern's ACKs.
 
 I guess you already got request about patch style from Simon.
 
It's not about style. I tried to keep the series copmpletely
 bisectable, and granting almost all requests about splitting the
 patches would have broken the bisection.
 
 When you send v2 patch, could you please add this patch is
 tested on  bard
 on each patch's comment area ?
 
I'm not sure it's worth doing v2, although in one place I can
 indeed readily split the patch. All patches were tested on the
 Marzen board, I forgot to mention that in the cover letter.
 
Well, there's gonna be version 2 now, mainly because Alan Stern
 wasn't content with the patch #2.

When you spin v2 could you note in the change log of each patch that
includes both SoC and board of SoC and river code that the reason for this
is to avoid breaking bisection?

Thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/9] Reorganize R8A7779/Marzen USB code

2013-04-09 Thread Simon Horman
On Tue, Apr 09, 2013 at 01:10:49AM +0400, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 9 patches against the Simon Horman's 'renesas.git' repo,
 'renesas-next-20130405v2' tag.  It was created to fix the shortcomings in the
 R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and so
 spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some patches 
 have
 to touch both subtrees). The patches were conceived with the complete
 bisectability goal in mind. The patches have been tested on the Marzen board.
 
 [1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 
 code
 [2/9] ehci-platform: add pre_setup() method to platform data
 [3/9] ARM: shmobile: R8A7779: setup EHCI internal buffer
 [4/9] rcar-phy: remove EHCI internal buffer setup
 [5/9] ARM: shmobile: R8A7779: remove USB PHY 2nd memory resource
 [6/9] rcar-phy: correct base address
 [7/9] rcar-phy: add platform data
 [8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [9/9] rcar-phy: handle platform data
 
I'm not sure thru which tree this patchset should be merged, however it 
 turns
 out that it's too late now to push it thru Felipe Balbi's USB tree for 3.10 
 which
 would have been most convenient probably, so maybe the patchset can be merged
 thru Simon's tree with Felipe's and Alan Stern's ACKs. Or perhaps it now 
 should
 be postponed for 3.11...

I feel that it is also too late for v3.10 for my tree.

I am happy to take them through my tree with appropriate acks.
Or, follow acks from Morimoto-san to allow the shmobile portions
to go through a different tree.

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/8] Reorganize R8A7779/Marzen USB code

2013-04-09 Thread Simon Horman
On Tue, Apr 09, 2013 at 04:00:15PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 05-04-2013 6:01, Kuninori Morimoto wrote:
 
 Here's the set of 4 patches against the Simon Horman's 'renesas.git' 
  repo,
 'renesas-next-20130404v2' tag and the 2 Ether patches I've reposted 
 yesterday.
 It was created to fix the shortcomings in the R8A7779/Marzen USB platform 
 code
 and R8A7779 USB common PHY driver, and so spans both arch/arm/mach-shmobile/
 and drivers/usb/ subtrees (some patches have to touch both subtrees).
 The patches were conceived with the complete bisectability goal in mind.
 
 [1/8] ARM: shmobile:Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 
 code
 [2/8] ehci-platform: add init() method to platform data
 [3/8] ARM: shmobile: R8A7779: setup EHCI internal buffer
 [4/8] rcar-phy: remove EHCI internal buffer setup
 [5/8] rcar-phy: correct base address
 [6/8] rcar-phy: add platform data
 [7/8] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [8/8] rcar-phy: handle platform data
 
 I'm not sure thru which tree this patchset should be merged, however it 
  turns
 out that it's too late now to push it thru Felipe Balbi's USB tree for 
 3.10, so
 maybe the patchset can be merged thru Simon's tree with Felipe's and Alan
 Stern's ACKs.
 
 I guess you already got request about patch style from Simon.
 When you send v2 patch, could you please add this patch is tested on  
 bard
 on each patch's comment area ?
 
I thought adding it to each patch (BTW, I didn't get what you
 meant: changelog or the area below ---) was a bit too much and just
 mentioned it in the cover letter.
 
 Then,
 for all patches
 
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
 
Sorry, I forgot to add this. If you still want it, I'll add it to
 version 3 that will be posted today.

You can also add

Acked-by: Simon Horman horms+rene...@verge.net.au

I'll replace it with a Sob line if the patches
end up going through my tree.

 
 Best regards
 ---
 Kuninori Morimoto
 
 WBR, Sergei
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/9] Reorganize R8A7779/Marzen USB code

2013-04-09 Thread Simon Horman
On Wed, Apr 10, 2013 at 02:26:08AM +0400, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 9 patches against the Simon Horman's 'renesas.git' repo,
 'renesas-next-20130410' tag.  It was created to fix the shortcomings in the
 R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and so
 spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some patches 
 have
 to touch both subtrees). The patches were conceived with the complete
 bisectability goal in mind.
 
 [1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 
 code
 [2/9] ehci-platform: add pre_setup() method to platform data
 [3/9] ARM: shmobile: R8A7779: setup EHCI internal buffer
 [4/9] rcar-phy: remove EHCI internal buffer setup
 [5/9] ARM: shmobile: R8A7779: remove USB PHY 2nd memory resource
 [6/9] rcar-phy: correct base address
 [7/9] rcar-phy: add platform data
 [8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [9/9] rcar-phy: handle platform data
 
I'm not sure thru which tree this patchset should be merged, however it 
 turns
 out that it's too late now to push it thru Felipe Balbi's USB tree for 3.10
 (which would have been most convenient probably), and it's probably too late 
 to
 merge thru Simon's tree for 3.10 too. So it now have to be postponed to 3.11,
 unfortunately...

Felipe, how would you prefer to handle this?
I'm happy for you to take it or to take it myself.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/9] Reorganize R8A7779/Marzen USB code

2013-04-10 Thread Simon Horman
On Wed, Apr 10, 2013 at 06:05:43PM +0900, Simon Horman wrote:
 On Wed, Apr 10, 2013 at 11:50:33AM +0300, Felipe Balbi wrote:
  Hi,
  
  On Wed, Apr 10, 2013 at 01:49:23PM +0900, Simon Horman wrote:
   On Wed, Apr 10, 2013 at 02:26:08AM +0400, Sergei Shtylyov wrote:
Hello.

   Here's the set of 9 patches against the Simon Horman's 'renesas.git' 
repo,
'renesas-next-20130410' tag.  It was created to fix the shortcomings in 
the
R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and 
so
spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some 
patches have
to touch both subtrees). The patches were conceived with the complete
bisectability goal in mind.

[1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to 
R8A7779 code
[2/9] ehci-platform: add pre_setup() method to platform data
[3/9] ARM: shmobile: R8A7779: setup EHCI internal buffer
[4/9] rcar-phy: remove EHCI internal buffer setup
[5/9] ARM: shmobile: R8A7779: remove USB PHY 2nd memory resource
[6/9] rcar-phy: correct base address
[7/9] rcar-phy: add platform data
[8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
[9/9] rcar-phy: handle platform data

   I'm not sure thru which tree this patchset should be merged, however 
it turns
out that it's too late now to push it thru Felipe Balbi's USB tree for 
3.10
(which would have been most convenient probably), and it's probably too 
late to
merge thru Simon's tree for 3.10 too. So it now have to be postponed to 
3.11,
unfortunately...
   
   Felipe, how would you prefer to handle this?
   I'm happy for you to take it or to take it myself.
  
  please take it yourself, just keep in mind there will be conflicts, I
  will go over the patches now and give my Acked-by so you can queue them
  up.
 
 Thanks

Sergei, it looks like patches 1-7 are clear.
Do you want me to start queueing them up.
Or would you rather wait for the issue with patch 6 to be resolved?
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Add USB support to R8A7778/BOCK-W

2013-04-10 Thread Simon Horman
On Wed, Apr 10, 2013 at 04:46:31PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 10-04-2013 2:47, Sergei Shtylyov wrote:
 
 Here's the set of 4 patches against the Simon Horman's 'renesas.git' 
  repo,
 'renesas-next-20130410' tag.
 
Sorry, forgot to mention that it is atop the previous
 R8A7779/Marzen USB patchset.

Thanks, got it.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/9] Reorganize R8A7779/Marzen USB code

2013-04-11 Thread Simon Horman
On Thu, Apr 11, 2013 at 04:02:33PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 11-04-2013 4:51, Simon Horman wrote:
 
 Here's the set of 9 patches against the Simon Horman's 'renesas.git' 
  repo,
 'renesas-next-20130410' tag.  It was created to fix the shortcomings in 
 the
 R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and 
 so
 spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some 
 patches have
 to touch both subtrees). The patches were conceived with the complete
 bisectability goal in mind.
 
 [1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to 
 R8A7779 code
 [2/9] ehci-platform: add pre_setup() method to platform data
 [3/9] ARM: shmobile: R8A7779: setup EHCI internal buffer
 [4/9] rcar-phy: remove EHCI internal buffer setup
 [5/9] ARM: shmobile: R8A7779: remove USB PHY 2nd memory resource
 [6/9] rcar-phy: correct base address
 [7/9] rcar-phy: add platform data
 [8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [9/9] rcar-phy: handle platform data
 
 I'm not sure thru which tree this patchset should be merged, however 
  it turns
 out that it's too late now to push it thru Felipe Balbi's USB tree for 
 3.10
 (which would have been most convenient probably), and it's probably too 
 late to
 merge thru Simon's tree for 3.10 too. So it now have to be postponed to 
 3.11,
 unfortunately...
 
 Felipe, how would you prefer to handle this?
 I'm happy for you to take it or to take it myself.
 
 please take it yourself, just keep in mind there will be conflicts, I
 will go over the patches now and give my Acked-by so you can queue them
 up.
 
 Thanks
 
 Sergei, it looks like patches 1-7 are clear.
 
#7  #9 have been refused by Felipe (hence #8 isn't good too).
 
 Do you want me to start queueing them up.
 
I was going to repost the whole series soon, adding ACK from Alan
 to the patch #2 and resolving issues with patches #7..#9. It's worth
 waiting for that to happen I think.

I am quite happy to wait.

One minor comment - there is no need to repost just to fix this -
could you consider using lower-case for the socs for consistency
with the common practice in patch subject lines.

e.g.: ARM: shmobile: r8a7779: setup EHCI

 Or would you rather wait for the issue with patch 6 to be resolved?
 
There's no special issue with patch #6 other than the PHY driver
 files being renamed in Felipe's tree -- but that concerns all
 patches touching drivers/usb/phy/rcar-phy.c (some of which precede
 #6).

Sorry, I made an error. I meant #8 and in turn #9.

I don't know how the rename conflict will be handled (this is
 really bad coincidence), perhaps I still should have done this
 patchset against Felipe's 'next' branch and pushed it thru his tree.
 If the patches will be queued for 3.11 anyway, maybe it's worth
 doing that -- I'm still of the opinion that his tree would be the
 one most fitting for this patchset.

It seems that git will handle it :)
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/4] ARM: shmobile: BOCK-W: enable USB in defconfig

2013-04-18 Thread Simon Horman
On Wed, Apr 17, 2013 at 01:35:09AM +0400, Sergei Shtylyov wrote:
 Enable USB platform EHCI/OHCI and common PHY drivers in 'bockw_defconfig'.
 Enable USB storage driver and SCSI disk driver that it needs as well...
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com

I realise that this is not going to be useful until the rest
of the series has been merged. But regardless I have pre-emptively
queued it up for v3.11 in the defconfig-bockw branch.
 
 ---
  arch/arm/configs/bockw_defconfig |   11 ++-
  1 file changed, 10 insertions(+), 1 deletion(-)
 
 Index: renesas/arch/arm/configs/bockw_defconfig
 ===
 --- renesas.orig/arch/arm/configs/bockw_defconfig
 +++ renesas/arch/arm/configs/bockw_defconfig
 @@ -48,6 +48,8 @@ CONFIG_DEVTMPFS_MOUNT=y
  # CONFIG_STANDALONE is not set
  # CONFIG_PREVENT_FIRMWARE_BUILD is not set
  # CONFIG_FW_LOADER is not set
 +CONFIG_SCSI=y
 +CONFIG_BLK_DEV_SD=y
  CONFIG_NETDEVICES=y
  # CONFIG_NET_CADENCE is not set
  # CONFIG_NET_VENDOR_BROADCOM is not set
 @@ -71,7 +73,14 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6
  CONFIG_SERIAL_SH_SCI_CONSOLE=y
  # CONFIG_HW_RANDOM is not set
  # CONFIG_HWMON is not set
 -# CONFIG_USB_SUPPORT is not set
 +CONFIG_USB=y
 +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 +CONFIG_USB_EHCI_HCD=y
 +CONFIG_USB_OHCI_HCD=y
 +CONFIG_USB_OHCI_HCD_PLATFORM=y
 +CONFIG_USB_EHCI_HCD_PLATFORM=y
 +CONFIG_USB_STORAGE=y
 +CONFIG_USB_RCAR_PHY=y
  CONFIG_UIO=y
  CONFIG_UIO_PDRV_GENIRQ=y
  # CONFIG_IOMMU_SUPPORT is not set
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/4] ARM: shmobile: BOCK-W: enable USB in defconfig

2013-04-18 Thread Simon Horman
On Fri, Apr 19, 2013 at 02:50:05AM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 04/18/2013 06:05 PM, Simon Horman wrote:
 
 
 Enable USB platform EHCI/OHCI and common PHY drivers in 'bockw_defconfig'.
 Enable USB storage driver and SCSI disk driver that it needs as well...
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
 I realise that this is not going to be useful until the rest
 of the series has been merged. But regardless I have pre-emptively
 queued it up for v3.11 in the defconfig-bockw branch.
 ---
   arch/arm/configs/bockw_defconfig |   11 ++-
   1 file changed, 10 insertions(+), 1 deletion(-)
 
 Index: renesas/arch/arm/configs/bockw_defconfig
 ===
 --- renesas.orig/arch/arm/configs/bockw_defconfig
 +++ renesas/arch/arm/configs/bockw_defconfig
 @@ -48,6 +48,8 @@ CONFIG_DEVTMPFS_MOUNT=y
   # CONFIG_STANDALONE is not set
   # CONFIG_PREVENT_FIRMWARE_BUILD is not set
   # CONFIG_FW_LOADER is not set
 +CONFIG_SCSI=y
 +CONFIG_BLK_DEV_SD=y
   CONFIG_NETDEVICES=y
   # CONFIG_NET_CADENCE is not set
   # CONFIG_NET_VENDOR_BROADCOM is not set
 @@ -71,7 +73,14 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6
   CONFIG_SERIAL_SH_SCI_CONSOLE=y
   # CONFIG_HW_RANDOM is not set
   # CONFIG_HWMON is not set
 -# CONFIG_USB_SUPPORT is not set
 +CONFIG_USB=y
 +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 +CONFIG_USB_EHCI_HCD=y
 +CONFIG_USB_OHCI_HCD=y
 +CONFIG_USB_OHCI_HCD_PLATFORM=y
 +CONFIG_USB_EHCI_HCD_PLATFORM=y
 +CONFIG_USB_STORAGE=y
 +CONFIG_USB_RCAR_PHY=y
 
 
Unfortunately, you've made a mistake in this last line of the patch:
 you've truncated it to just CONFIG_USB_RCAR. :-(
Will you correct it?

Sorry about that, I will fix it.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 code

2013-04-21 Thread Simon Horman
On Sun, Apr 21, 2013 at 11:19:28PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 04/20/2013 01:56 AM, Sergei Shtylyov wrote:
 
 USB EHCI, OHCI, and common PHY are the SoC devices but are wrongly defined 
 and
 registered in the Marzen board file.  Move the data and code to their proper
 place in setup-r8a7779.c; while at it, we have to rename 
 8a7779_late_devices[]
 to 8a7779_standard_devices[] -- this seems legitimate since they are 
 registered
 
 I've been pointed to the types in the above variable names privately.
 Don't know should I resend or Simon could fix s/8a7779/r8a7779/ while
 applying... well, the USB patches haven't been ACK'ed yet.

I can fix that up.

Is the series waiting on anything?

 
 from r8a7779_add_standard_devices() anyway.
 
 Note that I'm deliberately changing the USB PHY platform device's 'id' field
 from (previously just omitted) 0 to -1 as the device is a single of its kind.
 
 Note also that the board and SoC code have to be in one patch to keep the 
 code
 bisectable...
 
 The patch has been tested on the Marzen board.
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
 Acked-by: Simon Horman horms+rene...@verge.net.au
 
 WBR, Sergei
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 0/4] Add USB support to R8A7778/BOCK-W

2013-04-21 Thread Simon Horman
On Sat, Apr 20, 2013 at 02:27:32AM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 04/20/2013 02:07 AM, Sergei Shtylyov wrote:
 
 Here's the set of 3 patches against the Simon Horman's 'renesas.git' 
  repo,
 'renesas-next-20130416' tag and the R8A7779/Marzen patchset I've posted.
 
Sorry, it's against 'renesas-next-20130419' tag now.

Thanks, got it.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/4] ARM: shmobile: BOCK-W: enable USB in defconfig

2013-04-21 Thread Simon Horman
On Sat, Apr 20, 2013 at 12:23:52AM +0400, Sergei Shtylyov wrote:
 On 04/19/2013 06:14 AM, Simon Horman wrote:
 On Fri, Apr 19, 2013 at 02:50:05AM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 04/18/2013 06:05 PM, Simon Horman wrote:
 
 Enable USB platform EHCI/OHCI and common PHY drivers in 'bockw_defconfig'.
 Enable USB storage driver and SCSI disk driver that it needs as well...
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
 I realise that this is not going to be useful until the rest
 of the series has been merged. But regardless I have pre-emptively
 queued it up for v3.11 in the defconfig-bockw branch.
 ---
   arch/arm/configs/bockw_defconfig |   11 ++-
   1 file changed, 10 insertions(+), 1 deletion(-)
 
 Index: renesas/arch/arm/configs/bockw_defconfig
 ===
 --- renesas.orig/arch/arm/configs/bockw_defconfig
 +++ renesas/arch/arm/configs/bockw_defconfig
 @@ -48,6 +48,8 @@ CONFIG_DEVTMPFS_MOUNT=y
   # CONFIG_STANDALONE is not set
   # CONFIG_PREVENT_FIRMWARE_BUILD is not set
   # CONFIG_FW_LOADER is not set
 +CONFIG_SCSI=y
 +CONFIG_BLK_DEV_SD=y
   CONFIG_NETDEVICES=y
   # CONFIG_NET_CADENCE is not set
   # CONFIG_NET_VENDOR_BROADCOM is not set
 @@ -71,7 +73,14 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6
   CONFIG_SERIAL_SH_SCI_CONSOLE=y
   # CONFIG_HW_RANDOM is not set
   # CONFIG_HWMON is not set
 -# CONFIG_USB_SUPPORT is not set
 +CONFIG_USB=y
 +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 +CONFIG_USB_EHCI_HCD=y
 +CONFIG_USB_OHCI_HCD=y
 +CONFIG_USB_OHCI_HCD_PLATFORM=y
 +CONFIG_USB_EHCI_HCD_PLATFORM=y
 +CONFIG_USB_STORAGE=y
 +CONFIG_USB_RCAR_PHY=y
 
 Unfortunately, you've made a mistake in this last line of the patch:
 you've truncated it to just CONFIG_USB_RCAR. :-(
 Will you correct it?
 Sorry about that, I will fix it.
 
 Sorry to say, but you fixed it the wrong way; now it's:
 
 +CONFIG_USB_RCAR=y
 
 instead of:
 
 +CONFIG_USB_RCAR_PHY=y

Sorry for my carelessness.
I will forcibly push the following:

From 26b78f5c9ad1e4809f6d0a5547e4eab222f53f23 Mon Sep 17 00:00:00 2001
From: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
Date: Wed, 17 Apr 2013 01:35:09 +0400
Subject: [PATCH] ARM: shmobile: BOCK-W: enable USB in defconfig

Enable USB platform EHCI/OHCI and common PHY drivers in 'bockw_defconfig'.
Enable USB storage driver and SCSI disk driver that it needs as well...

Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
Signed-off-by: Simon Horman horms+rene...@verge.net.au
---
 arch/arm/configs/bockw_defconfig | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig
index a4bc76d..d662608 100644
--- a/arch/arm/configs/bockw_defconfig
+++ b/arch/arm/configs/bockw_defconfig
@@ -49,6 +49,8 @@ CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
 CONFIG_NETDEVICES=y
 # CONFIG_NET_CADENCE is not set
 # CONFIG_NET_VENDOR_BROADCOM is not set
@@ -74,7 +76,14 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
 # CONFIG_HWMON is not set
 CONFIG_I2C=y
 CONFIG_I2C_RCAR=y
-# CONFIG_USB_SUPPORT is not set
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_RCAR_PHY=y
 CONFIG_MMC=y
 CONFIG_MMC_SDHI=y
 CONFIG_UIO=y
-- 
1.8.2.1

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 code

2013-04-22 Thread Simon Horman
On Mon, Apr 22, 2013 at 05:34:05PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 22-04-2013 5:09, Simon Horman wrote:
 
 USB EHCI, OHCI, and common PHY are the SoC devices but are wrongly defined 
 and
 registered in the Marzen board file.  Move the data and code to their 
 proper
 place in setup-r8a7779.c; while at it, we have to rename 
 8a7779_late_devices[]
 to 8a7779_standard_devices[] -- this seems legitimate since they are 
 registered
 
  I've been pointed to the types in the above variable names privately.
 Don't know should I resend or Simon could fix s/8a7779/r8a7779/ while
 applying... well, the USB patches haven't been ACK'ed yet.
 
 I can fix that up.
 
 Is the series waiting on anything?
 
Probably on Felipe's ACKs on rcar-phy.c patches... Felipe hasn't
 appeared on this list for a week but I see his mails from today.

Thanks, lets wait a little longer for his feedback.
Please feel free to ping me if things stagnate.

 from r8a7779_add_standard_devices() anyway.
 
 Note that I'm deliberately changing the USB PHY platform device's 'id' 
 field
 from (previously just omitted) 0 to -1 as the device is a single of its 
 kind.
 
 Note also that the board and SoC code have to be in one patch to keep the 
 code
 bisectable...
 
 The patch has been tested on the Marzen board.
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
 Acked-by: Simon Horman horms+rene...@verge.net.au
 
 WBR, Sergei
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy-rcar-usb-gen2: add device tree support

2014-01-28 Thread Simon Horman
On Mon, Jan 27, 2014 at 07:06:26PM +, Ben Dooks wrote:
 On 27/01/14 18:23, Sergei Shtylyov wrote:
 Hello.
 
 On 01/26/2014 08:05 PM, Ben Dooks wrote:
 
 [snip]
 
 
 +static struct of_device_id rcar_gen2_usb_phy_ofmatch[] = {
 +{ .compatible = renesas,usb-phy-r8a7790, },
 +{ .compatible = renesas,rcar-gen2-usb-phy, },
 
 Frankly speaking, I don't understand the need for the clearly
 duplicate entries.
 
 Thanks, will look into remove it.
 Anyone else have any comments on this?

I would like you to leave it there.

As we know the r8a7790 is an R-Car Gen2 SoC.  But there are other R-Car
Gen2 SoCs, such as the r8a7791, they it could plausibly make use of
rcar-gen2-usb-phy until the driver is updated with a usb-phy-r8a7791 entry.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy-rcar-usb-gen2: add device tree support

2014-01-29 Thread Simon Horman
On Wed, Jan 29, 2014 at 02:41:58PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 29-01-2014 10:22, Simon Horman wrote:
 
 [snip]
 
 +static struct of_device_id rcar_gen2_usb_phy_ofmatch[] = {
 +{ .compatible = renesas,usb-phy-r8a7790, },
 +{ .compatible = renesas,rcar-gen2-usb-phy, },
 
 Frankly speaking, I don't understand the need for the clearly
 duplicate entries.
 
 Thanks, will look into remove it.
 Anyone else have any comments on this?
 
 I would like you to leave it there.
 
 As we know the r8a7790 is an R-Car Gen2 SoC.  But there are other R-Car
 Gen2 SoCs, such as the r8a7791, they it could plausibly make use of
 rcar-gen2-usb-phy until the driver is updated with a usb-phy-r8a7791 entry.
 
Why not just update the driver this way now, may I ask?

Because I don't believe that Ben has access to r8a7791 hardware
to test the change and thus it makes sense to handle it separately.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy-rcar-usb-gen2: add device tree support

2014-01-29 Thread Simon Horman
On Wed, Jan 29, 2014 at 04:26:55PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 29-01-2014 16:22, Simon Horman wrote:
 
 [snip]
 
 +static struct of_device_id rcar_gen2_usb_phy_ofmatch[] = {
 +{ .compatible = renesas,usb-phy-r8a7790, },
 +{ .compatible = renesas,rcar-gen2-usb-phy, },
 
 Frankly speaking, I don't understand the need for the clearly
 duplicate entries.
 
 Thanks, will look into remove it.
 Anyone else have any comments on this?
 
 I would like you to leave it there.
 
 As we know the r8a7790 is an R-Car Gen2 SoC.  But there are other R-Car
 Gen2 SoCs, such as the r8a7791, they it could plausibly make use of
 rcar-gen2-usb-phy until the driver is updated with a usb-phy-r8a7791 entry.
 
 Why not just update the driver this way now, may I ask?
 
 Because I don't believe that Ben has access to r8a7791 hardware
 to test the change and thus it makes sense to handle it separately.
 
I believe Valentine has already tested the driver with both SoCs.

Oh, great. Then I guess the compat string for r8a7791 can be added
as you suggest.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH 1/4 v3] usb: host: ehci-platform: BUG_ON() to WARN_ON() on probe

2012-08-06 Thread Simon Horman
On Sun, Aug 05, 2012 at 06:51:34PM -0700, kuninori.morimoto...@renesas.com 
wrote:
 We should avoid using BUG_ON() in drivers.
 This patch switch to use WARN_ON() from BUG_ON(),
 and avoid NULL pointer access by new macro.
 
 Signed-off-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
 ---
 v2 - v3
 
  - BUG_ON - WARN_ON
 
  drivers/usb/host/ehci-platform.c |   18 ++
  1 files changed, 10 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/usb/host/ehci-platform.c 
 b/drivers/usb/host/ehci-platform.c
 index 4b1d896..db27dfe 100644
 --- a/drivers/usb/host/ehci-platform.c
 +++ b/drivers/usb/host/ehci-platform.c
 @@ -21,6 +21,8 @@
  #include linux/platform_device.h
  #include linux/usb/ehci_pdriver.h
  
 +#define ehci_pdata_get(pdata, x) ((pdata) ? (pdata)-x : 0)
 +

FWIW, I think that an inline function would be a slight improvement over
a macro here.  Likewise for the 2nd patch of this series.

  static int ehci_platform_reset(struct usb_hcd *hcd)
  {
   struct platform_device *pdev = to_platform_device(hcd-self.controller);
 @@ -28,19 +30,19 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
   struct ehci_hcd *ehci = hcd_to_ehci(hcd);
   int retval;
  
 - hcd-has_tt = pdata-has_tt;
 - ehci-has_synopsys_hc_bug = pdata-has_synopsys_hc_bug;
 - ehci-big_endian_desc = pdata-big_endian_desc;
 - ehci-big_endian_mmio = pdata-big_endian_mmio;
 + hcd-has_tt = ehci_pdata_get(pdata, has_tt);
 + ehci-has_synopsys_hc_bug = ehci_pdata_get(pdata, has_synopsys_hc_bug);
 + ehci-big_endian_desc = ehci_pdata_get(pdata, big_endian_desc);
 + ehci-big_endian_mmio = ehci_pdata_get(pdata, big_endian_mmio);
  
 - ehci-caps = hcd-regs + pdata-caps_offset;
 + ehci-caps = hcd-regs + ehci_pdata_get(pdata, caps_offset);
   retval = ehci_setup(hcd);
   if (retval)
   return retval;
  
 - if (pdata-port_power_on)
 + if (ehci_pdata_get(pdata, port_power_on))
   ehci_port_power(ehci, 1);
 - if (pdata-port_power_off)
 + if (ehci_pdata_get(pdata, port_power_off))
   ehci_port_power(ehci, 0);
  
   return 0;
 @@ -85,7 +87,7 @@ static int __devinit ehci_platform_probe(struct 
 platform_device *dev)
   int irq;
   int err = -ENOMEM;
  
 - BUG_ON(!dev-dev.platform_data);
 + WARN_ON(!dev-dev.platform_data);
  
   if (usb_disabled())
   return -ENODEV;
 -- 
 1.7.5.4
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 0/9] Reorganize R8A7779/Marzen USB code

2013-06-07 Thread Simon Horman
On Sun, Jun 02, 2013 at 01:28:05AM +0400, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 9 patches against the Simon Horman's 'renesas.git' repo,
 'renesas-next-20130528' tag.  It was created to fix the shortcomings in the
 R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and so
 spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some patches 
 have
 to touch both subtrees). The patches were conceived with the complete
 bisectability goal in mind.
 
 [1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 
 code
 [2/9] ehci-platform: add pre_setup() method to platform data
 [3/9] ARM: shmobile: r8a7779: setup EHCI internal buffer
 [4/9] phy-rcar-usb: remove EHCI internal buffer setup
 [5/9] ARM: shmobile: r8a7779: remove USB PHY 2nd memory resource
 [6/9] phy-rcar-usb: correct base address
 [7/9] phy-rcar-usb: add platform data
 [8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [9/9] phy-rcar-usb: handle platform data
 
The patchset is completely ready to be merged now.

Can I confirm that the plan is for me to merge this code?

If so, I should be able to do so next week.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 0/3] Add USB support to R8A7778/BOCK-W

2013-06-09 Thread Simon Horman
On Sun, Jun 09, 2013 at 12:24:04AM +0400, Sergei Shtylyov wrote:
 On 06/09/2013 12:12 AM, Sergei Shtylyov wrote:
 
 Here's the set of 3 patches against the Simon Horman's 'renesas.git' 
  repo,
 'renesas-next-20130607' tag, and the R8A7779/Marzen USB patchset I've posted.
 It was created to add support of R8A7778/BOCK-W USB to the platform code and
 the USB common PHY driver, and so spans both arch/arm/mach-shmobile/ and
 drivers/usb/phy/ subtrees.
 
 [1/3] phy-rcar-usb: add R8A7778 support
 [2/3] ARM: shmobile: r8a7778: add USB support
 [3/3] ARM: shmobile: BOCK-W: add USB support
 
 The patch #4 (ARM: shmobile: BOCK-W: enable USB in defconfig) that has 
  been
 already merged, is not reposted.
 
 The patchset is completely ready for merging now.
 
Argh, scratch that -- I forgot to refresh the patches before sending...

Scratched.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 resend 0/3] Add USB support to R8A7778/BOCK-W

2013-06-11 Thread Simon Horman
On Sun, Jun 09, 2013 at 12:32:34AM +0400, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 3 patches against the Simon Horman's 'renesas.git' repo,
 'renesas-next-20130607' tag, and the R8A7779/Marzen USB patchset I've posted.
 It was created to add support of R8A7778/BOCK-W USB to the platform code and
 the USB common PHY driver, and so spans both arch/arm/mach-shmobile/ and
 drivers/usb/phy/ subtrees.
 
 [1/3] phy-rcar-usb: add R8A7778 support
 [2/3] ARM: shmobile: r8a7778: add USB support
 [3/3] ARM: shmobile: BOCK-W: add USB support
 
The patchset is completely ready for merging now.

Thanks, I have queued this up in the soc2 phy-rcar-usb.
My current plan is to let that branch sit in next for a few
days and then send a pull-request for it to be included in v3.11.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 0/9] Reorganize R8A7779/Marzen USB code

2013-06-11 Thread Simon Horman
On Fri, Jun 07, 2013 at 02:45:45PM +0400, Sergei Shtylyov wrote:
 Hello.
 
 On 07-06-2013 12:06, Simon Horman wrote:
 
 Here's the set of 9 patches against the Simon Horman's 'renesas.git' 
  repo,
 'renesas-next-20130528' tag.  It was created to fix the shortcomings in the
 R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and so
 spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some patches 
 have
 to touch both subtrees). The patches were conceived with the complete
 bisectability goal in mind.
 
 [1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to 
 R8A7779 code
 [2/9] ehci-platform: add pre_setup() method to platform data
 [3/9] ARM: shmobile: r8a7779: setup EHCI internal buffer
 [4/9] phy-rcar-usb: remove EHCI internal buffer setup
 [5/9] ARM: shmobile: r8a7779: remove USB PHY 2nd memory resource
 [6/9] phy-rcar-usb: correct base address
 [7/9] phy-rcar-usb: add platform data
 [8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
 [9/9] phy-rcar-usb: handle platform data
 
 The patchset is completely ready to be merged now.
 
 Can I confirm that the plan is for me to merge this code?
 
Yes, that was the plan.
 
 If so, I should be able to do so next week.

Thanks, I have queued this up in the soc2 phy-rcar-usb.
My current plan is to let that branch sit in next for a few
days and then send a pull-request for it to be included in v3.11.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 0/9] Reorganize R8A7779/Marzen USB code

2013-06-11 Thread Simon Horman
On Tue, Jun 11, 2013 at 04:49:43PM +0900, Simon Horman wrote:
 On Fri, Jun 07, 2013 at 02:45:45PM +0400, Sergei Shtylyov wrote:
  Hello.
  
  On 07-06-2013 12:06, Simon Horman wrote:
  
  Here's the set of 9 patches against the Simon Horman's 'renesas.git' 
   repo,
  'renesas-next-20130528' tag.  It was created to fix the shortcomings in 
  the
  R8A7779/Marzen USB platform code and R8A7779 USB common PHY driver, and so
  spans both arch/arm/mach-shmobile/ and drivers/usb/ subtrees (some 
  patches have
  to touch both subtrees). The patches were conceived with the complete
  bisectability goal in mind.
  
  [1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to 
  R8A7779 code
  [2/9] ehci-platform: add pre_setup() method to platform data
  [3/9] ARM: shmobile: r8a7779: setup EHCI internal buffer
  [4/9] phy-rcar-usb: remove EHCI internal buffer setup
  [5/9] ARM: shmobile: r8a7779: remove USB PHY 2nd memory resource
  [6/9] phy-rcar-usb: correct base address
  [7/9] phy-rcar-usb: add platform data
  [8/9] ARM: shmobile: Marzen: pass platform data to USB PHY device
  [9/9] phy-rcar-usb: handle platform data
  
  The patchset is completely ready to be merged now.
  
  Can I confirm that the plan is for me to merge this code?
  
 Yes, that was the plan.
  
  If so, I should be able to do so next week.
 
 Thanks, I have queued this up in the soc2 phy-rcar-usb.

s/soc2 phy-rcar-usb/phy-rcar-usb branch/

 My current plan is to let that branch sit in next for a few
 days and then send a pull-request for it to be included in v3.11.
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 resend 0/3] Add USB support to R8A7778/BOCK-W

2013-06-11 Thread Simon Horman
On Tue, Jun 11, 2013 at 04:49:59PM +0900, Simon Horman wrote:
 On Sun, Jun 09, 2013 at 12:32:34AM +0400, Sergei Shtylyov wrote:
  Hello.
  
 Here's the set of 3 patches against the Simon Horman's 'renesas.git' 
  repo,
  'renesas-next-20130607' tag, and the R8A7779/Marzen USB patchset I've 
  posted.
  It was created to add support of R8A7778/BOCK-W USB to the platform code and
  the USB common PHY driver, and so spans both arch/arm/mach-shmobile/ and
  drivers/usb/phy/ subtrees.
  
  [1/3] phy-rcar-usb: add R8A7778 support
  [2/3] ARM: shmobile: r8a7778: add USB support
  [3/3] ARM: shmobile: BOCK-W: add USB support
  
 The patchset is completely ready for merging now.
 
 Thanks, I have queued this up in the soc2 phy-rcar-usb.

s/soc2 phy-rcar-usb/phy-rcar-usb branch/

 My current plan is to let that branch sit in next for a few
 days and then send a pull-request for it to be included in v3.11.
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/9] usb: hcd: Initialize USB phy if needed

2013-11-20 Thread Simon Horman
On Thu, Nov 21, 2013 at 01:26:19AM +0400, Valentine wrote:
 On 11/20/2013 09:46 PM, Fabio Estevam wrote:
 On Wed, Nov 20, 2013 at 3:38 PM, Ulrich Hecht ulrich.he...@gmail.com wrote:
 From: Valentine Barshak valentine.bars...@cogentembedded.com
 
 This adds external USB phy support to USB HCD driver that
 allows to find and initialize external USB phy, bound to
 the HCD, when the HCD is added.
 The usb_add_hcd function returns -EPROBE_DEFER if the USB
 phy, bound to the HCD, is not ready.
 If no USB phy is bound, the HCD is initialized as usual.
 
 Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
 Acked-by: Alan Stern st...@rowland.harvard.edu
 ---
   drivers/usb/core/hcd.c | 20 
   1 file changed, 20 insertions(+)
 
 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
 index d939521..fd09ec6 100644
 --- a/drivers/usb/core/hcd.c
 +++ b/drivers/usb/core/hcd.c
 @@ -2597,6 +2597,26 @@ int usb_add_hcd(struct usb_hcd *hcd,
  int retval;
  struct usb_device *rhdev;
 
 +#ifdef CONFIG_USB_PHY
 +   if (!hcd-phy) {
 +   struct usb_phy *phy = usb_get_phy_dev(hcd-self.controller, 
 0);
 
 Wouldn't it be better to use the following instead?
 
if (IS_ENABLED(CONFIG_USB_PHY)  !hcd-(phy) {
 
 Since USB_PHY is a bool I don't see much of a difference.

The difference is that IS_ENABLED() is thought to be less ugly
than #ifdef. For this reason I agree with Fabio's comment.

 
 
 Regards,
 
 Fabio Estevam
 
 Thanks,
 Val.
 
 
 +
 +   if (IS_ERR(phy)) {
 +   retval = PTR_ERR(phy);
 +   if (retval == -EPROBE_DEFER)
 +   return retval;
 +   } else {
 +   retval = usb_phy_init(phy);
 +   if (retval) {
 +   usb_put_phy(phy);
 +   return retval;
 +   }
 +   hcd-phy = phy;
 +   hcd-remove_phy = 1;
 +   }
 +   }
 +#endif
 +
  dev_info(hcd-self.controller, %s\n, hcd-product_desc);
 
  /* Keep old behaviour if authorized_default is not in [0, 1]. */
 --
 1.8.4
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-usb in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/12] usb: r8a66597-hcd: Convert to clk_prepare/unprepare

2013-11-28 Thread Simon Horman
On Tue, Nov 26, 2013 at 03:08:27PM +0100, Laurent Pinchart wrote:
 Hi Greg,
 
 On Monday 25 November 2013 18:36:08 Greg Kroah-Hartman wrote:
  On Tue, Nov 26, 2013 at 03:00:30AM +0100, Laurent Pinchart wrote:
   On Saturday 09 November 2013 08:10:59 Greg Kroah-Hartman wrote:
On Sat, Nov 09, 2013 at 03:12:05PM +0100, Laurent Pinchart wrote:
 On Tuesday 29 October 2013 18:47:26 Shimoda, Yoshihiro wrote:
  Hi Laurent-san,
  
  (2013/10/29 7:49), Laurent Pinchart wrote:
   Turn clk_enable() and clk_disable() calls into
   clk_prepare_enable() and clk_disable_unprepare() to get ready for
   the migration to the common clock framework.
   
   Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
   Cc: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
   Cc: linux-usb@vger.kernel.org
   Signed-off-by: Laurent Pinchart
   laurent.pinchart+rene...@ideasonboard.com
  
  Thank you for the patch.
  
  Acked-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
 
 Could you please pick this patch up ?

I'll pick things up after 3.13-rc1 is out, I can't do anything until
then.
   
   Sure.
   
   As this patch is a dependency for other series that will go through
   different trees, could you please provide a stable branch in your tree
   with this patch included that you will push to v3.14 ?
  
  If you need this for other work, feel free to take it in your tree, I
  have no real need for it to go in mine.
  
  Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org
 
 Sounds good to me, thanks.
 
 Simon, could you please pick this patch then ?

Sure. I have queued it up.
But I may not push it for a day or two.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] ARM: shmobile: lager: USBHS callback elimination

2014-07-11 Thread Simon Horman
[Cc Felipe Balbi]

On Thu, Jul 10, 2014 at 01:20:34AM -0700, Kuninori Morimoto wrote:
 
 Hi
 
  Changes in v2:
  - move phy handle to struct usbhs_priv
  - add new default pipe type to driver
  - remove pipe type from Lager board code
  
  Ulrich Hecht (2):
usb: renesas_usbhs: add R-Car Gen. 2 init and power control
ARM: shmobile: lager: remove USBHS callbacks
  
   arch/arm/mach-shmobile/board-lager.c | 126 
  ---
   drivers/usb/renesas_usbhs/Makefile   |   2 +-
   drivers/usb/renesas_usbhs/common.c   |  66 --
   drivers/usb/renesas_usbhs/common.h   |   2 +
   drivers/usb/renesas_usbhs/rcar2.c|  76 +
   drivers/usb/renesas_usbhs/rcar2.h|   4 ++
   include/linux/usb/renesas_usbhs.h|   6 ++
   7 files changed, 163 insertions(+), 119 deletions(-)
   create mode 100644 drivers/usb/renesas_usbhs/rcar2.c
   create mode 100644 drivers/usb/renesas_usbhs/rcar2.h
 
 For all patches
 
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com

[snip]

 I tested these patches on Lager legacy, and these patches worked correctly.
 
 Tested-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com

Hi,

it seems that the 2nd patch should go through my renesas tree
but it depends on the first patch which should be taken by 
Felipe Balbi (Cced).

Felipe, is there any chance that you could take this for v3.16?
I am quite happy to make a branch for you to pull for renesas_usbhs
if this would make your life easier.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] ARM: shmobile: lager: USBHS callback elimination

2014-07-11 Thread Simon Horman
On Fri, Jul 11, 2014 at 10:12:37AM -0500, Felipe Balbi wrote:
 On Fri, Jul 11, 2014 at 11:00:07AM +0200, Simon Horman wrote:
  [Cc Felipe Balbi]
  
  On Thu, Jul 10, 2014 at 01:20:34AM -0700, Kuninori Morimoto wrote:
   
   Hi
   
Changes in v2:
- move phy handle to struct usbhs_priv
- add new default pipe type to driver
- remove pipe type from Lager board code

Ulrich Hecht (2):
  usb: renesas_usbhs: add R-Car Gen. 2 init and power control
  ARM: shmobile: lager: remove USBHS callbacks

 arch/arm/mach-shmobile/board-lager.c | 126 
---
 drivers/usb/renesas_usbhs/Makefile   |   2 +-
 drivers/usb/renesas_usbhs/common.c   |  66 --
 drivers/usb/renesas_usbhs/common.h   |   2 +
 drivers/usb/renesas_usbhs/rcar2.c|  76 +
 drivers/usb/renesas_usbhs/rcar2.h|   4 ++
 include/linux/usb/renesas_usbhs.h|   6 ++
 7 files changed, 163 insertions(+), 119 deletions(-)
 create mode 100644 drivers/usb/renesas_usbhs/rcar2.c
 create mode 100644 drivers/usb/renesas_usbhs/rcar2.h
   
   For all patches
   
   Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com
  
  [snip]
  
   I tested these patches on Lager legacy, and these patches worked 
   correctly.
   
   Tested-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
  
  Hi,
  
  it seems that the 2nd patch should go through my renesas tree
  but it depends on the first patch which should be taken by 
  Felipe Balbi (Cced).
  
  Felipe, is there any chance that you could take this for v3.16?
  I am quite happy to make a branch for you to pull for renesas_usbhs
  if this would make your life easier.
 
 you need to take both patches or just patch 1 ?

Please just take patch 1.
Thanks
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] ARM: shmobile: lager: USBHS callback elimination

2014-07-12 Thread Simon Horman
On Fri, Jul 11, 2014 at 11:23:48AM -0500, Felipe Balbi wrote:
 On Fri, Jul 11, 2014 at 05:41:52PM +0200, Simon Horman wrote:
  On Fri, Jul 11, 2014 at 10:12:37AM -0500, Felipe Balbi wrote:
   On Fri, Jul 11, 2014 at 11:00:07AM +0200, Simon Horman wrote:
[Cc Felipe Balbi]

On Thu, Jul 10, 2014 at 01:20:34AM -0700, Kuninori Morimoto wrote:
 
 Hi
 
  Changes in v2:
  - move phy handle to struct usbhs_priv
  - add new default pipe type to driver
  - remove pipe type from Lager board code
  
  Ulrich Hecht (2):
usb: renesas_usbhs: add R-Car Gen. 2 init and power control
ARM: shmobile: lager: remove USBHS callbacks
  
   arch/arm/mach-shmobile/board-lager.c | 126 
  ---
   drivers/usb/renesas_usbhs/Makefile   |   2 +-
   drivers/usb/renesas_usbhs/common.c   |  66 --
   drivers/usb/renesas_usbhs/common.h   |   2 +
   drivers/usb/renesas_usbhs/rcar2.c|  76 +
   drivers/usb/renesas_usbhs/rcar2.h|   4 ++
   include/linux/usb/renesas_usbhs.h|   6 ++
   7 files changed, 163 insertions(+), 119 deletions(-)
   create mode 100644 drivers/usb/renesas_usbhs/rcar2.c
   create mode 100644 drivers/usb/renesas_usbhs/rcar2.h
 
 For all patches
 
 Acked-by: Kuninori Morimoto kuninori.morimoto...@renesas.com

[snip]

 I tested these patches on Lager legacy, and these patches worked 
 correctly.
 
 Tested-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com

Hi,

it seems that the 2nd patch should go through my renesas tree
but it depends on the first patch which should be taken by 
Felipe Balbi (Cced).

Felipe, is there any chance that you could take this for v3.16?
I am quite happy to make a branch for you to pull for renesas_usbhs
if this would make your life easier.
   
   you need to take both patches or just patch 1 ?
  
  Please just take patch 1.
 
 will do.

Thanks.

Ulrich, please repost patch #2 once patch #1 hits an rc release.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] usb: renesas_usbhs: fix driver dependencies

2014-09-01 Thread Simon Horman
On Mon, Sep 01, 2014 at 06:40:50PM +0200, Geert Uytterhoeven wrote:
 On Mon, Sep 1, 2014 at 4:24 PM, Bartlomiej Zolnierkiewicz
 b.zolnier...@samsung.com wrote:
  Renesas USBHS controller support should be available only on
  Renesas ARM SoCs and SuperH architecture.
 
  Signed-off-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
  Acked-by: Kyungmin Park kyungmin.p...@samsung.com
  Cc: Simon Horman ho...@verge.net.au
  Cc: Magnus Damm magnus.d...@gmail.com
  ---
  v2:
  - s/ARCH_SH/SUPERH/ (thanks to Sergei Shtylyov)
 
 Acked-by: Geert Uytterhoeven geert+rene...@glider.be

Acked-by: Simon Horman horms+rene...@verge.net.au

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 0/2] Add USB PHY device tree support for R8A7790/Lager board

2014-09-29 Thread Simon Horman
On Fri, Sep 26, 2014 at 01:58:01PM -0700, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
 'renesas-devel-20140924-v3.17-rc6' tag. Here we add the USB PHY device tree
 support on the R8A7790/Lager reference board. The patchset requires the USB 
 PHY
 driver already merged by Kishon and Greg in order to work, so can be applied 
 at
 last...
 
 [1/2] ARM: shmobile: r8a7790: add USB PHY DT support
 [2/2] ARM: shmobile: lager: enable USB PHY

Thanks, I have queued these up.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 0/3] Add USB PHY device tree support for R8A7791/Koelsch/Henninger board

2014-09-29 Thread Simon Horman
On Sat, Sep 27, 2014 at 01:05:41AM +0400, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
 'renesas-devel-20140924-v3.17-rc6' tag. Here we add the USB PHY device tree
 support on the R8A7791/Koelsch/Henninger boards. The patchset requires the USB
 PHY driver already merged by Kishon and Greg in order to work, so can be
 applied at last...
 
 [1/3] ARM: shmobile: r8a7791: add USB PHY DT support
 [2/3] ARM: shmobile: koelsch: enable USB PHY
 [3/3] ARM: shmobile: henninger: enable USB PHY

Thanks, I have queued these up.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY

2014-09-29 Thread Simon Horman
On Mon, Sep 29, 2014 at 10:21:59PM +0400, Sergei Shtylyov wrote:
 Describe the PCI USB devices that are behind the PCI bridges, adding necessary
 links to the USB PHY device.
 
 Based on the original work by Ben Dooks ben.do...@codethink.co.uk.
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com

Thanks, I have queued this up.

 
 ---
 This patch is against 'renesas-devel-20140924-v3.17-rc6' tag of Simon Horman's
 'renesas.git' repo plus R8A7790/Lager USB PHY support patches posted before.
 The patch requires the USB PHY driver and USB HCD generic PHY support (merged
 by Kishon and Greg recently) in order to work.
 
 Changes in version 4:
 - refreshed the patch.
 
 Changes in version 3:
 - adjusted phys properties in the PCI OHCI/EHCI device nodes;
 - resolved rejects.
 
 Changes in version 2:
 - renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
 - changed the PHY specifier in the PCI#2 node to reflect that channel #1 
 support
   was dropped;
 - resolved rejects, refreshed the patch.
 
  arch/arm/boot/dts/r8a7790.dtsi |   28 
  1 file changed, 28 insertions(+)
 
 Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
 ===
 --- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi
 +++ renesas/arch/arm/boot/dts/r8a7790.dtsi
 @@ -1107,6 +1107,20 @@
   interrupt-map = 0x 0 0 1 gic 0 108 IRQ_TYPE_LEVEL_HIGH
0x0800 0 0 1 gic 0 108 IRQ_TYPE_LEVEL_HIGH
0x1000 0 0 2 gic 0 108 IRQ_TYPE_LEVEL_HIGH;
 +
 + usb@0,1 {
 + reg = 0x800 0 0 0 0;
 + device_type = pci;
 + phys = usb0 0;
 + phy-names = usb;
 + };
 +
 + usb@0,2 {
 + reg = 0x1000 0 0 0 0;
 + device_type = pci;
 + phys = usb0 0;
 + phy-names = usb;
 + };
   };
  
   pci1: pci@ee0b {
 @@ -1147,6 +1161,20 @@
   interrupt-map = 0x 0 0 1 gic 0 113 IRQ_TYPE_LEVEL_HIGH
0x0800 0 0 1 gic 0 113 IRQ_TYPE_LEVEL_HIGH
0x1000 0 0 2 gic 0 113 IRQ_TYPE_LEVEL_HIGH;
 +
 + usb@0,1 {
 + reg = 0x800 0 0 0 0;
 + device_type = pci;
 + phys = usb2 0;
 + phy-names = usb;
 + };
 +
 + usb@0,2 {
 + reg = 0x1000 0 0 0 0;
 + device_type = pci;
 + phys = usb2 0;
 + phy-names = usb;
 + };
   };
  
   pciec: pcie@fe00 {
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4] ARM: shmobile: r8a7791: link PCI USB devices to USB PHY

2014-09-29 Thread Simon Horman
On Mon, Sep 29, 2014 at 10:23:11PM +0400, Sergei Shtylyov wrote:
 Describe the PCI USB devices that are behind the PCI bridges, adding necessary
 links to the USB PHY device.
 
 Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com

Thanks, I have queued this up.

 
 ---
 This patch is against 'renesas-devel-20140924-v3.17-rc6' tag of Simon Horman's
 'renesas.git' repo plus R8A7791/Koelsch/Henninger USB PHY support patches 
 posted
 before.  The patch requires the USB PHY driver and USB HCD generic PHY support
 (merged by Kishon and Greg recently) in order to work.
 
 Changes in version 4:
 - refreshed the patch.
 
 Changes in version 3:
 - adjusted phys properties in the PCI OHCI/EHCI device nodes;
 - resolved rejects.
 
 Changes in version 2:
 - renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
 - changed the PHY specifier in the PCI#1 node to reflect that channel #1 
 support
   was dropped;
 - resolved rejects.
 
  arch/arm/boot/dts/r8a7791.dtsi |   28 
  1 file changed, 28 insertions(+)
 
 Index: renesas/arch/arm/boot/dts/r8a7791.dtsi
 ===
 --- renesas.orig/arch/arm/boot/dts/r8a7791.dtsi
 +++ renesas/arch/arm/boot/dts/r8a7791.dtsi
 @@ -1125,6 +1125,20 @@
   interrupt-map = 0x 0 0 1 gic 0 108 IRQ_TYPE_LEVEL_HIGH
0x0800 0 0 1 gic 0 108 IRQ_TYPE_LEVEL_HIGH
0x1000 0 0 2 gic 0 108 IRQ_TYPE_LEVEL_HIGH;
 +
 + usb@0,1 {
 + reg = 0x800 0 0 0 0;
 + device_type = pci;
 + phys = usb0 0;
 + phy-names = usb;
 + };
 +
 + usb@0,2 {
 + reg = 0x1000 0 0 0 0;
 + device_type = pci;
 + phys = usb0 0;
 + phy-names = usb;
 + };
   };
  
   pci1: pci@ee0d {
 @@ -1145,6 +1159,20 @@
   interrupt-map = 0x 0 0 1 gic 0 113 IRQ_TYPE_LEVEL_HIGH
0x0800 0 0 1 gic 0 113 IRQ_TYPE_LEVEL_HIGH
0x1000 0 0 2 gic 0 113 IRQ_TYPE_LEVEL_HIGH;
 +
 + usb@0,1 {
 + reg = 0x800 0 0 0 0;
 + device_type = pci;
 + phys = usb2 0;
 + phy-names = usb;
 + };
 +
 + usb@0,2 {
 + reg = 0x1000 0 0 0 0;
 + device_type = pci;
 + phys = usb2 0;
 + phy-names = usb;
 + };
   };
  
   pciec: pcie@fe00 {
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] arm: shmobile: lager: enable HS-USB

2014-10-05 Thread Simon Horman
On Mon, Oct 06, 2014 at 09:59:48AM +0900, Yoshihiro Shimoda wrote:
 Hello.
 
 (2014/10/04 4:50), Sergei Shtylyov wrote:
  On 10/02/2014 12:04 PM, Yoshihiro Shimoda wrote:
  
  Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
  ---
arch/arm/boot/dts/r8a7790-lager.dts |5 +
1 file changed, 5 insertions(+)
  
  diff --git a/arch/arm/boot/dts/r8a7790-lager.dts 
  b/arch/arm/boot/dts/r8a7790-lager.dts
  index 1698591..4badd0a 100644
  --- a/arch/arm/boot/dts/r8a7790-lager.dts
  +++ b/arch/arm/boot/dts/r8a7790-lager.dts
  @@ -445,3 +445,8 @@
 };
 };
};
  +
  +hsusb {
  +  status = okay;
  +  renesas,enable-gpio = gpio5 18 GPIO_ACTIVE_LOW;
  
  It's certainly active-high.
 
 Since the current code has the following, we have to set the active_low...
 However, the code is unreadable, I think. So, I will modify the code.

It seems to me that would be best.

As far as possible the bindings and their use should
describe the hardware rather than the software.

   /* check GPIO determining if USB function should be enabled */
   if (priv-dparam.enable_gpio) {
   gpio_request_one(priv-dparam.enable_gpio, GPIOF_IN, NULL);
   ret = !gpio_get_value(priv-dparam.enable_gpio);
   gpio_free(priv-dparam.enable_gpio);
   if (ret) {
   dev_warn(pdev-dev,
USB function not selected (GPIO %d)\n,
priv-dparam.enable_gpio);
   ret = -ENOTSUPP;
   goto probe_end_mod_exit;
   }
   }
 
 Best regards,
 Yoshihiro Shimoda
 
  WBR, Sergei
  
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: shmobile: add USB3.0 device node on r8a7791

2014-10-23 Thread Simon Horman
On Wed, Oct 08, 2014 at 03:27:55PM +0900, Yoshihiro Shimoda wrote:
 (2014/10/08 15:24), Yoshihiro Shimoda wrote:
   This patch is based on Simon's renesas.git branch and
  renesas-devel-20141007-v3.17 tag.
  Since koelsch and henninger doesn't have a USB3.0 connector,
  I submit a patch for r8a7791.dtsi only.
  
  Yoshihiro Shimoda (1):
ARM: shmobile: r8a7791: add USB3.0 device node
  
   arch/arm/boot/dts/r8a7791.dtsi |   10 ++
   1 file changed, 10 insertions(+)
  
 
 Oops, this patch means [PATCH 0/1]...
 Also the [PATCH] ARM: shmobile: r8a7791: add USB3.0 device node email means
 [PATCH 1/1].

Hi Shimoda-san,

could you update me on the status of this patch.
Should I queue it up?
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] ARM: shmobile: add USB3.0 device node on r8a7790

2014-10-23 Thread Simon Horman
On Wed, Oct 08, 2014 at 03:24:28PM +0900, Yoshihiro Shimoda wrote:
  This series is based on Simon's renesas.git branch and
 renesas-devel-20141007-v3.17 tag. If we use the generic phy
 driver for R-Car Gen2 (drivers/phy/phy-rcar-gen2.c), we can use
 the USB3.0 on lager.
 
 Yoshihiro Shimoda (2):
   ARM: shmobile: r8a7790: add USB3.0 device node
   ARM: shmobile: lager: enable USB3.0
 
  arch/arm/boot/dts/r8a7790-lager.dts |6 ++
  arch/arm/boot/dts/r8a7790.dtsi  |   10 ++
  2 files changed, 16 insertions(+)

Hi Shimoda-san,

could you update me on the status of this patch.
Should I queue it up?
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] ARM: shmobile: add USB3.0 device node on r8a7790

2014-10-23 Thread Simon Horman
On Fri, Oct 24, 2014 at 04:44:28AM +, yoshihiro shimoda wrote:
 Hi Simon-san,
 
  On Wed, Oct 08, 2014 at 03:24:28PM +0900, Yoshihiro Shimoda wrote:
This series is based on Simon's renesas.git branch and
   renesas-devel-20141007-v3.17 tag. If we use the generic phy driver for
   R-Car Gen2 (drivers/phy/phy-rcar-gen2.c), we can use the USB3.0 on
   lager.
  
   Yoshihiro Shimoda (2):
 ARM: shmobile: r8a7790: add USB3.0 device node
 ARM: shmobile: lager: enable USB3.0
  
arch/arm/boot/dts/r8a7790-lager.dts |6 ++
arch/arm/boot/dts/r8a7790.dtsi  |   10 ++
2 files changed, 16 insertions(+)
  
  Hi Shimoda-san,
  
  could you update me on the status of this patch.
  Should I queue it up?
 
 Yes.
 So, should I rebase this patch serias on the current your repository?

Yes, please rebase it on renesas-devel-20141024-v3.18-rc1
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: shmobile: add USB3.0 device node on r8a7791

2014-10-23 Thread Simon Horman
On Fri, Oct 24, 2014 at 04:43:55AM +, yoshihiro shimoda wrote:
 Hi Simon-san,
 
  On Wed, Oct 08, 2014 at 03:27:55PM +0900, Yoshihiro Shimoda wrote:
   (2014/10/08 15:24), Yoshihiro Shimoda wrote:
 This patch is based on Simon's renesas.git branch and
renesas-devel-20141007-v3.17 tag.
Since koelsch and henninger doesn't have a USB3.0 connector, I
submit a patch for r8a7791.dtsi only.
   
Yoshihiro Shimoda (1):
  ARM: shmobile: r8a7791: add USB3.0 device node
   
 arch/arm/boot/dts/r8a7791.dtsi |   10 ++
 1 file changed, 10 insertions(+)
   
  
   Oops, this patch means [PATCH 0/1]...
   Also the [PATCH] ARM: shmobile: r8a7791: add USB3.0 device node
   email means [PATCH 1/1].
  
  Hi Shimoda-san,
  
  could you update me on the status of this patch.
  Should I queue it up?
 
 Yes.
 So, should I rebase this patch on the current your repository?

Yes, please rebase it on renesas-devel-20141024-v3.18-rc1

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 0/2] Add HS-USB device tree support for R8A7790/Lager board

2014-10-23 Thread Simon Horman
On Wed, Oct 08, 2014 at 11:53:11PM +0400, Sergei Shtylyov wrote:
 Hello.
 
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
 'renesas-devel-20141007-v3.17' tag. Here we add the HS-USB device tree support
 on the R8A7790/Lager reference board. The patchset requires the USB PHY
 driver (already merged by Kishon and Greg) and the generic PHY support patches
 for the HS-USB driver posted by Yoshihiro Shimoda in order to work...
 
 [1/2] ARM: shmobile: r8a7790: add HS-USB device node
 [2/2] ARM: shmobile: lager: enable HS-USB

Now that v3.18-rc1 is present in my devel branch should I queue-up
these patches? If so, please rebase them on renesas-devel-20141024-v3.18-rc1
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] ARM: shmobile: add USB3.0 device node on r8a7790

2014-10-26 Thread Simon Horman
On Fri, Oct 24, 2014 at 07:41:45PM +0900, Yoshihiro Shimoda wrote:
  This series is based on Simon's renesas.git branch and
 renesas-devel-20141024-v3.18-rc1 tag. If we use the generic phy
 driver for R-Car Gen2 (drivers/phy/phy-rcar-gen2.c), we can use
 the USB3.0 on lager.

Thanks, I have queued these up.

 
 Changes from v1:
  - rebase the repository.
 
 Yoshihiro Shimoda (2):
   ARM: shmobile: r8a7790: add USB3.0 device node
   ARM: shmobile: lager: enable USB3.0
 
  arch/arm/boot/dts/r8a7790-lager.dts |6 ++
  arch/arm/boot/dts/r8a7790.dtsi  |   10 ++
  2 files changed, 16 insertions(+)
 
 -- 
 1.7.9.5
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-sh in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 0/2] Add HS-USB device tree support for R8A7790/Lager board

2014-10-26 Thread Simon Horman
On Fri, Oct 24, 2014 at 07:44:32PM +0900, Yoshihiro Shimoda wrote:
 Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
 'renesas-devel-20141024-v3.18-rc1' tag. Here we add the HS-USB device tree
 support on the R8A7790/Lager reference board. The patchset requires the USB 
 PHY
 driver (already merged by Kishon and Greg) and the generic PHY support patches
 for the HS-USB driver posted by Yoshihiro Shimoda in order to work...

Thanks, I have queued these up.

 
 Changes from v4:
  - rebase the repository.
 
 Yoshihiro Shimoda (2):
   ARM: shmobile: r8a7790: add HS-USB device node
   ARM: shmobile: lager: enable HS-USB
 
  arch/arm/boot/dts/r8a7790-lager.dts |   12 
  arch/arm/boot/dts/r8a7790.dtsi  |   11 +++
  2 files changed, 23 insertions(+)
 
 -- 
 1.7.9.5
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/1] ARM: shmobile: add USB3.0 device node on r8a7791

2014-10-26 Thread Simon Horman
On Fri, Oct 24, 2014 at 07:43:01PM +0900, Yoshihiro Shimoda wrote:
  This patch is based on Simon's renesas.git branch and
 renesas-devel-20141024-v3.18-rc1 tag.
 Since koelsch and henninger doesn't have a USB3.0 connector,
 I submit a patch for r8a7791.dtsi only.

Thanks, I have queued this up.

 
 Changes from v1:
  - rebase the repository.
 
 Yoshihiro Shimoda (1):
   ARM: shmobile: r8a7791: add USB3.0 device node
 
  arch/arm/boot/dts/r8a7791.dtsi |   10 ++
  1 file changed, 10 insertions(+)
 
 -- 
 1.7.9.5
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 0/3] HS-USB device tree support for R8A7791/Koelsch/Henninger board

2014-10-26 Thread Simon Horman
On Fri, Oct 24, 2014 at 07:45:05PM +0900, Yoshihiro Shimoda wrote:
Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
 'renesas-devel-20141024-v3.18-rc1' tag. Here we add the HS-USB device tree
 support on the R8A7791/Koelsch/Henninger reference boards. The patchset
 requires the USB PHY driver (already merged by Kishon and Greg) and the
 generic PHY support patches for the HS-USB driver posted by Yoshihiro Shimoda
 in order to work...
 
 Changes from v3:
  - rebase the repository.

Thanks, I have queued these up.

 
 Yoshihiro Shimoda (3):
   ARM: shmobile: r8a7791: add HS-USB device node
   ARM: shmobile: koelsch: enable HS-USB
   ARM: shmobile: henninger: enable HS-USB
 
  arch/arm/boot/dts/r8a7791-henninger.dts |7 +++
  arch/arm/boot/dts/r8a7791-koelsch.dts   |7 +++
  arch/arm/boot/dts/r8a7791.dtsi  |   11 +++
  3 files changed, 25 insertions(+)
 
 -- 
 1.7.9.5
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/2] ARM: shmobile: lager: enable USB3.0

2014-10-29 Thread Simon Horman
On Wed, Oct 29, 2014 at 08:19:30PM +0900, Yoshihiro Shimoda wrote:
 Hi Magnus-san,
 
 (2014/10/29 15:53), Magnus Damm wrote:
  On Fri, Oct 24, 2014 at 7:41 PM, Yoshihiro Shimoda
  yoshihiro.shimoda...@renesas.com wrote:
  Since the PHY of USB3.0 and EHCI/OHCI ch2 are the same, the USB3.0
  driver cannot use the phy driver when the EHCI/OHCI ch2 already used it:
 
  phy phy-e6590100.usb-phy.3: phy init failed -- -16
  xhci-hcd: probe of ee00.usb failed with error -16
 
  If so, we have to unbind the EHCI/OHCI ch2, and then we have to bind
  the USB3.0 driver as the following:
 
echo :02:02.0  /sys/bus/pci/drivers/ehci-pci/unbind
echo :02:01.0  /sys/bus/pci/drivers/ohci-pci/unbind
echo ee00.usb  /sys/bus/platform/drivers/xhci-hcd/bind
 
  Note that there will be pinctrl-related error messages if both
  internal PCI and USB3.0 are enabled but they should be just ignored:
 
  sh-pfc e606.pfc: pin GP_5_22 already requested by ee0d.pci; cannot 
  claim for ee00.usb
  sh-pfc e606.pfc: pin-182 (ee00.usb) status -22
  ata1: SATA link down (SStatus 0 SControl 300)
  sh-pfc e606.pfc: could not request pin 182 (GP_5_22) from group usb2  
  on device sh-pfc
 
  Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
  ---
   arch/arm/boot/dts/r8a7790-lager.dts |6 ++
   1 file changed, 6 insertions(+)
  
  Hi Shimoda-san,
  
  Thanks for your patch. I'm fine with this patch as a first step, but
  I'm wondering what the reason is to prioritize USB 2.0 over USB 3.0?
 
 I investigated this reason today, and I found the reason is
 request_firmware().  I checked the following environments:
 
  Case 1: xHCI and EHCI and OHCI are enabled =y Case 2: xHCI and EHCI
  and OHCI are loadable modules =m Case 3: xHCI and EHCI and OHCI are
  enabled =y, and CONFIG_EXTRA_FIRMWARE is enabled
 
 The results are: - In Case 1, EHCI and OHCI are probed first because
 xHCI didn't find the firmware.  - In Case 2 and Case 3, xHCI is
 probed first.
 
  Is the current order just based on device init order? In my mind the
  expected behavior would be to always use USB 3.0 if it happens to be
  available in the hardware, specified in the DTS, enabled by the kernel
  configuration and firmware is loadable. Or does some case exist where
  it is better to use USB 2.0? I suspect no.
 
 I agree with you.
 
  So I wonder if you have any plans how to make USB 3.0 enabled by
  default on Lager?
 
 It depends on a kernel config. I'm not sure of the shmobile_defconfig
 strategy.  But, in my opinion, one of a solution is kernel modules (this
 means the Case 2.)

It sounds like we should enable CONFIG_EXTRA_FIRMWARE in
shmobile_defconfig. I wonder what if any fallout we can foresee occurring
if we do that.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/2] ARM: shmobile: lager: enable USB3.0

2014-10-30 Thread Simon Horman
On Fri, Oct 31, 2014 at 02:06:14AM +, yoshihiro shimoda wrote:
 Hi Simon-san,
 
  On Wed, Oct 29, 2014 at 08:19:30PM +0900, Yoshihiro Shimoda wrote:
   Hi Magnus-san,
  
   (2014/10/29 15:53), Magnus Damm wrote:
  snip 
   
Hi Shimoda-san,
   
Thanks for your patch. I'm fine with this patch as a first step, but
I'm wondering what the reason is to prioritize USB 2.0 over USB 3.0?
  
   I investigated this reason today, and I found the reason is
   request_firmware().  I checked the following environments:
  
   Case 1: xHCI and EHCI and OHCI are enabled =y
   Case 2: xHCI and EHCI and OHCI are loadable modules =m
   Case 3: xHCI and EHCI and OHCI are enabled =y,
   and CONFIG_EXTRA_FIRMWARE is enabled
  
   The results are:
   - In Case 1, EHCI and OHCI are probed first because xHCI didn't find 
   the firmware. 
   - In Case 2 and Case 3, xHCI is probed first.
  
Is the current order just based on device init order? In my mind the
expected behavior would be to always use USB 3.0 if it happens to be
available in the hardware, specified in the DTS, enabled by the
kernel configuration and firmware is loadable. Or does some case
exist where it is better to use USB 2.0? I suspect no.
  
   I agree with you.
  
So I wonder if you have any plans how to make USB 3.0 enabled by
default on Lager?
  
   It depends on a kernel config. I'm not sure of the shmobile_defconfig
   strategy.  But, in my opinion, one of a solution is kernel modules
   (this means the Case 2.)
  
  It sounds like we should enable CONFIG_EXTRA_FIRMWARE in 
  shmobile_defconfig. I wonder what if any fallout we can foresee
  occurring if we do that.
 
 According to the firmware/README.AddingFirmware, we are unable to add a new 
 firmware image to the firmware directory now.
 So, if we enable CONFIG_EXTRA_FIRMWARE with the xHCI firmware, we will not 
 build kernel because the xHCI firmware doesn't exist in the linux.git.
 
 === from  firmware/README.AddingFirmware =
 This directory is _NOT_ for adding arbitrary new firmware images. The
 place to add those is the separate linux-firmware repository:
 
 git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
 ==

Thanks. It seems that EXTRA_FIRMWARE is not an option from
a mainline point of view after all.

Is the problem in case 1 that the firmware can't be found because
userspace does exist yet and thus can't be loaded from there?
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/2] ARM: shmobile: lager: enable USB3.0

2014-11-03 Thread Simon Horman
On Fri, Oct 31, 2014 at 01:22:22PM +, yoshihiro shimoda wrote:
 Hi Simon-san,
 
  On Fri, Oct 31, 2014 at 02:06:14AM +, yoshihiro shimoda wrote:
   Hi Simon-san,
  
On Wed, Oct 29, 2014 at 08:19:30PM +0900, Yoshihiro Shimoda wrote:
 Hi Magnus-san,

 (2014/10/29 15:53), Magnus Damm wrote:
snip 
 
  Hi Shimoda-san,
 
  Thanks for your patch. I'm fine with this patch as a first step,
  but I'm wondering what the reason is to prioritize USB 2.0 over USB 
  3.0?

 I investigated this reason today, and I found the reason is
 request_firmware().  I checked the following environments:

 Case 1: xHCI and EHCI and OHCI are enabled =y
 Case 2: xHCI and EHCI and OHCI are loadable modules =m
 Case 3: xHCI and EHCI and OHCI are enabled =y,
 and CONFIG_EXTRA_FIRMWARE is enabled

 The results are:
 - In Case 1, EHCI and OHCI are probed first because xHCI didn't 
 find the firmware.
 - In Case 2 and Case 3, xHCI is probed first.

  Is the current order just based on device init order? In my mind
  the expected behavior would be to always use USB 3.0 if it
  happens to be available in the hardware, specified in the DTS,
  enabled by the kernel configuration and firmware is loadable. Or
  does some case exist where it is better to use USB 2.0? I suspect 
  no.

 I agree with you.

  So I wonder if you have any plans how to make USB 3.0 enabled by
  default on Lager?

 It depends on a kernel config. I'm not sure of the
 shmobile_defconfig strategy.  But, in my opinion, one of a
 solution is kernel modules (this means the Case 2.)
   
It sounds like we should enable CONFIG_EXTRA_FIRMWARE in
shmobile_defconfig. I wonder what if any fallout we can foresee 
occurring if we do that.
  
   According to the firmware/README.AddingFirmware, we are unable to add a 
   new firmware image to the firmware directory
  now.
   So, if we enable CONFIG_EXTRA_FIRMWARE with the xHCI firmware, we will 
   not build kernel because the xHCI firmware doesn't
  exist in the linux.git.
  
   === from  firmware/README.AddingFirmware
   =
   This directory is _NOT_ for adding arbitrary new firmware images. The
   place to add those is the separate linux-firmware repository:
  
  
   git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.
   git
   ==
   
  
  Thanks. It seems that EXTRA_FIRMWARE is not an option from a mainline point 
  of view after all.
  
  Is the problem in case 1 that the firmware can't be found because userspace 
  does exist yet and thus can't be loaded from
  there?
 
 That's correct.
 If EXTRA_FIRMWARE is not set, the following error happens:
 
 xhci-hcd ee00.usb: Direct firmware load for r8a779x_usb3_v1.dlmem failed 
 with error -2
 xhci-hcd ee00.usb: can't setup: -2
 xhci-hcd ee00.usb: USB bus 1 deregistered
 xhci-hcd: probe of ee00.usb failed with error -2

At the risk of adding noise to this discussion:
It seems like case 2 with a fallback to case 3 is the way to go.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] usb: renesas_usbhs: add support for requesting DT DMA

2015-01-29 Thread Simon Horman
Hi Shimoda-san,

On Mon, Jan 19, 2015 at 12:53:17PM +0900, Yoshihiro Shimoda wrote:
 This patch adds dma_request_slave_channel_reason() calling to request
 dma slave channels for multiplatform environment.
 
 Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
 ---
  .../devicetree/bindings/usb/renesas_usbhs.txt  |2 ++
  drivers/usb/renesas_usbhs/fifo.c   |   11 ++-
  2 files changed, 12 insertions(+), 1 deletion(-)

I have observed what appears to be a regression caused by this
patch when booting a kernel built using shmobile_defconfig on the koelsch
and lager boards.

I noticed this problem while testing next-20150129.

I have provided boot logs at the end of this email.

 
 diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
 b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
 index b08c903..61b045b 100644
 --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
 +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
 @@ -14,6 +14,8 @@ Optional properties:
function should be enabled
- phys: phandle + phy specifier pair
- phy-names: must be usb
 +  - dmas: Must contain a list of references to DMA specifiers.
 +  - dma-names : Must contain a list of DMA names, tx or rx.
  
  Example:
   usbhs: usb@e659 {
 diff --git a/drivers/usb/renesas_usbhs/fifo.c 
 b/drivers/usb/renesas_usbhs/fifo.c
 index 48e31b9..4c086b1 100644
 --- a/drivers/usb/renesas_usbhs/fifo.c
 +++ b/drivers/usb/renesas_usbhs/fifo.c
 @@ -1069,12 +1069,21 @@ static void usbhsf_dma_init_pdev(struct usbhs_fifo 
 *fifo)
   fifo-rx_slave);
  }
  
 +static void usbhsf_dma_init_dt(struct device *dev, struct usbhs_fifo *fifo)
 +{
 + fifo-tx_chan = dma_request_slave_channel_reason(dev, tx);
 + fifo-rx_chan = dma_request_slave_channel_reason(dev, rx);
 +}
 +
  static void usbhsf_dma_init(struct usbhs_priv *priv,
   struct usbhs_fifo *fifo)
  {
   struct device *dev = usbhs_priv_to_dev(priv);
  
 - usbhsf_dma_init_pdev(fifo);
 + if (dev-of_node)
 + usbhsf_dma_init_dt(dev, fifo);
 + else
 + usbhsf_dma_init_pdev(fifo);
  
   if (fifo-tx_chan || fifo-rx_chan)
   dev_dbg(dev, enable DMAEngine (%s%s%s)\n,


Koelsch
---

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 3.19.0-rc5-00129-gabd2dbf 
(ho...@ayumi.isobedori.kobe.vergenet.net) (gcc version 4.6.3 (GCC) ) #959 SMP 
Thu Jan 29 20:40:07 JST 2015
CPU: ARMv7 Processor [413fc0f2] revision 2 (ARMv7), cr=10c5307d
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
Machine model: Koelsch
Ignoring memory block 0x2 - 0x24000
debug: ignoring loglevel setting.
Memory policy: Data cache writealloc
On node 0 totalpages: 262144
free_area_init_node: node 0, pgdat c0612a80, node_mem_map eeff9000
  Normal zone: 1520 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 194560 pages, LIFO batch:31
  HighMem zone: 67584 pages, LIFO batch:15
PERCPU: Embedded 7 pages/cpu @eefca000 s7552 r0 d21120 u32768
pcpu-alloc: s7552 r0 d21120 u32768 alloc=8*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
Kernel command line: ignore_loglevel rw root=/dev/nfs ip=dhcp
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1032964K/1048576K available (4524K kernel code, 264K rwdata, 1128K 
rodata, 268K init, 191K bss, 15612K reserved, 0K cma-reserved, 270336K highmem)
Virtual kernel memory layout:
vector  : 0x - 0x1000   (   4 kB)
fixmap  : 0xffc0 - 0xfff0   (3072 kB)
vmalloc : 0xf000 - 0xff00   ( 240 MB)
lowmem  : 0xc000 - 0xef80   ( 760 MB)
pkmap   : 0xbfe0 - 0xc000   (   2 MB)
  .text : 0xc0008000 - 0xc058e024   (5657 kB)
  .init : 0xc058f000 - 0xc05d2000   ( 268 kB)
  .data : 0xc05d2000 - 0xc06143a0   ( 265 kB)
   .bss : 0xc06143a0 - 0xc064407c   ( 192 kB)
Hierarchical RCU implementation.
RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
Architected cp15 timer(s) running at 10.00MHz (virt).
sched_clock: 56 bits at 10MHz, resolution 100ns, wraps every 3435973836800ns
Switching to timer-based delay loop, resolution 100ns
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 
20.00 BogoMIPS (lpj=10)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: update cpu_capacity 1024
CPU0: thread -1, cpu 0, socket 0, mpidr 8000
Setting 

Re: [PATCH 0/2] ARM: shmobile: r8a7790: add for USB-DMAC

2015-02-09 Thread Simon Horman
On Mon, Feb 09, 2015 at 08:41:18AM +, yoshihiro shimoda wrote:
  Subject: [PATCH 0/2] ARM: shmobile: r8a7790: add for USB-DMAC
 
 Oops, I mistook this subject of cover-letter.
 However, actual patches are correct.

Thanks,

I think it would be best if you resubmitted this series, which is for the
r8a7791, and the other similar series for the r8a7790 once the relevant
driver changes have been accepted by their subsystem maintainer.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()

2015-01-30 Thread Simon Horman
On Fri, Jan 30, 2015 at 03:58:23PM +0900, Yoshihiro Shimoda wrote:
 This patch fixes an issue that the following commit causes NULL
 pointer dereference in dma_release_channel().
  usb: renesas_usbhs: add support for requesting DT DMA
  (commit id abd2dbf6bb1b5f3a03a8c76b1a8879da1dd30caa)
 
 The usbhsf_dma_init_dt() should set fifo-{t,r}x_chan to NULL if
 dma_request_slave_channel_reason() returns IS_ERR value.
 Otherwise, usbhsf_dma_quit() will call dma_release_channel(), and then
 NULL pointer dereference happens.
 
 Reported-by: Simon Horman ho...@verge.net.au
 Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com

I have tested this on the lager and koelsch boards using
shmobile_defconfig and next-20150129 as a base. The environment
where I originally observed the problem.

Tested-by: Simon Horman horms+rene...@verge.net.au

 ---
 This patch is based on Felipe's usb.git / testing/next branch.
 (commit id =7db3990cb707ff91cd6507d53a0a730afe97)
 
  drivers/usb/renesas_usbhs/fifo.c |4 
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/usb/renesas_usbhs/fifo.c 
 b/drivers/usb/renesas_usbhs/fifo.c
 index 4c086b1..d891bff 100644
 --- a/drivers/usb/renesas_usbhs/fifo.c
 +++ b/drivers/usb/renesas_usbhs/fifo.c
 @@ -1072,7 +1072,11 @@ static void usbhsf_dma_init_pdev(struct usbhs_fifo 
 *fifo)
  static void usbhsf_dma_init_dt(struct device *dev, struct usbhs_fifo *fifo)
  {
   fifo-tx_chan = dma_request_slave_channel_reason(dev, tx);
 + if (IS_ERR(fifo-tx_chan))
 + fifo-tx_chan = NULL;
   fifo-rx_chan = dma_request_slave_channel_reason(dev, rx);
 + if (IS_ERR(fifo-rx_chan))
 + fifo-rx_chan = NULL;
  }
  
  static void usbhsf_dma_init(struct usbhs_priv *priv,
 -- 
 1.7.9.5
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/2] usb: renesas_usbhs: Change USBHS_TYPE_R8A779x to USBHS_TYPE_RCAR_GEN2

2015-05-18 Thread Simon Horman
On Mon, May 18, 2015 at 08:04:14PM +0900, Yoshihiro Shimoda wrote:
 Since the HSUSB controllers of R-Car Gen2 are the same specification
 (they have 16 pipes and usb-dmac), this patch changes USBHS_TYPE_R8A7790
 and USBHS_TYPE_R8A7791 to USBHS_TYPE_RCAR_GEN2.
 
 Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com

Acked-by: Simon Horman horms+rene...@verge.net.au
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] arm: koelsch: make USB0 perform Host/Function switching

2015-07-02 Thread Simon Horman
Hi Phil,

when you re-spin this patch could you change the prefix to the following?

ARM: shmobile: koelsch:

Thanks
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: renesas_usbhs: avoid uninitialized variable use

2015-05-24 Thread Simon Horman
On Fri, May 22, 2015 at 11:33:57AM +, Yoshihiro Shimoda wrote:
 Hi Arnd,
 
  Sent: Friday, May 22, 2015 8:07 PM
  
  After the renesas_usbhs driver is enabled in ARM multi_v7_defconfig,
  we now get a new warning:
  
  renesas_usbhs/mod.c: In function 'usbhs_interrupt':
  renesas_usbhs/mod.c:246:7: warning: 'intenb1' may be used uninitialized in 
  this function [-Wmaybe-uninitialized]
  
  gcc correctly points to a problem here, for the case that the
  device is in host mode, we use the intenb1 variable without
  having assigned it first. The state-intsts1 has a similar
  problem, but gcc cannot know that.
  
  This avoids the problem by initializing both sides of the
  comparison to zero when we don't read them from the respective
  registers.
  
  Signed-off-by: Arnd Bergmann a...@arndb.de
  Fixes: 88a25e02f3 (usb: renesas_usbhs: Add access control for INTSTS1 and 
  INTENB1 register)
 
 Thank you very much for the patch!
 
 Acked-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com
 
 (I'm not sure why a toolchain I used (Linaro GCC 2014.11) doesn't show this 
 warning...)
 
 Best regards,
 Yoshihiro Shimoda

Reviewed-by: Simon Horman horms+rene...@verge.net.au

 
  diff --git a/drivers/usb/renesas_usbhs/mod.c 
  b/drivers/usb/renesas_usbhs/mod.c
  index e5ce6e6d4f51..d4be5d594896 100644
  --- a/drivers/usb/renesas_usbhs/mod.c
  +++ b/drivers/usb/renesas_usbhs/mod.c
  @@ -223,6 +223,8 @@ static int usbhs_status_get_each_irq(struct usbhs_priv 
  *priv,
  if (usbhs_mod_is_host(priv)) {
  state-intsts1 = usbhs_read(priv, INTSTS1);
  intenb1 = usbhs_read(priv, INTENB1);
  +   } else {
  +   state-intsts1 = intenb1 = 0;
  }
  
  /* mask */
  
  --
  To unsubscribe from this list: send the line unsubscribe linux-usb in
  the body of a message to majord...@vger.kernel.org
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] usb: renesas_usbhs: add fallback compatibility string

2015-12-07 Thread Simon Horman
On Tue, Dec 08, 2015 at 06:05:51AM +, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > Add fallback compatibility string.
> > This is in keeping with the fallback scheme being adopted wherever
> > appropriate for drivers for Renesas SoCs.
> > 
> > Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
> > ---
> (snip)
> > +   {
> > +   .compatible = "renesas,usbhs",
> > +   .data = (void *)USBHS_TYPE_RCAR_GEN2,
> > +   },
> > { },
> >  };
> 
> I think this is too much. This driver is used not only from R-Car Gen2.
> It will work as normal mode if .data was 0.
> see usbhs_parse_dt()

Are you suggesting that we remove USBHS_TYPE_RCAR_GEN2 from the driver?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: phy: Remove unused Renesas R-Car (Gen1) USB PHY driveer

2015-12-06 Thread Simon Horman
On Fri, Dec 04, 2015 at 05:04:25PM +0100, Geert Uytterhoeven wrote:
> As of commit 3d7608e4c169af03 ("ARM: shmobile: bockw: remove legacy
> board file and config"), the Renesas R-Car (Gen1) USB PHY driver is no
> longer used.
> In theory it could still be used on R-Car Gen1 SoCs, but that would
> require adding DT support to the driver. Instead, a new driver using the
> generic PHY framework should be written, as was done for R-Car Gen2.
> 
> Remove the driver for good.
> 
> Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>

There is a typo in the subject, but that aside:

Acked-by: Simon Horman <horms+rene...@verge.net.au>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] usb: renesas_usbhs: add fallback compatibility string

2015-12-08 Thread Simon Horman
On Tue, Dec 08, 2015 at 05:35:28PM +0300, Sergei Shtylyov wrote:
> On 12/08/2015 08:51 AM, Simon Horman wrote:
> 
> >Add fallback compatibility string.
> >This is in keeping with the fallback scheme being adopted wherever
> >appropriate for drivers for Renesas SoCs.
> >
> >Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
> >---
> >  Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 4 ++--
> >  drivers/usb/renesas_usbhs/common.c  | 4 
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> >
> >diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
> >b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >index 7d48f63db44e..8c50df8441c9 100644
> >--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >@@ -1,7 +1,7 @@
> >  Renesas Electronics USBHS driver
> >
> >  Required properties:
> >-  - compatible: Must contain one of the following:
> >+  - compatible: "renesas,usbhs-", "renesas,rcar-usbhs" as fallback.
> > - "renesas,usbhs-r8a7790"
> > - "renesas,usbhs-r8a7791"
> > - "renesas,usbhs-r8a7794"
> [...]
> >diff --git a/drivers/usb/renesas_usbhs/common.c 
> >b/drivers/usb/renesas_usbhs/common.c
> >index d82fa36c3465..2a9d4f405f30 100644
> >--- a/drivers/usb/renesas_usbhs/common.c
> >+++ b/drivers/usb/renesas_usbhs/common.c
> >@@ -481,6 +481,10 @@ static const struct of_device_id usbhs_of_match[] = {
> > .compatible = "renesas,usbhs-r8a7795",
> > .data = (void *)USBHS_TYPE_RCAR_GEN2,
> > },
> >+{
> >+.compatible = "renesas,usbhs",
> 
>You just documented "renesas,rcar-usbhs".

Thanks. I meant to use "renesas,rcar-usbhs" throughout the patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] usb: renesas_usbhs: add fallback compatibility string

2015-12-08 Thread Simon Horman
On Tue, Dec 08, 2015 at 08:32:49AM +, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > > Add fallback compatibility string.
> > > > This is in keeping with the fallback scheme being adopted wherever
> > > > appropriate for drivers for Renesas SoCs.
> > > > 
> > > > Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
> > > > ---
> > > (snip)
> > > > +   {
> > > > +   .compatible = "renesas,usbhs",
> > > > +   .data = (void *)USBHS_TYPE_RCAR_GEN2,
> > > > +   },
> > > > { },
> > > >  };
> > > 
> > > I think this is too much. This driver is used not only from R-Car Gen2.
> > > It will work as normal mode if .data was 0.
> > > see usbhs_parse_dt()
> > 
> > Are you suggesting that we remove USBHS_TYPE_RCAR_GEN2 from the driver?
> 
> I mean this
> 
> + {
> + .compatible = "renesas,usbhs",
> + },

(As Sergei noted elsewhere, "renesas,rcar-usbhs" is consistent
 with what I documented elsewhere in the patch)

My understanding is that will cause the driver to operate in a different manner
to if USBHS_TYPE_RCAR_GEN2 was set. And thus meaning
of the generic and SoC-specifc compatibility strings will cause
the driver to operate differently.

Currently the only compat strings present are as follows:

* renesas,usbhs-r8a7790
* renesas,usbhs-r8a7791
* renesas,usbhs-r8a7794
* renesas,usbhs-r8a7795

And they all set USBHS_TYPE_RCAR_GEN2 (even though r8a7795 is a Gen3 SoC).

What I am aiming is either:
* A compatibility string for R-Car or;
* Two compatibility strings, one for R-Car Gen2 and one for R-Car Gen3

And for this new compatibility string or strings to operate the same
way as the current compatibility strings.


Looking over the driver its not clear to me why the
non-USBHS_TYPE_RCAR_GEN2 case is handled by the code as
there are no compatibility strings present that trigger that mode of
operation. I feel that I must be missing something.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] usb: renesas_usbhs: add fallback compatibility string

2015-12-08 Thread Simon Horman
On Wed, Dec 09, 2015 at 06:29:07AM +, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > > (As Sergei noted elsewhere, "renesas,rcar-usbhs" is consistent
> > > >  with what I documented elsewhere in the patch)
> > > 
> > > "renesas,rcar-usbhs" is better,
> > > but I guess you want to have "renesas,rcar-gen2-usbhs" ?
> > > 
> > > My understanding is these
> > > 
> > >  * renesas,usbhs-r8a77xx  # SoC specific
> > >  * renesas,rcar-usbhs # R-Car common
> > >  * renesas,rcar-gen2-usbhs# R-Car Gen2 common
> > >  * renesas,rcar-gen3-usbhs# R-Car Gen3 common
> > >  * renesas,usbhs  # Renesas USBHS common
> > > 
> > 
> > I was intentionally including gen3 as well. So I think we have two options:
> > 
> > 1. renesas,rcar-usbhs
> > 2. renesas,rcar-gen2-usbhs and renesas,rcar-gen3-usbhs
> 
> Renesas USB always have pick feature/settings.
> Thus, generic name (= "renesas,rcar-usbhs") is very risky IMO.
> I think 2 is more safety.

Sure, better safe than sorry.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] usb: renesas_usbhs: add fallback compatibility string

2015-12-08 Thread Simon Horman
On Wed, Dec 09, 2015 at 04:48:47AM +, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > (As Sergei noted elsewhere, "renesas,rcar-usbhs" is consistent
> >  with what I documented elsewhere in the patch)
> 
> "renesas,rcar-usbhs" is better,
> but I guess you want to have "renesas,rcar-gen2-usbhs" ?
> 
> My understanding is these
> 
>  * renesas,usbhs-r8a77xx  # SoC specific
>  * renesas,rcar-usbhs # R-Car common
>  * renesas,rcar-gen2-usbhs# R-Car Gen2 common
>  * renesas,rcar-gen3-usbhs# R-Car Gen3 common
>  * renesas,usbhs  # Renesas USBHS common
> 

I was intentionally including gen3 as well. So I think we have two options:

1. renesas,rcar-usbhs
2. renesas,rcar-gen2-usbhs and renesas,rcar-gen3-usbhs

Which do you prefer?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] usb: renesas_usbhs: More compat strings

2015-12-07 Thread Simon Horman
Hi,

this short series adds generic, and soc-specific r8a7792 and r8a7793 compat
strings to the Renesas USBHS driver. The intention is to provide a complete
set of compat strings for known R-Car SoCs.

Simon Horman (2):
  usb: renesas_usbhs: add fallback compatibility string
  usb: renesas_usbhs: add device tree support for r8a779[23]

 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 14 --
 drivers/usb/renesas_usbhs/common.c  |  4 
 2 files changed, 12 insertions(+), 6 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] usb: renesas_usbhs: add fallback compatibility string

2015-12-07 Thread Simon Horman
Add fallback compatibility string.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 4 ++--
 drivers/usb/renesas_usbhs/common.c  | 4 
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 7d48f63db44e..8c50df8441c9 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -1,7 +1,7 @@
 Renesas Electronics USBHS driver
 
 Required properties:
-  - compatible: Must contain one of the following:
+  - compatible: "renesas,usbhs-", "renesas,rcar-usbhs" as fallback.
- "renesas,usbhs-r8a7790"
- "renesas,usbhs-r8a7791"
- "renesas,usbhs-r8a7794"
@@ -22,7 +22,7 @@ Optional properties:
 
 Example:
usbhs: usb@e659 {
-   compatible = "renesas,usbhs-r8a7790";
+   compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
reg = <0 0xe659 0 0x100>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
clocks = <_clks R8A7790_CLK_HSUSB>;
diff --git a/drivers/usb/renesas_usbhs/common.c 
b/drivers/usb/renesas_usbhs/common.c
index d82fa36c3465..2a9d4f405f30 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -481,6 +481,10 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,usbhs-r8a7795",
.data = (void *)USBHS_TYPE_RCAR_GEN2,
},
+   {
+   .compatible = "renesas,usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] usb: renesas_usbhs: add device tree support for r8a779[23]

2015-12-07 Thread Simon Horman
Simply document new compatibility string.
As a previous patch adds a generic R-Car Gen2 compatibility string
there appears to be no need for a driver updates.

Also add names for SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 8c50df8441c9..b31f036d2171 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,12 @@ Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: "renesas,usbhs-", "renesas,rcar-usbhs" as fallback.
-   - "renesas,usbhs-r8a7790"
-   - "renesas,usbhs-r8a7791"
-   - "renesas,usbhs-r8a7794"
-   - "renesas,usbhs-r8a7795"
+   - "renesas,usbhs-r8a7790" (R-Car H2)
+   - "renesas,usbhs-r8a7791" (R-Car M2-W)
+   - "renesas,usbhs-r8a7792" (R-Car V2H)
+   - "renesas,usbhs-r8a7793" (R-Car M2-N)
+   - "renesas,usbhs-r8a7794" (R-Car E2)
+   - "renesas,usbhs-r8a7795" (R-Car H3)
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/2] usb: renesas_usbhs: More compat strings

2015-12-09 Thread Simon Horman
Hi,

this short series adds generic, and soc-specific r8a7792 and r8a7793 compat
strings to the Renesas USBHS driver. The intention is to provide a complete
set of compat strings for known R-Car SoCs.

Changes since v1:
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.

*** BLURB HERE ***

Simon Horman (2):
  usb: renesas_usbhs: add fallback compatibility strings
  usb: renesas_usbhs: add device tree support for r8a779[23]

 .../devicetree/bindings/usb/renesas_usbhs.txt| 20 +++-
 drivers/usb/renesas_usbhs/common.c   |  9 +
 2 files changed, 24 insertions(+), 5 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/2] usb: renesas_usbhs: add device tree support for r8a779[23]

2015-12-09 Thread Simon Horman
Simply document new compatibility string.
As a previous patch adds a generic R-Car Gen2 compatibility string
there appears to be no need for a driver updates.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
Acked-by: Rob Herring <r...@kernel.org>
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index b959059826cd..efb3199a2a80 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -5,6 +5,8 @@ Required properties:
 
- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+   - "renesas,usbhs-r8a7792" for r8a7792 (R-Car V2H) compatible device
+   - "renesas,usbhs-r8a7793" for r8a7793 (R-Car M2-N) compatible device
- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatibile device
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/2] usb: renesas_usbhs: add fallback compatibility strings

2015-12-09 Thread Simon Horman
Add fallback compatibility strings for R-Car Gen2 and Gen3.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Also add SoC names.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
v2
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.
---
 .../devicetree/bindings/usb/renesas_usbhs.txt  | 18 +-
 drivers/usb/renesas_usbhs/common.c |  9 +
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 7d48f63db44e..b959059826cd 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: Must contain one of the following:
-   - "renesas,usbhs-r8a7790"
-   - "renesas,usbhs-r8a7791"
-   - "renesas,usbhs-r8a7794"
-   - "renesas,usbhs-r8a7795"
+
+   - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
+   - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+   - "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
+   - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
+   - "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatibile device
+   - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatibile device
+
+   When compatible with the generic version, nodes must list the
+   SoC-specific version corresponding to the platform first followed
+   by the generic version.
+
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
@@ -22,7 +30,7 @@ Optional properties:
 
 Example:
usbhs: usb@e659 {
-   compatible = "renesas,usbhs-r8a7790";
+   compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
reg = <0 0xe659 0 0x100>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
clocks = <_clks R8A7790_CLK_HSUSB>;
diff --git a/drivers/usb/renesas_usbhs/common.c 
b/drivers/usb/renesas_usbhs/common.c
index d82fa36c3465..db9a17bd8997 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -481,6 +481,15 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,usbhs-r8a7795",
.data = (void *)USBHS_TYPE_RCAR_GEN2,
},
+   {
+   .compatible = "renesas,rcar-gen2-usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
+   {
+   /* Gen3 is compatible with Gen2 */
+   .compatible = "renesas,rcar-gen3-usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 2/3] usb: renesas_usbhs: add fallback compatibility strings

2015-12-14 Thread Simon Horman
On Fri, Dec 11, 2015 at 03:24:27PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 12/11/2015 5:12 AM, Simon Horman wrote:
> 
> >Add fallback compatibility strings for R-Car Gen2 and Gen3.
> >This is in keeping with the fallback scheme being adopted wherever
> >appropriate for drivers for Renesas SoCs.
> >
> >Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
> >---
> >v3
> >* Moved documentation of SoC names to a separate patch
> >* Use correct fallback compatibility string in example
> >
> >v2
> >* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
> >   a single compatibility string for all of R-Car.
> >---
> >  Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 +-
> >  drivers/usb/renesas_usbhs/common.c  |  9 +
> >  2 files changed, 18 insertions(+), 1 deletion(-)
> >
> >diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
> >b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >index a14c0bb561d5..c55cf77006d0 100644
> >--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >@@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
> >
> >  Required properties:
> >- compatible: Must contain one of the following:
> 
>Really?

Would "...one or more of the following" help?

> >+
> > - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
> > - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
> > - "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
> > - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
> >+- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
> >+- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
> >+
> >+When compatible with the generic version, nodes must list the
> >+SoC-specific version corresponding to the platform first followed
> >+by the generic version.
> >+
> 
>This kinda contradicts the above claim.
> 
> [...]
> 
> MBR, Sergei
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 0/3] usb: renesas_usbhs: More compat strings

2015-12-15 Thread Simon Horman

Hi,

this short series adds generic, and soc-specific r8a7792 and r8a7793 compat
strings to the Renesas USBHS driver. The intention is to provide a complete
set of compat strings for known R-Car SoCs.

Changes since v3:
* State that one or more compat string should be used

Changes since v2:
* Split documentation of SoC names into separate patch
* Use correct fallback compatibility string in example

Changes since v1:
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
a single compatibility string for all of R-Car.

Simon Horman (3):
  usb: renesas_usbhs: add SoC names to compatibility string
documentation
  usb: renesas_usbhs: add fallback compatibility strings
  usb: renesas_usbhs: add device tree support for r8a779[23]

 .../devicetree/bindings/usb/renesas_usbhs.txt  | 22 --
 drivers/usb/renesas_usbhs/common.c |  9 +
 2 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 2/3] usb: renesas_usbhs: add fallback compatibility strings

2015-12-15 Thread Simon Horman
Add fallback compatibility strings for R-Car Gen2 and Gen3.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
Acked-by: Kuninori Morimoto <kuninori.morimoto...@renesas.com>
---
v4
* State that one or more compat string should be used

v3
* Moved documentation of SoC names to a separate patch
* Use correct fallback compatibility string in example

v2
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 12 ++--
 drivers/usb/renesas_usbhs/common.c  |  9 +
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index a14c0bb561d5..45d9ae13ffa3 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -1,11 +1,19 @@
 Renesas Electronics USBHS driver
 
 Required properties:
-  - compatible: Must contain one of the following:
+  - compatible: Must contain one or more of the following:
+
- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
+   - "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
+   - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
+
+   When compatible with the generic version, nodes must list the
+   SoC-specific version corresponding to the platform first followed
+   by the generic version.
+
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
@@ -22,7 +30,7 @@ Optional properties:
 
 Example:
usbhs: usb@e659 {
-   compatible = "renesas,usbhs-r8a7790";
+   compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";
reg = <0 0xe659 0 0x100>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
clocks = <_clks R8A7790_CLK_HSUSB>;
diff --git a/drivers/usb/renesas_usbhs/common.c 
b/drivers/usb/renesas_usbhs/common.c
index d82fa36c3465..db9a17bd8997 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -481,6 +481,15 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,usbhs-r8a7795",
.data = (void *)USBHS_TYPE_RCAR_GEN2,
},
+   {
+   .compatible = "renesas,rcar-gen2-usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
+   {
+   /* Gen3 is compatible with Gen2 */
+   .compatible = "renesas,rcar-gen3-usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 3/3] usb: renesas_usbhs: add device tree support for r8a779[23]

2015-12-15 Thread Simon Horman
Simply document new compatibility string.
As a previous patch adds a generic R-Car Gen2 compatibility string
there appears to be no need for a driver updates.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
Acked-by: Rob Herring <r...@kernel.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto...@renesas.com>
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 45d9ae13ffa3..b6040563e51a 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -5,6 +5,8 @@ Required properties:
 
- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+   - "renesas,usbhs-r8a7792" for r8a7792 (R-Car V2H) compatible device
+   - "renesas,usbhs-r8a7793" for r8a7793 (R-Car M2-N) compatible device
- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 1/3] usb: renesas_usbhs: add SoC names to compatibility string documentation

2015-12-15 Thread Simon Horman
This extends the documentation of compatibility strings a little to
include the SoC names.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
Acked-by: Kuninori Morimoto <kuninori.morimoto...@renesas.com>

---
v3
* Split into separate patch
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 7d48f63db44e..a14c0bb561d5 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,10 @@ Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: Must contain one of the following:
-   - "renesas,usbhs-r8a7790"
-   - "renesas,usbhs-r8a7791"
-   - "renesas,usbhs-r8a7794"
-   - "renesas,usbhs-r8a7795"
+   - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
+   - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+   - "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
+   - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/2] usb: renesas_usbhs: add fallback compatibility strings

2015-12-10 Thread Simon Horman
On Thu, Dec 10, 2015 at 07:28:06AM +, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> Thank you for your patch
> 
> > Add fallback compatibility strings for R-Car Gen2 and Gen3.
> > This is in keeping with the fallback scheme being adopted wherever
> > appropriate for drivers for Renesas SoCs.
> > 
> > Also add SoC names.
> > 
> > Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
> > ---
> (snip)
> >  Required properties:
> >- compatible: Must contain one of the following:
> > -   - "renesas,usbhs-r8a7790"
> > -   - "renesas,usbhs-r8a7791"
> > -   - "renesas,usbhs-r8a7794"
> > -   - "renesas,usbhs-r8a7795"
> > +
> > +   - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
> > +   - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
> > +   - "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
> > +   - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
> > +   - "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatibile device
> > +   - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatibile device
> > +
> > +   When compatible with the generic version, nodes must list the
> > +   SoC-specific version corresponding to the platform first followed
> > +   by the generic version.
> 
> I think these can be separated ?
> 
>  1. document update for "renesas,usbhs-r8a77xx"
>  2. add new "rcar-genX" (this patch)

Sure, will do.

> >  Example:
> > usbhs: usb@e659 {
> > -   compatible = "renesas,usbhs-r8a7790";
> > +   compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
> 
> I think you want
> 
>  -compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
>  +compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";

Thanks, I will fix that.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 3/3] usb: renesas_usbhs: add device tree support for r8a779[23]

2015-12-10 Thread Simon Horman
Simply document new compatibility string.
As a previous patch adds a generic R-Car Gen2 compatibility string
there appears to be no need for a driver updates.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
Acked-by: Rob Herring <r...@kernel.org>
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index c55cf77006d0..471a0649e63e 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -5,6 +5,8 @@ Required properties:
 
- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+   - "renesas,usbhs-r8a7792" for r8a7792 (R-Car V2H) compatible device
+   - "renesas,usbhs-r8a7793" for r8a7793 (R-Car M2-N) compatible device
- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 0/3] usb: renesas_usbhs: More compat strings

2015-12-10 Thread Simon Horman
Hi,

this short series adds generic, and soc-specific r8a7792 and r8a7793 compat
strings to the Renesas USBHS driver. The intention is to provide a complete
set of compat strings for known R-Car SoCs.

Changes since v2:
* Split documentation of SoC names into separate patch
* Use correct fallback compatibility string in example

Changes since v1:
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.

Simon Horman (3):
  usb: renesas_usbhs: add SoC names to compatibility string
documentation
  usb: renesas_usbhs: add fallback compatibility strings
  usb: renesas_usbhs: add device tree support for r8a779[23]

 .../devicetree/bindings/usb/renesas_usbhs.txt| 20 +++-
 drivers/usb/renesas_usbhs/common.c   |  9 +
 2 files changed, 24 insertions(+), 5 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 2/3] usb: renesas_usbhs: add fallback compatibility strings

2015-12-10 Thread Simon Horman
Add fallback compatibility strings for R-Car Gen2 and Gen3.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
v3
* Moved documentation of SoC names to a separate patch
* Use correct fallback compatibility string in example

v2
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 +-
 drivers/usb/renesas_usbhs/common.c  |  9 +
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index a14c0bb561d5..c55cf77006d0 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: Must contain one of the following:
+
- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
+   - "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
+   - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
+
+   When compatible with the generic version, nodes must list the
+   SoC-specific version corresponding to the platform first followed
+   by the generic version.
+
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
@@ -22,7 +30,7 @@ Optional properties:
 
 Example:
usbhs: usb@e659 {
-   compatible = "renesas,usbhs-r8a7790";
+   compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";
reg = <0 0xe659 0 0x100>;
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
clocks = <_clks R8A7790_CLK_HSUSB>;
diff --git a/drivers/usb/renesas_usbhs/common.c 
b/drivers/usb/renesas_usbhs/common.c
index d82fa36c3465..db9a17bd8997 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -481,6 +481,15 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,usbhs-r8a7795",
.data = (void *)USBHS_TYPE_RCAR_GEN2,
},
+   {
+   .compatible = "renesas,rcar-gen2-usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
+   {
+   /* Gen3 is compatible with Gen2 */
+   .compatible = "renesas,rcar-gen3-usbhs",
+   .data = (void *)USBHS_TYPE_RCAR_GEN2,
+   },
{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 1/3] usb: renesas_usbhs: add SoC names to compatibility string documentation

2015-12-10 Thread Simon Horman
This extends the documentation of compatibility strings a little to
include the SoC names.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
v3
* Split into separate patch
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 7d48f63db44e..a14c0bb561d5 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,10 @@ Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: Must contain one of the following:
-   - "renesas,usbhs-r8a7790"
-   - "renesas,usbhs-r8a7791"
-   - "renesas,usbhs-r8a7794"
-   - "renesas,usbhs-r8a7795"
+   - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
+   - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+   - "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
+   - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 2/3] usb: renesas_usbhs: add fallback compatibility strings

2015-12-10 Thread Simon Horman
On Thu, Dec 10, 2015 at 09:56:24PM -0600, Rob Herring wrote:
> On Fri, Dec 11, 2015 at 11:12:26AM +0900, Simon Horman wrote:
> > Add fallback compatibility strings for R-Car Gen2 and Gen3.
> > This is in keeping with the fallback scheme being adopted wherever
> > appropriate for drivers for Renesas SoCs.
> > 
> > Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
> 
> Binding looks okay, but one possible typo.
> 
> Acked-by: Rob Herring <r...@kernel.org>
> 
> > --- a/drivers/usb/renesas_usbhs/common.c
> > +++ b/drivers/usb/renesas_usbhs/common.c
> > @@ -481,6 +481,15 @@ static const struct of_device_id usbhs_of_match[] = {
> > .compatible = "renesas,usbhs-r8a7795",
> > .data = (void *)USBHS_TYPE_RCAR_GEN2,
> > },
> > +   {
> > +   .compatible = "renesas,rcar-gen2-usbhs",
> > +   .data = (void *)USBHS_TYPE_RCAR_GEN2,
> > +   },
> > +   {
> > +   /* Gen3 is compatible with Gen2 */
> > +   .compatible = "renesas,rcar-gen3-usbhs",
> > +   .data = (void *)USBHS_TYPE_RCAR_GEN2,
> 
> This supposed to be GEN3?

Confusingly the symbol is called GEN2 as it was there for Gen 2
before Gen 3 came along and (so far) Gen 3 is compatible with Gen 2.

I'd be happy to change the name but I think that would be best
as an incremental change on top of this one.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] usb: Use ARCH_RENESAS

2016-02-18 Thread Simon Horman
Hi,

this short series makes use of of ARCH_RENESAS in place of ARCH_SHMOBILE.

This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.

Simon Horman (2):
  usb: renesas_usbhs: Use ARCH_RENESAS
  usb: host: xhci-rcar: Use ARCH_RENESAS

 drivers/usb/host/Kconfig  | 2 +-
 drivers/usb/renesas_usbhs/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] usb: renesas_usbhs: Use ARCH_RENESAS

2016-02-18 Thread Simon Horman
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.

This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
 drivers/usb/renesas_usbhs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/renesas_usbhs/Kconfig 
b/drivers/usb/renesas_usbhs/Kconfig
index ebc99ee076ce..b26d7c339c05 100644
--- a/drivers/usb/renesas_usbhs/Kconfig
+++ b/drivers/usb/renesas_usbhs/Kconfig
@@ -5,7 +5,7 @@
 config USB_RENESAS_USBHS
tristate 'Renesas USBHS controller'
depends on USB_GADGET
-   depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
+   depends on ARCH_RENESAS || SUPERH || COMPILE_TEST
depends on EXTCON || !EXTCON # if EXTCON=m, USBHS cannot be built-in
default n
help
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] usb: host: xhci-rcar: Use ARCH_RENESAS

2016-02-18 Thread Simon Horman
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.

This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
 drivers/usb/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 438dcf6289b0..ed9a90f601e8 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -64,7 +64,7 @@ config USB_XHCI_MVEBU
 config USB_XHCI_RCAR
tristate "xHCI support for Renesas R-Car SoCs"
select USB_XHCI_PLATFORM
-   depends on ARCH_SHMOBILE || COMPILE_TEST
+   depends on ARCH_RENESAS || COMPILE_TEST
---help---
  Say 'Y' to enable the support for the xHCI host controller
  found in Renesas R-Car ARM SoCs.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: gadget: renesas_usb3: Use ARCH_RENESAS

2016-03-01 Thread Simon Horman
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.

This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.

Signed-off-by: Simon Horman <horms+rene...@verge.net.au>
---
 drivers/usb/gadget/udc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 Based on usb-gadget/next

diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
index ff4f8a6735d6..7c289416f87d 100644
--- a/drivers/usb/gadget/udc/Kconfig
+++ b/drivers/usb/gadget/udc/Kconfig
@@ -176,7 +176,7 @@ config USB_RENESAS_USBHS_UDC
 
 config USB_RENESAS_USB3
tristate 'Renesas USB3.0 Peripheral controller'
-   depends on ARCH_SHMOBILE || COMPILE_TEST
+   depends on ARCH_RENESAS || COMPILE_TEST
help
   Renesas USB3.0 Peripheral controller is a USB peripheral controller
   that supports super, high, and full speed USB 3.0 data transfers.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper

2017-10-05 Thread Simon Horman
On Wed, Oct 04, 2017 at 02:25:03PM +0200, Geert Uytterhoeven wrote:
> Use the of_device_get_match_data() helper instead of open coding.
> 
> Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>

Reviewed-by: Simon Horman <horms+rene...@verge.net.au>


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper

2017-10-05 Thread Simon Horman
On Wed, Oct 04, 2017 at 02:26:48PM +0200, Geert Uytterhoeven wrote:
> Use the of_device_get_match_data() helper instead of open coding.
> 
> Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>

Reviewed-by: Simon Horman <horms+rene...@verge.net.au>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: gadget: udc: renesas_usb3: Use of_device_get_match_data() helper

2017-10-05 Thread Simon Horman
On Wed, Oct 04, 2017 at 02:23:31PM +0200, Geert Uytterhoeven wrote:
> Use the of_device_get_match_data() helper instead of open coding,
> postponing the matching until when it's really needed.
> Note that the renesas_usb3 driver is used with DT only, so there's
> always a valid match.
> 
> Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>

Reviewed-by: Simon Horman <horms+rene...@verge.net.au>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper

2017-10-06 Thread Simon Horman
On Thu, Oct 05, 2017 at 01:12:01PM +0300, Mathias Nyman wrote:
> On 05.10.2017 12:19, Simon Horman wrote:
> >On Wed, Oct 04, 2017 at 02:25:03PM +0200, Geert Uytterhoeven wrote:
> >>Use the of_device_get_match_data() helper instead of open coding.
> >>
> >>Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>
> >
> >Reviewed-by: Simon Horman <horms+rene...@verge.net.au>
> >
> >
> 
> Thanks, I already applied and sent forward before this new reviewed-by tag

Thanks, sorry for not noticing that.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] dt-bindings: usb-xhci: Document r8a7743 support

2017-10-17 Thread Simon Horman
On Mon, Oct 16, 2017 at 11:12:48AM +0100, Biju Das wrote:
> From: Fabrizio Castro <fabrizio.cas...@bp.renesas.com>
> 
> Document r8a7743 xhci support. The driver will use the fallback
> compatible string "renesas,rcar-gen2-xhci", therefore no driver
> change is needed.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.cas...@bp.renesas.com>

Reviewed-by: Simon Horman <horms+rene...@verge.net.au>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] usb: renesas_usbhs: Add compatible string for r8a7743/5

2017-10-09 Thread Simon Horman
On Fri, Oct 06, 2017 at 05:49:34PM +0100, Biju Das wrote:
> This patch adds support for r8a7743/5 SoCs. The Renesas RZ/G1[ME]
> (R8A7743/5) usbhs is identical to the R-Car Gen2 family.
> 
> No driver change is needed due to the fallback compatible value
> "renesas,rcar-gen2-usbhs".
> Adding the SoC-specific compatible values here has two purposes:
>   1. Document which SoCs have this hardware module,
>   2. Allow checkpatch to validate compatible values.

3. Allow the driver to support SoC specific implementations in future
   as necessary.

Acked-by: Simon Horman <horms+rene...@verge.net.au>

> Signed-off-by: Biju Das <biju@bp.renesas.com>
> Signed-off-by: Chris Paterson <chris.paters...@renesas.com>
> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be>
> ---
> v1-->v2
>* Modified the patch description
>* Rebased on the below R-Car D3 patch
>  https://patchwork.kernel.org/patch/9982267/
> 
> This patch is tested against Linux next tag next-20170929 +
>   https://patchwork.kernel.org/patch/9982267/
> 
>  Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt 
> b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> index e79f6e4..47394ab 100644
> --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> @@ -3,6 +3,8 @@ Renesas Electronics USBHS driver
>  Required properties:
>- compatible: Must contain one or more of the following:
>  
> + - "renesas,usbhs-r8a7743" for r8a7743 (RZ/G1M) compatible device
> + - "renesas,usbhs-r8a7745" for r8a7745 (RZ/G1E) compatible device
>   - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
>   - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
>   - "renesas,usbhs-r8a7792" for r8a7792 (R-Car V2H) compatible device
> @@ -11,7 +13,7 @@ Required properties:
>   - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
>   - "renesas,usbhs-r8a7796" for r8a7796 (R-Car M3-W) compatible device
>   - "renesas,usbhs-r8a77995" for r8a77995 (R-Car D3) compatible device
> - - "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
> + - "renesas,rcar-gen2-usbhs" for R-Car Gen2 or RZ/G1 compatible devices
>   - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
>  
>   When compatible with the generic version, nodes must list the
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ARM: dts: r8a7743: Add xhci support to SoC dtsi

2017-10-17 Thread Simon Horman
On Tue, Oct 17, 2017 at 01:39:33AM +, Yoshihiro Shimoda wrote:
> Hi Biju-san,
> 
> IIUC, when we submitted a patch for dts[i] file,
> we don't need to submit such a patch to usb maintainers.
> 
> > From: Biju Das, Sent: Monday, October 16, 2017 7:13 PM
> > 
> > From: Fabrizio Castro 
> > 
> > Add node for xhci. Boards DT files will enable it if needed.
> > 
> > Signed-off-by: Fabrizio Castro 
> > ---
> >  arch/arm/boot/dts/r8a7743.dtsi | 20 
> >  1 file changed, 20 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
> > index 699c040..386bf07 100644
> > --- a/arch/arm/boot/dts/r8a7743.dtsi
> > +++ b/arch/arm/boot/dts/r8a7743.dtsi
> > @@ -931,6 +931,26 @@
> > status = "disabled";
> > };
> > 
> > +   /*
> > +* pci1 and xhci share the same phy, therefore only one of them
> > +* can be active at any one time. If both of them are enabled,
> > +* a race condition will determine who'll control the phy.
> > +* A firmware file is needed by the xhci driver in order for
> > +* USB 3.0 to work properly.
> > +*/
> > +   xhci: usb@ee00 {
> > +   compatible = "renesas,xhci-r8a7743",
> > +"renesas,rcar-gen2-xhci";
> > +   reg = <0 0xee00 0 0xc00>;
> > +   interrupts = ;
> > +   clocks = < CPG_MOD 328>;
> > +   power-domains = < R8A7743_PD_ALWAYS_ON>;
> > +   resets = < 328>;
> > +   phys = < 1>;
> > +   phy-names = "usb";
> > +   status = "disabled";
> > +   };
> > +
> > sdhi0: sd@ee10 {
> > compatible = "renesas,sdhi-r8a7743";
> > reg = <0 0xee10 0 0x328>;
> 
> It seems good to me. So,
> 
> Reviewed-by: Yoshihiro Shimoda 

Thanks, applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 5/6] usb: gadget: udc: renesas_usb3: should fail if devm_phy_get() returns error

2018-05-15 Thread Simon Horman
On Tue, Apr 10, 2018 at 02:38:53PM +0900, Yoshihiro Shimoda wrote:
> This patch fixes an issue that this driver ignores errors other than
> the non-existence of the device, f.e. a memory allocation failure
> in devm_phy_get(). So, this patch replaces devm_phy_get() with
> devm_phy_optional_get().
> 
> Reported-by: Simon Horman <horms+rene...@verge.net.au>
> Fixes: 279d4bc64060 ("usb: gadget: udc: renesas_usb3: add support for generic 
> phy")
> Cc: <sta...@vger.kernel.org> # v4.15+
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>

Reviewed-by: Simon Horman <horms+rene...@verge.net.au>

> ---
> Remarks:
>  - A new file in v2
> 
>  drivers/usb/gadget/udc/renesas_usb3.c | 8 +---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/renesas_usb3.c 
> b/drivers/usb/gadget/udc/renesas_usb3.c
> index 233bc04..0e70163 100644
> --- a/drivers/usb/gadget/udc/renesas_usb3.c
> +++ b/drivers/usb/gadget/udc/renesas_usb3.c
> @@ -2636,9 +2636,11 @@ static int renesas_usb3_probe(struct platform_device 
> *pdev)
>* This is optional. So, if this driver cannot get a phy,
>* this driver will not handle a phy anymore.
>*/
> - usb3->phy = devm_phy_get(>dev, "usb");
> - if (IS_ERR(usb3->phy))
> - usb3->phy = NULL;
> + usb3->phy = devm_phy_optional_get(>dev, "usb");
> + if (IS_ERR(usb3->phy)) {
> + ret = PTR_ERR(usb3->phy);
> + goto err_add_udc;
> + }
>  
>   pm_runtime_enable(>dev);
>   ret = usb_add_gadget_udc(>dev, >gadget);
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 6/6] usb: gadget: udc: renesas_usb3: disable the controller's irqs for reconnecting

2018-05-15 Thread Simon Horman
On Tue, Apr 10, 2018 at 02:38:54PM +0900, Yoshihiro Shimoda wrote:
> This patch fixes an issue that reconnection is possible to fail
> because unexpected state handling happens by the irqs. To fix the issue,
> the driver disables the controller's irqs when disconnected.
> 
> Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas 
> USB3.0 peripheral controller")
> Cc:  # v4.5+
> Signed-off-by: Yoshihiro Shimoda 
> ---
> 
> Remarks:
>  - A new file in v2
> 
>  drivers/usb/gadget/udc/renesas_usb3.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/usb/gadget/udc/renesas_usb3.c 
> b/drivers/usb/gadget/udc/renesas_usb3.c
> index 0e70163..5caf78b 100644
> --- a/drivers/usb/gadget/udc/renesas_usb3.c
> +++ b/drivers/usb/gadget/udc/renesas_usb3.c
> @@ -623,6 +623,13 @@ static void usb3_disconnect(struct renesas_usb3 *usb3)
>   usb3_usb2_pullup(usb3, 0);
>   usb3_clear_bit(usb3, USB30_CON_B3_CONNECT, USB3_USB30_CON);
>   usb3_reset_epc(usb3);
> + usb3_disable_irq_1(usb3, USB_INT_1_B2_RSUM | USB_INT_1_B3_PLLWKUP |
> +USB_INT_1_B3_LUPSUCS | USB_INT_1_B3_DISABLE |
> +USB_INT_1_SPEED | USB_INT_1_B3_WRMRST |
> +USB_INT_1_B3_HOTRST | USB_INT_1_B2_SPND |
> +USB_INT_1_B2_L1SPND | USB_INT_1_B2_USBRST);

Hi Shimoda-san,

is it intentional that USB_INT_1_VBUS_CNG is not disabled above?

> + usb3_clear_bit(usb3, USB_COM_CON_SPD_MODE, USB3_USB_COM_CON);
> + usb3_init_epc_registers(usb3);
>  
>   if (usb3->driver)
>   usb3->driver->disconnect(>gadget);
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 6/6] usb: gadget: udc: renesas_usb3: disable the controller's irqs for reconnecting

2018-05-15 Thread Simon Horman
On Tue, May 15, 2018 at 07:49:44AM +, Yoshihiro Shimoda wrote:
> Hi Simon-san,
> 
> Thank you for your review!
> 
> > From: Simon Horman, Sent: Tuesday, May 15, 2018 4:35 PM
> > 
> > On Tue, Apr 10, 2018 at 02:38:54PM +0900, Yoshihiro Shimoda wrote:
> > > This patch fixes an issue that reconnection is possible to fail
> > > because unexpected state handling happens by the irqs. To fix the issue,
> > > the driver disables the controller's irqs when disconnected.
> > >
> > > Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas 
> > > USB3.0 peripheral controller")
> > > Cc: <sta...@vger.kernel.org> # v4.5+
> > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
> > > ---
> > >
> > > Remarks:
> > >  - A new file in v2
> > >
> > >  drivers/usb/gadget/udc/renesas_usb3.c | 7 +++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/drivers/usb/gadget/udc/renesas_usb3.c 
> > > b/drivers/usb/gadget/udc/renesas_usb3.c
> > > index 0e70163..5caf78b 100644
> > > --- a/drivers/usb/gadget/udc/renesas_usb3.c
> > > +++ b/drivers/usb/gadget/udc/renesas_usb3.c
> > > @@ -623,6 +623,13 @@ static void usb3_disconnect(struct renesas_usb3 
> > > *usb3)
> > >   usb3_usb2_pullup(usb3, 0);
> > >   usb3_clear_bit(usb3, USB30_CON_B3_CONNECT, USB3_USB30_CON);
> > >   usb3_reset_epc(usb3);
> > > + usb3_disable_irq_1(usb3, USB_INT_1_B2_RSUM | USB_INT_1_B3_PLLWKUP |
> > > +USB_INT_1_B3_LUPSUCS | USB_INT_1_B3_DISABLE |
> > > +USB_INT_1_SPEED | USB_INT_1_B3_WRMRST |
> > > +USB_INT_1_B3_HOTRST | USB_INT_1_B2_SPND |
> > > +USB_INT_1_B2_L1SPND | USB_INT_1_B2_USBRST);
> > 
> > Hi Shimoda-san,
> > 
> > is it intentional that USB_INT_1_VBUS_CNG is not disabled above?
> 
> Yes, because the USB_INT_1_VBUS_CNG is enabled in usb3_init_epc_registers() 
> below.

Thanks for the clarification,

Reviewed-by: Simon Horman <horms+rene...@verge.net.au>

> 
> > > + usb3_clear_bit(usb3, USB_COM_CON_SPD_MODE, USB3_USB_COM_CON);
> > > + usb3_init_epc_registers(usb3);
> 
> Best regards,
> Yoshihiro Shimoda
> 
> > >   if (usb3->driver)
> > >   usb3->driver->disconnect(>gadget);
> > > --
> > > 1.9.1
> > >
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >