From patchwork Wed Apr 25 04:12:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8119 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 81E7423E13 for ; Wed, 25 Apr 2012 04:23:30 +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 4501EA185F9 for ; Wed, 25 Apr 2012 04:23:30 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:23: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=6cK6S3mTgKx7dmn+kcpat9p6iYYMSsOK5bHTT5u5U4k=; b=gl5iKPQm4Zqekvn3qjvhd+dAId5fDbFyOkKrxW5SKMfikxpzpnrxZkIz2W4VO/mDtr 3Lltkk25wgFSfDyIzmOjpXSRhBmngkFf5dyOLh+9gZXAOc2T2J08S8w9nPTDZz0+Ltfy 55hQGNU+IBQ7cEK75hOsrOpPGfgiAkjvItr6vEzZiZgd/s5sei2l3Zf2oNcs3rW/c3I4 FImUl+tMqGg+RBt4MdyRJY2SlcXUUXfrsj4l9k6jczqRY0fQMhMswChLbH/Rv2PZPXRF BW4zspzxLdpgpO2vV1OJKV0OqJuGb+DfTY1U7qfOSk104iGQDlFO31Eb8pe4OPd3TuSK J4Gw== Received: by 10.42.19.72 with SMTP id a8mr575000icb.39.1335327810050; Tue, 24 Apr 2012 21:23: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 x6csp231237ibt; Tue, 24 Apr 2012 21:23:29 -0700 (PDT) Received: by 10.68.201.165 with SMTP id kb5mr4088114pbc.150.1335327809383; Tue, 24 Apr 2012 21:23:29 -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.23.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:23:29 -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:23:29 -0700 (PDT) Received: by 10.68.135.38 with SMTP id pp6mr4150989pbb.82.1335327809129; Tue, 24 Apr 2012 21:23:29 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.23.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:23:27 -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 21/33] ARM: S3C24XX: mach-vr1000: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:31 +0530 Message-Id: <1335327163-11794-22-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: ALoCoQmRHMIgdNi6PBxDcVEH/IMDxhgEAa0IomdkTbaz6i0juGKYPYfiEmMKWz/Yyi4/xmKDkd4E CC: Ben Dooks CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/mach-s3c24xx/mach-vr1000.c | 39 +++++++--------------------------- 1 files changed, 8 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c index 87608d4..bd5f189 100644 --- a/arch/arm/mach-s3c24xx/mach-vr1000.c +++ b/arch/arm/mach-s3c24xx/mach-vr1000.c @@ -187,40 +187,17 @@ static struct platform_device serial_device = { /* DM9000 ethernet devices */ static struct resource vr1000_dm9k0_resource[] = { - [0] = { - .start = S3C2410_CS5 + VR1000_PA_DM9000, - .end = S3C2410_CS5 + VR1000_PA_DM9000 + 3, - .flags = IORESOURCE_MEM - }, - [1] = { - .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, - .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x7f, - .flags = IORESOURCE_MEM - }, - [2] = { - .start = IRQ_VR1000_DM9000A, - .end = IRQ_VR1000_DM9000A, - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, - } - + [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000, 4), + [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, 0x40), + [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000A, 1, NULL, IORESOURCE_IRQ \ + | IORESOURCE_IRQ_HIGHLEVEL), }; static struct resource vr1000_dm9k1_resource[] = { - [0] = { - .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, - .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x83, - .flags = IORESOURCE_MEM - }, - [1] = { - .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, - .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0xFF, - .flags = IORESOURCE_MEM - }, - [2] = { - .start = IRQ_VR1000_DM9000N, - .end = IRQ_VR1000_DM9000N, - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, - } + [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, 4), + [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, 0x40), + [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000N, 1, NULL, IORESOURCE_IRQ \ + | IORESOURCE_IRQ_HIGHLEVEL), }; /* for the moment we limit ourselves to 16bit IO until some