From patchwork Tue May 31 08:51:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh KUMAR X-Patchwork-Id: 831942 Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4VA0Vov028638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 31 May 2011 10:01:00 GMT 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 1QRLfV-0008Mf-E8; Tue, 31 May 2011 09:55:21 +0000 Received: from eu1sys200aog101.obsmtp.com ([207.126.144.111]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRLfE-0008Ja-Sk for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2011 09:55:06 +0000 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKTeS68p6K+zcUg0M7zJIgo47CnkVPkFbH@postini.com; Tue, 31 May 2011 09:55:04 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 E94FFBE; Tue, 31 May 2011 08:52:36 +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 CAFB4D0F; Tue, 31 May 2011 08:52:36 +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; Tue, 31 May 2011 16:52:36 +0800 From: Viresh Kumar To: , Subject: [PATCH V2 2/3] SPEAr3xx: Add machine support for ST's PWM IP Date: Tue, 31 May 2011 14:21:52 +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-20110531_055505_167052_40F73096 X-CRM114-Status: GOOD ( 18.18 ) 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.111 listed in list.dnswl.org] Cc: pratyush.anand@st.com, rajeev-dlh.kumar@st.com, bhupesh.sharma@st.com, armando.visconti@st.com, linux-kernel@vger.kernel.org, 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 (demeter2.kernel.org [140.211.167.43]); Tue, 31 May 2011 10:01:00 +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)