All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
@ 2014-06-26  5:39 Sachin Kamat
       [not found] ` <1403761178-5371-1-git-send-email-sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Sachin Kamat @ 2014-06-26  5:39 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, balbi-l0cyMroinI0,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ,
	spk.linux-Re5JQEeQqe8AvxtiuMwx3w, Kishon Vijay Abraham I

EHCI and OHCI drivers on Exynos platforms do not work without their
corresponding SoC specific phy drivers. Hence it makes no sense to
keep these phy drivers as user selectable. Instead select them from
the respective USB configs to make things easier for the end user.
While at it enable 5250 phy for Exynos 5420 SoC too.

Signed-off-by: Sachin Kamat <sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
---
 drivers/phy/Kconfig      |   37 +++++++------------------------------
 drivers/usb/host/Kconfig |   10 ++++++----
 2 files changed, 13 insertions(+), 34 deletions(-)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 16a2f067c242..7fe7ef5f1322 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -121,44 +121,21 @@ config PHY_SUN4I_USB
 	  parts, as well as the 2 regular USB 2 host PHYs.
 
 config PHY_SAMSUNG_USB2
-	tristate "Samsung USB 2.0 PHY driver"
+	tristate
 	select GENERIC_PHY
 	select MFD_SYSCON
-	help
-	  Enable this to support the Samsung USB 2.0 PHY driver for Samsung
-	  SoCs. This driver provides the interface for USB 2.0 PHY. Support for
-	  particular SoCs has to be enabled in addition to this driver. Number
-	  and type of supported phys depends on the SoC.
+	select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210
+	select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
+	select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420)
 
 config PHY_EXYNOS4210_USB2
-	bool "Support for Exynos 4210"
-	depends on PHY_SAMSUNG_USB2
-	depends on CPU_EXYNOS4210
-	help
-	  Enable USB PHY support for Exynos 4210. This option requires that
-	  Samsung USB 2.0 PHY driver is enabled and means that support for this
-	  particular SoC is compiled in the driver. In case of Exynos 4210 four
-	  phys are available - device, host, HSIC0 and HSIC1.
+	bool
 
 config PHY_EXYNOS4X12_USB2
-	bool "Support for Exynos 4x12"
-	depends on PHY_SAMSUNG_USB2
-	depends on (SOC_EXYNOS4212 || SOC_EXYNOS4412)
-	help
-	  Enable USB PHY support for Exynos 4x12. This option requires that
-	  Samsung USB 2.0 PHY driver is enabled and means that support for this
-	  particular SoC is compiled in the driver. In case of Exynos 4x12 four
-	  phys are available - device, host, HSIC0 and HSIC1.
+	bool
 
 config PHY_EXYNOS5250_USB2
-	bool "Support for Exynos 5250"
-	depends on PHY_SAMSUNG_USB2
-	depends on SOC_EXYNOS5250
-	help
-	  Enable USB PHY support for Exynos 5250. This option requires that
-	  Samsung USB 2.0 PHY driver is enabled and means that support for this
-	  particular SoC is compiled in the driver. In case of Exynos 5250 four
-	  phys are available - device, host, HSIC0 and HSIC.
+	bool
 
 config PHY_EXYNOS5_USBDRD
 	tristate "Exynos5 SoC series USB DRD PHY driver"
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 61b7817bd66b..2938807331de 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -211,10 +211,11 @@ config USB_EHCI_SH
 	  If you use the PCI EHCI controller, this option is not necessary.
 
 config USB_EHCI_EXYNOS
-       tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
-       depends on PLAT_S5P || ARCH_EXYNOS
-       help
-	Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
+	tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
+	depends on PLAT_S5P || ARCH_EXYNOS
+	select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
+	help
+	  Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
 
 config USB_EHCI_MV
 	bool "EHCI support for Marvell PXA/MMP USB controller"
@@ -520,6 +521,7 @@ config USB_OHCI_SH
 config USB_OHCI_EXYNOS
 	tristate "OHCI support for Samsung S5P/EXYNOS SoC Series"
 	depends on PLAT_S5P || ARCH_EXYNOS
+	select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
 	help
 	 Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
 
-- 
1.7.9.5

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] usb: dwc3: Kconfig: Select PHY drivers for Exynos DWC3
       [not found] ` <1403761178-5371-1-git-send-email-sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2014-06-26  5:39   ` Sachin Kamat
  2014-06-26  5:56     ` Tushar Behera
  2014-06-26  8:49   ` [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Kishon Vijay Abraham I
  1 sibling, 1 reply; 16+ messages in thread
From: Sachin Kamat @ 2014-06-26  5:39 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, balbi-l0cyMroinI0,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ,
	spk.linux-Re5JQEeQqe8AvxtiuMwx3w, Kishon Vijay Abraham I

USB DWC3 driver on Exynos platforms does not work without its
corresponding phy driver. Hence it makes no sense to keep the
phy driver as user selectable. Instead select it from USB config
to make things easier for the end user.
While at it make the config depend on ARCH_EXYNOS5 instead of
ARCH_EXYNOS as this IP is available only on Exynos5 platforms.

Signed-off-by: Sachin Kamat <sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
---
 drivers/phy/Kconfig      |    8 +-------
 drivers/usb/dwc3/Kconfig |    3 ++-
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 7fe7ef5f1322..6be353c9dc4c 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -138,15 +138,9 @@ config PHY_EXYNOS5250_USB2
 	bool
 
 config PHY_EXYNOS5_USBDRD
-	tristate "Exynos5 SoC series USB DRD PHY driver"
-	depends on ARCH_EXYNOS5 && OF
-	depends on HAS_IOMEM
+	tristate
 	select GENERIC_PHY
 	select MFD_SYSCON
-	help
-	  Enable USB DRD PHY support for Exynos 5 SoC series.
-	  This driver provides PHY interface for USB 3.0 DRD controller
-	  present on Exynos5 SoC series.
 
 config PHY_XGENE
 	tristate "APM X-Gene 15Gbps PHY support"
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index 261c3b428220..501477452ad8 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -55,7 +55,8 @@ config USB_DWC3_OMAP
 
 config USB_DWC3_EXYNOS
 	tristate "Samsung Exynos Platform"
-	depends on ARCH_EXYNOS || COMPILE_TEST
+	depends on ARCH_EXYNOS5 || COMPILE_TEST
+	select PHY_EXYNOS5_USBDRD
 	default USB_DWC3
 	help
 	  Recent Exynos5 SoCs ship with one DesignWare Core USB3 IP inside,
-- 
1.7.9.5

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-26  5:39 [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Sachin Kamat
       [not found] ` <1403761178-5371-1-git-send-email-sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2014-06-26  5:55 ` Tushar Behera
  2014-06-26  8:09 ` Vivek Gautam
  2014-06-27 15:46 ` Felipe Balbi
  3 siblings, 0 replies; 16+ messages in thread
From: Tushar Behera @ 2014-06-26  5:55 UTC (permalink / raw)
  To: Sachin Kamat, linux-usb
  Cc: linux-samsung-soc, kgene.kim, balbi, gregkh, dianders,
	gautam.vivek, spk.linux, Kishon Vijay Abraham I

On 06/26/2014 11:09 AM, Sachin Kamat wrote:
> EHCI and OHCI drivers on Exynos platforms do not work without their
> corresponding SoC specific phy drivers. Hence it makes no sense to
> keep these phy drivers as user selectable. Instead select them from
> the respective USB configs to make things easier for the end user.
> While at it enable 5250 phy for Exynos 5420 SoC too.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> ---

Reviewed-by: Tushar Behera <tushar.b@samsung.com>

>  drivers/phy/Kconfig      |   37 +++++++------------------------------
>  drivers/usb/host/Kconfig |   10 ++++++----
>  2 files changed, 13 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 16a2f067c242..7fe7ef5f1322 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -121,44 +121,21 @@ config PHY_SUN4I_USB
>  	  parts, as well as the 2 regular USB 2 host PHYs.
>  
>  config PHY_SAMSUNG_USB2
> -	tristate "Samsung USB 2.0 PHY driver"
> +	tristate
>  	select GENERIC_PHY
>  	select MFD_SYSCON
> -	help
> -	  Enable this to support the Samsung USB 2.0 PHY driver for Samsung
> -	  SoCs. This driver provides the interface for USB 2.0 PHY. Support for
> -	  particular SoCs has to be enabled in addition to this driver. Number
> -	  and type of supported phys depends on the SoC.
> +	select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210
> +	select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
> +	select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420)
>  
>  config PHY_EXYNOS4210_USB2
> -	bool "Support for Exynos 4210"
> -	depends on PHY_SAMSUNG_USB2
> -	depends on CPU_EXYNOS4210
> -	help
> -	  Enable USB PHY support for Exynos 4210. This option requires that
> -	  Samsung USB 2.0 PHY driver is enabled and means that support for this
> -	  particular SoC is compiled in the driver. In case of Exynos 4210 four
> -	  phys are available - device, host, HSIC0 and HSIC1.
> +	bool
>  
>  config PHY_EXYNOS4X12_USB2
> -	bool "Support for Exynos 4x12"
> -	depends on PHY_SAMSUNG_USB2
> -	depends on (SOC_EXYNOS4212 || SOC_EXYNOS4412)
> -	help
> -	  Enable USB PHY support for Exynos 4x12. This option requires that
> -	  Samsung USB 2.0 PHY driver is enabled and means that support for this
> -	  particular SoC is compiled in the driver. In case of Exynos 4x12 four
> -	  phys are available - device, host, HSIC0 and HSIC1.
> +	bool
>  
>  config PHY_EXYNOS5250_USB2
> -	bool "Support for Exynos 5250"
> -	depends on PHY_SAMSUNG_USB2
> -	depends on SOC_EXYNOS5250
> -	help
> -	  Enable USB PHY support for Exynos 5250. This option requires that
> -	  Samsung USB 2.0 PHY driver is enabled and means that support for this
> -	  particular SoC is compiled in the driver. In case of Exynos 5250 four
> -	  phys are available - device, host, HSIC0 and HSIC.
> +	bool
>  
>  config PHY_EXYNOS5_USBDRD
>  	tristate "Exynos5 SoC series USB DRD PHY driver"
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 61b7817bd66b..2938807331de 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -211,10 +211,11 @@ config USB_EHCI_SH
>  	  If you use the PCI EHCI controller, this option is not necessary.
>  
>  config USB_EHCI_EXYNOS
> -       tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
> -       depends on PLAT_S5P || ARCH_EXYNOS
> -       help
> -	Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
> +	tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
> +	depends on PLAT_S5P || ARCH_EXYNOS
> +	select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
> +	help
> +	  Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
>  
>  config USB_EHCI_MV
>  	bool "EHCI support for Marvell PXA/MMP USB controller"
> @@ -520,6 +521,7 @@ config USB_OHCI_SH
>  config USB_OHCI_EXYNOS
>  	tristate "OHCI support for Samsung S5P/EXYNOS SoC Series"
>  	depends on PLAT_S5P || ARCH_EXYNOS
> +	select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
>  	help
>  	 Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
>  
> 


-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] usb: dwc3: Kconfig: Select PHY drivers for Exynos DWC3
  2014-06-26  5:39   ` [PATCH 2/2] usb: dwc3: Kconfig: Select PHY drivers for Exynos DWC3 Sachin Kamat
@ 2014-06-26  5:56     ` Tushar Behera
  0 siblings, 0 replies; 16+ messages in thread
From: Tushar Behera @ 2014-06-26  5:56 UTC (permalink / raw)
  To: Sachin Kamat, linux-usb
  Cc: linux-samsung-soc, kgene.kim, balbi, gregkh, dianders,
	gautam.vivek, spk.linux, Kishon Vijay Abraham I

On 06/26/2014 11:09 AM, Sachin Kamat wrote:
> USB DWC3 driver on Exynos platforms does not work without its
> corresponding phy driver. Hence it makes no sense to keep the
> phy driver as user selectable. Instead select it from USB config
> to make things easier for the end user.
> While at it make the config depend on ARCH_EXYNOS5 instead of
> ARCH_EXYNOS as this IP is available only on Exynos5 platforms.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> ---

Reviewed-by: Tushar Behera <tushar.b@samsung.com>

>  drivers/phy/Kconfig      |    8 +-------
>  drivers/usb/dwc3/Kconfig |    3 ++-
>  2 files changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 7fe7ef5f1322..6be353c9dc4c 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -138,15 +138,9 @@ config PHY_EXYNOS5250_USB2
>  	bool
>  
>  config PHY_EXYNOS5_USBDRD
> -	tristate "Exynos5 SoC series USB DRD PHY driver"
> -	depends on ARCH_EXYNOS5 && OF
> -	depends on HAS_IOMEM
> +	tristate
>  	select GENERIC_PHY
>  	select MFD_SYSCON
> -	help
> -	  Enable USB DRD PHY support for Exynos 5 SoC series.
> -	  This driver provides PHY interface for USB 3.0 DRD controller
> -	  present on Exynos5 SoC series.
>  
>  config PHY_XGENE
>  	tristate "APM X-Gene 15Gbps PHY support"
> diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
> index 261c3b428220..501477452ad8 100644
> --- a/drivers/usb/dwc3/Kconfig
> +++ b/drivers/usb/dwc3/Kconfig
> @@ -55,7 +55,8 @@ config USB_DWC3_OMAP
>  
>  config USB_DWC3_EXYNOS
>  	tristate "Samsung Exynos Platform"
> -	depends on ARCH_EXYNOS || COMPILE_TEST
> +	depends on ARCH_EXYNOS5 || COMPILE_TEST
> +	select PHY_EXYNOS5_USBDRD
>  	default USB_DWC3
>  	help
>  	  Recent Exynos5 SoCs ship with one DesignWare Core USB3 IP inside,
> 


-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-26  5:39 [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Sachin Kamat
       [not found] ` <1403761178-5371-1-git-send-email-sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2014-06-26  5:55 ` Tushar Behera
@ 2014-06-26  8:09 ` Vivek Gautam
  2014-06-26  8:25   ` Sachin Kamat
  2014-06-27 15:46 ` Felipe Balbi
  3 siblings, 1 reply; 16+ messages in thread
From: Vivek Gautam @ 2014-06-26  8:09 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: Linux USB Mailing List, linux-samsung-soc, Kukjin Kim,
	Felipe Balbi, Greg KH, Doug Anderson, Sachin Kamat,
	Kishon Vijay Abraham I

Hi Sachin,


On Thu, Jun 26, 2014 at 11:09 AM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
> EHCI and OHCI drivers on Exynos platforms do not work without their
> corresponding SoC specific phy drivers. Hence it makes no sense to
> keep these phy drivers as user selectable. Instead select them from
> the respective USB configs to make things easier for the end user.
> While at it enable 5250 phy for Exynos 5420 SoC too.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/phy/Kconfig      |   37 +++++++------------------------------
>  drivers/usb/host/Kconfig |   10 ++++++----
>  2 files changed, 13 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 16a2f067c242..7fe7ef5f1322 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -121,44 +121,21 @@ config PHY_SUN4I_USB
>           parts, as well as the 2 regular USB 2 host PHYs.
>
>  config PHY_SAMSUNG_USB2
> -       tristate "Samsung USB 2.0 PHY driver"
> +       tristate
>         select GENERIC_PHY
>         select MFD_SYSCON
> -       help
> -         Enable this to support the Samsung USB 2.0 PHY driver for Samsung
> -         SoCs. This driver provides the interface for USB 2.0 PHY. Support for
> -         particular SoCs has to be enabled in addition to this driver. Number
> -         and type of supported phys depends on the SoC.
> +       select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210
> +       select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
> +       select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420)

also || SOC_EXYNOS5800
same controller present on Exynos5800 too.

>
>  config PHY_EXYNOS4210_USB2
> -       bool "Support for Exynos 4210"
> -       depends on PHY_SAMSUNG_USB2
> -       depends on CPU_EXYNOS4210
> -       help
> -         Enable USB PHY support for Exynos 4210. This option requires that
> -         Samsung USB 2.0 PHY driver is enabled and means that support for this
> -         particular SoC is compiled in the driver. In case of Exynos 4210 four
> -         phys are available - device, host, HSIC0 and HSIC1.
> +       bool
>
>  config PHY_EXYNOS4X12_USB2
> -       bool "Support for Exynos 4x12"
> -       depends on PHY_SAMSUNG_USB2
> -       depends on (SOC_EXYNOS4212 || SOC_EXYNOS4412)
> -       help
> -         Enable USB PHY support for Exynos 4x12. This option requires that
> -         Samsung USB 2.0 PHY driver is enabled and means that support for this
> -         particular SoC is compiled in the driver. In case of Exynos 4x12 four
> -         phys are available - device, host, HSIC0 and HSIC1.
> +       bool
>
>  config PHY_EXYNOS5250_USB2
> -       bool "Support for Exynos 5250"
> -       depends on PHY_SAMSUNG_USB2
> -       depends on SOC_EXYNOS5250
> -       help
> -         Enable USB PHY support for Exynos 5250. This option requires that
> -         Samsung USB 2.0 PHY driver is enabled and means that support for this
> -         particular SoC is compiled in the driver. In case of Exynos 5250 four
> -         phys are available - device, host, HSIC0 and HSIC.
> +       bool
>
>  config PHY_EXYNOS5_USBDRD
>         tristate "Exynos5 SoC series USB DRD PHY driver"
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 61b7817bd66b..2938807331de 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -211,10 +211,11 @@ config USB_EHCI_SH
>           If you use the PCI EHCI controller, this option is not necessary.
>
>  config USB_EHCI_EXYNOS
> -       tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
> -       depends on PLAT_S5P || ARCH_EXYNOS
> -       help
> -       Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
> +       tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
> +       depends on PLAT_S5P || ARCH_EXYNOS
> +       select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
> +       help
> +         Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
>
>  config USB_EHCI_MV
>         bool "EHCI support for Marvell PXA/MMP USB controller"
> @@ -520,6 +521,7 @@ config USB_OHCI_SH
>  config USB_OHCI_EXYNOS
>         tristate "OHCI support for Samsung S5P/EXYNOS SoC Series"
>         depends on PLAT_S5P || ARCH_EXYNOS
> +       select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
>         help
>          Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
>

rest looks fine.



-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-26  8:09 ` Vivek Gautam
@ 2014-06-26  8:25   ` Sachin Kamat
       [not found]     ` <CAK5sBcHL0f+UVFoyQT3O8m+NAv3rNjiq=aEH4xh9BV3tFbYcSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Sachin Kamat @ 2014-06-26  8:25 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: Linux USB Mailing List, linux-samsung-soc, Kukjin Kim,
	Felipe Balbi, Greg KH, Doug Anderson, Kishon Vijay Abraham I

Hi Vivek,

On Thu, Jun 26, 2014 at 1:39 PM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
> Hi Sachin,
>
>
> On Thu, Jun 26, 2014 at 11:09 AM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
>> EHCI and OHCI drivers on Exynos platforms do not work without their
>> corresponding SoC specific phy drivers. Hence it makes no sense to
>> keep these phy drivers as user selectable. Instead select them from
>> the respective USB configs to make things easier for the end user.
>> While at it enable 5250 phy for Exynos 5420 SoC too.

<snip>

>> +       select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210
>> +       select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
>> +       select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420)
>
> also || SOC_EXYNOS5800
> same controller present on Exynos5800 too.

Thanks. Will add.

<snip>

>> @@ -520,6 +521,7 @@ config USB_OHCI_SH
>>  config USB_OHCI_EXYNOS
>>         tristate "OHCI support for Samsung S5P/EXYNOS SoC Series"
>>         depends on PLAT_S5P || ARCH_EXYNOS
>> +       select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
>>         help
>>          Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
>>
>
> rest looks fine.

Thanks.
Sachin.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
       [not found] ` <1403761178-5371-1-git-send-email-sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2014-06-26  5:39   ` [PATCH 2/2] usb: dwc3: Kconfig: Select PHY drivers for Exynos DWC3 Sachin Kamat
@ 2014-06-26  8:49   ` Kishon Vijay Abraham I
  2014-06-26  9:02     ` Sachin Kamat
  1 sibling, 1 reply; 16+ messages in thread
From: Kishon Vijay Abraham I @ 2014-06-26  8:49 UTC (permalink / raw)
  To: Sachin Kamat, linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, balbi-l0cyMroinI0,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ,
	spk.linux-Re5JQEeQqe8AvxtiuMwx3w

Hi Sachin,

On Thursday 26 June 2014 11:09 AM, Sachin Kamat wrote:
> EHCI and OHCI drivers on Exynos platforms do not work without their
> corresponding SoC specific phy drivers. Hence it makes no sense to
> keep these phy drivers as user selectable. Instead select them from
> the respective USB configs to make things easier for the end user.
> While at it enable 5250 phy for Exynos 5420 SoC too.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Cc: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
> ---
>  drivers/phy/Kconfig      |   37 +++++++------------------------------
>  drivers/usb/host/Kconfig |   10 ++++++----
>  2 files changed, 13 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 16a2f067c242..7fe7ef5f1322 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig

<snip>

>  
>  config USB_EHCI_EXYNOS
> -       tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
> -       depends on PLAT_S5P || ARCH_EXYNOS
> -       help
> -	Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
> +	tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
> +	depends on PLAT_S5P || ARCH_EXYNOS
> +	select PHY_SAMSUNG_USB2 if ARCH_EXYNOS

I am skeptical to add select after the problems it created during previous
releases.
Maybe use 'default y if ARCH_EXYNOS' in PHY_SAMSUNG_USB2 Kconfig?

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
       [not found]     ` <CAK5sBcHL0f+UVFoyQT3O8m+NAv3rNjiq=aEH4xh9BV3tFbYcSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-06-26  8:53       ` Sachin Kamat
  2014-06-26  9:07         ` Vivek Gautam
  0 siblings, 1 reply; 16+ messages in thread
From: Sachin Kamat @ 2014-06-26  8:53 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: Linux USB Mailing List, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Kukjin Kim, Felipe Balbi, Greg KH, Doug Anderson,
	Kishon Vijay Abraham I

Hi Vivek,

On Thu, Jun 26, 2014 at 1:55 PM, Sachin Kamat <sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> Hi Vivek,
>
> On Thu, Jun 26, 2014 at 1:39 PM, Vivek Gautam <gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
>> Hi Sachin,
>>
>>
>> On Thu, Jun 26, 2014 at 11:09 AM, Sachin Kamat <sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
>>> EHCI and OHCI drivers on Exynos platforms do not work without their
>>> corresponding SoC specific phy drivers. Hence it makes no sense to
>>> keep these phy drivers as user selectable. Instead select them from
>>> the respective USB configs to make things easier for the end user.
>>> While at it enable 5250 phy for Exynos 5420 SoC too.
>
> <snip>
>
>>> +       select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210
>>> +       select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
>>> +       select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420)
>>
>> also || SOC_EXYNOS5800
>> same controller present on Exynos5800 too.

Just checked that SOC_EXYNOS5800 is dependent on SOC_EXYNOS5420. Hence
explicit option for SOC_EXYNOS5800 is redundant here. Will keep it as is.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-26  8:49   ` [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Kishon Vijay Abraham I
@ 2014-06-26  9:02     ` Sachin Kamat
  0 siblings, 0 replies; 16+ messages in thread
From: Sachin Kamat @ 2014-06-26  9:02 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Linux USB Mailing List, linux-samsung-soc, Kukjin Kim,
	Felipe Balbi, Greg Kroah-Hartman, Doug Anderson, Vivek Gautam

Hi Kishon,

On Thu, Jun 26, 2014 at 2:19 PM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> Hi Sachin,
>
> On Thursday 26 June 2014 11:09 AM, Sachin Kamat wrote:
>> EHCI and OHCI drivers on Exynos platforms do not work without their
>> corresponding SoC specific phy drivers. Hence it makes no sense to
>> keep these phy drivers as user selectable. Instead select them from
>> the respective USB configs to make things easier for the end user.
>> While at it enable 5250 phy for Exynos 5420 SoC too.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>>  drivers/phy/Kconfig      |   37 +++++++------------------------------
>>  drivers/usb/host/Kconfig |   10 ++++++----
>>  2 files changed, 13 insertions(+), 34 deletions(-)
>>
>> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
>> index 16a2f067c242..7fe7ef5f1322 100644
>> --- a/drivers/phy/Kconfig
>> +++ b/drivers/phy/Kconfig
>
> <snip>
>
>>
>>  config USB_EHCI_EXYNOS
>> -       tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
>> -       depends on PLAT_S5P || ARCH_EXYNOS
>> -       help
>> -     Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
>> +     tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
>> +     depends on PLAT_S5P || ARCH_EXYNOS
>> +     select PHY_SAMSUNG_USB2 if ARCH_EXYNOS
>
> I am skeptical to add select after the problems it created during previous
> releases.

If you could point me to some link/discussion about this, I could check if such
problem is applicable here. IMHO, there shouldn't be any in this case.

> Maybe use 'default y if ARCH_EXYNOS' in PHY_SAMSUNG_USB2 Kconfig?

I would prefer to use this option only if there is a strong objection
to doing it the
current way as I do not see any benefits of exposing the PHY entries
that are only
prerequisites for the USB functionality (in this case) to users.

Regards,
Sachin.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-26  8:53       ` Sachin Kamat
@ 2014-06-26  9:07         ` Vivek Gautam
  0 siblings, 0 replies; 16+ messages in thread
From: Vivek Gautam @ 2014-06-26  9:07 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: Linux USB Mailing List, linux-samsung-soc, Kukjin Kim,
	Felipe Balbi, Greg KH, Doug Anderson, Kishon Vijay Abraham I

Hi Sachin,


On Thu, Jun 26, 2014 at 2:23 PM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
> Hi Vivek,
>
> On Thu, Jun 26, 2014 at 1:55 PM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
>> Hi Vivek,
>>
>> On Thu, Jun 26, 2014 at 1:39 PM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
>>> Hi Sachin,
>>>
>>>
>>> On Thu, Jun 26, 2014 at 11:09 AM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
>>>> EHCI and OHCI drivers on Exynos platforms do not work without their
>>>> corresponding SoC specific phy drivers. Hence it makes no sense to
>>>> keep these phy drivers as user selectable. Instead select them from
>>>> the respective USB configs to make things easier for the end user.
>>>> While at it enable 5250 phy for Exynos 5420 SoC too.
>>
>> <snip>
>>
>>>> +       select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210
>>>> +       select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
>>>> +       select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420)
>>>
>>> also || SOC_EXYNOS5800
>>> same controller present on Exynos5800 too.
>
> Just checked that SOC_EXYNOS5800 is dependent on SOC_EXYNOS5420. Hence
> explicit option for SOC_EXYNOS5800 is redundant here. Will keep it as is.

Aah ! right, it's fine then. Sorry for the noise.


-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-26  5:39 [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Sachin Kamat
                   ` (2 preceding siblings ...)
  2014-06-26  8:09 ` Vivek Gautam
@ 2014-06-27 15:46 ` Felipe Balbi
  2014-06-27 15:55   ` Doug Anderson
  3 siblings, 1 reply; 16+ messages in thread
From: Felipe Balbi @ 2014-06-27 15:46 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: linux-usb, linux-samsung-soc, kgene.kim, balbi, gregkh, dianders,
	gautam.vivek, spk.linux, Kishon Vijay Abraham I

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

On Thu, Jun 26, 2014 at 11:09:37AM +0530, Sachin Kamat wrote:
> EHCI and OHCI drivers on Exynos platforms do not work without their
> corresponding SoC specific phy drivers. Hence it makes no sense to
> keep these phy drivers as user selectable. Instead select them from
> the respective USB configs to make things easier for the end user.
> While at it enable 5250 phy for Exynos 5420 SoC too.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>

no more selects, please. We've already had way too many issues because
of misused selects.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-27 15:46 ` Felipe Balbi
@ 2014-06-27 15:55   ` Doug Anderson
  2014-06-27 15:59     ` Felipe Balbi
  0 siblings, 1 reply; 16+ messages in thread
From: Doug Anderson @ 2014-06-27 15:55 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Sachin Kamat, linux-usb, linux-samsung-soc, Kukjin Kim,
	Greg Kroah-Hartman, Vivek Gautam, Sachin Kamat,
	Kishon Vijay Abraham I

Felipe,

On Fri, Jun 27, 2014 at 8:46 AM, Felipe Balbi <balbi@ti.com> wrote:
> On Thu, Jun 26, 2014 at 11:09:37AM +0530, Sachin Kamat wrote:
>> EHCI and OHCI drivers on Exynos platforms do not work without their
>> corresponding SoC specific phy drivers. Hence it makes no sense to
>> keep these phy drivers as user selectable. Instead select them from
>> the respective USB configs to make things easier for the end user.
>> While at it enable 5250 phy for Exynos 5420 SoC too.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>
> no more selects, please. We've already had way too many issues because
> of misused selects.

I'll admit to not having been involved with the previous discussions,
but this seems strange to me.  Are we throwing in the towel and
deciding that it's too hard to get the Kconfigs right and that we'll
just rely on individual users to figure out the right answer for
themselves?

Certainly the Exynos USB driver is not useful without the Exynos USB
Phy driver, so it seems awfully strange to allow the user to select
one without getting the other...  ...and if including an extra USB Phy
driver will break something then it seems like we have bigger problems
(aren't we supposed to have one kernel that works across a wide
variety of boards?)

-Doug

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-27 15:55   ` Doug Anderson
@ 2014-06-27 15:59     ` Felipe Balbi
       [not found]       ` <20140627155900.GN8069-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Felipe Balbi @ 2014-06-27 15:59 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Felipe Balbi, Sachin Kamat, linux-usb, linux-samsung-soc,
	Kukjin Kim, Greg Kroah-Hartman, Vivek Gautam, Sachin Kamat,
	Kishon Vijay Abraham I

[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]

On Fri, Jun 27, 2014 at 08:55:31AM -0700, Doug Anderson wrote:
> Felipe,
> 
> On Fri, Jun 27, 2014 at 8:46 AM, Felipe Balbi <balbi@ti.com> wrote:
> > On Thu, Jun 26, 2014 at 11:09:37AM +0530, Sachin Kamat wrote:
> >> EHCI and OHCI drivers on Exynos platforms do not work without their
> >> corresponding SoC specific phy drivers. Hence it makes no sense to
> >> keep these phy drivers as user selectable. Instead select them from
> >> the respective USB configs to make things easier for the end user.
> >> While at it enable 5250 phy for Exynos 5420 SoC too.
> >>
> >> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> >> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> >
> > no more selects, please. We've already had way too many issues because
> > of misused selects.
> 
> I'll admit to not having been involved with the previous discussions,
> but this seems strange to me.  Are we throwing in the towel and
> deciding that it's too hard to get the Kconfigs right and that we'll
> just rely on individual users to figure out the right answer for
> themselves?

no. select prevents a driver from be built as a dynamically linked
module and distro-kernels might want to enable everything as modules.

> Certainly the Exynos USB driver is not useful without the Exynos USB
> Phy driver, so it seems awfully strange to allow the user to select
> one without getting the other...  ...and if including an extra USB Phy
> driver will break something then it seems like we have bigger problems
> (aren't we supposed to have one kernel that works across a wide
> variety of boards?)

yeah, but for the kernel to "work" it doesn't depend on the PHY driver,
does it ? The USB parts of the SoC depend on the PHY, but even PHY
drivers should be allowed to be built as modules. Find another way

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
       [not found]       ` <20140627155900.GN8069-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
@ 2014-06-27 16:32         ` Doug Anderson
  2014-06-27 16:53           ` Olof Johansson
  0 siblings, 1 reply; 16+ messages in thread
From: Doug Anderson @ 2014-06-27 16:32 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Sachin Kamat, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc, Kukjin Kim, Greg Kroah-Hartman, Vivek Gautam,
	Sachin Kamat, Kishon Vijay Abraham I

Felipe,

On Fri, Jun 27, 2014 at 8:59 AM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
>> I'll admit to not having been involved with the previous discussions,
>> but this seems strange to me.  Are we throwing in the towel and
>> deciding that it's too hard to get the Kconfigs right and that we'll
>> just rely on individual users to figure out the right answer for
>> themselves?
>
> no. select prevents a driver from be built as a dynamically linked
> module and distro-kernels might want to enable everything as modules.

Ah, that's what the problem was!  I wasn't aware of this issue with
SELECT.  Sorry for the noob-ness.

Really we want the PHY to be "=y" if the USB driver is "=y" or "=m" if
the USB driver is "=m", I think.  You could argue that one might want
to build the main USB driver into the kernel but have the phy drivers
as modules, so you could possibly also try to support that...

If there's not a good way to specify that, I guess we'll just have to
use "default" and rely on the user not to purposely choose the wrong
thing.  Like the following (untested):

config PHY_SAMSUNG_USB2
  depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS
  default y if ARCH_EXYNOS=y && (USB_OHCI_EXYNOS=y || USB_EHCI_EXYNOS=y)
  default m if ARCH_EXYNOS=m && (USB_OHCI_EXYNOS=m || USB_EHCI_EXYNOS=m)
  ...

I see some syntax like that elsewhere in Kconfig so I assume it's reasonable...

With the above the user could purposely enable the OHCI or EHCI driver
and disable the PHY driver which is not really sensible.  ...but it
wouldn't cause a compile failure or crash--USB just won't work.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-27 16:32         ` Doug Anderson
@ 2014-06-27 16:53           ` Olof Johansson
  2014-06-30  8:32             ` Sachin Kamat
  0 siblings, 1 reply; 16+ messages in thread
From: Olof Johansson @ 2014-06-27 16:53 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Felipe Balbi, Sachin Kamat, linux-usb, linux-samsung-soc,
	Kukjin Kim, Greg Kroah-Hartman, Vivek Gautam, Sachin Kamat,
	Kishon Vijay Abraham I

On Fri, Jun 27, 2014 at 9:32 AM, Doug Anderson <dianders@chromium.org> wrote:
> Felipe,
>
> On Fri, Jun 27, 2014 at 8:59 AM, Felipe Balbi <balbi@ti.com> wrote:
>>> I'll admit to not having been involved with the previous discussions,
>>> but this seems strange to me.  Are we throwing in the towel and
>>> deciding that it's too hard to get the Kconfigs right and that we'll
>>> just rely on individual users to figure out the right answer for
>>> themselves?
>>
>> no. select prevents a driver from be built as a dynamically linked
>> module and distro-kernels might want to enable everything as modules.
>
> Ah, that's what the problem was!  I wasn't aware of this issue with
> SELECT.  Sorry for the noob-ness.

Select is also fragile, for example if a main subsystem isn't enabled,
the specific option will still be enabled (or there'll be a
warning/error about it). Overall it tends to cause headaches so many
maintainers are starting to push back against it.

> Really we want the PHY to be "=y" if the USB driver is "=y" or "=m" if
> the USB driver is "=m", I think.  You could argue that one might want
> to build the main USB driver into the kernel but have the phy drivers
> as modules, so you could possibly also try to support that...
>
> If there's not a good way to specify that, I guess we'll just have to
> use "default" and rely on the user not to purposely choose the wrong
> thing.  Like the following (untested):
>
> config PHY_SAMSUNG_USB2
>   depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS
>   default y if ARCH_EXYNOS=y && (USB_OHCI_EXYNOS=y || USB_EHCI_EXYNOS=y)
>   default m if ARCH_EXYNOS=m && (USB_OHCI_EXYNOS=m || USB_EHCI_EXYNOS=m)
>   ...
>
> I see some syntax like that elsewhere in Kconfig so I assume it's reasonable...

I think you can take out the test for ARCH_EXYNOS here (first of all,
it can never be modular).

I'm not sure it makes sense to work so hard to set the default right
either, as long as the dependencies are correct. I.e. it'll still mess
up randconfig if the combination doesn't build, and distros can still
downgrade to 'm' if they want to. That'll just leave:

config PHY_SAMSUNG_USB2
  tristate "foo"
  depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS
  default y     (no need to add an if since it's taken care of by the depends)

> With the above the user could purposely enable the OHCI or EHCI driver
> and disable the PHY driver which is not really sensible.  ...but it
> wouldn't cause a compile failure or crash--USB just won't work.

Just make the sub-drivers silent options with defaults. I.e:

 config PHY_EXYNOS5250_USB2
        bool SOC_EXYNOS5250
        depends on PHY_SAMSUNG_USB2

and so on. Note that it doesn't actually scale to make it depend on a
specific SoC though, so it should probably just be cut down the line
of EXYNOS4/5 and err on the side of including a bit too much code
instead.


-Olof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
  2014-06-27 16:53           ` Olof Johansson
@ 2014-06-30  8:32             ` Sachin Kamat
  0 siblings, 0 replies; 16+ messages in thread
From: Sachin Kamat @ 2014-06-30  8:32 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Doug Anderson, Felipe Balbi, linux-usb, linux-samsung-soc,
	Kukjin Kim, Greg Kroah-Hartman, Vivek Gautam,
	Kishon Vijay Abraham I

On Fri, Jun 27, 2014 at 10:23 PM, Olof Johansson <olof@lixom.net> wrote:
> On Fri, Jun 27, 2014 at 9:32 AM, Doug Anderson <dianders@chromium.org> wrote:
>> Felipe,
>>
>> On Fri, Jun 27, 2014 at 8:59 AM, Felipe Balbi <balbi@ti.com> wrote:
>>>> I'll admit to not having been involved with the previous discussions,
>>>> but this seems strange to me.  Are we throwing in the towel and
>>>> deciding that it's too hard to get the Kconfigs right and that we'll
>>>> just rely on individual users to figure out the right answer for
>>>> themselves?
>>>
>>> no. select prevents a driver from be built as a dynamically linked
>>> module and distro-kernels might want to enable everything as modules.
>>
>> Ah, that's what the problem was!  I wasn't aware of this issue with
>> SELECT.  Sorry for the noob-ness.
>
> Select is also fragile, for example if a main subsystem isn't enabled,
> the specific option will still be enabled (or there'll be a
> warning/error about it). Overall it tends to cause headaches so many
> maintainers are starting to push back against it.
>
>> Really we want the PHY to be "=y" if the USB driver is "=y" or "=m" if
>> the USB driver is "=m", I think.  You could argue that one might want
>> to build the main USB driver into the kernel but have the phy drivers
>> as modules, so you could possibly also try to support that...
>>
>> If there's not a good way to specify that, I guess we'll just have to
>> use "default" and rely on the user not to purposely choose the wrong
>> thing.  Like the following (untested):
>>
>> config PHY_SAMSUNG_USB2
>>   depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS
>>   default y if ARCH_EXYNOS=y && (USB_OHCI_EXYNOS=y || USB_EHCI_EXYNOS=y)
>>   default m if ARCH_EXYNOS=m && (USB_OHCI_EXYNOS=m || USB_EHCI_EXYNOS=m)
>>   ...
>>
>> I see some syntax like that elsewhere in Kconfig so I assume it's reasonable...
>
> I think you can take out the test for ARCH_EXYNOS here (first of all,
> it can never be modular).
>
> I'm not sure it makes sense to work so hard to set the default right
> either, as long as the dependencies are correct. I.e. it'll still mess
> up randconfig if the combination doesn't build, and distros can still
> downgrade to 'm' if they want to. That'll just leave:
>
> config PHY_SAMSUNG_USB2
>   tristate "foo"
>   depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS
>   default y     (no need to add an if since it's taken care of by the depends)
>
>> With the above the user could purposely enable the OHCI or EHCI driver
>> and disable the PHY driver which is not really sensible.  ...but it
>> wouldn't cause a compile failure or crash--USB just won't work.
>
> Just make the sub-drivers silent options with defaults. I.e:
>
>  config PHY_EXYNOS5250_USB2
>         bool SOC_EXYNOS5250
>         depends on PHY_SAMSUNG_USB2
>
> and so on. Note that it doesn't actually scale to make it depend on a
> specific SoC though, so it should probably just be cut down the line
> of EXYNOS4/5 and err on the side of including a bit too much code
> instead.

Yes, that seems the right thing to do. However, for now I will retain the SoC
based structure.
Considering the fragility involved in using 'select', I will re-do
this by playing
around with the default option. Thanks everyone for your inputs.

-- 
Regards,
Sachin.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-06-30  8:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26  5:39 [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Sachin Kamat
     [not found] ` <1403761178-5371-1-git-send-email-sachin.kamat-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-06-26  5:39   ` [PATCH 2/2] usb: dwc3: Kconfig: Select PHY drivers for Exynos DWC3 Sachin Kamat
2014-06-26  5:56     ` Tushar Behera
2014-06-26  8:49   ` [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI Kishon Vijay Abraham I
2014-06-26  9:02     ` Sachin Kamat
2014-06-26  5:55 ` Tushar Behera
2014-06-26  8:09 ` Vivek Gautam
2014-06-26  8:25   ` Sachin Kamat
     [not found]     ` <CAK5sBcHL0f+UVFoyQT3O8m+NAv3rNjiq=aEH4xh9BV3tFbYcSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-26  8:53       ` Sachin Kamat
2014-06-26  9:07         ` Vivek Gautam
2014-06-27 15:46 ` Felipe Balbi
2014-06-27 15:55   ` Doug Anderson
2014-06-27 15:59     ` Felipe Balbi
     [not found]       ` <20140627155900.GN8069-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-06-27 16:32         ` Doug Anderson
2014-06-27 16:53           ` Olof Johansson
2014-06-30  8:32             ` Sachin Kamat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.