From patchwork Wed Apr 25 04:12:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8128 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 44A3B23E42 for ; Wed, 25 Apr 2012 04:24:17 +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 07F2FA187BA for ; Wed, 25 Apr 2012 04:24:16 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:24:16 -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=owLy2jo0WUtyfT/aonGveiyNFR7GgGiELOC+eqh0F1w=; b=OePjbWxADH/dIzR6oFuXD9TJr4tvxCATsCp2ZzyFA6huuY9eLLG38bXA+TgevBUYEr jY7uwMmuPAwYePPSqoWUBUvKolNWF0/NZL10DF6aARKUhqph0ug0aaiiOsJHVTs3ZZBb skhlw7LcgwNgEPXa8O8j/dpsH+2dIMG8jaAwoalBGbT7hY4L/06yhNh5N6UhoZpLR/3j nHS/Dmg5LGqzYrY04os3g1ZwPANKDlNFz1Iyu99xJB64FgJPBpynbWV6imsMA/cybdGy uJQE/50gkfIej0n/J8PYIVl+PblaaNrBOENZVBOewIW3C8BAKscxCLQoCB+NCw9F1QYr etZA== Received: by 10.50.17.201 with SMTP id q9mr758113igd.19.1335327856799; Tue, 24 Apr 2012 21:24:16 -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 x6csp231303ibt; Tue, 24 Apr 2012 21:24:16 -0700 (PDT) Received: by 10.68.216.6 with SMTP id om6mr4120411pbc.117.1335327856127; Tue, 24 Apr 2012 21:24:16 -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.24.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:24:16 -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:24:15 -0700 (PDT) Received: by 10.68.234.201 with SMTP id ug9mr1487590pbc.113.1335327855918; Tue, 24 Apr 2012 21:24:15 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.24.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:24:15 -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 30/33] ARM: S5P64X0: dev-audio: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:40 +0530 Message-Id: <1335327163-11794-31-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: ALoCoQmSMvEqPZijgcGCSDH4W4DGoOmg7yhW2g56M6JCKjkN/TYy1hy1u5dCDMkQAheUc74WIxPJ CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/mach-s5p64x0/dev-audio.c | 72 ++++++------------------------------ 1 files changed, 12 insertions(+), 60 deletions(-) diff --git a/arch/arm/mach-s5p64x0/dev-audio.c b/arch/arm/mach-s5p64x0/dev-audio.c index 35f1f22..91113dd 100644 --- a/arch/arm/mach-s5p64x0/dev-audio.c +++ b/arch/arm/mach-s5p64x0/dev-audio.c @@ -51,21 +51,9 @@ static struct s3c_audio_pdata s5p6440_i2s_pdata = { }; static struct resource s5p64x0_i2s0_resource[] = { - [0] = { - .start = S5P64X0_PA_I2S, - .end = S5P64X0_PA_I2S + 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, - }, + [0] = DEFINE_RES_MEM(S5P64X0_PA_I2S, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), }; struct platform_device s5p6440_device_iis = { @@ -130,21 +118,9 @@ static struct s3c_audio_pdata s5p6450_i2s_pdata = { }; static struct resource s5p6450_i2s1_resource[] = { - [0] = { - .start = S5P6450_PA_I2S1, - .end = S5P6450_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(S5P6450_PA_I2S1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), }; struct platform_device s5p6450_device_iis1 = { @@ -158,21 +134,9 @@ struct platform_device s5p6450_device_iis1 = { }; static struct resource s5p6450_i2s2_resource[] = { - [0] = { - .start = S5P6450_PA_I2S2, - .end = S5P6450_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(S5P6450_PA_I2S2, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), }; struct platform_device s5p6450_device_iis2 = { @@ -208,21 +172,9 @@ static struct s3c_audio_pdata s5p6440_pcm_pdata = { }; static struct resource s5p6440_pcm0_resource[] = { - [0] = { - .start = S5P64X0_PA_PCM, - .end = S5P64X0_PA_PCM + 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(S5P64X0_PA_PCM, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), }; struct platform_device s5p6440_device_pcm = {