* [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk
@ 2012-12-04 14:31 Roger Quadros
2012-12-04 14:31 ` [PATCH v3 17/23] mfd: omap-usb-host: Manage HSIC clocks for HSIC mode Roger Quadros
` (6 more replies)
0 siblings, 7 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi-l0cyMroinI0
Cc: keshava_mgowda-l0cyMroinI0, sshtylyov-Igf4POYTYCDQT0dZR+AlfA,
bjorn-yOkvZcmFvRU, rogerq-l0cyMroinI0,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA, Paul Walmsley, Rajendra Nayak,
Benoit Cousson
There is no such clock as utmi_p1_gfclk. It is only a clock selector
bit to select th the parent of usb_host_hs_utmi_p1_clk.
So we get rid of utmi_p1_gfclk and utmi_p2_gfclk by merging them into
usb_host_hs_utmi_p1_clk and usb_host_hs_utmi_p2_clk respectively.
CC: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
CC: Rajendra Nayak <rnayak-l0cyMroinI0@public.gmane.org>
CC: Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org>
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
arch/arm/mach-omap2/cclock3xxx_data.c | 2 -
arch/arm/mach-omap2/cclock44xx_data.c | 47 +++++++++++++++++++++++----------
2 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index bdf3948..5655414 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -3392,8 +3392,6 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK("usbhs_omap", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- CLK(NULL, "utmi_p1_gfclk", &dummy_ck, CK_3XXX),
- CLK(NULL, "utmi_p2_gfclk", &dummy_ck, CK_3XXX),
CLK(NULL, "xclk60mhsp1_ck", &dummy_ck, CK_3XXX),
CLK(NULL, "xclk60mhsp2_ck", &dummy_ck, CK_3XXX),
CLK(NULL, "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX),
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
index aa56c3e..74535fe 100644
--- a/arch/arm/mach-omap2/cclock44xx_data.c
+++ b/arch/arm/mach-omap2/cclock44xx_data.c
@@ -1366,31 +1366,52 @@ static struct clk_hw_omap usb_host_fs_fck_hw = {
DEFINE_STRUCT_CLK(usb_host_fs_fck, usb_host_fs_fck_parent_names,
usb_host_fs_fck_ops);
+static const struct clk_ops utmi_clk_ops = {
+ .enable = &omap2_dflt_clk_enable,
+ .disable = &omap2_dflt_clk_disable,
+ .is_enabled = &omap2_dflt_clk_is_enabled,
+ .recalc_rate = &omap2_clksel_recalc,
+ .get_parent = &omap2_clksel_find_parent_index,
+ .set_parent = &omap2_clksel_set_parent,
+};
+
static const char *utmi_p1_gfclk_parents[] = {
"init_60m_fclk", "xclk60mhsp1_ck",
};
-DEFINE_CLK_MUX(utmi_p1_gfclk, utmi_p1_gfclk_parents, NULL, 0x0,
- OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
- OMAP4430_CLKSEL_UTMI_P1_SHIFT, OMAP4430_CLKSEL_UTMI_P1_WIDTH,
- 0x0, NULL);
+static const struct clksel utmi_p1_clk_mux_sel[] = {
+ { .parent = &init_60m_fclk, .rates = div_1_0_rates },
+ { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates },
+ { .parent = NULL },
+};
-DEFINE_CLK_GATE(usb_host_hs_utmi_p1_clk, "utmi_p1_gfclk", &utmi_p1_gfclk, 0x0,
+/* Merged utmi_p1_gfclk into usb_host_hs_utmi_p1_clk */
+DEFINE_CLK_OMAP_MUX_GATE(usb_host_hs_utmi_p1_clk, "l3_init_clkdm",
+ utmi_p1_clk_mux_sel,
+ OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
+ OMAP4430_CLKSEL_UTMI_P1_MASK,
OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
- OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT, 0x0, NULL);
+ OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT, NULL,
+ utmi_p1_gfclk_parents, utmi_clk_ops);
static const char *utmi_p2_gfclk_parents[] = {
"init_60m_fclk", "xclk60mhsp2_ck",
};
-DEFINE_CLK_MUX(utmi_p2_gfclk, utmi_p2_gfclk_parents, NULL, 0x0,
- OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
- OMAP4430_CLKSEL_UTMI_P2_SHIFT, OMAP4430_CLKSEL_UTMI_P2_WIDTH,
- 0x0, NULL);
+static const struct clksel utmi_p2_clk_mux_sel[] = {
+ { .parent = &init_60m_fclk, .rates = div_1_0_rates },
+ { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates },
+ { .parent = NULL },
+};
-DEFINE_CLK_GATE(usb_host_hs_utmi_p2_clk, "utmi_p2_gfclk", &utmi_p2_gfclk, 0x0,
+/* Merged utmi_p2_gfclk into usb_host_hs_utmi_p2_clk */
+DEFINE_CLK_OMAP_MUX_GATE(usb_host_hs_utmi_p2_clk, "l3_init_clkdm",
+ utmi_p2_clk_mux_sel,
+ OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
+ OMAP4430_CLKSEL_UTMI_P2_MASK,
OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
- OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT, 0x0, NULL);
+ OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT, NULL,
+ utmi_p2_gfclk_parents, utmi_clk_ops);
DEFINE_CLK_GATE(usb_host_hs_utmi_p3_clk, "init_60m_fclk", &init_60m_fclk, 0x0,
OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
@@ -1838,9 +1859,7 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X),
- CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
- CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X),
CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X),
CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X),
CLK(NULL, "usb_host_hs_hsic480m_p1_clk", &usb_host_hs_hsic480m_p1_clk, CK_443X),
--
1.7.4.1
--
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] 13+ messages in thread
* [PATCH v3 17/23] mfd: omap-usb-host: Manage HSIC clocks for HSIC mode
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
@ 2012-12-04 14:31 ` Roger Quadros
[not found] ` <1354631514-24815-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi; +Cc: keshava_mgowda, sshtylyov, bjorn, rogerq, linux-usb, linux-omap
Enable the optional HSIC clocks (60MHz and 480MHz) for the ports
that are configured in HSIC mode.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/mfd/omap-usb-host.c | 77 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 71 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 6294f13..90dbd17 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -94,6 +94,8 @@
struct usbhs_hcd_omap {
int nports;
struct clk **utmi_clk;
+ struct clk **hsic60m_clk;
+ struct clk **hsic480m_clk;
struct clk *xclk60mhsp1_ck;
struct clk *xclk60mhsp2_ck;
@@ -291,7 +293,28 @@ static int usbhs_runtime_resume(struct device *dev)
clk_enable(omap->ehci_logic_fck);
for (i = 0; i < omap->nports; i++) {
- if (is_ehci_tll_mode(pdata->port_mode[i])) {
+ switch (pdata->port_mode[i]) {
+ case OMAP_EHCI_PORT_MODE_HSIC:
+ if (omap->hsic60m_clk[i]) {
+ r = clk_enable(omap->hsic60m_clk[i]);
+ if (r) {
+ dev_err(dev,
+ "Can't enable port %d hsic60m clk:%d\n",
+ i, r);
+ }
+ }
+
+ if (omap->hsic480m_clk[i]) {
+ r = clk_enable(omap->hsic480m_clk[i]);
+ if (r) {
+ dev_err(dev,
+ "Can't enable port %d hsic480m clk:%d\n",
+ i, r);
+ }
+ }
+ /* Fall through as HSIC mode needs utmi_clk */
+
+ case OMAP_EHCI_PORT_MODE_TLL:
if (omap->utmi_clk[i]) {
r = clk_enable(omap->utmi_clk[i]);
if (r) {
@@ -300,6 +323,9 @@ static int usbhs_runtime_resume(struct device *dev)
i, r);
}
}
+ break;
+ default:
+ break;
}
}
@@ -320,9 +346,21 @@ static int usbhs_runtime_suspend(struct device *dev)
spin_lock_irqsave(&omap->lock, flags);
for (i = 0; i < omap->nports; i++) {
- if (is_ehci_tll_mode(pdata->port_mode[i])) {
+ switch (pdata->port_mode[i]) {
+ case OMAP_EHCI_PORT_MODE_HSIC:
+ if (omap->hsic60m_clk[i])
+ clk_disable(omap->hsic60m_clk[i]);
+
+ if (omap->hsic480m_clk[i])
+ clk_disable(omap->hsic480m_clk[i]);
+ /* Fall through as utmi_clks were used in HSIC mode */
+
+ case OMAP_EHCI_PORT_MODE_TLL:
if (omap->utmi_clk[i])
clk_disable(omap->utmi_clk[i]);
+ break;
+ default:
+ break;
}
}
@@ -527,7 +565,10 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
i = sizeof(struct clk *) * omap->nports;
omap->utmi_clk = devm_kzalloc(dev, i, GFP_KERNEL);
- if (!omap->utmi_clk) {
+ omap->hsic480m_clk = devm_kzalloc(dev, i, GFP_KERNEL);
+ omap->hsic60m_clk = devm_kzalloc(dev, i, GFP_KERNEL);
+
+ if (!omap->utmi_clk || !omap->hsic480m_clk || !omap->hsic60m_clk) {
dev_err(dev, "Memory allocation failed\n");
ret = -ENOMEM;
goto err_mem;
@@ -571,7 +612,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
for (i = 0; i < omap->nports; i++) {
struct clk *pclk;
- char clkname[] = "usb_host_hs_utmi_px_clk";
+ char clkname[] = "usb_host_hs_hsic480m_px_clk";
/* clock names are indexed from 1*/
snprintf(clkname, sizeof(clkname),
@@ -587,6 +628,24 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
clkname, PTR_ERR(pclk));
else
omap->utmi_clk[i] = pclk;
+
+ snprintf(clkname, sizeof(clkname),
+ "usb_host_hs_hsic480m_p%d_clk", i + 1);
+ pclk = clk_get(dev, clkname);
+ if (IS_ERR(pclk))
+ dev_dbg(dev, "Failed to get clock : %s : %ld\n",
+ clkname, PTR_ERR(pclk));
+ else
+ omap->hsic480m_clk[i] = pclk;
+
+ snprintf(clkname, sizeof(clkname),
+ "usb_host_hs_hsic60m_p%d_clk", i + 1);
+ pclk = clk_get(dev, clkname);
+ if (IS_ERR(pclk))
+ dev_dbg(dev, "Failed to get clock : %s : %ld\n",
+ clkname, PTR_ERR(pclk));
+ else
+ omap->hsic60m_clk[i] = pclk;
}
if (is_ehci_phy_mode(pdata->port_mode[0])) {
@@ -630,8 +689,11 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
err_alloc:
omap_usbhs_deinit(&pdev->dev);
- for (i = 0; i < omap->nports; i++)
+ for (i = 0; i < omap->nports; i++) {
clk_put(omap->utmi_clk[i]);
+ clk_put(omap->hsic60m_clk[i]);
+ clk_put(omap->hsic480m_clk[i]);
+ }
clk_put(omap->init_60m_fclk);
@@ -662,8 +724,11 @@ static int __devexit usbhs_omap_remove(struct platform_device *pdev)
omap_usbhs_deinit(&pdev->dev);
- for (i = 0; i < omap->nports; i++)
+ for (i = 0; i < omap->nports; i++) {
clk_put(omap->utmi_clk[i]);
+ clk_put(omap->hsic60m_clk[i]);
+ clk_put(omap->hsic480m_clk[i]);
+ }
clk_put(omap->init_60m_fclk);
clk_put(omap->xclk60mhsp2_ck);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 18/23] mfd: omap-usb-host: Get rid of unnecessary spinlock
[not found] ` <1354631514-24815-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2012-12-04 14:31 ` Roger Quadros
2012-12-04 14:31 ` [PATCH v3 19/23] mfd: omap-usb-host: clean up omap_usbhs_init() Roger Quadros
1 sibling, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi-l0cyMroinI0
Cc: keshava_mgowda-l0cyMroinI0, sshtylyov-Igf4POYTYCDQT0dZR+AlfA,
bjorn-yOkvZcmFvRU, rogerq-l0cyMroinI0,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
The driver does not have an interrupt handler and
we don't really need a spinlock, so get rid of it.
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
drivers/mfd/omap-usb-host.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 90dbd17..289b356 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -23,7 +23,6 @@
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
-#include <linux/spinlock.h>
#include <linux/gpio.h>
#include <plat/cpu.h>
#include <linux/platform_device.h>
@@ -107,7 +106,6 @@ struct usbhs_hcd_omap {
struct usbhs_omap_platform_data *pdata;
u32 usbhs_rev;
- spinlock_t lock;
};
/*-------------------------------------------------------------------------*/
@@ -280,14 +278,12 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
static int usbhs_runtime_resume(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
- unsigned long flags;
struct usbhs_omap_platform_data *pdata = omap->pdata;
int i, r;
dev_dbg(dev, "usbhs_runtime_resume\n");
omap_tll_enable();
- spin_lock_irqsave(&omap->lock, flags);
if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck))
clk_enable(omap->ehci_logic_fck);
@@ -329,22 +325,17 @@ static int usbhs_runtime_resume(struct device *dev)
}
}
- spin_unlock_irqrestore(&omap->lock, flags);
-
return 0;
}
static int usbhs_runtime_suspend(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
- unsigned long flags;
struct usbhs_omap_platform_data *pdata = omap->pdata;
int i;
dev_dbg(dev, "usbhs_runtime_suspend\n");
- spin_lock_irqsave(&omap->lock, flags);
-
for (i = 0; i < omap->nports; i++) {
switch (pdata->port_mode[i]) {
case OMAP_EHCI_PORT_MODE_HSIC:
@@ -367,7 +358,6 @@ static int usbhs_runtime_suspend(struct device *dev)
if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck))
clk_disable(omap->ehci_logic_fck);
- spin_unlock_irqrestore(&omap->lock, flags);
omap_tll_disable();
return 0;
@@ -377,7 +367,6 @@ static void omap_usbhs_init(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
struct usbhs_omap_platform_data *pdata = omap->pdata;
- unsigned long flags;
unsigned reg;
dev_dbg(dev, "starting TI HSUSB Controller\n");
@@ -396,7 +385,6 @@ static void omap_usbhs_init(struct device *dev)
}
pm_runtime_get_sync(dev);
- spin_lock_irqsave(&omap->lock, flags);
reg = usbhs_read(omap->uhh_base, OMAP_UHH_HOSTCONFIG);
/* setup ULPI bypass and burst configurations */
@@ -459,8 +447,6 @@ static void omap_usbhs_init(struct device *dev)
usbhs_write(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg);
dev_dbg(dev, "UHH setup done, uhh_hostconfig=%x\n", reg);
- spin_unlock_irqrestore(&omap->lock, flags);
-
pm_runtime_put_sync(dev);
if (pdata->ehci_data->phy_reset) {
/* Hold the PHY in RESET for enough time till
@@ -524,8 +510,6 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
if (!omap->uhh_base)
return -EADDRNOTAVAIL;
- spin_lock_init(&omap->lock);
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 19/23] mfd: omap-usb-host: clean up omap_usbhs_init()
[not found] ` <1354631514-24815-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2012-12-04 14:31 ` [PATCH v3 18/23] mfd: omap-usb-host: Get rid of unnecessary spinlock Roger Quadros
@ 2012-12-04 14:31 ` Roger Quadros
1 sibling, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi-l0cyMroinI0
Cc: keshava_mgowda-l0cyMroinI0, sshtylyov-Igf4POYTYCDQT0dZR+AlfA,
bjorn-yOkvZcmFvRU, rogerq-l0cyMroinI0,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
We split initializing revision 1 and revision 2 into different
functions. Initialization is now done dynamically so that only
the number of ports available on the system are initialized.
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
drivers/mfd/omap-usb-host.c | 122 +++++++++++++++++++++++++-----------------
1 files changed, 73 insertions(+), 49 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 289b356..0bb54393 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -363,6 +363,75 @@ static int usbhs_runtime_suspend(struct device *dev)
return 0;
}
+static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
+ unsigned reg)
+{
+ struct usbhs_omap_platform_data *pdata = omap->pdata;
+ int i;
+
+ for (i = 0; i < omap->nports; i++) {
+ switch (pdata->port_mode[i]) {
+ case OMAP_USBHS_PORT_MODE_UNUSED:
+ reg &= ~(OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS << i);
+ break;
+ case OMAP_EHCI_PORT_MODE_PHY:
+ if (pdata->single_ulpi_bypass)
+ break;
+
+ if (i == 0)
+ reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
+ else
+ reg &= ~(OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS
+ << (i-1));
+ break;
+ default:
+ if (pdata->single_ulpi_bypass)
+ break;
+
+ if (i == 0)
+ reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
+ else
+ reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS
+ << (i-1);
+ break;
+ }
+ }
+
+ if (pdata->single_ulpi_bypass) {
+ /* bypass ULPI only if none of the ports use PHY mode */
+ reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+
+ for (i = 0; i < omap->nports; i++) {
+ if (is_ehci_phy_mode(pdata->port_mode[i])) {
+ reg &= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+ break;
+ }
+ }
+ }
+
+ return reg;
+}
+
+static unsigned omap_usbhs_rev2_hostconfig(struct usbhs_hcd_omap *omap,
+ unsigned reg)
+{
+ struct usbhs_omap_platform_data *pdata = omap->pdata;
+ int i;
+
+ for (i = 0; i < omap->nports; i++) {
+ /* Clear port mode fields for PHY mode */
+ reg &= ~(OMAP4_P1_MODE_CLEAR << 2 * i);
+
+ if (is_ehci_tll_mode(pdata->port_mode[i]) ||
+ (is_ohci_port(pdata->port_mode[i])))
+ reg |= OMAP4_P1_MODE_TLL << 2 * i;
+ else if (is_ehci_hsic_mode(pdata->port_mode[i]))
+ reg |= OMAP4_P1_MODE_HSIC << 2 * i;
+ }
+
+ return reg;
+}
+
static void omap_usbhs_init(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
@@ -394,55 +463,10 @@ static void omap_usbhs_init(struct device *dev)
reg |= OMAP4_UHH_HOSTCONFIG_APP_START_CLK;
reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
- if (is_omap_usbhs_rev1(omap)) {
- if (pdata->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
- reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
- if (pdata->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
- reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
- if (pdata->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
- reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
-
- /* Bypass the TLL module for PHY mode operation */
- if (pdata->single_ulpi_bypass) {
- dev_dbg(dev, "OMAP3 ES version <= ES2.1\n");
- if (is_ehci_phy_mode(pdata->port_mode[0]) ||
- is_ehci_phy_mode(pdata->port_mode[1]) ||
- is_ehci_phy_mode(pdata->port_mode[2]))
- reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
- else
- reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
- } else {
- dev_dbg(dev, "OMAP3 ES version > ES2.1\n");
- if (is_ehci_phy_mode(pdata->port_mode[0]))
- reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
- else
- reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
- if (is_ehci_phy_mode(pdata->port_mode[1]))
- reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
- else
- reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
- if (is_ehci_phy_mode(pdata->port_mode[2]))
- reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
- else
- reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
- }
- } else if (is_omap_usbhs_rev2(omap)) {
- /* Clear port mode fields for PHY mode*/
- reg &= ~OMAP4_P1_MODE_CLEAR;
- reg &= ~OMAP4_P2_MODE_CLEAR;
-
- if (is_ehci_tll_mode(pdata->port_mode[0]) ||
- (is_ohci_port(pdata->port_mode[0])))
- reg |= OMAP4_P1_MODE_TLL;
- else if (is_ehci_hsic_mode(pdata->port_mode[0]))
- reg |= OMAP4_P1_MODE_HSIC;
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 20/23] USB: ehci-omap: Don't free gpios that we didn't request
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
2012-12-04 14:31 ` [PATCH v3 17/23] mfd: omap-usb-host: Manage HSIC clocks for HSIC mode Roger Quadros
[not found] ` <1354631514-24815-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2012-12-04 14:31 ` Roger Quadros
2012-12-04 14:31 ` [PATCH v3 21/23] ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies Roger Quadros
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi; +Cc: keshava_mgowda, sshtylyov, bjorn, rogerq, linux-usb, linux-omap
This driver does not request any gpios so don't free them.
Fixes L3 bus error on multiple modprobe/rmmod of ehci_hcd
with ehci-omap in use.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/usb/host/ehci-omap.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 0d5ac36..9f7441b 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -291,7 +291,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct usb_hcd *hcd = dev_get_drvdata(dev);
- struct ehci_hcd_omap_platform_data *pdata = dev->platform_data;
usb_remove_hcd(hcd);
disable_put_regulator(dev->platform_data);
@@ -301,13 +300,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
pm_runtime_put_sync(dev);
pm_runtime_disable(dev);
- if (pdata->phy_reset) {
- if (gpio_is_valid(pdata->reset_gpio_port[0]))
- gpio_free(pdata->reset_gpio_port[0]);
-
- if (gpio_is_valid(pdata->reset_gpio_port[1]))
- gpio_free(pdata->reset_gpio_port[1]);
- }
return 0;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 21/23] ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
` (2 preceding siblings ...)
2012-12-04 14:31 ` [PATCH v3 20/23] USB: ehci-omap: Don't free gpios that we didn't request Roger Quadros
@ 2012-12-04 14:31 ` Roger Quadros
2012-12-04 14:31 ` [PATCH v3 22/23] ARM: OMAP4: clock data: get rid of unused USB host clock aliases Roger Quadros
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi
Cc: keshava_mgowda, sshtylyov, bjorn, rogerq, linux-usb, linux-omap,
Paul Walmsley, Rajendra Nayak, Benoit Cousson
We don't need multiple aliases for the OMAP USB host clocks and neither
the dummy clocks so remove them.
CC: Paul Walmsley <paul@pwsan.com>
CC: Rajendra Nayak <rnayak@ti.com>
CC: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/mach-omap2/cclock3xxx_data.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index 5655414..8b9d109 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -3289,8 +3289,6 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- CLK("usbhs_tll", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX),
@@ -3327,8 +3325,6 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "pka_ick", &pka_ick, CK_34XX | CK_36XX),
CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX),
CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- CLK("usbhs_tll", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "mmchs3_ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX),
@@ -3391,15 +3387,8 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- CLK("usbhs_omap", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "xclk60mhsp1_ck", &dummy_ck, CK_3XXX),
CLK(NULL, "xclk60mhsp2_ck", &dummy_ck, CK_3XXX),
- CLK(NULL, "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX),
- CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX),
- CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
- CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
- CLK("usbhs_tll", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
- CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX),
CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX),
CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 22/23] ARM: OMAP4: clock data: get rid of unused USB host clock aliases
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
` (3 preceding siblings ...)
2012-12-04 14:31 ` [PATCH v3 21/23] ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies Roger Quadros
@ 2012-12-04 14:31 ` Roger Quadros
2012-12-04 14:31 ` [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure Roger Quadros
2012-12-05 5:08 ` [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Paul Walmsley
6 siblings, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi
Cc: keshava_mgowda, sshtylyov, bjorn, rogerq, linux-usb, linux-omap,
Paul Walmsley, Rajendra Nayak, Benoit Cousson
We don't need multiple aliases for the OMAP USB host clocks so remove them.
CC: Paul Walmsley <paul@pwsan.com>
CC: Rajendra Nayak <rnayak@ti.com>
CC: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/mach-omap2/cclock44xx_data.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
index 74535fe..5a27244 100644
--- a/arch/arm/mach-omap2/cclock44xx_data.c
+++ b/arch/arm/mach-omap2/cclock44xx_data.c
@@ -1858,7 +1858,6 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
- CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X),
CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X),
CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X),
@@ -1868,7 +1867,6 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X),
- CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X),
CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
CLK(NULL, "usb_otg_hs_ick", &usb_otg_hs_ick, CK_443X),
@@ -1878,8 +1876,6 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X),
- CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
- CLK("usbhs_tll", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
CLK(NULL, "usim_ck", &usim_ck, CK_443X),
CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
CLK(NULL, "usim_fck", &usim_fck, CK_443X),
@@ -1930,9 +1926,7 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "uart2_ick", &dummy_ck, CK_443X),
CLK(NULL, "uart3_ick", &dummy_ck, CK_443X),
CLK(NULL, "uart4_ick", &dummy_ck, CK_443X),
- CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X),
- CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X),
- CLK("usbhs_tll", "usbtll_fck", &dummy_ck, CK_443X),
+ CLK(NULL, "usbhost_ick", &dummy_ck, CK_443X),
CLK("omap_wdt", "ick", &dummy_ck, CK_443X),
CLK(NULL, "timer_32k_ck", &sys_32k_ck, CK_443X),
/* TODO: Remove "omap_timer.X" aliases once DT migration is complete */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
` (4 preceding siblings ...)
2012-12-04 14:31 ` [PATCH v3 22/23] ARM: OMAP4: clock data: get rid of unused USB host clock aliases Roger Quadros
@ 2012-12-04 14:31 ` Roger Quadros
2012-12-05 13:42 ` Sergei Shtylyov
2012-12-05 5:08 ` [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Paul Walmsley
6 siblings, 1 reply; 13+ messages in thread
From: Roger Quadros @ 2012-12-04 14:31 UTC (permalink / raw)
To: balbi; +Cc: keshava_mgowda, sshtylyov, bjorn, rogerq, linux-usb, linux-omap
clk_set_parent is expected to fail on OMAP3 platforms. We don't
consider that as fatal so don't spam console.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/mfd/omap-usb-host.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 0bb54393..e5257dc 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -657,32 +657,32 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
}
if (is_ehci_phy_mode(pdata->port_mode[0])) {
- /* for OMAP3 , the clk set paretn fails */
+ /* for OMAP3, clk_set_parent fails */
ret = clk_set_parent(omap->utmi_clk[0],
omap->xclk60mhsp1_ck);
if (ret != 0)
- dev_err(dev, "xclk60mhsp1_ck set parent"
- "failed error:%d\n", ret);
+ dev_dbg(dev, "xclk60mhsp1_ck set parent failed : %d\n",
+ ret);
} else if (is_ehci_tll_mode(pdata->port_mode[0])) {
ret = clk_set_parent(omap->utmi_clk[0],
omap->init_60m_fclk);
if (ret != 0)
- dev_err(dev, "init_60m_fclk set parent"
- "failed error:%d\n", ret);
+ dev_dbg(dev, "P0 init_60m_fclk set parent failed: %d\n",
+ ret);
}
if (is_ehci_phy_mode(pdata->port_mode[1])) {
ret = clk_set_parent(omap->utmi_clk[1],
omap->xclk60mhsp2_ck);
if (ret != 0)
- dev_err(dev, "xclk60mhsp2_ck set parent"
- "failed error:%d\n", ret);
+ dev_dbg(dev, "xclk60mhsp2_ck set parent failed : %d\n",
+ ret);
} else if (is_ehci_tll_mode(pdata->port_mode[1])) {
ret = clk_set_parent(omap->utmi_clk[1],
omap->init_60m_fclk);
if (ret != 0)
- dev_err(dev, "init_60m_fclk set parent"
- "failed error:%d\n", ret);
+ dev_dbg(dev, "P1 init_60m_fclk set parent failed: %d\n",
+ ret);
}
omap_usbhs_init(dev);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
` (5 preceding siblings ...)
2012-12-04 14:31 ` [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure Roger Quadros
@ 2012-12-05 5:08 ` Paul Walmsley
6 siblings, 0 replies; 13+ messages in thread
From: Paul Walmsley @ 2012-12-05 5:08 UTC (permalink / raw)
To: Benoit Cousson, Roger Quadros, mturquette
Cc: balbi, keshava_mgowda, sshtylyov, bjorn, linux-usb, linux-omap,
Rajendra Nayak
[-- Attachment #1: Type: TEXT/PLAIN, Size: 693 bytes --]
+ Benoît, Mike
Hi Roger,
On Tue, 4 Dec 2012, Roger Quadros wrote:
> There is no such clock as utmi_p1_gfclk. It is only a clock selector
> bit to select th the parent of usb_host_hs_utmi_p1_clk.
> So we get rid of utmi_p1_gfclk and utmi_p2_gfclk by merging them into
> usb_host_hs_utmi_p1_clk and usb_host_hs_utmi_p2_clk respectively.
>
> CC: Paul Walmsley <paul@pwsan.com>
> CC: Rajendra Nayak <rnayak@ti.com>
> CC: Benoit Cousson <b-cousson@ti.com>
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
This one needs careful review from Benoît; these were originally
autogenerated, and it would be nice to return to an autogenerated clock
tree for OMAP4...
- Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure
2012-12-04 14:31 ` [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure Roger Quadros
@ 2012-12-05 13:42 ` Sergei Shtylyov
2012-12-05 14:13 ` Roger Quadros
0 siblings, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2012-12-05 13:42 UTC (permalink / raw)
To: Roger Quadros; +Cc: balbi, keshava_mgowda, bjorn, linux-usb, linux-omap
Hello.
On 04-12-2012 18:31, Roger Quadros wrote:
> clk_set_parent is expected to fail on OMAP3 platforms. We don't
> consider that as fatal so don't spam console.
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
> drivers/mfd/omap-usb-host.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 0bb54393..e5257dc 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -657,32 +657,32 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
> }
>
> if (is_ehci_phy_mode(pdata->port_mode[0])) {
> - /* for OMAP3 , the clk set paretn fails */
> + /* for OMAP3, clk_set_parent fails */
> ret = clk_set_parent(omap->utmi_clk[0],
> omap->xclk60mhsp1_ck);
> if (ret != 0)
> - dev_err(dev, "xclk60mhsp1_ck set parent"
> - "failed error:%d\n", ret);
> + dev_dbg(dev, "xclk60mhsp1_ck set parent failed : %d\n",
> + ret);
> } else if (is_ehci_tll_mode(pdata->port_mode[0])) {
> ret = clk_set_parent(omap->utmi_clk[0],
> omap->init_60m_fclk);
> if (ret != 0)
> - dev_err(dev, "init_60m_fclk set parent"
> - "failed error:%d\n", ret);
> + dev_dbg(dev, "P0 init_60m_fclk set parent failed: %d\n",
> + ret);
> }
>
> if (is_ehci_phy_mode(pdata->port_mode[1])) {
> ret = clk_set_parent(omap->utmi_clk[1],
> omap->xclk60mhsp2_ck);
> if (ret != 0)
> - dev_err(dev, "xclk60mhsp2_ck set parent"
> - "failed error:%d\n", ret);
> + dev_dbg(dev, "xclk60mhsp2_ck set parent failed : %d\n",
> + ret);
> } else if (is_ehci_tll_mode(pdata->port_mode[1])) {
> ret = clk_set_parent(omap->utmi_clk[1],
> omap->init_60m_fclk);
> if (ret != 0)
> - dev_err(dev, "init_60m_fclk set parent"
> - "failed error:%d\n", ret);
> + dev_dbg(dev, "P1 init_60m_fclk set parent failed: %d\n",
> + ret);
Hm, you sometimes put a space before colon in the error message and
sometimes not. Inconsistent. :-)
WBR, Sergei
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure
2012-12-05 13:42 ` Sergei Shtylyov
@ 2012-12-05 14:13 ` Roger Quadros
[not found] ` <50BF569A.1080403-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Roger Quadros @ 2012-12-05 14:13 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: balbi, keshava_mgowda, bjorn, linux-usb, linux-omap
On 12/05/2012 03:42 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 04-12-2012 18:31, Roger Quadros wrote:
>
>> clk_set_parent is expected to fail on OMAP3 platforms. We don't
>> consider that as fatal so don't spam console.
>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> ---
>> drivers/mfd/omap-usb-host.c | 18 +++++++++---------
>> 1 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
>> index 0bb54393..e5257dc 100644
>> --- a/drivers/mfd/omap-usb-host.c
>> +++ b/drivers/mfd/omap-usb-host.c
>> @@ -657,32 +657,32 @@ static int __devinit usbhs_omap_probe(struct
>> platform_device *pdev)
>> }
>>
>> if (is_ehci_phy_mode(pdata->port_mode[0])) {
>> - /* for OMAP3 , the clk set paretn fails */
>> + /* for OMAP3, clk_set_parent fails */
>> ret = clk_set_parent(omap->utmi_clk[0],
>> omap->xclk60mhsp1_ck);
>> if (ret != 0)
>> - dev_err(dev, "xclk60mhsp1_ck set parent"
>> - "failed error:%d\n", ret);
>> + dev_dbg(dev, "xclk60mhsp1_ck set parent failed : %d\n",
>> + ret);
>> } else if (is_ehci_tll_mode(pdata->port_mode[0])) {
>> ret = clk_set_parent(omap->utmi_clk[0],
>> omap->init_60m_fclk);
>> if (ret != 0)
>> - dev_err(dev, "init_60m_fclk set parent"
>> - "failed error:%d\n", ret);
>> + dev_dbg(dev, "P0 init_60m_fclk set parent failed: %d\n",
>> + ret);
>> }
>>
>> if (is_ehci_phy_mode(pdata->port_mode[1])) {
>> ret = clk_set_parent(omap->utmi_clk[1],
>> omap->xclk60mhsp2_ck);
>> if (ret != 0)
>> - dev_err(dev, "xclk60mhsp2_ck set parent"
>> - "failed error:%d\n", ret);
>> + dev_dbg(dev, "xclk60mhsp2_ck set parent failed : %d\n",
>> + ret);
>> } else if (is_ehci_tll_mode(pdata->port_mode[1])) {
>> ret = clk_set_parent(omap->utmi_clk[1],
>> omap->init_60m_fclk);
>> if (ret != 0)
>> - dev_err(dev, "init_60m_fclk set parent"
>> - "failed error:%d\n", ret);
>> + dev_dbg(dev, "P1 init_60m_fclk set parent failed: %d\n",
>> + ret);
>
> Hm, you sometimes put a space before colon in the error message and
> sometimes not. Inconsistent. :-)
>
That was because it fit in 80 characters without the space. I'm not sure
what is more important, fitting in 80 or consistency in the print
message. Maybe i should have removed the spaces everywhere so that it is
consistent as well. :)
cheers,
-roger
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure
[not found] ` <50BF569A.1080403-l0cyMroinI0@public.gmane.org>
@ 2012-12-13 10:46 ` Felipe Balbi
2012-12-13 11:04 ` Jassi Brar
1 sibling, 0 replies; 13+ messages in thread
From: Felipe Balbi @ 2012-12-13 10:46 UTC (permalink / raw)
To: Roger Quadros
Cc: Sergei Shtylyov, balbi-l0cyMroinI0, keshava_mgowda-l0cyMroinI0,
bjorn-yOkvZcmFvRU, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 3063 bytes --]
On Wed, Dec 05, 2012 at 04:13:46PM +0200, Roger Quadros wrote:
> On 12/05/2012 03:42 PM, Sergei Shtylyov wrote:
> > Hello.
> >
> > On 04-12-2012 18:31, Roger Quadros wrote:
> >
> >> clk_set_parent is expected to fail on OMAP3 platforms. We don't
> >> consider that as fatal so don't spam console.
> >
> >> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> >> ---
> >> drivers/mfd/omap-usb-host.c | 18 +++++++++---------
> >> 1 files changed, 9 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> >> index 0bb54393..e5257dc 100644
> >> --- a/drivers/mfd/omap-usb-host.c
> >> +++ b/drivers/mfd/omap-usb-host.c
> >> @@ -657,32 +657,32 @@ static int __devinit usbhs_omap_probe(struct
> >> platform_device *pdev)
> >> }
> >>
> >> if (is_ehci_phy_mode(pdata->port_mode[0])) {
> >> - /* for OMAP3 , the clk set paretn fails */
> >> + /* for OMAP3, clk_set_parent fails */
> >> ret = clk_set_parent(omap->utmi_clk[0],
> >> omap->xclk60mhsp1_ck);
> >> if (ret != 0)
> >> - dev_err(dev, "xclk60mhsp1_ck set parent"
> >> - "failed error:%d\n", ret);
> >> + dev_dbg(dev, "xclk60mhsp1_ck set parent failed : %d\n",
> >> + ret);
> >> } else if (is_ehci_tll_mode(pdata->port_mode[0])) {
> >> ret = clk_set_parent(omap->utmi_clk[0],
> >> omap->init_60m_fclk);
> >> if (ret != 0)
> >> - dev_err(dev, "init_60m_fclk set parent"
> >> - "failed error:%d\n", ret);
> >> + dev_dbg(dev, "P0 init_60m_fclk set parent failed: %d\n",
> >> + ret);
> >> }
> >>
> >> if (is_ehci_phy_mode(pdata->port_mode[1])) {
> >> ret = clk_set_parent(omap->utmi_clk[1],
> >> omap->xclk60mhsp2_ck);
> >> if (ret != 0)
> >> - dev_err(dev, "xclk60mhsp2_ck set parent"
> >> - "failed error:%d\n", ret);
> >> + dev_dbg(dev, "xclk60mhsp2_ck set parent failed : %d\n",
> >> + ret);
> >> } else if (is_ehci_tll_mode(pdata->port_mode[1])) {
> >> ret = clk_set_parent(omap->utmi_clk[1],
> >> omap->init_60m_fclk);
> >> if (ret != 0)
> >> - dev_err(dev, "init_60m_fclk set parent"
> >> - "failed error:%d\n", ret);
> >> + dev_dbg(dev, "P1 init_60m_fclk set parent failed: %d\n",
> >> + ret);
> >
> > Hm, you sometimes put a space before colon in the error message and
> > sometimes not. Inconsistent. :-)
> >
>
> That was because it fit in 80 characters without the space. I'm not sure
> what is more important, fitting in 80 or consistency in the print
> message. Maybe i should have removed the spaces everywhere so that it is
> consistent as well. :)
I'd say it's the consistency :-)
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure
[not found] ` <50BF569A.1080403-l0cyMroinI0@public.gmane.org>
2012-12-13 10:46 ` Felipe Balbi
@ 2012-12-13 11:04 ` Jassi Brar
1 sibling, 0 replies; 13+ messages in thread
From: Jassi Brar @ 2012-12-13 11:04 UTC (permalink / raw)
To: Roger Quadros
Cc: Sergei Shtylyov, balbi-l0cyMroinI0, keshava_mgowda-l0cyMroinI0,
bjorn-yOkvZcmFvRU, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
On 5 December 2012 19:43, Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> wrote:
> On 12/05/2012 03:42 PM, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 04-12-2012 18:31, Roger Quadros wrote:
>>
>>> clk_set_parent is expected to fail on OMAP3 platforms. We don't
>>> consider that as fatal so don't spam console.
>>
>>> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
>>> ---
>>> drivers/mfd/omap-usb-host.c | 18 +++++++++---------
>>> 1 files changed, 9 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
>>> index 0bb54393..e5257dc 100644
>>> --- a/drivers/mfd/omap-usb-host.c
>>> +++ b/drivers/mfd/omap-usb-host.c
>>> @@ -657,32 +657,32 @@ static int __devinit usbhs_omap_probe(struct
>>> platform_device *pdev)
>>> }
>>>
>>> if (is_ehci_phy_mode(pdata->port_mode[0])) {
>>> - /* for OMAP3 , the clk set paretn fails */
>>> + /* for OMAP3, clk_set_parent fails */
>>> ret = clk_set_parent(omap->utmi_clk[0],
>>> omap->xclk60mhsp1_ck);
>>> if (ret != 0)
>>> - dev_err(dev, "xclk60mhsp1_ck set parent"
>>> - "failed error:%d\n", ret);
>>> + dev_dbg(dev, "xclk60mhsp1_ck set parent failed : %d\n",
>>> + ret);
>>> } else if (is_ehci_tll_mode(pdata->port_mode[0])) {
>>> ret = clk_set_parent(omap->utmi_clk[0],
>>> omap->init_60m_fclk);
>>> if (ret != 0)
>>> - dev_err(dev, "init_60m_fclk set parent"
>>> - "failed error:%d\n", ret);
>>> + dev_dbg(dev, "P0 init_60m_fclk set parent failed: %d\n",
>>> + ret);
>>> }
>>>
>>> if (is_ehci_phy_mode(pdata->port_mode[1])) {
>>> ret = clk_set_parent(omap->utmi_clk[1],
>>> omap->xclk60mhsp2_ck);
>>> if (ret != 0)
>>> - dev_err(dev, "xclk60mhsp2_ck set parent"
>>> - "failed error:%d\n", ret);
>>> + dev_dbg(dev, "xclk60mhsp2_ck set parent failed : %d\n",
>>> + ret);
>>> } else if (is_ehci_tll_mode(pdata->port_mode[1])) {
>>> ret = clk_set_parent(omap->utmi_clk[1],
>>> omap->init_60m_fclk);
>>> if (ret != 0)
>>> - dev_err(dev, "init_60m_fclk set parent"
>>> - "failed error:%d\n", ret);
>>> + dev_dbg(dev, "P1 init_60m_fclk set parent failed: %d\n",
>>> + ret);
>>
>> Hm, you sometimes put a space before colon in the error message and
>> sometimes not. Inconsistent. :-)
>>
>
> That was because it fit in 80 characters without the space. I'm not sure
> what is more important, fitting in 80 or consistency in the print
> message. Maybe i should have removed the spaces everywhere so that it is
> consistent as well. :)
>
prints are one thing where breaking the 80 column rule is acceptable.
Otherwise it fails grep'ing
--
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] 13+ messages in thread
end of thread, other threads:[~2012-12-13 11:04 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04 14:31 [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Roger Quadros
2012-12-04 14:31 ` [PATCH v3 17/23] mfd: omap-usb-host: Manage HSIC clocks for HSIC mode Roger Quadros
[not found] ` <1354631514-24815-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2012-12-04 14:31 ` [PATCH v3 18/23] mfd: omap-usb-host: Get rid of unnecessary spinlock Roger Quadros
2012-12-04 14:31 ` [PATCH v3 19/23] mfd: omap-usb-host: clean up omap_usbhs_init() Roger Quadros
2012-12-04 14:31 ` [PATCH v3 20/23] USB: ehci-omap: Don't free gpios that we didn't request Roger Quadros
2012-12-04 14:31 ` [PATCH v3 21/23] ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies Roger Quadros
2012-12-04 14:31 ` [PATCH v3 22/23] ARM: OMAP4: clock data: get rid of unused USB host clock aliases Roger Quadros
2012-12-04 14:31 ` [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure Roger Quadros
2012-12-05 13:42 ` Sergei Shtylyov
2012-12-05 14:13 ` Roger Quadros
[not found] ` <50BF569A.1080403-l0cyMroinI0@public.gmane.org>
2012-12-13 10:46 ` Felipe Balbi
2012-12-13 11:04 ` Jassi Brar
2012-12-05 5:08 ` [PATCH v3 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox