From patchwork Tue Aug 2 08:39:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lin X-Patchwork-Id: 1028332 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p728Wq7p022970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 2 Aug 2011 08:33:13 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QoAP5-0002EH-Jt; Tue, 02 Aug 2011 08:32:43 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QoAP5-0007oe-35; Tue, 02 Aug 2011 08:32:43 +0000 Received: from db3ehsobe005.messaging.microsoft.com ([213.199.154.143] helo=DB3EHSOBE005.bigfish.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QoAP0-0007o6-Uj for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2011 08:32:39 +0000 Received: from mail57-db3-R.bigfish.com (10.3.81.242) by DB3EHSOBE005.bigfish.com (10.3.84.25) with Microsoft SMTP Server id 14.1.225.22; Tue, 2 Aug 2011 08:32:36 +0000 Received: from mail57-db3 (localhost.localdomain [127.0.0.1]) by mail57-db3-R.bigfish.com (Postfix) with ESMTP id 158B1143006F; Tue, 2 Aug 2011 08:32:37 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail57-db3 (localhost.localdomain [127.0.0.1]) by mail57-db3 (MessageSwitch) id 1312273956903448_7655; Tue, 2 Aug 2011 08:32:36 +0000 (UTC) Received: from DB3EHSMHS005.bigfish.com (unknown [10.3.81.250]) by mail57-db3.bigfish.com (Postfix) with ESMTP id CD980AA8052; Tue, 2 Aug 2011 08:32:36 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS005.bigfish.com (10.3.87.105) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 2 Aug 2011 08:32:36 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.289.8; Tue, 2 Aug 2011 03:32:35 -0500 Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p728WUAS002387; Tue, 2 Aug 2011 03:32:33 -0500 (CDT) From: Tony Lin To: Subject: [PATCH v4 1/7] ARM: mxs: ehci: consolidate definitions and structures to share among platforms Date: Tue, 2 Aug 2011 16:39:40 +0800 Message-ID: <1312274386-6833-2-git-send-email-tony.lin@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1312274386-6833-1-git-send-email-tony.lin@freescale.com> References: <1312274386-6833-1-git-send-email-tony.lin@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110802_043239_237259_A3FDBF18 X-CRM114-Status: GOOD ( 13.89 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [213.199.154.143 listed in list.dnswl.org] Cc: s.hauer@pengutronix.de, stern@rowland.harvard.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Aug 2011 08:33:44 +0000 (UTC) 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 --- 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 #include #include - -#include - +#include #include #define ULPI_VIEWPORT_OFFSET 0x170 diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index fffdf00..cb19260 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 {