From patchwork Wed Apr 25 04:12:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8130 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 63C1823E42 for ; Wed, 25 Apr 2012 04:24:27 +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 2726DA185F9 for ; Wed, 25 Apr 2012 04:24:27 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:24:26 -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=HcMifIAp/xsHID1jnh/hAg++ROCQD8w64Kdsj0zW0sg=; b=Jzy0I5zLQT3Ws0w4qgFS4MCvLmwZI+GU0FrgkGC8suy6kQBT/h+BGLgxL2azKwx7J5 BlwrhM38K/ypbCHwNLpDE3PQSwCp3Ml2YVUoLX9qXdLFRStvpqzflIUGRmTyE8mWLTub gtfS9PIpzDFkuvVCnlUxfRb5yY6nY2wn/QNvQbvdzWlk1XyjzBIq+fyjRkxDRNqyPj7L NUk5SiA8GCGv2Aom3EXgFFNZb5j7YhI9aTIqngmn/R1SIadYyCDaW5rroq5Bh//pxn7N taoMnQBwAI1k63HOwBH8WjnIy7mul/Ozds1iNCTEJPjN5HSY6P2ZC5tL/Pu8FWekJnSz ylmw== Received: by 10.50.135.36 with SMTP id pp4mr755551igb.19.1335327866927; Tue, 24 Apr 2012 21:24:26 -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 x6csp231317ibt; Tue, 24 Apr 2012 21:24:26 -0700 (PDT) Received: by 10.68.134.8 with SMTP id pg8mr3955177pbb.152.1335327866295; Tue, 24 Apr 2012 21:24:26 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id ox6si756797pbb.309.2012.04.24.21.24.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:24:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 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-pb0-f50.google.com with SMTP id xa12so1100728pbc.37 for ; Tue, 24 Apr 2012 21:24:26 -0700 (PDT) Received: by 10.68.221.74 with SMTP id qc10mr4163036pbc.80.1335327866087; Tue, 24 Apr 2012 21:24:26 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.24.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:24:25 -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 32/33] ARM: S5PV210: dev-audio: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:42 +0530 Message-Id: <1335327163-11794-33-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: ALoCoQn8iVD3HrczBaDsyXOIwnz2MzUUd+Oc14iFNYGPV275a95jsq3y3tfo5o963iJQfm7f9RJm CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/mach-s5pv210/dev-audio.c | 156 ++++++------------------------------ 1 files changed, 26 insertions(+), 130 deletions(-) diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c index 63f5d82..8367749 100644 --- a/arch/arm/mach-s5pv210/dev-audio.c +++ b/arch/arm/mach-s5pv210/dev-audio.c @@ -59,26 +59,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { }; static struct resource s5pv210_iis0_resource[] = { - [0] = { - .start = S5PV210_PA_IIS0, - .end = S5PV210_PA_IIS0 + 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(S5PV210_PA_IIS0, 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 s5pv210_device_iis0 = { @@ -106,21 +90,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { }; static struct resource s5pv210_iis1_resource[] = { - [0] = { - .start = S5PV210_PA_IIS1, - .end = S5PV210_PA_IIS1 + 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(S5PV210_PA_IIS1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), }; struct platform_device s5pv210_device_iis1 = { @@ -134,21 +106,9 @@ struct platform_device s5pv210_device_iis1 = { }; static struct resource s5pv210_iis2_resource[] = { - [0] = { - .start = S5PV210_PA_IIS2, - .end = S5PV210_PA_IIS2 + 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(S5PV210_PA_IIS2, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), }; struct platform_device s5pv210_device_iis2 = { @@ -188,21 +148,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { }; static struct resource s5pv210_pcm0_resource[] = { - [0] = { - .start = S5PV210_PA_PCM0, - .end = S5PV210_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(S5PV210_PA_PCM0, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), }; struct platform_device s5pv210_device_pcm0 = { @@ -216,21 +164,9 @@ struct platform_device s5pv210_device_pcm0 = { }; static struct resource s5pv210_pcm1_resource[] = { - [0] = { - .start = S5PV210_PA_PCM1, - .end = S5PV210_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(S5PV210_PA_PCM1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), }; struct platform_device s5pv210_device_pcm1 = { @@ -244,21 +180,9 @@ struct platform_device s5pv210_device_pcm1 = { }; static struct resource s5pv210_pcm2_resource[] = { - [0] = { - .start = S5PV210_PA_PCM2, - .end = S5PV210_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(S5PV210_PA_PCM2, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM2_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM2_RX), }; struct platform_device s5pv210_device_pcm2 = { @@ -279,31 +203,11 @@ static int s5pv210_ac97_cfg_gpio(struct platform_device *pdev) } static struct resource s5pv210_ac97_resource[] = { - [0] = { - .start = S5PV210_PA_AC97, - .end = S5PV210_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 = IRQ_AC97, - .end = IRQ_AC97, - .flags = IORESOURCE_IRQ, - }, + [0] = DEFINE_RES_MEM(S5PV210_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(IRQ_AC97), }; static struct s3c_audio_pdata s3c_ac97_pdata = { @@ -334,16 +238,8 @@ static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev) } static struct resource s5pv210_spdif_resource[] = { - [0] = { - .start = S5PV210_PA_SPDIF, - .end = S5PV210_PA_SPDIF + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_SPDIF, - .end = DMACH_SPDIF, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(S5PV210_PA_SPDIF, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_SPDIF), }; static struct s3c_audio_pdata samsung_spdif_pdata = {