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

2013-04-22 Thread Sergei Shtylyov

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.



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-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 v5 1/9] ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 code

2013-04-21 Thread Sergei Shtylyov

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.


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-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


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

2013-04-19 Thread Sergei Shtylyov
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
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

---
Changes since version 4:
- resolved reject in the 'board-marzen.c' file, refreshed the patch.

Changes since version 3:
- refreshed the 'board-marzen.c' file.

Changes since version 2:
- added a note about testing to the changelog;
- added ACKs from Simon Horman and Kuninori Morimoto.

Changes since the original posting:
- added a note about bisectability to the changelog.

 arch/arm/mach-shmobile/board-marzen.c |  178 -
 arch/arm/mach-shmobile/include/mach/r8a7779.h |1 
 arch/arm/mach-shmobile/setup-r8a7779.c|  185 +-
 3 files changed, 184 insertions(+), 180 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
@@ -37,10 +37,6 @@
 #include linux/mmc/host.h
 #include linux/mmc/sh_mobile_sdhi.h
 #include linux/mfd/tmio.h
-#include linux/usb/otg.h
-#include linux/usb/ehci_pdriver.h
-#include linux/usb/ohci_pdriver.h
-#include linux/pm_runtime.h
 #include mach/hardware.h
 #include mach/r8a7779.h
 #include mach/common.h
@@ -150,26 +146,6 @@ static struct platform_device hspi_devic
.num_resources  = ARRAY_SIZE(hspi_resources),
 };
 
-/* USB PHY */
-static struct resource usb_phy_resources[] = {
-   [0] = {
-   .start  = 0xffe7,
-   .end= 0xffe70900 - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   [1] = {
-   .start  = 0xfff7,
-   .end= 0xfff70900 - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-};
-
-static struct platform_device usb_phy_device = {
-   .name   = rcar_usb_phy,
-   .resource   = usb_phy_resources,
-   .num_resources  = ARRAY_SIZE(usb_phy_resources),
-};
-
 /* LEDS */
 static struct gpio_led marzen_leds[] = {
{
@@ -205,161 +181,9 @@ static struct platform_device *marzen_de
sdhi0_device,
thermal_device,
hspi_device,
-   usb_phy_device,
leds_device,
 };
 
-/* USB */
-static struct usb_phy *phy;
-static int usb_power_on(struct platform_device *pdev)
-{
-   if (!phy)
-   return -EIO;
-
-   pm_runtime_enable(pdev-dev);
-   pm_runtime_get_sync(pdev-dev);
-
-   usb_phy_init(phy);
-
-   return 0;
-}
-
-static void usb_power_off(struct platform_device *pdev)
-{
-   if (!phy)
-   return;
-
-   usb_phy_shutdown(phy);
-
-   pm_runtime_put_sync(pdev-dev);
-   pm_runtime_disable(pdev-dev);
-}
-
-static struct usb_ehci_pdata ehcix_pdata = {
-   .power_on   = usb_power_on,
-   .power_off  = usb_power_off,
-   .power_suspend  = usb_power_off,
-};
-
-static struct resource ehci0_resources[] = {
-   [0] = {
-   .start  = 0xffe7,
-   .end= 0xffe70400 - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   [1] = {
-   .start  = gic_iid(0x4c),
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static struct platform_device ehci0_device = {
-   .name   = ehci-platform,
-   .id = 0,
-   .dev= {
-   .dma_mask   = ehci0_device.dev.coherent_dma_mask,
-   .coherent_dma_mask  = 0x,
-   .platform_data  = ehcix_pdata,
-   },
-   .num_resources  = ARRAY_SIZE(ehci0_resources),
-   .resource   = ehci0_resources,
-};
-
-static struct resource ehci1_resources[] = {
-   [0] = {
-   .start  = 0xfff7,
-   .end= 0xfff70400 - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   [1] = {
-   .start  = gic_iid(0x4d),
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static struct platform_device ehci1_device = {
-   .name   = ehci-platform,
-   .id = 1,
-   .dev= {
-   .dma_mask   = ehci1_device.dev.coherent_dma_mask,
-   .coherent_dma_mask  = 0x,
-