From patchwork Wed Apr 25 04:12:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8129 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 8166223E42 for ; Wed, 25 Apr 2012 04:24:23 +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 19173A185F9 for ; Wed, 25 Apr 2012 04:24:22 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:24:22 -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=rIwMIYBJiW3pQ53oyhrw0ezNMApQ70oCdOHd+ASoVF8=; b=GIqJraPqLfzMyYiVmqBoyCPY+aLIjZDV1bfvKBZQHeBmHRJwv4pnAWLCBPdlrZzxsG hCXT7OUTvw+WBIsSl+69+4q6pU1s+tbMkF9MBhRZ9k7aXQnEiR6EKX1NSFzIJVbkxAm9 X0VzNqFuJEX/B4cHyLGhSfl4A/h0f7Cm96dA59QP5MajMZQe9zr6zoKBUuVpxoxIBjda mqhV2fVsemBQBw+1PuGztJfGWMa8Vlz1+/ekw5Sg6ZjLuwCZ+RtmjnnIg9hiZNFyFtqf 9rnLvse23C+hZupUBKoaV6S1UpwkVUw8XgyTu47Njep4BaTpvATKFxQTDzm6xfcSUxq5 Eebg== Received: by 10.50.41.201 with SMTP id h9mr12679839igl.19.1335327862879; Tue, 24 Apr 2012 21:24:22 -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 x6csp231312ibt; Tue, 24 Apr 2012 21:24:22 -0700 (PDT) Received: by 10.68.235.105 with SMTP id ul9mr4077367pbc.106.1335327862143; Tue, 24 Apr 2012 21:24:22 -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.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:24:22 -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:21 -0700 (PDT) Received: by 10.68.230.130 with SMTP id sy2mr1167571pbc.11.1335327861914; Tue, 24 Apr 2012 21:24:21 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.24.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:24:21 -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 31/33] ARM: S5PC100: dev-audio: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:41 +0530 Message-Id: <1335327163-11794-32-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: ALoCoQlWkWtQiU7913Z//VrskjEdEEPe3pWFLsl1Cz1ZWouRjAlUtxHTQhLEuiRnV3pdT2m4hAeD CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/mach-s5pc100/dev-audio.c | 138 ++++++------------------------------ 1 files changed, 23 insertions(+), 115 deletions(-) diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c index ab2d271..9d4bde3 100644 --- a/arch/arm/mach-s5pc100/dev-audio.c +++ b/arch/arm/mach-s5pc100/dev-audio.c @@ -56,26 +56,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { }; static struct resource s5pc100_iis0_resource[] = { - [0] = { - .start = S5PC100_PA_I2S0, - .end = S5PC100_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(S5PC100_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 s5pc100_device_iis0 = { @@ -103,21 +87,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { }; static struct resource s5pc100_iis1_resource[] = { - [0] = { - .start = S5PC100_PA_I2S1, - .end = S5PC100_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(S5PC100_PA_I2S1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), }; struct platform_device s5pc100_device_iis1 = { @@ -131,21 +103,9 @@ struct platform_device s5pc100_device_iis1 = { }; static struct resource s5pc100_iis2_resource[] = { - [0] = { - .start = S5PC100_PA_I2S2, - .end = S5PC100_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(S5PC100_PA_I2S2, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), + [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), }; struct platform_device s5pc100_device_iis2 = { @@ -184,21 +144,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { }; static struct resource s5pc100_pcm0_resource[] = { - [0] = { - .start = S5PC100_PA_PCM0, - .end = S5PC100_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(S5PC100_PA_PCM0, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), }; struct platform_device s5pc100_device_pcm0 = { @@ -212,21 +160,9 @@ struct platform_device s5pc100_device_pcm0 = { }; static struct resource s5pc100_pcm1_resource[] = { - [0] = { - .start = S5PC100_PA_PCM1, - .end = S5PC100_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(S5PC100_PA_PCM1, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), + [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), }; struct platform_device s5pc100_device_pcm1 = { @@ -247,31 +183,11 @@ static int s5pc100_ac97_cfg_gpio(struct platform_device *pdev) } static struct resource s5pc100_ac97_resource[] = { - [0] = { - .start = S5PC100_PA_AC97, - .end = S5PC100_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(S5PC100_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 = { @@ -308,16 +224,8 @@ static int s5pc100_spdif_cfg_gpg3(struct platform_device *pdev) } static struct resource s5pc100_spdif_resource[] = { - [0] = { - .start = S5PC100_PA_SPDIF, - .end = S5PC100_PA_SPDIF + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_SPDIF, - .end = DMACH_SPDIF, - .flags = IORESOURCE_DMA, - }, + [0] = DEFINE_RES_MEM(S5PC100_PA_SPDIF, SZ_256), + [1] = DEFINE_RES_DMA(DMACH_SPDIF), }; static struct s3c_audio_pdata s5p_spdif_pdata = {