From patchwork Wed Apr 25 04:12:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8107 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 52AE223E13 for ; Wed, 25 Apr 2012 04:22:31 +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 15D46A18860 for ; Wed, 25 Apr 2012 04:22:30 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:22:30 -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=tXrE5IvcL1gCCAG5Nv8DWkrubKasto6+Ke5T1ZxnQGQ=; b=PcWCLTfNQLwJw0t1b/LLHXNybL8Nc4ktE8gQF5ztbikpaeEX0sh/jItibg1rtAVzrG yz7k4xlysZnMd8zcsILEMY6L67HnJyacRQ3r9djaL0wbeVMGxbuLNOZEy3K3c70RUC5B vwAKzFZhQyZ3y4Q8YV1rqWP4m05s8/KDFaH1o+9cR4nzFkmWYgkRUpjtW4sw7L8Bq+Ha sxCX6XX853NHSgBz0+ybNHiyD2MDY6ab+4n8BGJZ2ro+3l2+TIikAfi4k34mGdalFDyf s5Zx4Z3nkP/L21mK2tC0FkH5PnA/PqSe21zmiO3Qn8sSu08128QwhPA8akuKAWeb96aO m4Vg== Received: by 10.50.207.38 with SMTP id lt6mr695706igc.55.1335327750844; Tue, 24 Apr 2012 21:22:30 -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 x6csp231172ibt; Tue, 24 Apr 2012 21:22:30 -0700 (PDT) Received: by 10.68.217.67 with SMTP id ow3mr3952040pbc.16.1335327750191; Tue, 24 Apr 2012 21:22:30 -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.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:22:30 -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:29 -0700 (PDT) Received: by 10.68.189.106 with SMTP id gh10mr2067244pbc.85.1335327748985; Tue, 24 Apr 2012 21:22:28 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.22.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:22:28 -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, Ben Dooks Subject: [PATCH 09/33] ARM: S3C24XX: mach-anubis: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:19 +0530 Message-Id: <1335327163-11794-10-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: ALoCoQkt05W7XOKCuAGdRjY73RzIwTg0neytpl7suZuiPGKTA5OtJNkQnPIhkDsQRHu9X0Xia6I9 CC: Ben Dooks CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/mach-s3c24xx/mach-anubis.c | 62 ++++++---------------------------- 1 files changed, 11 insertions(+), 51 deletions(-) diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c index 60c72c5..5a7d0c0 100644 --- a/arch/arm/mach-s3c24xx/mach-anubis.c +++ b/arch/arm/mach-s3c24xx/mach-anubis.c @@ -235,19 +235,9 @@ static struct pata_platform_info anubis_ide_platdata = { }; static struct resource anubis_ide0_resource[] = { - { - .start = S3C2410_CS3, - .end = S3C2410_CS3 + (8*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = S3C2410_CS3 + (1<<26) + (6*32), - .end = S3C2410_CS3 + (1<<26) + (7*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = IRQ_IDE0, - .end = IRQ_IDE0, - .flags = IORESOURCE_IRQ, - }, + [0] = DEFINE_RES_MEM(S3C2410_CS3, 8 * 32), + [2] = DEFINE_RES_MEM(S3C2410_CS3 + (1 << 26) + (6 * 32), 32), + [3] = DEFINE_RES_IRQ(IRQ_IDE0), }; static struct platform_device anubis_device_ide0 = { @@ -262,19 +252,9 @@ static struct platform_device anubis_device_ide0 = { }; static struct resource anubis_ide1_resource[] = { - { - .start = S3C2410_CS4, - .end = S3C2410_CS4 + (8*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = S3C2410_CS4 + (1<<26) + (6*32), - .end = S3C2410_CS4 + (1<<26) + (7*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = IRQ_IDE0, - .end = IRQ_IDE0, - .flags = IORESOURCE_IRQ, - }, + [0] = DEFINE_RES_MEM(S3C2410_CS4, 8 * 32), + [1] = DEFINE_RES_MEM(S3C2410_CS4 + (1 << 26) + (6 * 32), 32), + [2] = DEFINE_RES_IRQ(IRQ_IDE0), }; static struct platform_device anubis_device_ide1 = { @@ -298,16 +278,8 @@ static struct ax_plat_data anubis_asix_platdata = { }; static struct resource anubis_asix_resource[] = { - [0] = { - .start = S3C2410_CS5, - .end = S3C2410_CS5 + (0x20 * 0x20) -1, - .flags = IORESOURCE_MEM - }, - [1] = { - .start = IRQ_ASIX, - .end = IRQ_ASIX, - .flags = IORESOURCE_IRQ - } + [0] = DEFINE_RES_MEM(S3C2410_CS5, 0x20 * 0x20), + [1] = DEFINE_RES_IRQ(IRQ_ASIX), }; static struct platform_device anubis_device_asix = { @@ -323,21 +295,9 @@ static struct platform_device anubis_device_asix = { /* SM501 */ static struct resource anubis_sm501_resource[] = { - [0] = { - .start = S3C2410_CS2, - .end = S3C2410_CS2 + SZ_8M, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = S3C2410_CS2 + SZ_64M - SZ_2M, - .end = S3C2410_CS2 + SZ_64M - 1, - .flags = IORESOURCE_MEM, - }, - [2] = { - .start = IRQ_EINT0, - .end = IRQ_EINT0, - .flags = IORESOURCE_IRQ, - }, + [0] = DEFINE_RES_MEM(S3C2410_CS2, SZ_8M), + [1] = DEFINE_RES_MEM(S3C2410_CS2 + SZ_64M - SZ_2M, SZ_2M), + [2] = DEFINE_RES_IRQ(IRQ_EINT0), }; static struct sm501_initdata anubis_sm501_initdata = {