All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: linux-omap@vger.kernel.org
Cc: Steve Sakoman <steve@sakoman.com>, Anand Gadiyar <gadiyar@ti.com>,
	Tony Lindgren <tony@atomide.com>
Subject: [rft/rfc/patch-v2.6.29-rc5+ 22/23] ehci-omap: Remove defines for clock names
Date: Mon, 23 Feb 2009 20:55:34 +0200	[thread overview]
Message-ID: <1235415335-17408-23-git-send-email-me@felipebalbi.com> (raw)
In-Reply-To: <1235415335-17408-22-git-send-email-me@felipebalbi.com>

From: Tony Lindgren <tony@atomide.com>

This just makes it harder to figure out the clock names
when reading the code. If the clock change, they should
get set dynamically.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/usb/host/ehci-omap.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index e413601..ebfed95 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -163,13 +163,6 @@ struct ehci_hcd_omap {
 	void __iomem		*ehci_base;
 };
 
-/* Clock names as per clock framework: May change so keep as #defs */
-#define USBHOST_ICKL		"usbhost_ick"
-#define USBHOST_120M_FCLK	"usbhost_120m_fck"
-#define USBHOST_48M_FCLK	"usbhost_48m_fck"
-#define USBHOST_TLL_ICKL	"usbtll_ick"
-#define USBHOST_TLL_FCLK	"usbtll_fck"
-
 /*-------------------------------------------------------------------------*/
 
 static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask)
@@ -265,21 +258,21 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 
 
 	/* Enable Clocks for USBHOST */
-	omap->usbhost_ick = clk_get(omap->dev, USBHOST_ICKL);
+	omap->usbhost_ick = clk_get(omap->dev, "usbhost_ick");
 	if (IS_ERR(omap->usbhost_ick)) {
 		ret =  PTR_ERR(omap->usbhost_ick);
 		goto err_host_ick;
 	}
 	clk_enable(omap->usbhost_ick);
 
-	omap->usbhost2_120m_fck = clk_get(omap->dev, USBHOST_120M_FCLK);
+	omap->usbhost2_120m_fck = clk_get(omap->dev, "usbhost_120m_fck");
 	if (IS_ERR(omap->usbhost2_120m_fck)) {
 		ret = PTR_ERR(omap->usbhost2_120m_fck);
 		goto err_host_120m_fck;
 	}
 	clk_enable(omap->usbhost2_120m_fck);
 
-	omap->usbhost1_48m_fck = clk_get(omap->dev, USBHOST_48M_FCLK);
+	omap->usbhost1_48m_fck = clk_get(omap->dev, "usbhost_48m_fck");
 	if (IS_ERR(omap->usbhost1_48m_fck)) {
 		ret = PTR_ERR(omap->usbhost1_48m_fck);
 		goto err_host_48m_fck;
@@ -297,14 +290,14 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	}
 
 	/* Configure TLL for 60Mhz clk for ULPI */
-	omap->usbtll_fck = clk_get(omap->dev, USBHOST_TLL_FCLK);
+	omap->usbtll_fck = clk_get(omap->dev, "usbtll_fck");
 	if (IS_ERR(omap->usbtll_fck)) {
 		ret = PTR_ERR(omap->usbtll_fck);
 		goto err_tll_fck;
 	}
 	clk_enable(omap->usbtll_fck);
 
-	omap->usbtll_ick = clk_get(omap->dev, USBHOST_TLL_ICKL);
+	omap->usbtll_ick = clk_get(omap->dev, "usbtll_ick");
 	if (IS_ERR(omap->usbtll_ick)) {
 		ret = PTR_ERR(omap->usbtll_ick);
 		goto err_tll_ick;
-- 
1.6.1.3


  reply	other threads:[~2009-02-23 19:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23 18:55 [rft/rfc/patch-v2.6.29-rc5+ 00/23] ehci cleanup series Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 01/23] usb: host: ehci: make checkpatch.pl happy with ehci-omap Felipe Balbi
2009-02-23 18:55   ` [rft/rfc/patch-v2.6.29-rc5+ 02/23] usb: host: ehci: use dev_name Felipe Balbi
2009-02-23 18:55     ` [rft/rfc/patch-v2.6.29-rc5+ 03/23] usb: host: ehci: standardize variables Felipe Balbi
2009-02-23 18:55       ` [rft/rfc/patch-v2.6.29-rc5+ 04/23] usb: host: ehci: tabify structures Felipe Balbi
2009-02-23 18:55         ` [rft/rfc/patch-v2.6.29-rc5+ 05/23] usb: host: ehci: use resource helpers Felipe Balbi
2009-02-23 18:55           ` [rft/rfc/patch-v2.6.29-rc5+ 06/23] usb: host: ehci: sanitize error path Felipe Balbi
2009-02-23 18:55             ` [rft/rfc/patch-v2.6.29-rc5+ 07/23] usb: host: ehci: get rid of pm functions Felipe Balbi
2009-02-23 18:55               ` [rft/rfc/patch-v2.6.29-rc5+ 08/23] usb: host: ehci: reorganize structures Felipe Balbi
2009-02-23 18:55                 ` [rft/rfc/patch-v2.6.29-rc5+ 09/23] usb: host: ehci: better function names Felipe Balbi
2009-02-23 18:55                   ` [rft/rfc/patch-v2.6.29-rc5+ 10/23] usb: host: ehci: move some comments Felipe Balbi
2009-02-23 18:55                     ` [rft/rfc/patch-v2.6.29-rc5+ 11/23] usb: host: ehci: add MODULE_AUTHOR Felipe Balbi
2009-02-23 18:55                       ` [rft/rfc/patch-v2.6.29-rc5+ 12/23] usb: host: ehci: include <linux/gpio.h> instead Felipe Balbi
2009-02-23 18:55                         ` [rft/rfc/patch-v2.6.29-rc5+ 13/23] usb: host: ehci: remove ehci-omap.h Felipe Balbi
2009-02-23 18:55                           ` [rft/rfc/patch-v2.6.29-rc5+ 14/23] usb: host: ehci: get rid of infinite loops Felipe Balbi
2009-02-23 18:55                             ` [rft/rfc/patch-v2.6.29-rc5+ 15/23] usb: host: ehci: disable clocks on error Felipe Balbi
2009-02-23 18:55                               ` [rft/rfc/patch-v2.6.29-rc5+ 16/23] usb: host: ehci: add platform_data Felipe Balbi
2009-02-23 18:55                                 ` [rft/rfc/patch-v2.6.29-rc5+ 17/23] usb: host: ehci: fix register definitions Felipe Balbi
2009-02-23 18:55                                   ` [rft/rfc/patch-v2.6.29-rc5+ 18/23] arm: omap: make usb base defines follow trm Felipe Balbi
2009-02-23 18:55                                     ` [rft/rfc/patch-v2.6.29-rc5+ 19/23] usb: host: ehci: ioremap all usb bases Felipe Balbi
2009-02-23 18:55                                       ` [rft/rfc/patch-v2.6.29-rc5+ 20/23] usb: host: ehci: align defines Felipe Balbi
2009-02-23 18:55                                         ` [rft/rfc/patch-v2.6.29-rc5+ 21/23] usb: host: ehci: don't ensure register write Felipe Balbi
2009-02-23 18:55                                           ` Felipe Balbi [this message]
2009-02-23 18:55                                             ` [rft/rfc/patch-v2.6.29-rc5+ 23/23] usb: host: ehci: add few comments and todo Felipe Balbi
2009-02-23 19:08                                           ` [rft/rfc/patch-v2.6.29-rc5+ 21/23] usb: host: ehci: don't ensure register write Felipe Balbi
2009-02-24 22:42                                   ` [rft/rfc/patch-v2.6.29-rc5+ 17/23] usb: host: ehci: fix register definitions Grazvydas Ignotas
2009-02-24 22:35                                 ` [rft/rfc/patch-v2.6.29-rc5+ 16/23] usb: host: ehci: add platform_data Grazvydas Ignotas
2009-02-24 22:39                                   ` Felipe Balbi
2009-02-23 19:32 ` [rft/rfc/patch-v2.6.29-rc5+ 00/23] ehci cleanup series Felipe Balbi
2009-04-27  9:18 ` Grazvydas Ignotas
2009-04-27  9:18   ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1235415335-17408-23-git-send-email-me@felipebalbi.com \
    --to=me@felipebalbi.com \
    --cc=gadiyar@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=steve@sakoman.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.