From patchwork Fri Apr 12 19:17:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2437551 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 72A71DFE82 for ; Fri, 12 Apr 2013 19:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754924Ab3DLTSa (ORCPT ); Fri, 12 Apr 2013 15:18:30 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:54973 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754878Ab3DLTS3 (ORCPT ); Fri, 12 Apr 2013 15:18:29 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ML500BYKPMS9DC0@mailout1.samsung.com> for linux-samsung-soc@vger.kernel.org; Sat, 13 Apr 2013 04:18:28 +0900 (KST) X-AuditID: cbfee61b-b7f076d0000034b6-d6-51685e03be32 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id ED.8C.13494.30E58615; Sat, 13 Apr 2013 04:18:28 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ML500CT6PL8T090@mmp2.samsung.com>; Sat, 13 Apr 2013 04:18:27 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Cc: devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, 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 v5 05/14] ARM: SAMSUNG: Add new PWM platform device Date: Fri, 12 Apr 2013 21:17:21 +0200 Message-id: <1365794250-14436-6-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1365794250-14436-1-git-send-email-t.figa@samsung.com> References: <1365794250-14436-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRW0hTcQDG+29n5xxnB0/HS4cJButCFJpdHv6ViCXEgYIa4otFtfS4iZvO TSWTaFk+tLxfajhYGik5NHHqcpWhVprNnBotsZa0NUNmkg2ttdxyk95+H98PvocP51L3EQGe k1fIKvPEMiHKRyx+55Z45LxUlDiqxeBa3QgGB777AfTr3qBw1uPAYHf7MgoHdV948FVFMgw4 3DxombYBOPSolQfHffGwsvk9Ch/2TSLwbdkiBo1OGw9qrc858OM7AvpM1xHY+dKOwdYPUxw4 rS9D4K/VVRTqPWYO7NK6EdhjbORCw5O/IEXAdOg7AHPzRgXK+P7UAcbcZMeYT7ZnKLM0MYEx PQ+uMVZtC2AWan0oU9VrAIx1sRFhHtv0XOaO24oyHmMc457RgTMRGfykLFaWU8wq9yVf5Eub 5n+jik7i8mhtG6IG/eEaEIbT5CE68NQHNjiGnvzchWoAH6fIu4AO6GaxjaDh0GNeHydooeQu 2qN2oEGOInfTDRpnSOKSPxG6298QKiLJVHqkfYkXZITcSRvHB5EgE+Rx2mha4WzMbaNdc1Uh P2zdr7fPh5had6q7q0ENIJrBJgOIZhWZCtUlifxAgkosVxXlSRIy8+VGEHpuPrYfGNRwGJA4 EG4mpAKpiOKJi1Ul8mFA41xhFHFuIFtEEVnikiusMv+CskjGqoZBLI4ItxJD5UdFFCkRF7K5 LKtglf9bDh4mUAPcZdY3oOHjYynR1d6FkybNjnJ4z7W6V3yi5eqt9MG0FEtFkqivMIBEoEfC E3mO21RN5AidyZRMWcYOFjjnskHM6bXKF3Jrbdth0Vczb7k0d6bepO7rpVIz0jtWDKdKTd6u 10bibEHxj7TVgYjt3jhZge1YzJSdLpV863QJEZVUvH8PV6kS/wOtNWzKtQIAAA== 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 */