From patchwork Thu Apr 4 16:37:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2393951 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 46C06DF25A for ; Thu, 4 Apr 2013 16:38:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763116Ab3DDQii (ORCPT ); Thu, 4 Apr 2013 12:38:38 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:55058 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762945Ab3DDQii (ORCPT ); Thu, 4 Apr 2013 12:38:38 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKQ009VZOWDFFF0@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 05 Apr 2013 01:38:37 +0900 (KST) X-AuditID: cbfee61b-b7f076d0000034b6-7e-515dac8d1280 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E6.0B.13494.D8CAD515; Fri, 05 Apr 2013 01:38:37 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKQ00F2OOU1P170@mmp1.samsung.com>; Fri, 05 Apr 2013 01:38:36 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Cc: devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, sameo@linux.intel.com, kgene.kim@samsung.com, kyungmin.park@samsung.com, linux@simtec.co.uk, broonie@opensource.wolfsonmicro.com, kwangwoo.lee@gmail.com, jacmet@sunsite.dk, augulis.darius@gmail.com, mcuelenaere@gmail.com, linux@arm.linux.org.uk, sylvester.nawrocki@gmail.com, buserror@gmail.com, christer@weinigel.se, jekhor@gmail.com, ghcstop@gmail.com, mark.rutland@arm.com, tomasz.figa@gmail.com, heiko@sntech.de, robherring2@gmail.com, m.szyprowski@samsung.com, arnd@arndb.de, john.stultz@linaro.org, tglx@linutronix.de, Tomasz Figa Subject: [PATCH v4 06/14] ARM: SAMSUNG: Add new PWM platform device Date: Thu, 04 Apr 2013 18:37:03 +0200 Message-id: <1365093431-30621-7-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1365093431-30621-1-git-send-email-t.figa@samsung.com> References: <1365093431-30621-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBIsWRmVeSWpSXmKPExsVy+t9jAd3eNbGBBpN+8Vn8nXSM3WLv23+M Fv9mn2KzuPX5EbvFxpUf2SwOzH7IanG0x87i/6PXrBanL11jtDi4bimrxZnfuha9C66yWazY eoHF4mzTG3aLTY+vsVrMOL+PyeL2ZV6L39saWSzWHrnLbrH0+kUmi0vzmlgsvn/7xmZxupvV Yt7nnUwW62e8ZrHYvGkqs8WqXX8YHaQ91sxbw+jR0tzD5vH71yRGj52z7rJ73Lm2h83j3blz 7B7zTgZ6bF5S73F+xkJGj5cTf7N59G1Zxehx/s1UFo/t1+Yxe0x7fZ7N4/MmOY/XN2YzBghE cdmkpOZklqUW6dslcGXMevaDrWAtb8XxictYGhh3cHcxcnJICJhI7JtxgAXCFpO4cG89G4gt JLCIUWJ3Y2EXIxeQ3cUk0du2nREkwSagJvG54RFYkYiAhsSUrsfsIDazQCerxK7pIiC2sICz xJXZ/8FqWARUJT4/b2MGsXkFnCSmXrrPBrFMXuLp/T4wmxOo/v/ZD0wQi50k2n4fYpzAyLuA kWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRnD8PZPewbiqweIQowAHoxIPb0ZfbKAQa2JZ cWXuIUYJDmYlEd6jLUAh3pTEyqrUovz4otKc1OJDjNIcLErivAdbrQOFBNITS1KzU1MLUotg skwcnFINjHplSk88t8WvLGDgWlxQMM+yaHef1L97IdaRZ81Wsho86DVrveEW9D/DwdjOVEwg 7IDg9LhCawn+srvs22UfHfX/sPOHdI/OPL/lCpOCMgojmX57r/HfxvBo2Y3Kk+5MH9WZuQoM uco4LiSV9HttC+7l2Kg379gMt+biz3+iTh95y135axGLEktxRqKhFnNRcSIAy3VrrrsCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch adds new samsung_device_pwm platform device that represents the whole PWM/timer block and includes memory and IRQ resources. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- arch/arm/plat-samsung/devs.c | 16 ++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 1 + 2 files changed, 17 insertions(+) diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index e1124d9..bfae4dd 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -1168,6 +1168,22 @@ struct platform_device s3c_device_timer[] = { }; #endif /* CONFIG_SAMSUNG_DEV_PWM */ +static struct resource samsung_pwm_resource[] = { + DEFINE_RES_IRQ(IRQ_TIMER0), + DEFINE_RES_IRQ(IRQ_TIMER1), + DEFINE_RES_IRQ(IRQ_TIMER2), + DEFINE_RES_IRQ(IRQ_TIMER3), + DEFINE_RES_IRQ(IRQ_TIMER4), + DEFINE_RES_MEM(SAMSUNG_PA_TIMER, SZ_4K), +}; + +struct platform_device samsung_device_pwm = { + .name = "samsung-pwm", + .id = -1, + .num_resources = ARRAY_SIZE(samsung_pwm_resource), + .resource = samsung_pwm_resource, +}; + /* RTC */ #ifdef CONFIG_PLAT_S3C24XX diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 87d501f..0dc4ac4 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h @@ -134,6 +134,7 @@ extern struct platform_device exynos4_device_spdif; extern struct platform_device samsung_asoc_idma; extern struct platform_device samsung_device_keypad; +extern struct platform_device samsung_device_pwm; /* s3c2440 specific devices */