All of lore.kernel.org
 help / color / mirror / Atom feed
From: tony.lin@freescale.com (Tony Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/6] ARM: mxs: ehci: consolidate definitions and structures to share among platforms
Date: Mon, 25 Jul 2011 15:01:19 +0800	[thread overview]
Message-ID: <1311577284-11506-2-git-send-email-tony.lin@freescale.com> (raw)
In-Reply-To: <1311577284-11506-1-git-send-email-tony.lin@freescale.com>

move common definitions and data structures used for mxs and mxc
platforms to fsl_device.h from mxc_ehci.h
so that these definitions and structures could be shared without
duplicated copies.

Signed-off-by: Tony Lin <tony.lin@freescale.com>
---
 arch/arm/plat-mxc/include/mach/mxc_ehci.h |   19 -------------------
 drivers/usb/host/ehci-mxc.c               |    4 +---
 include/linux/fsl_devices.h               |   19 +++++++++++++++++++
 3 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
index 2c159dc..8775807 100644
--- a/arch/arm/plat-mxc/include/mach/mxc_ehci.h
+++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
@@ -1,17 +1,6 @@
 #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
 #define __INCLUDE_ASM_ARCH_MXC_EHCI_H
 
-/* values for portsc field */
-#define MXC_EHCI_PHY_LOW_POWER_SUSPEND	(1 << 23)
-#define MXC_EHCI_FORCE_FS		(1 << 24)
-#define MXC_EHCI_UTMI_8BIT		(0 << 28)
-#define MXC_EHCI_UTMI_16BIT		(1 << 28)
-#define MXC_EHCI_SERIAL			(1 << 29)
-#define MXC_EHCI_MODE_UTMI		(0 << 30)
-#define MXC_EHCI_MODE_PHILIPS		(1 << 30)
-#define MXC_EHCI_MODE_ULPI		(2 << 30)
-#define MXC_EHCI_MODE_SERIAL		(3 << 30)
-
 /* values for flags field */
 #define MXC_EHCI_INTERFACE_DIFF_UNI	(0 << 0)
 #define MXC_EHCI_INTERFACE_DIFF_BI	(1 << 0)
@@ -39,14 +28,6 @@
 #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK		0x3
 #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT		0
 
-struct mxc_usbh_platform_data {
-	int (*init)(struct platform_device *pdev);
-	int (*exit)(struct platform_device *pdev);
-
-	unsigned int		 portsc;
-	struct otg_transceiver	*otg;
-};
-
 int mx51_initialize_usb_hw(int port, unsigned int flags);
 int mx25_initialize_usb_hw(int port, unsigned int flags);
 int mx31_initialize_usb_hw(int port, unsigned int flags);
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 0c058be..cbf60a6 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -23,9 +23,7 @@
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
 #include <linux/slab.h>
-
-#include <mach/mxc_ehci.h>
-
+#include <linux/fsl_devices.h>
 #include <asm/mach-types.h>
 
 #define ULPI_VIEWPORT_OFFSET	0x170
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index fffdf00..bc2c1bf 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -103,6 +103,25 @@ struct fsl_usb2_platform_data {
 
 #define FLS_USB2_WORKAROUND_ENGCM09152	(1 << 0)
 
+/* values for portsc field */
+#define MXC_EHCI_PHY_LOW_POWER_SUSPEND	(1 << 23)
+#define MXC_EHCI_FORCE_FS		(1 << 24)
+#define MXC_EHCI_UTMI_8BIT		(0 << 28)
+#define MXC_EHCI_UTMI_16BIT		(1 << 28)
+#define MXC_EHCI_SERIAL			(1 << 29)
+#define MXC_EHCI_MODE_UTMI		(0 << 30)
+#define MXC_EHCI_MODE_PHILIPS		(1 << 30)
+#define MXC_EHCI_MODE_ULPI		(2 << 30)
+#define MXC_EHCI_MODE_SERIAL		(3 << 30)
+
+struct mxc_usbh_platform_data {
+	int (*init)(struct platform_device *pdev);
+	int (*exit)(struct platform_device *pdev);
+
+	unsigned int		 portsc;
+	struct otg_transceiver	*otg;
+};
+
 struct spi_device;
 
 struct fsl_spi_platform_data {
-- 
1.7.0.4

  reply	other threads:[~2011-07-25  7:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25  7:01 [PATCH v2 0/6] ARM: mx28: add usb host function Tony Lin
2011-07-25  7:01 ` Tony Lin [this message]
2011-07-25  7:01 ` [PATCH v2 2/6] ARM: mxs: enable usb1 phy power supply Tony Lin
2011-07-25  7:01 ` [PATCH v2 3/6] ARM: mxs: add usb clocks to clock tree Tony Lin
2011-07-25 10:24   ` Sergei Shtylyov
2011-07-25 10:43     ` Lin Tony-B19295
2011-07-25  7:01 ` [PATCH v2 4/6] ARM: mxs: make ehci-mxc more flexible to be used on different platforms Tony Lin
2011-07-25  7:21   ` Lothar Waßmann
2011-07-25  7:01 ` [PATCH v2 5/6] ARM: mxs: add usb phy operations Tony Lin
2011-07-25  7:15   ` Lothar Waßmann
2011-07-25  7:26     ` Lin Tony-B19295
2011-07-25  8:24     ` Russell King - ARM Linux
2011-07-26  2:05       ` Lin Tony-B19295
2011-07-26  7:07   ` Koen Beel
2011-07-26  7:12     ` Lin Tony-B19295
2011-07-25  7:01 ` [PATCH v2 6/6] ARM: mxs: add usb host function to default config Tony Lin

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=1311577284-11506-2-git-send-email-tony.lin@freescale.com \
    --to=tony.lin@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.