Skip to contentSkip to conversation

ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk

PATCH In review Roger Quadros 6 participants 13 messages Dec 4, 2012 – Dec 13, 2012 2 messages not in the archive

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

PATCH v3 16/23 ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk

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 <[email protected]>
CC Rajendra Nayak <[email protected]>
CC Benoit Cousson <[email protected]>
---
 arch/arm/mach-omap2/cclock3xxx_data.c |    2 -
 arch/arm/mach-omap2/cclock44xx_data.c |   47 +++++++++++++++++++++++----------
 2 files changed, 33 insertions(+), 16 deletions(-)
arch/arm/mach-omap2/cclock3xxx_data.c +0 -2
index bdf3948..5655414 100644
@@ -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),
arch/arm/mach-omap2/cclock44xx_data.c +33 -14

73 lines not on this page · raw message

Signature · 6 lines
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH v3 18/23 mfd: omap-usb-host: Get rid of unnecessary spinlock

In reply to a message not in the archive

The driver does not have an interrupt handler and we don't really need a spinlock, so get rid of it.

---
 drivers/mfd/omap-usb-host.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
drivers/mfd/omap-usb-host.c +0 -15
index 90dbd17..289b356 100644
@@ -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);
#3 lore raw

PATCH v3 19/23 mfd: omap-usb-host: clean up omap_usbhs_init()

In reply to a message not in the archive

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.

---
 drivers/mfd/omap-usb-host.c |  122 +++++++++++++++++++++++++-----------------
 1 files changed, 73 insertions(+), 49 deletions(-)
drivers/mfd/omap-usb-host.c +69 -42
index 289b356..0bb54393 100644
@@ -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;
#4 lore raw

PATCH v3 17/23 mfd: omap-usb-host: Manage HSIC clocks for HSIC mode

In reply to Roger Quadros

Enable the optional HSIC clocks (60MHz and 480MHz) for the ports that are configured in HSIC mode.

---
 drivers/mfd/omap-usb-host.c |   77 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 71 insertions(+), 6 deletions(-)
drivers/mfd/omap-usb-host.c +71 -6
index 6294f13..90dbd17 100644
@@ -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);
Signature · 1 line
1.7.4.1
#5 lore raw

PATCH v3 20/23 USB: ehci-omap: Don't free gpios that we didn't request

In reply to Roger Quadros

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.

---
 drivers/usb/host/ehci-omap.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
drivers/usb/host/ehci-omap.c +0 -8
index 0d5ac36..9f7441b 100644
@@ -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;
 }
 
Signature · 1 line
1.7.4.1
#6 lore raw

PATCH v3 21/23 ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies

In reply to Roger Quadros

We don't need multiple aliases for the OMAP USB host clocks and neither the dummy clocks so remove them.

CC Paul Walmsley <[email protected]>
CC Rajendra Nayak <[email protected]>
CC Benoit Cousson <[email protected]>
---
 arch/arm/mach-omap2/cclock3xxx_data.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/cclock3xxx_data.c +0 -11
index 5655414..8b9d109 100644
@@ -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),
Signature · 1 line
1.7.4.1
#8 lore raw

PATCH v3 23/23 mfd: omap-usb-host: Don't spam console on clk_set_parent failure

In reply to Roger Quadros

clk_set_parent is expected to fail on OMAP3 platforms. We don't consider that as fatal so don't spam console.

---
 drivers/mfd/omap-usb-host.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
drivers/mfd/omap-usb-host.c +9 -9
index 0bb54393..e5257dc 100644
@@ -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);
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH v3 22/23 ARM: OMAP4: clock data: get rid of unused USB host clock aliases

In reply to Roger Quadros

We don't need multiple aliases for the OMAP USB host clocks so remove them.

CC Paul Walmsley <[email protected]>
CC Rajendra Nayak <[email protected]>
CC Benoit Cousson <[email protected]>
---
 arch/arm/mach-omap2/cclock44xx_data.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/cclock44xx_data.c +1 -7
index 74535fe..5a27244 100644
@@ -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 */
Signature · 1 line
1.7.4.1
maintainer
#14 lore raw
In reply to Roger Quadros

+ Benoît, Mike

Hi Roger,

Quoted 10 lines · Roger Quadros

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 <[email protected]>
CC Rajendra Nayak <[email protected]>
CC Benoit Cousson <[email protected]>

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

#9 lore raw

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

In reply to Roger Quadros

Hello.

Quoted 41 lines · Roger Quadros

clk_set_parent is expected to fail on OMAP3 platforms. We don't consider that as fatal so don't spam console.

---
  drivers/mfd/omap-usb-host.c |   18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)
drivers/mfd/omap-usb-host.c +5 -7
index 0bb54393..e5257dc 100644
@@ -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);

drivers/mfd/omap-usb-host.c static int __devinit usbhs_omap_probe(struct platform_device *pdev) · line 685

Quoted 10 lines
drivers/mfd/omap-usb-host.c +4 -2
+			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

#10 lore raw

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

Quoted 51 lines · Sergei Shtylyov

Hello.

Quoted 47 lines · Roger Quadros

clk_set_parent is expected to fail on OMAP3 platforms. We don't consider that as fatal so don't spam console.

---
  drivers/mfd/omap-usb-host.c |   18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)
drivers/mfd/omap-usb-host.c +7 -7
index 0bb54393..e5257dc 100644
@@ -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);
Quoted 9 lines

drivers/mfd/omap-usb-host.c static int __devinit usbhs_omap_probe(struct platform_device *pdev) · line 685

Quoted 5 lines
drivers/mfd/omap-usb-host.c +2 -2
          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

#12 lore raw

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

In reply to a message not in the archive
Quoted 62 lines · Roger Quadros
Quoted 51 lines · Sergei Shtylyov

Hello.

Quoted 47 lines · Roger Quadros

clk_set_parent is expected to fail on OMAP3 platforms. We don't consider that as fatal so don't spam console.

---
  drivers/mfd/omap-usb-host.c |   18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)
drivers/mfd/omap-usb-host.c +7 -7
index 0bb54393..e5257dc 100644
@@ -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);
Quoted 9 lines

drivers/mfd/omap-usb-host.c static int __devinit usbhs_omap_probe(struct platform_device *pdev) · line 685

Quoted 5 lines
drivers/mfd/omap-usb-host.c +2 -2
          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. :-)

Quoted 4 lines

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

Signature · 1 line
balbi
#13 lore raw

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

In reply to a message not in the archive
Quoted 62 lines · Roger Quadros
Quoted 51 lines · Sergei Shtylyov

Hello.

Quoted 47 lines · Roger Quadros

clk_set_parent is expected to fail on OMAP3 platforms. We don't consider that as fatal so don't spam console.

---
  drivers/mfd/omap-usb-host.c |   18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)
drivers/mfd/omap-usb-host.c +7 -7
index 0bb54393..e5257dc 100644
@@ -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);
Quoted 9 lines

drivers/mfd/omap-usb-host.c static int __devinit usbhs_omap_probe(struct platform_device *pdev) · line 685

Quoted 5 lines
drivers/mfd/omap-usb-host.c +2 -2
          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. :-)

Quoted 5 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html