From patchwork Wed Apr 25 04:12:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 8104 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 36F2F23E13 for ; Wed, 25 Apr 2012 04:22: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 E7283A1860D for ; Wed, 25 Apr 2012 04:22:16 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2775712iag.11 for ; Tue, 24 Apr 2012 21:22: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=9as1qFIyeUiuuK/0H4LTrILj+l1beMeJO4HvtmWRloE=; b=gTCDO5OOE/MLhvAel3Qqz9Sdx5lmUh+KKpTwaaN40vNOURnQbDlrGNR2FX0DfXmHCm H8Az0yAdddgwenkTWtu3d7rPQdOZnMLtUJ7SXVrrqUS1Nh3lsi/mhakPp+f6RrOSX1gk YxztFjYpRxWc2dJNHe+ZjijVZtNNrBeASmcrvVHPmVWOgP1Os1eXLOe7YKpKucl6YJAR DEDaPl4pmG079aqTz2S6xwRZjv1+u8w3Z1AJJNOcyhrdB0mbsjKriRdida2Gt0RG/6fx k8hMiO3tdzh5Yz/vBZxvGcz+swbFnOp/C671gCOhi7aL/hu75mN0dBfDUgQEGSR02LYa sZDg== Received: by 10.50.194.163 with SMTP id hx3mr628252igc.49.1335327736717; Tue, 24 Apr 2012 21:22: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 x6csp231158ibt; Tue, 24 Apr 2012 21:22:16 -0700 (PDT) Received: by 10.68.130.40 with SMTP id ob8mr4203104pbb.84.1335327736082; Tue, 24 Apr 2012 21:22:16 -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.22.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:22:16 -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:22:15 -0700 (PDT) Received: by 10.68.224.34 with SMTP id qz2mr3913762pbc.166.1335327735875; Tue, 24 Apr 2012 21:22:15 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm9954480pbc.37.2012.04.24.21.22.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 21:22: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, Ben Dooks Subject: [PATCH 06/33] ARM: S3C24XX: dev-uart: Use common macro to define resources Date: Wed, 25 Apr 2012 09:42:16 +0530 Message-Id: <1335327163-11794-7-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: ALoCoQkvzZL+YjOYr5LZF+noT9L4YJE2xQBoAAjcMGnfFBx2KkvkaMdXirdbBY7DFYRrkMp921q+ CC: Ben Dooks CC: Kukjin Kim Signed-off-by: Tushar Behera --- arch/arm/plat-s3c24xx/dev-uart.c | 56 +++++++++++--------------------------- 1 files changed, 16 insertions(+), 40 deletions(-) diff --git a/arch/arm/plat-s3c24xx/dev-uart.c b/arch/arm/plat-s3c24xx/dev-uart.c index 9ab22e6..d779216 100644 --- a/arch/arm/plat-s3c24xx/dev-uart.c +++ b/arch/arm/plat-s3c24xx/dev-uart.c @@ -29,55 +29,31 @@ /* Serial port registrations */ static struct resource s3c2410_uart0_resource[] = { - [0] = { - .start = S3C2410_PA_UART0, - .end = S3C2410_PA_UART0 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX0, - .end = IRQ_S3CUART_ERR0, - .flags = IORESOURCE_IRQ, - } + [0] = DEFINE_RES_MEM(S3C2410_PA_UART0, SZ_16K), + [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX0, \ + IRQ_S3CUART_ERR0 - IRQ_S3CUART_RX0 + 1, \ + NULL, IORESOURCE_IRQ) }; static struct resource s3c2410_uart1_resource[] = { - [0] = { - .start = S3C2410_PA_UART1, - .end = S3C2410_PA_UART1 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX1, - .end = IRQ_S3CUART_ERR1, - .flags = IORESOURCE_IRQ, - } + [0] = DEFINE_RES_MEM(S3C2410_PA_UART1, SZ_16K), + [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX1, \ + IRQ_S3CUART_ERR1 - IRQ_S3CUART_RX1 + 1, \ + NULL, IORESOURCE_IRQ) }; static struct resource s3c2410_uart2_resource[] = { - [0] = { - .start = S3C2410_PA_UART2, - .end = S3C2410_PA_UART2 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX2, - .end = IRQ_S3CUART_ERR2, - .flags = IORESOURCE_IRQ, - } + [0] = DEFINE_RES_MEM(S3C2410_PA_UART2, SZ_16K), + [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX2, \ + IRQ_S3CUART_ERR2 - IRQ_S3CUART_RX2 + 1, \ + NULL, IORESOURCE_IRQ) }; static struct resource s3c2410_uart3_resource[] = { - [0] = { - .start = S3C2443_PA_UART3, - .end = S3C2443_PA_UART3 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX3, - .end = IRQ_S3CUART_ERR3, - .flags = IORESOURCE_IRQ, - }, + [0] = DEFINE_RES_MEM(S3C2443_PA_UART3, SZ_16K), + [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX3, \ + IRQ_S3CUART_ERR3 - IRQ_S3CUART_RX3 + 1, \ + NULL, IORESOURCE_IRQ) }; struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {