From patchwork Tue Jun 21 07:03:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: p.paneri@samsung.com X-Patchwork-Id: 899922 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 p5L71JHs021512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2011 07:01:40 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QYuxN-0000fc-H9; Tue, 21 Jun 2011 07:01:05 +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 1QYuxL-0007T4-8f; Tue, 21 Jun 2011 07:01:03 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QYuw1-0007Bu-E9 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 06:59:47 +0000 Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LN4005M3OQ03QH0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 15:59:33 +0900 (KST) X-AuditID: cbfee61b-b7b2dae000007af9-02-4e004154ab43 Received: from epmmp1 ( [203.254.227.16]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 26.C6.31481.451400E4; Tue, 21 Jun 2011 15:59:33 +0900 (KST) Received: from localhost.localdomain ([107.108.73.199]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LN40097UOQQD9@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 15:59:32 +0900 (KST) Date: Tue, 21 Jun 2011 12:33:47 +0530 From: p.paneri@samsung.com Subject: [RFC][PATCH 5/5] ARM: S5P64x0: Adding OTG device for smdk6440 In-reply-to: <1308639827-2121-1-git-send-email-p.paneri@samsung.com> To: linux-usb@vger.kernel.org Message-id: <1308639827-2121-6-git-send-email-p.paneri@samsung.com> X-Mailer: git-send-email 1.7.0.4 References: <1308639827-2121-1-git-send-email-p.paneri@samsung.com> X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110621_025941_824317_6DE56080 X-CRM114-Status: GOOD ( 17.86 ) 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 [203.254.224.24 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain Cc: kgene.kim@samsung.com, tmarri@apm.com, balbi@ti.com, naushad@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com, a.kesavan@samsung.com, 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: , MIME-Version: 1.0 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, 21 Jun 2011 07:01:40 +0000 (UTC) From: Praveen Paneri Selected DWC OTG for smdk6440 and added platform specific data in machine file. Signed-off-by: Praveen Paneri --- arch/arm/Kconfig | 1 + arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9adc278..e98bb53 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -728,6 +728,7 @@ config ARCH_S5P64X0 select HAVE_SCHED_CLOCK select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS + select S3C_DEV_DWC_OTG help Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, SMDK6450. diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 2d559f1..515e252 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c @@ -46,6 +46,7 @@ #include #include #include +#include #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \ @@ -130,6 +131,27 @@ static struct platform_device smdk6440_backlight_device = { }, }; +/* USB OTG */ +#define S3C_DEV_RX_FIFO_SIZ (4096>>2) +#define S3C_DEV_NPTX_FIFO_SIZ (4096>>2) +#define S3C_HOST_RX_FIFO_SIZ 0x0000010D +#define S3C_HOST_NPTX_FIFO_SIZ 0x0080010D +#define S3C_HOST_CH_NUM 12 + +static struct s5p_otg_platdata smdk6440_otg_pdata = { + .dev_rx_fifo_size = S3C_DEV_RX_FIFO_SIZ, + .dev_nptx_fifo_size = S3C_DEV_NPTX_FIFO_SIZ, + .host_rx_fifo_size = S3C_HOST_RX_FIFO_SIZ, + .host_nptx_fifo_size = S3C_HOST_NPTX_FIFO_SIZ, + .host_ch_num = S3C_HOST_CH_NUM, +}; + +static void __init smdk6440_otg_init(void) +{ + struct s5p_otg_platdata *pdata = &smdk6440_otg_pdata; + + s5p_otg_set_platdata(pdata); +} static struct platform_device *smdk6440_devices[] __initdata = { &s3c_device_adc, &s3c_device_rtc, @@ -141,6 +163,7 @@ static struct platform_device *smdk6440_devices[] __initdata = { &s5p6440_device_iis, &s3c_device_timer[1], &smdk6440_backlight_device, + &s3c_device_usb_hsotg, }; static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { @@ -193,6 +216,7 @@ static void __init smdk6440_machine_init(void) ARRAY_SIZE(smdk6440_i2c_devs0)); i2c_register_board_info(1, smdk6440_i2c_devs1, ARRAY_SIZE(smdk6440_i2c_devs1)); + smdk6440_otg_init(); platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); }