From patchwork Fri Sep 20 20:18:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20489 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5137C25DFC for ; Fri, 20 Sep 2013 20:18:27 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id b4sf840570qen.5 for ; Fri, 20 Sep 2013 13:18:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=EyeOdDWC5QEy8MPUkSxVjdJFTp66apewF3fFa3ioh5I=; b=dHbMhoZsvw38+kOYnSkY2LOQCspwzMdkeyf7aCPCYDHoksmgqKb7Uvyr7OMmBSp9ZZ XBZs11zBQAoXI6j0vq+gOsAYgu6GrA0CAIcb3rjZd+3h39RXudvIMv1lTU0Iy0EN+rYT 78JSGWnKhKtRpJPx98/FkBQ4/UhmK6os2Fl2PBmZdknm3idRSNu1M5svAfVPbjhQ3Xl0 FsVXoaJ2m0oI3c1p86G9o7MY8RhM3E1QIakleathMmBBzxMnZetypPGHXbioQGjgKiYt 5sE82l5BeIXBUygogICDvuvVCPpz2FDtu4nfL3ztq+aoWLB22sK4dABNbakBEEHCGntQ Mb1g== X-Gm-Message-State: ALoCoQkhNiUTWgXPQcEiOfu76s3CdGXMUxEg/tGqHsC3TRbG0Ek7Q88glNl3DDBljdVd6GjQYVfU X-Received: by 10.224.2.68 with SMTP id 4mr3211450qai.1.1379708307146; Fri, 20 Sep 2013 13:18:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.72 with SMTP id eo8ls422619qeb.41.gmail; Fri, 20 Sep 2013 13:18:27 -0700 (PDT) X-Received: by 10.220.43.19 with SMTP id u19mr8069461vce.3.1379708307057; Fri, 20 Sep 2013 13:18:27 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id qf5si408646vec.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 13:18:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so678064vbb.23 for ; Fri, 20 Sep 2013 13:18:27 -0700 (PDT) X-Received: by 10.58.137.167 with SMTP id qj7mr8015205veb.1.1379708306952; Fri, 20 Sep 2013 13:18:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp36827vcz; Fri, 20 Sep 2013 13:18:26 -0700 (PDT) X-Received: by 10.15.74.197 with SMTP id j45mr12969880eey.40.1379708305963; Fri, 20 Sep 2013 13:18:25 -0700 (PDT) Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by mx.google.com with ESMTPS id q8si12700428eem.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 13:18:25 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.46 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.83.46; Received: by mail-ee0-f46.google.com with SMTP id c13so487716eek.19 for ; Fri, 20 Sep 2013 13:18:25 -0700 (PDT) X-Received: by 10.14.208.194 with SMTP id q42mr13047780eeo.31.1379708305333; Fri, 20 Sep 2013 13:18:25 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id z12sm21963704eev.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 20 Sep 2013 13:18:24 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Lennert Buytenhek , Dan Williams , Mikael Pettersson , Aaro Koskinen Cc: Alexandre Courbot , linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 8/8] ARM: plat-iop: pass physical base for GPIO Date: Fri, 20 Sep 2013 22:18:20 +0200 Message-Id: <1379708300-8129-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This alters the IOP platforms to pass a physical base for their GPIO blocks and alters the driver to remap it when probing instead of relying on the virtual addresses to be used. Cc: Aaro Koskinen Cc: Lennert Buytenhek Cc: Dan Williams Cc: Mikael Pettersson Signed-off-by: Linus Walleij --- arch/arm/mach-iop32x/gpio-iop32x.h | 2 +- arch/arm/mach-iop33x/iq80331.c | 2 +- arch/arm/mach-iop33x/iq80332.c | 2 +- drivers/gpio/gpio-iop.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-iop32x/gpio-iop32x.h b/arch/arm/mach-iop32x/gpio-iop32x.h index b8710a6..3c7309c 100644 --- a/arch/arm/mach-iop32x/gpio-iop32x.h +++ b/arch/arm/mach-iop32x/gpio-iop32x.h @@ -1,5 +1,5 @@ static struct resource iop32x_gpio_res[] = { - DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4), 0x10), + DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x07c4), 0x10), }; static inline void register_iop32x_gpio(void) diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index 25741c4..e2cb65c 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c @@ -123,7 +123,7 @@ static struct platform_device iq80331_flash_device = { }; static struct resource iq80331_gpio_res[] = { - DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780), 0x10), + DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x1780), 0x10), }; static void __init iq80331_init_machine(void) diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index a3b56e1..0b6269d 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c @@ -123,7 +123,7 @@ static struct platform_device iq80332_flash_device = { }; static struct resource iq80332_gpio_res[] = { - DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780), 0x10), + DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x1780), 0x10), }; static void __init iq80332_init_machine(void) diff --git a/drivers/gpio/gpio-iop.c b/drivers/gpio/gpio-iop.c index 0d991d7..c22a61b 100644 --- a/drivers/gpio/gpio-iop.c +++ b/drivers/gpio/gpio-iop.c @@ -110,7 +110,7 @@ static int iop3xx_gpio_probe(struct platform_device *pdev) struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = (void *) res->start; + base = devm_ioremap_resource(&pdev->dev, res); return gpiochip_add(&iop3xx_chip); }