From patchwork Wed Jul 20 11:08:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lin X-Patchwork-Id: 105634 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 79335B6F7C for ; Wed, 20 Jul 2011 20:44:14 +1000 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QjUG1-0004SV-V5; Wed, 20 Jul 2011 10:44:02 +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 1QjUG1-0000QZ-Dg; Wed, 20 Jul 2011 10:44:01 +0000 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11] helo=TX2EHSOBE002.bigfish.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QjUF0-0000FE-SA for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2011 10:43:02 +0000 Received: from mail21-tx2-R.bigfish.com (10.9.14.242) by TX2EHSOBE002.bigfish.com (10.9.40.22) with Microsoft SMTP Server id 14.1.225.22; Wed, 20 Jul 2011 10:42:55 +0000 Received: from mail21-tx2 (localhost.localdomain [127.0.0.1]) by mail21-tx2-R.bigfish.com (Postfix) with ESMTP id E7A3B10C01D0; Wed, 20 Jul 2011 10:42:54 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h63h) X-Spam-TCS-SCL: 2:0 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 mail21-tx2 (localhost.localdomain [127.0.0.1]) by mail21-tx2 (MessageSwitch) id 1311158563316590_1857; Wed, 20 Jul 2011 10:42:43 +0000 (UTC) Received: from TX2EHSMHS023.bigfish.com (unknown [10.9.14.244]) by mail21-tx2.bigfish.com (Postfix) with ESMTP id F384B1C8004B; Wed, 20 Jul 2011 10:42:42 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS023.bigfish.com (10.9.99.123) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 20 Jul 2011 10:42:42 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.289.8; Wed, 20 Jul 2011 05:42:41 -0500 Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p6KAgbAY009560; Wed, 20 Jul 2011 05:42:40 -0500 (CDT) From: Tony Lin To: Subject: [PATCH 1/7] consolidate definitions and structures to share among platforms Date: Wed, 20 Jul 2011 19:08:20 +0800 Message-ID: <1311160106-4898-2-git-send-email-tony.lin@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1311160106-4898-1-git-send-email-tony.lin@freescale.com> References: <1311160106-4898-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-20110720_064259_057016_131A81E0 X-CRM114-Status: GOOD ( 13.25 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [65.55.88.11 listed in list.dnswl.org] Cc: koen.beel.barco@gmail.com, balbi@ti.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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 ------------------- include/linux/fsl_devices.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 19 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/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index fffdf00..c138988 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h @@ -103,6 +103,27 @@ 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; + int (*plt_get_usb_connect_status)(void); + void (*plt_usb_disconnect_detect)(int enable); +}; + struct spi_device; struct fsl_spi_platform_data {