* [PATCH 0/2] usb: fix controller-PHY binding for OMAP3 platform
@ 2013-07-26 9:03 Kishon Vijay Abraham I
2013-07-26 9:03 ` [PATCH 1/2] usb: musb: omap: remove using PLATFORM_DEVID_AUTO in omap2430.c Kishon Vijay Abraham I
2013-07-26 9:03 ` [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy Kishon Vijay Abraham I
0 siblings, 2 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-26 9:03 UTC (permalink / raw)
To: linux-arm-kernel
After the platform devices are created using PLATFORM_DEVID_AUTO, the
device names given in usb_bind_phy (in board file) does not match with
the actual device name causing the USB PHY library not to return the
PHY reference when the MUSB controller request for the PHY in the non-dt boot
case.
So removed creating platform devices using PLATFORM_DEVID_AUTO in omap2430.c.
This is also needed for the Generic PHY Framework [1] after it's redesigned
to address Greg's concerns [2]
*usb: musb: fix USB enumeration issue in OMAP3 platform* can be dropped since
this patch series should fix the same issue.
I've tested in beagle, but if any of you have any other OMAP3 boards, would be
great if you can test it too.
[1] -> https://git.kernel.org/cgit/linux/kernel/git/kishon/linux-phy.git/
[2] -> http://thread.gmane.org/gmane.linux.ports.arm.kernel/252813/focus=101661
Kishon Vijay Abraham I (2):
usb: musb: omap: remove using PLATFORM_DEVID_AUTO in omap2430.c
arm: omap: remove *.auto* from device names given in usb_bind_phy
arch/arm/mach-omap2/board-2430sdp.c | 2 +-
arch/arm/mach-omap2/board-3430sdp.c | 2 +-
arch/arm/mach-omap2/board-cm-t35.c | 2 +-
arch/arm/mach-omap2/board-devkit8000.c | 2 +-
arch/arm/mach-omap2/board-igep0020.c | 2 +-
arch/arm/mach-omap2/board-ldp.c | 2 +-
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
arch/arm/mach-omap2/board-omap3evm.c | 2 +-
arch/arm/mach-omap2/board-omap3logic.c | 2 +-
arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
arch/arm/mach-omap2/board-overo.c | 2 +-
arch/arm/mach-omap2/board-rm680.c | 2 +-
arch/arm/mach-omap2/board-rx51.c | 2 +-
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
drivers/usb/musb/musb_core.c | 31 +++++++++++++++++++++++++-
drivers/usb/musb/musb_core.h | 2 ++
drivers/usb/musb/omap2430.c | 16 +++++++++++--
19 files changed, 62 insertions(+), 19 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/2] usb: musb: omap: remove using PLATFORM_DEVID_AUTO in omap2430.c
2013-07-26 9:03 [PATCH 0/2] usb: fix controller-PHY binding for OMAP3 platform Kishon Vijay Abraham I
@ 2013-07-26 9:03 ` Kishon Vijay Abraham I
2013-07-26 9:03 ` [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy Kishon Vijay Abraham I
1 sibling, 0 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-26 9:03 UTC (permalink / raw)
To: linux-arm-kernel
After the platform devices are created using PLATFORM_DEVID_AUTO, the
device names given in usb_bind_phy (in board file) does not match with
the actual device name causing the USB PHY library not to return the
PHY reference when the MUSB controller request for the PHY in the non-dt boot
case.
So removed creating platform devices using PLATFORM_DEVID_AUTO in omap2430.c.
This is also needed for the Generic PHY Framework.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/musb/musb_core.c | 31 ++++++++++++++++++++++++++++++-
drivers/usb/musb/musb_core.h | 2 ++
drivers/usb/musb/omap2430.c | 16 ++++++++++++++--
3 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 29a24ce..eb5d876 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -121,7 +121,7 @@ MODULE_DESCRIPTION(DRIVER_INFO);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" MUSB_DRIVER_NAME);
-
+static DEFINE_IDA(musb_ida);
/*-------------------------------------------------------------------------*/
@@ -132,6 +132,35 @@ static inline struct musb *dev_to_musb(struct device *dev)
/*-------------------------------------------------------------------------*/
+int musb_get_id(struct device *dev, gfp_t gfp_mask)
+{
+ int ret;
+ int id;
+
+ ret = ida_pre_get(&musb_ida, gfp_mask);
+ if (!ret) {
+ dev_err(dev, "failed to reserve resource for id\n");
+ return -ENOMEM;
+ }
+
+ ret = ida_get_new(&musb_ida, &id);
+ if (ret < 0) {
+ dev_err(dev, "failed to allocate a new id\n");
+ return ret;
+ }
+
+ return id;
+}
+EXPORT_SYMBOL_GPL(musb_get_id);
+
+void musb_put_id(struct device *dev, int id)
+{
+
+ dev_dbg(dev, "removing id %d\n", id);
+ ida_remove(&musb_ida, id);
+}
+EXPORT_SYMBOL_GPL(musb_put_id);
+
#ifndef CONFIG_BLACKFIN
static int musb_ulpi_read(struct usb_phy *phy, u32 offset)
{
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 7d341c3..79545a4 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -511,6 +511,8 @@ static inline void musb_configure_ep0(struct musb *musb)
extern const char musb_driver_name[];
extern void musb_stop(struct musb *musb);
+extern int musb_get_id(struct device *dev, gfp_t gfp_mask);
+extern void musb_put_id(struct device *dev, int id);
extern void musb_write_fifo(struct musb_hw_ep *ep, u16 len, const u8 *src);
extern void musb_read_fifo(struct musb_hw_ep *ep, u16 len, u8 *dst);
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 6708a3b..812a7fc 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -489,6 +489,7 @@ static int omap2430_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct musb_hdrc_config *config;
int ret = -ENOMEM;
+ int musbid;
glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
if (!glue) {
@@ -496,10 +497,18 @@ static int omap2430_probe(struct platform_device *pdev)
goto err0;
}
- musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
+ /* get the musb id */
+ musbid = musb_get_id(&pdev->dev, GFP_KERNEL);
+ if (musbid < 0) {
+ dev_err(&pdev->dev, "failed to allocate musb id\n");
+ ret = -ENOMEM;
+ goto err0;
+ }
+
+ musb = platform_device_alloc("musb-hdrc", musbid);
if (!musb) {
dev_err(&pdev->dev, "failed to allocate musb device\n");
- goto err0;
+ goto err1;
}
musb->dev.parent = &pdev->dev;
@@ -607,6 +616,9 @@ static int omap2430_probe(struct platform_device *pdev)
err2:
platform_device_put(musb);
+err1:
+ musb_put_id(&pdev->dev, musbid);
+
err0:
return ret;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-26 9:03 [PATCH 0/2] usb: fix controller-PHY binding for OMAP3 platform Kishon Vijay Abraham I
2013-07-26 9:03 ` [PATCH 1/2] usb: musb: omap: remove using PLATFORM_DEVID_AUTO in omap2430.c Kishon Vijay Abraham I
@ 2013-07-26 9:03 ` Kishon Vijay Abraham I
2013-07-29 15:06 ` Felipe Balbi
1 sibling, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-26 9:03 UTC (permalink / raw)
To: linux-arm-kernel
Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
device name of the controller had *.auto* in it. Since with using
PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
change is done in board file here.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/mach-omap2/board-2430sdp.c | 2 +-
arch/arm/mach-omap2/board-3430sdp.c | 2 +-
arch/arm/mach-omap2/board-cm-t35.c | 2 +-
arch/arm/mach-omap2/board-devkit8000.c | 2 +-
arch/arm/mach-omap2/board-igep0020.c | 2 +-
arch/arm/mach-omap2/board-ldp.c | 2 +-
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
arch/arm/mach-omap2/board-omap3evm.c | 2 +-
arch/arm/mach-omap2/board-omap3logic.c | 2 +-
arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
arch/arm/mach-omap2/board-overo.c | 2 +-
arch/arm/mach-omap2/board-rm680.c | 2 +-
arch/arm/mach-omap2/board-rx51.c | 2 +-
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 244d8a5..17bb076 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
omap_hsmmc_init(mmc);
omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 23b004a..5f43fc4 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -590,7 +590,7 @@ static void __init omap_3430sdp_init(void)
omap_ads7846_init(1, gpio_pendown, 310, NULL);
omap_serial_init();
omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index d4622ed..1c3345d 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -691,7 +691,7 @@ static void __init cm_t3x_common_init(void)
cm_t35_init_display();
omap_twl4030_audio_init("cm-t3x", NULL);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
cm_t35_init_usbh();
cm_t35_init_camera();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index f1d91ba..b4d57ec 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -594,7 +594,7 @@ static void __init devkit8000_init(void)
omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(devkit8000_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 87e65dd..b1cbbba 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -659,7 +659,7 @@ static void __init igep_init(void)
omap_serial_init();
omap_sdrc_init(m65kxxxxam_sdrc_params,
m65kxxxxam_sdrc_params);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
igep_flash_init();
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 62e4f70..02d7505 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -377,7 +377,7 @@ static void __init omap_ldp_init(void)
omap_ads7846_init(1, 54, 310, NULL);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions),
ZOOM_NAND_CS, 0, nand_default_timings);
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 04c1165..c9e6fc6 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -551,7 +551,7 @@ static void __init omap3_beagle_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 8c02626..daabe0c 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -706,7 +706,7 @@ static void __init omap3_evm_init(void)
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
phy_data[0].reset_gpio = 135;
}
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(&musb_board_data);
usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index bab51e6..d9a6c38 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -216,7 +216,7 @@ static void __init omap3logic_init(void)
board_mmc_init();
board_smsc911x_init();
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index b1547a0..fc5c133 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -611,7 +611,7 @@ static void __init omap3pandora_init(void)
usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
gpmc_nand_init(&pandora_nand_data, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index d37e6b1..44a38d4 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -394,7 +394,7 @@ static void __init omap3_stalker_init(void)
omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 7da48bc..e8e053d 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -367,7 +367,7 @@ static void __init omap3_touchbook_init(void)
/* Touchscreen and accelerometer */
omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 5748b5d..1ea764d 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -473,7 +473,7 @@ static void __init overo_init(void)
mt46h32m32lf6_sdrc_params);
board_nand_init(overo_nand_partitions,
ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 345e8c4..d95d219 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -135,7 +135,7 @@ static void __init rm680_init(void)
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
rm680_peripherals_init();
}
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index d2ea68e..4deacd5 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -99,7 +99,7 @@ static void __init rx51_init(void)
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(&musb_board_data);
rx51_peripherals_init();
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index a90375d..474ad1c 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -353,7 +353,7 @@ void __init zoom_peripherals_init(void)
omap_i2c_init();
pwm_add_table(zoom_pwm_lookup, ARRAY_SIZE(zoom_pwm_lookup));
platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
- usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
+ usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
--
1.7.10.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-26 9:03 ` [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy Kishon Vijay Abraham I
@ 2013-07-29 15:06 ` Felipe Balbi
2013-07-29 15:29 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-29 15:06 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Fri, Jul 26, 2013 at 02:33:38PM +0530, Kishon Vijay Abraham I wrote:
> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
> device name of the controller had *.auto* in it. Since with using
> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
> change is done in board file here.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> arch/arm/mach-omap2/board-2430sdp.c | 2 +-
> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
> arch/arm/mach-omap2/board-igep0020.c | 2 +-
> arch/arm/mach-omap2/board-ldp.c | 2 +-
> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
> arch/arm/mach-omap2/board-omap3logic.c | 2 +-
> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
> arch/arm/mach-omap2/board-overo.c | 2 +-
> arch/arm/mach-omap2/board-rm680.c | 2 +-
> arch/arm/mach-omap2/board-rx51.c | 2 +-
> arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
> 16 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
> index 244d8a5..17bb076 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
> omap_hsmmc_init(mmc);
>
> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
how about moving usb_bind_phy() calls to omap2430.c ?
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index f44e8b5..b6abc1a 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
pdata->board_data = data;
pdata->config = config;
+ } else {
+ /* bind the PHY */
+ usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
}
if (pdata->has_mailbox) {
The only problem is if some board comes with a PHY other than
twl4030_usb, but in that case we can add a separate compatible flag and
treat it properly. We only need to bind the phy in non-DT case anyway,
so that's temporary. It might be better than to reintroduce the IDR in
musb_core.c.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130729/a53c525b/attachment-0001.sig>
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-29 15:06 ` Felipe Balbi
@ 2013-07-29 15:29 ` Kishon Vijay Abraham I
2013-07-29 17:54 ` Felipe Balbi
0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-29 15:29 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Monday 29 July 2013 08:36 PM, Felipe Balbi wrote:
> Hi,
>
> On Fri, Jul 26, 2013 at 02:33:38PM +0530, Kishon Vijay Abraham I wrote:
>> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
>> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
>> device name of the controller had *.auto* in it. Since with using
>> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
>> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
>> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
>> change is done in board file here.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> arch/arm/mach-omap2/board-2430sdp.c | 2 +-
>> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
>> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
>> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
>> arch/arm/mach-omap2/board-igep0020.c | 2 +-
>> arch/arm/mach-omap2/board-ldp.c | 2 +-
>> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
>> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
>> arch/arm/mach-omap2/board-omap3logic.c | 2 +-
>> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
>> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
>> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
>> arch/arm/mach-omap2/board-overo.c | 2 +-
>> arch/arm/mach-omap2/board-rm680.c | 2 +-
>> arch/arm/mach-omap2/board-rx51.c | 2 +-
>> arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
>> 16 files changed, 16 insertions(+), 16 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
>> index 244d8a5..17bb076 100644
>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
>> omap_hsmmc_init(mmc);
>>
>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
>
> how about moving usb_bind_phy() calls to omap2430.c ?
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index f44e8b5..b6abc1a 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
>
> pdata->board_data = data;
> pdata->config = config;
> + } else {
> + /* bind the PHY */
> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
This looks like a hack IMHO to workaround the usb phy library. otherwise it is
similar to get_phy_by_name.
> }
>
> if (pdata->has_mailbox) {
>
> The only problem is if some board comes with a PHY other than
> twl4030_usb, but in that case we can add a separate compatible flag and
> treat it properly. We only need to bind the phy in non-DT case anyway,
right.
> so that's temporary. It might be better than to reintroduce the IDR in
> musb_core.c.
that?s needed for generic phy framework anyway :-s
Thanks
Kishon
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-29 15:29 ` Kishon Vijay Abraham I
@ 2013-07-29 17:54 ` Felipe Balbi
2013-07-30 5:14 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-29 17:54 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Mon, Jul 29, 2013 at 08:59:26PM +0530, Kishon Vijay Abraham I wrote:
> >> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
> >> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
> >> device name of the controller had *.auto* in it. Since with using
> >> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
> >> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
> >> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
> >> change is done in board file here.
> >>
> >> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> >> ---
> >> arch/arm/mach-omap2/board-2430sdp.c | 2 +-
> >> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
> >> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
> >> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
> >> arch/arm/mach-omap2/board-igep0020.c | 2 +-
> >> arch/arm/mach-omap2/board-ldp.c | 2 +-
> >> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
> >> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
> >> arch/arm/mach-omap2/board-omap3logic.c | 2 +-
> >> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
> >> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
> >> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
> >> arch/arm/mach-omap2/board-overo.c | 2 +-
> >> arch/arm/mach-omap2/board-rm680.c | 2 +-
> >> arch/arm/mach-omap2/board-rx51.c | 2 +-
> >> arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
> >> 16 files changed, 16 insertions(+), 16 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
> >> index 244d8a5..17bb076 100644
> >> --- a/arch/arm/mach-omap2/board-2430sdp.c
> >> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> >> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
> >> omap_hsmmc_init(mmc);
> >>
> >> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
> >> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
> >> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
> >
> > how about moving usb_bind_phy() calls to omap2430.c ?
> >
> > diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> > index f44e8b5..b6abc1a 100644
> > --- a/drivers/usb/musb/omap2430.c
> > +++ b/drivers/usb/musb/omap2430.c
> > @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
> >
> > pdata->board_data = data;
> > pdata->config = config;
> > + } else {
> > + /* bind the PHY */
> > + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
>
> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
> similar to get_phy_by_name.
actually, this is a workaround to the fact that we're not creating all
platform_devices in arch/arm/mach-omap2/ :-)
If we had the musb allocation there, we could easily handle
usb_bind_phy()
> > so that's temporary. It might be better than to reintroduce the IDR in
> > musb_core.c.
>
> that?s needed for generic phy framework anyway :-s
right, but generic phy framework can handle everything just fine, the
only problem is that names are changing.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130729/36df298b/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-29 17:54 ` Felipe Balbi
@ 2013-07-30 5:14 ` Kishon Vijay Abraham I
2013-07-30 6:01 ` Felipe Balbi
0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-30 5:14 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Monday 29 July 2013 11:24 PM, Felipe Balbi wrote:
> Hi,
>
> On Mon, Jul 29, 2013 at 08:59:26PM +0530, Kishon Vijay Abraham I wrote:
>>>> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
>>>> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
>>>> device name of the controller had *.auto* in it. Since with using
>>>> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
>>>> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
>>>> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
>>>> change is done in board file here.
>>>>
>>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>>> ---
>>>> arch/arm/mach-omap2/board-2430sdp.c | 2 +-
>>>> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
>>>> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
>>>> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
>>>> arch/arm/mach-omap2/board-igep0020.c | 2 +-
>>>> arch/arm/mach-omap2/board-ldp.c | 2 +-
>>>> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
>>>> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
>>>> arch/arm/mach-omap2/board-omap3logic.c | 2 +-
>>>> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
>>>> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
>>>> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
>>>> arch/arm/mach-omap2/board-overo.c | 2 +-
>>>> arch/arm/mach-omap2/board-rm680.c | 2 +-
>>>> arch/arm/mach-omap2/board-rx51.c | 2 +-
>>>> arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
>>>> 16 files changed, 16 insertions(+), 16 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
>>>> index 244d8a5..17bb076 100644
>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
>>>> omap_hsmmc_init(mmc);
>>>>
>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
>>>
>>> how about moving usb_bind_phy() calls to omap2430.c ?
>>>
>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>> index f44e8b5..b6abc1a 100644
>>> --- a/drivers/usb/musb/omap2430.c
>>> +++ b/drivers/usb/musb/omap2430.c
>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
>>>
>>> pdata->board_data = data;
>>> pdata->config = config;
>>> + } else {
>>> + /* bind the PHY */
>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
>>
>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
>> similar to get_phy_by_name.
>
> actually, this is a workaround to the fact that we're not creating all
> platform_devices in arch/arm/mach-omap2/ :-)
>
> If we had the musb allocation there, we could easily handle
> usb_bind_phy()
>
>>> so that's temporary. It might be better than to reintroduce the IDR in
>>> musb_core.c.
>>
>> that?s needed for generic phy framework anyway :-s
>
> right, but generic phy framework can handle everything just fine, the
> only problem is that names are changing.
right. But if the names change, PHY framework wouldn't be able to return the
reference to the PHY.
Thanks
Kishon
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 5:14 ` Kishon Vijay Abraham I
@ 2013-07-30 6:01 ` Felipe Balbi
2013-07-30 6:11 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-30 6:01 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Jul 30, 2013 at 10:44:48AM +0530, Kishon Vijay Abraham I wrote:
> > On Mon, Jul 29, 2013 at 08:59:26PM +0530, Kishon Vijay Abraham I wrote:
> >>>> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
> >>>> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
> >>>> device name of the controller had *.auto* in it. Since with using
> >>>> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
> >>>> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
> >>>> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
> >>>> change is done in board file here.
> >>>>
> >>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> >>>> ---
> >>>> arch/arm/mach-omap2/board-2430sdp.c | 2 +-
> >>>> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
> >>>> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
> >>>> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
> >>>> arch/arm/mach-omap2/board-igep0020.c | 2 +-
> >>>> arch/arm/mach-omap2/board-ldp.c | 2 +-
> >>>> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
> >>>> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
> >>>> arch/arm/mach-omap2/board-omap3logic.c | 2 +-
> >>>> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
> >>>> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
> >>>> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
> >>>> arch/arm/mach-omap2/board-overo.c | 2 +-
> >>>> arch/arm/mach-omap2/board-rm680.c | 2 +-
> >>>> arch/arm/mach-omap2/board-rx51.c | 2 +-
> >>>> arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
> >>>> 16 files changed, 16 insertions(+), 16 deletions(-)
> >>>>
> >>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
> >>>> index 244d8a5..17bb076 100644
> >>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
> >>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> >>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
> >>>> omap_hsmmc_init(mmc);
> >>>>
> >>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
> >>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
> >>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
> >>>
> >>> how about moving usb_bind_phy() calls to omap2430.c ?
> >>>
> >>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> >>> index f44e8b5..b6abc1a 100644
> >>> --- a/drivers/usb/musb/omap2430.c
> >>> +++ b/drivers/usb/musb/omap2430.c
> >>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
> >>>
> >>> pdata->board_data = data;
> >>> pdata->config = config;
> >>> + } else {
> >>> + /* bind the PHY */
> >>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
> >>
> >> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
> >> similar to get_phy_by_name.
> >
> > actually, this is a workaround to the fact that we're not creating all
> > platform_devices in arch/arm/mach-omap2/ :-)
> >
> > If we had the musb allocation there, we could easily handle
> > usb_bind_phy()
> >
> >>> so that's temporary. It might be better than to reintroduce the IDR in
> >>> musb_core.c.
> >>
> >> that?s needed for generic phy framework anyway :-s
> >
> > right, but generic phy framework can handle everything just fine, the
> > only problem is that names are changing.
>
> right. But if the names change, PHY framework wouldn't be able to return the
> reference to the PHY.
with my suggestion they can change whenever they want since we're using
dev_name() of the just-created musb platform_device. Right ?
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130730/18f1bcd7/attachment-0001.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 6:01 ` Felipe Balbi
@ 2013-07-30 6:11 ` Kishon Vijay Abraham I
2013-07-30 6:18 ` Felipe Balbi
0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-30 6:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 30 July 2013 11:31 AM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 30, 2013 at 10:44:48AM +0530, Kishon Vijay Abraham I wrote:
>>> On Mon, Jul 29, 2013 at 08:59:26PM +0530, Kishon Vijay Abraham I wrote:
>>>>>> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
>>>>>> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
>>>>>> device name of the controller had *.auto* in it. Since with using
>>>>>> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
>>>>>> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
>>>>>> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
>>>>>> change is done in board file here.
>>>>>>
>>>>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>>>>> ---
>>>>>> arch/arm/mach-omap2/board-2430sdp.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-igep0020.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-ldp.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-omap3logic.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-overo.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-rm680.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-rx51.c | 2 +-
>>>>>> arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +-
>>>>>> 16 files changed, 16 insertions(+), 16 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
>>>>>> index 244d8a5..17bb076 100644
>>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
>>>>>> omap_hsmmc_init(mmc);
>>>>>>
>>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
>>>>>
>>>>> how about moving usb_bind_phy() calls to omap2430.c ?
>>>>>
>>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>>>> index f44e8b5..b6abc1a 100644
>>>>> --- a/drivers/usb/musb/omap2430.c
>>>>> +++ b/drivers/usb/musb/omap2430.c
>>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
>>>>>
>>>>> pdata->board_data = data;
>>>>> pdata->config = config;
>>>>> + } else {
>>>>> + /* bind the PHY */
>>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
>>>>
>>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
>>>> similar to get_phy_by_name.
>>>
>>> actually, this is a workaround to the fact that we're not creating all
>>> platform_devices in arch/arm/mach-omap2/ :-)
>>>
>>> If we had the musb allocation there, we could easily handle
>>> usb_bind_phy()
>>>
>>>>> so that's temporary. It might be better than to reintroduce the IDR in
>>>>> musb_core.c.
>>>>
>>>> that?s needed for generic phy framework anyway :-s
>>>
>>> right, but generic phy framework can handle everything just fine, the
>>> only problem is that names are changing.
>>
>> right. But if the names change, PHY framework wouldn't be able to return the
>> reference to the PHY.
>
> with my suggestion they can change whenever they want since we're using
> dev_name() of the just-created musb platform_device. Right ?
right. But the PHY device can be created in a different place from where the
musb devices are created. And in the PHY framework, the PHY device should have
the list of controller device (names) it can support (PHY framework does not
maintain a separate list for binding like how we had in USB PHY library). e.g.
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
cases how do we pass the device names. Also will the MUSB core device be
created before twl4030-usb PHY device?
Thanks
Kishon
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 6:11 ` Kishon Vijay Abraham I
@ 2013-07-30 6:18 ` Felipe Balbi
2013-07-30 6:25 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-30 6:18 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Jul 30, 2013 at 11:41:23AM +0530, Kishon Vijay Abraham I wrote:
> >>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
> >>>>>> index 244d8a5..17bb076 100644
> >>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
> >>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> >>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
> >>>>>> omap_hsmmc_init(mmc);
> >>>>>>
> >>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
> >>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
> >>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
> >>>>>
> >>>>> how about moving usb_bind_phy() calls to omap2430.c ?
> >>>>>
> >>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> >>>>> index f44e8b5..b6abc1a 100644
> >>>>> --- a/drivers/usb/musb/omap2430.c
> >>>>> +++ b/drivers/usb/musb/omap2430.c
> >>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
> >>>>>
> >>>>> pdata->board_data = data;
> >>>>> pdata->config = config;
> >>>>> + } else {
> >>>>> + /* bind the PHY */
> >>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
> >>>>
> >>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
> >>>> similar to get_phy_by_name.
> >>>
> >>> actually, this is a workaround to the fact that we're not creating all
> >>> platform_devices in arch/arm/mach-omap2/ :-)
> >>>
> >>> If we had the musb allocation there, we could easily handle
> >>> usb_bind_phy()
> >>>
> >>>>> so that's temporary. It might be better than to reintroduce the IDR in
> >>>>> musb_core.c.
> >>>>
> >>>> that?s needed for generic phy framework anyway :-s
> >>>
> >>> right, but generic phy framework can handle everything just fine, the
> >>> only problem is that names are changing.
> >>
> >> right. But if the names change, PHY framework wouldn't be able to return the
> >> reference to the PHY.
> >
> > with my suggestion they can change whenever they want since we're using
> > dev_name() of the just-created musb platform_device. Right ?
>
> right. But the PHY device can be created in a different place from where the
> musb devices are created. And in the PHY framework, the PHY device should have
this shouldn't be a problem. As long as the phy is created, all should
be good.
> the list of controller device (names) it can support (PHY framework does not
> maintain a separate list for binding like how we had in USB PHY library). e.g.
> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
this has nothing to do with $subject though. We talk about generic PHY
framework once all these PHY drivers are moved there :-)
> cases how do we pass the device names. Also will the MUSB core device be
> created before twl4030-usb PHY device?
and why would that be a problem ? We're telling the framework that the
musb device will use a phy with a name of 'twl4030'. If musb calls
usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
try again later.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130730/c4161e9a/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 6:18 ` Felipe Balbi
@ 2013-07-30 6:25 ` Kishon Vijay Abraham I
2013-07-30 6:28 ` Felipe Balbi
0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-30 6:25 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 30 July 2013 11:48 AM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 30, 2013 at 11:41:23AM +0530, Kishon Vijay Abraham I wrote:
>>>>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
>>>>>>>> index 244d8a5..17bb076 100644
>>>>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>>>>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>>>>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
>>>>>>>> omap_hsmmc_init(mmc);
>>>>>>>>
>>>>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>>>>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>>>>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
>>>>>>>
>>>>>>> how about moving usb_bind_phy() calls to omap2430.c ?
>>>>>>>
>>>>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>>>>>> index f44e8b5..b6abc1a 100644
>>>>>>> --- a/drivers/usb/musb/omap2430.c
>>>>>>> +++ b/drivers/usb/musb/omap2430.c
>>>>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
>>>>>>>
>>>>>>> pdata->board_data = data;
>>>>>>> pdata->config = config;
>>>>>>> + } else {
>>>>>>> + /* bind the PHY */
>>>>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
>>>>>>
>>>>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
>>>>>> similar to get_phy_by_name.
>>>>>
>>>>> actually, this is a workaround to the fact that we're not creating all
>>>>> platform_devices in arch/arm/mach-omap2/ :-)
>>>>>
>>>>> If we had the musb allocation there, we could easily handle
>>>>> usb_bind_phy()
>>>>>
>>>>>>> so that's temporary. It might be better than to reintroduce the IDR in
>>>>>>> musb_core.c.
>>>>>>
>>>>>> that?s needed for generic phy framework anyway :-s
>>>>>
>>>>> right, but generic phy framework can handle everything just fine, the
>>>>> only problem is that names are changing.
>>>>
>>>> right. But if the names change, PHY framework wouldn't be able to return the
>>>> reference to the PHY.
>>>
>>> with my suggestion they can change whenever they want since we're using
>>> dev_name() of the just-created musb platform_device. Right ?
>>
>> right. But the PHY device can be created in a different place from where the
>> musb devices are created. And in the PHY framework, the PHY device should have
>
> this shouldn't be a problem. As long as the phy is created, all should
> be good.
>
>> the list of controller device (names) it can support (PHY framework does not
>> maintain a separate list for binding like how we had in USB PHY library). e.g.
>> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
>
> this has nothing to do with $subject though. We talk about generic PHY
> framework once all these PHY drivers are moved there :-)
>
>> cases how do we pass the device names. Also will the MUSB core device be
>> created before twl4030-usb PHY device?
>
> and why would that be a problem ? We're telling the framework that the
> musb device will use a phy with a name of 'twl4030'. If musb calls
> usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
> try again later.
I think we are talking about different problems here ;-) I'm trying to tell
using idr in MUSB core is needed for Generic PHY Framework. So in a way, the
Generic PHY Framework series depends on this patch series or else MUSB in OMAP3
platforms wont work after Generic PHY framework gets merged.
Thanks
Kishon
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 6:25 ` Kishon Vijay Abraham I
@ 2013-07-30 6:28 ` Felipe Balbi
2013-07-30 6:46 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-30 6:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Jul 30, 2013 at 11:55:04AM +0530, Kishon Vijay Abraham I wrote:
> > On Tue, Jul 30, 2013 at 11:41:23AM +0530, Kishon Vijay Abraham I wrote:
> >>>>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
> >>>>>>>> index 244d8a5..17bb076 100644
> >>>>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
> >>>>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> >>>>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
> >>>>>>>> omap_hsmmc_init(mmc);
> >>>>>>>>
> >>>>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
> >>>>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
> >>>>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
> >>>>>>>
> >>>>>>> how about moving usb_bind_phy() calls to omap2430.c ?
> >>>>>>>
> >>>>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> >>>>>>> index f44e8b5..b6abc1a 100644
> >>>>>>> --- a/drivers/usb/musb/omap2430.c
> >>>>>>> +++ b/drivers/usb/musb/omap2430.c
> >>>>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
> >>>>>>>
> >>>>>>> pdata->board_data = data;
> >>>>>>> pdata->config = config;
> >>>>>>> + } else {
> >>>>>>> + /* bind the PHY */
> >>>>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
> >>>>>>
> >>>>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
> >>>>>> similar to get_phy_by_name.
> >>>>>
> >>>>> actually, this is a workaround to the fact that we're not creating all
> >>>>> platform_devices in arch/arm/mach-omap2/ :-)
> >>>>>
> >>>>> If we had the musb allocation there, we could easily handle
> >>>>> usb_bind_phy()
> >>>>>
> >>>>>>> so that's temporary. It might be better than to reintroduce the IDR in
> >>>>>>> musb_core.c.
> >>>>>>
> >>>>>> that?s needed for generic phy framework anyway :-s
> >>>>>
> >>>>> right, but generic phy framework can handle everything just fine, the
> >>>>> only problem is that names are changing.
> >>>>
> >>>> right. But if the names change, PHY framework wouldn't be able to return the
> >>>> reference to the PHY.
> >>>
> >>> with my suggestion they can change whenever they want since we're using
> >>> dev_name() of the just-created musb platform_device. Right ?
> >>
> >> right. But the PHY device can be created in a different place from where the
> >> musb devices are created. And in the PHY framework, the PHY device should have
> >
> > this shouldn't be a problem. As long as the phy is created, all should
> > be good.
> >
> >> the list of controller device (names) it can support (PHY framework does not
> >> maintain a separate list for binding like how we had in USB PHY library). e.g.
> >> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
> >
> > this has nothing to do with $subject though. We talk about generic PHY
> > framework once all these PHY drivers are moved there :-)
> >
> >> cases how do we pass the device names. Also will the MUSB core device be
> >> created before twl4030-usb PHY device?
> >
> > and why would that be a problem ? We're telling the framework that the
> > musb device will use a phy with a name of 'twl4030'. If musb calls
> > usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
> > try again later.
>
> I think we are talking about different problems here ;-) I'm trying to tell
> using idr in MUSB core is needed for Generic PHY Framework. So in a way, the
> Generic PHY Framework series depends on this patch series or else MUSB in OMAP3
> platforms wont work after Generic PHY framework gets merged.
then you just found a limitation in your framework, right ? :-) I mean,
imagine if now we have to add an IDR to every single user of your
framework because they could end up in systems with multiple instances
of the same IP ?
Now consider that you aim to have your framework be used by Network,
USB, SATA, Graphics, etc... Have you really only considered DT
platforms ? DT is quite easy since you can require folks to pass the
proper phandle, but drivers will want to use PLATFORM_DEVID_AUTO and
your framework needs to cope with that.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130730/6d076c74/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 6:28 ` Felipe Balbi
@ 2013-07-30 6:46 ` Kishon Vijay Abraham I
2013-07-30 7:16 ` Felipe Balbi
0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-30 6:46 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 30 July 2013 11:58 AM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 30, 2013 at 11:55:04AM +0530, Kishon Vijay Abraham I wrote:
>>> On Tue, Jul 30, 2013 at 11:41:23AM +0530, Kishon Vijay Abraham I wrote:
>>>>>>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
>>>>>>>>>> index 244d8a5..17bb076 100644
>>>>>>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>>>>>>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>>>>>>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
>>>>>>>>>> omap_hsmmc_init(mmc);
>>>>>>>>>>
>>>>>>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>>>>>>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>>>>>>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
>>>>>>>>>
>>>>>>>>> how about moving usb_bind_phy() calls to omap2430.c ?
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>>>>>>>> index f44e8b5..b6abc1a 100644
>>>>>>>>> --- a/drivers/usb/musb/omap2430.c
>>>>>>>>> +++ b/drivers/usb/musb/omap2430.c
>>>>>>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
>>>>>>>>>
>>>>>>>>> pdata->board_data = data;
>>>>>>>>> pdata->config = config;
>>>>>>>>> + } else {
>>>>>>>>> + /* bind the PHY */
>>>>>>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");
>>>>>>>>
>>>>>>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is
>>>>>>>> similar to get_phy_by_name.
>>>>>>>
>>>>>>> actually, this is a workaround to the fact that we're not creating all
>>>>>>> platform_devices in arch/arm/mach-omap2/ :-)
>>>>>>>
>>>>>>> If we had the musb allocation there, we could easily handle
>>>>>>> usb_bind_phy()
>>>>>>>
>>>>>>>>> so that's temporary. It might be better than to reintroduce the IDR in
>>>>>>>>> musb_core.c.
>>>>>>>>
>>>>>>>> that?s needed for generic phy framework anyway :-s
>>>>>>>
>>>>>>> right, but generic phy framework can handle everything just fine, the
>>>>>>> only problem is that names are changing.
>>>>>>
>>>>>> right. But if the names change, PHY framework wouldn't be able to return the
>>>>>> reference to the PHY.
>>>>>
>>>>> with my suggestion they can change whenever they want since we're using
>>>>> dev_name() of the just-created musb platform_device. Right ?
>>>>
>>>> right. But the PHY device can be created in a different place from where the
>>>> musb devices are created. And in the PHY framework, the PHY device should have
>>>
>>> this shouldn't be a problem. As long as the phy is created, all should
>>> be good.
>>>
>>>> the list of controller device (names) it can support (PHY framework does not
>>>> maintain a separate list for binding like how we had in USB PHY library). e.g.
>>>> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
>>>
>>> this has nothing to do with $subject though. We talk about generic PHY
>>> framework once all these PHY drivers are moved there :-)
>>>
>>>> cases how do we pass the device names. Also will the MUSB core device be
>>>> created before twl4030-usb PHY device?
>>>
>>> and why would that be a problem ? We're telling the framework that the
>>> musb device will use a phy with a name of 'twl4030'. If musb calls
>>> usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
>>> try again later.
>>
>> I think we are talking about different problems here ;-) I'm trying to tell
>> using idr in MUSB core is needed for Generic PHY Framework. So in a way, the
>> Generic PHY Framework series depends on this patch series or else MUSB in OMAP3
>> platforms wont work after Generic PHY framework gets merged.
>
> then you just found a limitation in your framework, right ? :-) I mean,
> imagine if now we have to add an IDR to every single user of your
> framework because they could end up in systems with multiple instances
> of the same IP ?
I raised a similar concern in the PHY framework discussion [1] :-) And since
it's used everywhere else regulators, clkdev, etc.. it's agreed to be used in
PHY as well. Btw if PLATFORM_DEVID_AUTO is used even regulator, clk_get should
fail IMO.
[1] -> http://lkml.indiana.edu/hypermail/linux/kernel/1307.2/03573.html
Thanks
Kishon
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 6:46 ` Kishon Vijay Abraham I
@ 2013-07-30 7:16 ` Felipe Balbi
2013-07-30 8:11 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-30 7:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Jul 30, 2013 at 12:16:20PM +0530, Kishon Vijay Abraham I wrote:
> >>>> the list of controller device (names) it can support (PHY framework does not
> >>>> maintain a separate list for binding like how we had in USB PHY library). e.g.
> >>>> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
> >>>
> >>> this has nothing to do with $subject though. We talk about generic PHY
> >>> framework once all these PHY drivers are moved there :-)
> >>>
> >>>> cases how do we pass the device names. Also will the MUSB core device be
> >>>> created before twl4030-usb PHY device?
> >>>
> >>> and why would that be a problem ? We're telling the framework that the
> >>> musb device will use a phy with a name of 'twl4030'. If musb calls
> >>> usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
> >>> try again later.
> >>
> >> I think we are talking about different problems here ;-) I'm trying to tell
> >> using idr in MUSB core is needed for Generic PHY Framework. So in a way, the
> >> Generic PHY Framework series depends on this patch series or else MUSB in OMAP3
> >> platforms wont work after Generic PHY framework gets merged.
> >
> > then you just found a limitation in your framework, right ? :-) I mean,
> > imagine if now we have to add an IDR to every single user of your
> > framework because they could end up in systems with multiple instances
> > of the same IP ?
>
> I raised a similar concern in the PHY framework discussion [1] :-) And since
> it's used everywhere else regulators, clkdev, etc.. it's agreed to be used in
> PHY as well. Btw if PLATFORM_DEVID_AUTO is used even regulator, clk_get should
> fail IMO.
>
> [1] -> http://lkml.indiana.edu/hypermail/linux/kernel/1307.2/03573.html
look at Greg's and my reply to that email.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130730/a74b90be/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 7:16 ` Felipe Balbi
@ 2013-07-30 8:11 ` Kishon Vijay Abraham I
2013-07-30 8:15 ` Felipe Balbi
0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-30 8:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 30 July 2013 12:46 PM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 30, 2013 at 12:16:20PM +0530, Kishon Vijay Abraham I wrote:
>>>>>> the list of controller device (names) it can support (PHY framework does not
>>>>>> maintain a separate list for binding like how we had in USB PHY library). e.g.
>>>>>> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
>>>>>
>>>>> this has nothing to do with $subject though. We talk about generic PHY
>>>>> framework once all these PHY drivers are moved there :-)
>>>>>
>>>>>> cases how do we pass the device names. Also will the MUSB core device be
>>>>>> created before twl4030-usb PHY device?
>>>>>
>>>>> and why would that be a problem ? We're telling the framework that the
>>>>> musb device will use a phy with a name of 'twl4030'. If musb calls
>>>>> usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
>>>>> try again later.
>>>>
>>>> I think we are talking about different problems here ;-) I'm trying to tell
>>>> using idr in MUSB core is needed for Generic PHY Framework. So in a way, the
>>>> Generic PHY Framework series depends on this patch series or else MUSB in OMAP3
>>>> platforms wont work after Generic PHY framework gets merged.
>>>
>>> then you just found a limitation in your framework, right ? :-) I mean,
>>> imagine if now we have to add an IDR to every single user of your
>>> framework because they could end up in systems with multiple instances
>>> of the same IP ?
>>
>> I raised a similar concern in the PHY framework discussion [1] :-) And since
>> it's used everywhere else regulators, clkdev, etc.. it's agreed to be used in
>> PHY as well. Btw if PLATFORM_DEVID_AUTO is used even regulator, clk_get should
>> fail IMO.
>>
>> [1] -> http://lkml.indiana.edu/hypermail/linux/kernel/1307.2/03573.html
>
> look at Greg's and my reply to that email.
but finally Greg agreed to what Tomasz proposed no?
Thanks
Kishon
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 8:11 ` Kishon Vijay Abraham I
@ 2013-07-30 8:15 ` Felipe Balbi
2013-07-30 14:25 ` Greg KH
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-30 8:15 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 30, 2013 at 01:41:23PM +0530, Kishon Vijay Abraham I wrote:
> On Tuesday 30 July 2013 12:46 PM, Felipe Balbi wrote:
> > Hi,
> >
> > On Tue, Jul 30, 2013 at 12:16:20PM +0530, Kishon Vijay Abraham I wrote:
> >>>>>> the list of controller device (names) it can support (PHY framework does not
> >>>>>> maintain a separate list for binding like how we had in USB PHY library). e.g.
> >>>>>> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such
> >>>>>
> >>>>> this has nothing to do with $subject though. We talk about generic PHY
> >>>>> framework once all these PHY drivers are moved there :-)
> >>>>>
> >>>>>> cases how do we pass the device names. Also will the MUSB core device be
> >>>>>> created before twl4030-usb PHY device?
> >>>>>
> >>>>> and why would that be a problem ? We're telling the framework that the
> >>>>> musb device will use a phy with a name of 'twl4030'. If musb calls
> >>>>> usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and
> >>>>> try again later.
> >>>>
> >>>> I think we are talking about different problems here ;-) I'm trying to tell
> >>>> using idr in MUSB core is needed for Generic PHY Framework. So in a way, the
> >>>> Generic PHY Framework series depends on this patch series or else MUSB in OMAP3
> >>>> platforms wont work after Generic PHY framework gets merged.
> >>>
> >>> then you just found a limitation in your framework, right ? :-) I mean,
> >>> imagine if now we have to add an IDR to every single user of your
> >>> framework because they could end up in systems with multiple instances
> >>> of the same IP ?
> >>
> >> I raised a similar concern in the PHY framework discussion [1] :-) And since
> >> it's used everywhere else regulators, clkdev, etc.. it's agreed to be used in
> >> PHY as well. Btw if PLATFORM_DEVID_AUTO is used even regulator, clk_get should
> >> fail IMO.
> >>
> >> [1] -> http://lkml.indiana.edu/hypermail/linux/kernel/1307.2/03573.html
> >
> > look at Greg's and my reply to that email.
>
> but finally Greg agreed to what Tomasz proposed no?
that's not what I see in the thread. I see Greg agreed to regulator's
own IDs being sequentially created, but he mentions device names can
change.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130730/12cfc057/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy
2013-07-30 8:15 ` Felipe Balbi
@ 2013-07-30 14:25 ` Greg KH
0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2013-07-30 14:25 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 30, 2013 at 11:15:20AM +0300, Felipe Balbi wrote:
> > > look at Greg's and my reply to that email.
> >
> > but finally Greg agreed to what Tomasz proposed no?
>
> that's not what I see in the thread. I see Greg agreed to regulator's
> own IDs being sequentially created, but he mentions device names can
> change.
And that no one should _ever_ rely on them to be a specific "name", the
bus is responsible for creating the id, it could be "random" and
everything should work just fine.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-07-30 14:25 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26 9:03 [PATCH 0/2] usb: fix controller-PHY binding for OMAP3 platform Kishon Vijay Abraham I
2013-07-26 9:03 ` [PATCH 1/2] usb: musb: omap: remove using PLATFORM_DEVID_AUTO in omap2430.c Kishon Vijay Abraham I
2013-07-26 9:03 ` [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy Kishon Vijay Abraham I
2013-07-29 15:06 ` Felipe Balbi
2013-07-29 15:29 ` Kishon Vijay Abraham I
2013-07-29 17:54 ` Felipe Balbi
2013-07-30 5:14 ` Kishon Vijay Abraham I
2013-07-30 6:01 ` Felipe Balbi
2013-07-30 6:11 ` Kishon Vijay Abraham I
2013-07-30 6:18 ` Felipe Balbi
2013-07-30 6:25 ` Kishon Vijay Abraham I
2013-07-30 6:28 ` Felipe Balbi
2013-07-30 6:46 ` Kishon Vijay Abraham I
2013-07-30 7:16 ` Felipe Balbi
2013-07-30 8:11 ` Kishon Vijay Abraham I
2013-07-30 8:15 ` Felipe Balbi
2013-07-30 14:25 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).