From patchwork Mon May 30 07:21:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh KUMAR X-Patchwork-Id: 829312 Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4U7TeJS023734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 May 2011 07:30:02 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQwnG-0007Gp-W4; Mon, 30 May 2011 07:21: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 1QQwnD-0005xc-PP; Mon, 30 May 2011 07:21:39 +0000 Received: from eu1sys200aog117.obsmtp.com ([207.126.144.143]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQwmz-0005w6-JP for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2011 07:21:27 +0000 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob117.postini.com ([207.126.147.11]) with SMTP ID DSNKTeNFbvpPpXPu9kFV7zrzqQf6VklyOVXE@postini.com; Mon, 30 May 2011 07:21:25 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0C909DC; Mon, 30 May 2011 07:21:16 +0000 (GMT) Received: from Webmail-ap.st.com (eapex1hubcas1.st.com [10.80.176.8]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id E6AF37F7; Mon, 30 May 2011 07:21:15 +0000 (GMT) Received: from localhost (10.199.7.86) by Webmail-ap.st.com (10.80.176.7) with Microsoft SMTP Server (TLS) id 8.2.234.1; Mon, 30 May 2011 15:21:15 +0800 From: Viresh Kumar To: Subject: [PATCH 2/3] SPEAr3xx: Add machine support for ST's PWM IP Date: Mon, 30 May 2011 12:51:03 +0530 Message-ID: X-Mailer: git-send-email 1.7.2.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110530_032125_926550_E535C182 X-CRM114-Status: GOOD ( 19.12 ) 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 [207.126.144.143 listed in list.dnswl.org] Cc: pratyush.anand@st.com, rajeev-dlh.kumar@st.com, bhupesh.sharma@st.com, armando.visconti@st.com, vipin.kumar@st.com, shiraz.hashim@st.com, amit.virdi@st.com, vipulkumar.samar@st.com, viresh.linux@gmail.com, deepak.sikri@st.com, akpm@linux-foundation.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]); Mon, 30 May 2011 07:31:41 +0000 (UTC) Reviewed-by: Stanley Miao Signed-off-by: Viresh Kumar --- arch/arm/mach-spear3xx/include/mach/generic.h | 1 + arch/arm/mach-spear3xx/spear320.c | 16 ++++++++++++++++ arch/arm/mach-spear3xx/spear320_evb.c | 1 + 3 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index 8cc3a73..a88e359 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h @@ -162,6 +162,7 @@ void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, #ifdef CONFIG_MACH_SPEAR320 /* Add spear320 machine device structure declarations here */ extern struct platform_device spear320_plgpio_device; +extern struct platform_device spear320_pwm_device; /* pad mux modes */ extern struct pmx_mode spear320_auto_net_smii_mode; diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index 575493a..d84e986 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c @@ -548,6 +548,22 @@ struct platform_device spear320_plgpio_device = { .resource = plgpio_resources, }; +/* pwm device registeration */ +static struct resource pwm_resources[] = { + { + .start = SPEAR320_PWM_BASE, + .end = SPEAR320_PWM_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device spear320_pwm_device = { + .name = "st_pwm", + .id = -1, + .num_resources = ARRAY_SIZE(pwm_resources), + .resource = pwm_resources, +}; + /* spear320 routines */ void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, u8 pmx_dev_count) diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c index 4d747db..6190660 100644 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ b/arch/arm/mach-spear3xx/spear320_evb.c @@ -50,6 +50,7 @@ static struct platform_device *plat_devs[] __initdata = { /* spear320 specific devices */ &spear320_plgpio_device, + &spear320_pwm_device, }; static void __init spear320_evb_init(void)