From patchwork Wed Apr 25 04:12:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8101 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3356823E13 for ; Wed, 25 Apr 2012 04:22:04 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id E398BA18860 for ; Wed, 25 Apr 2012 04:22:03 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:22:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=1LbCpr3eBss9ZiEM+3+IRcBXV52X4o4hW+GBXSPOxvY=; b=SyFRp5RhG6v7NPjGX0SU7pE97yXO/Vl8t50cYvMKjgRxnsQHDRn5YdSMNP3bp7j7pO M0+RLp6sgCmVhmdnNWMH3WkAW+fjqnexxevGbLxc1FKAYZGtzzdodu/xHEnO+UCT+EVT PO43peY/ZikkSkxfwEzApEIRY6p2NTqB/PZzh0teDRzZmQaMRgK6qU2rJp2iw2ZxamNb qOtH+xUFCMBuhwI1dlkeJd1n5Juw6C6zZ4NJMY3DxbQa9PvmEUBtl3ISSG/VMey6FXDm jyI27bnazwX0HcxzkLRoPcfZdjyIO8j2N4IxPQOo4uomSqrHghtQq/VYWoXhRNZlybxS 6TBg== Received: by 10.50.154.167 with SMTP id vp7mr694335igb.55.1335327723678; Tue, 24 Apr 2012 21:22:03 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp231131ibt; Tue, 24 Apr 2012 21:22:03 -0700 (PDT) Received: by 10.68.72.138 with SMTP id d10mr4376066pbv.15.1335327722921; Tue, 24 Apr 2012 21:22:02 -0700 (PDT) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx.google.com with ESMTPS id of4si22406508pbb.262.2012.04.24.21.22.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:22:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.44 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.210.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.44 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pz0-f44.google.com with SMTP id z14so5396129dad.17 for ; Tue, 24 Apr 2012 21:22:02 -0700 (PDT) Received: by 10.68.195.163 with SMTP id if3mr4030304pbc.127.1335327722676; Tue, 24 Apr 2012 21:22:02 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.21.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:22:02 -0700 (PDT) From: Tushar Behera To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, patches@linaro.org Subject: [PATCH 03/33] ARM: EXYNOS: dev-audio: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:13 +0530 Message-Id: <1335327163-11794-4-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1335327163-11794-1-git-send-email-tushar.behera@linaro.org> References: <1335327163-11794-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQmXpb9l4TBUFDmUo3qOJbgEriYoRNarulBWQmi8P3GQdK0vIijJgw6gLtvribDms/bCvfDq CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/mach-exynos/dev-audio.c | 156 ++++++------------------------------- 1 files changed, 26 insertions(+), 130 deletions(-) diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c index 7199e1a..b33a5b6 100644 --- a/arch/arm/mach-exynos/dev-audio.c +++ b/arch/arm/mach-exynos/dev-audio.c @@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { }; static struct resource exynos4_i2s0_resource[] = { - [0] = { - .start = EXYNOS4_PA_I2S0, - .end = EXYNOS4_PA_I2S0 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_I2S0_TX, - .end = DMACH_I2S0_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_I2S0_RX, - .end = DMACH_I2S0_RX, - .flags = IORESOURCE_DMA, - }, - [3] = { - .start = DMACH_I2S0S_TX, - .end = DMACH_I2S0S_TX, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), + [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), }; struct platform_device exynos4_device_i2s0 = { @@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { }; static struct resource exynos4_i2s1_resource[] = { - [0] = { - .start = EXYNOS4_PA_I2S1, - .end = EXYNOS4_PA_I2S1 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_I2S1_TX, - .end = DMACH_I2S1_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_I2S1_RX, - .end = DMACH_I2S1_RX, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), }; struct platform_device exynos4_device_i2s1 = { @@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = { }; static struct resource exynos4_i2s2_resource[] = { - [0] = { - .start = EXYNOS4_PA_I2S2, - .end = EXYNOS4_PA_I2S2 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_I2S2_TX, - .end = DMACH_I2S2_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_I2S2_RX, - .end = DMACH_I2S2_RX, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), }; struct platform_device exynos4_device_i2s2 = { @@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { }; static struct resource exynos4_pcm0_resource[] = { - [0] = { - .start = EXYNOS4_PA_PCM0, - .end = EXYNOS4_PA_PCM0 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_PCM0_TX, - .end = DMACH_PCM0_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_PCM0_RX, - .end = DMACH_PCM0_RX, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), }; struct platform_device exynos4_device_pcm0 = { @@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = { }; static struct resource exynos4_pcm1_resource[] = { - [0] = { - .start = EXYNOS4_PA_PCM1, - .end = EXYNOS4_PA_PCM1 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_PCM1_TX, - .end = DMACH_PCM1_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_PCM1_RX, - .end = DMACH_PCM1_RX, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), }; struct platform_device exynos4_device_pcm1 = { @@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = { }; static struct resource exynos4_pcm2_resource[] = { - [0] = { - .start = EXYNOS4_PA_PCM2, - .end = EXYNOS4_PA_PCM2 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_PCM2_TX, - .end = DMACH_PCM2_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_PCM2_RX, - .end = DMACH_PCM2_RX, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM2_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM2_RX), }; struct platform_device exynos4_device_pcm2 = { @@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev) } static struct resource exynos4_ac97_resource[] = { - [0] = { - .start = EXYNOS4_PA_AC97, - .end = EXYNOS4_PA_AC97 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_AC97_PCMOUT, - .end = DMACH_AC97_PCMOUT, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_AC97_PCMIN, - .end = DMACH_AC97_PCMIN, - .flags = IORESOURCE_DMA, - }, - [3] = { - .start = DMACH_AC97_MICIN, - .end = DMACH_AC97_MICIN, - .flags = IORESOURCE_DMA, - }, - [4] = { - .start = EXYNOS4_IRQ_AC97, - .end = EXYNOS4_IRQ_AC97, - .flags = IORESOURCE_IRQ, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), + [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), + [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), + [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97), }; static struct s3c_audio_pdata s3c_ac97_pdata = { @@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) } static struct resource exynos4_spdif_resource[] = { - [0] = { - .start = EXYNOS4_PA_SPDIF, - .end = EXYNOS4_PA_SPDIF + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_SPDIF, - .end = DMACH_SPDIF, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_SPDIF), }; static struct s3c_audio_pdata samsung_spdif_pdata = {