From patchwork Mon Sep 9 15:41:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 19844 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E419A25A57 for ; Mon, 9 Sep 2013 15:41:25 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf6350377yen.10 for ; Mon, 09 Sep 2013 08:41:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=sU6YbB+lkh42vw1QPHFhi/K9DG1NOLk+oM6kQqESfW4=; b=dg/ZFsGztu3dJc7fKHedx2ln9OtEzEed6A9SJMimwUd5DhpvLu7U7Y0l7ru2SRjCRf 8Z2CXDIxIJGS9oOwUmftfKF2V2vMCyYnD8aYXHidY/1HnxarY20MvH+YRJPiMEbxd/4I QGcdslcY2cp74pdQGevcttdtdvxrXabytPyrFr756GWKZgSWvc5CY9HCrowzAv7gSFp8 jtexFEdL/03eW1CdFtROdq/AwTBDyJANK8KHXv72CL3jPQVRn2eKwMW/Ud4gHenoQ7MV fjTT7iPXx+LanOlzyFymA3XTL2oS4OrP7zcZEZEA6tVOY6L+lDtTUFxOwhrpnq0hGlg7 KfhQ== X-Received: by 10.58.106.198 with SMTP id gw6mr1501960veb.6.1378741285603; Mon, 09 Sep 2013 08:41:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.87.36 with SMTP id u4ls1800946qez.56.gmail; Mon, 09 Sep 2013 08:41:25 -0700 (PDT) X-Received: by 10.52.120.78 with SMTP id la14mr15531539vdb.9.1378741285522; Mon, 09 Sep 2013 08:41:25 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id tj1si3298590vdc.1.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 08:41:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ha12so4008807vcb.37 for ; Mon, 09 Sep 2013 08:41:25 -0700 (PDT) X-Gm-Message-State: ALoCoQl18So5n+jL0d4O/e9eC60RkJIejumZ4QcMtFihjdBIFftmhXtrIjPghu0p2RbBKNH+aeTe X-Received: by 10.52.232.165 with SMTP id tp5mr15108021vdc.11.1378741285435; Mon, 09 Sep 2013 08:41:25 -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 u4csp94177vcz; Mon, 9 Sep 2013 08:41:24 -0700 (PDT) X-Received: by 10.112.0.242 with SMTP id 18mr16591194lbh.18.1378741284247; Mon, 09 Sep 2013 08:41:24 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by mx.google.com with ESMTPS id m1si5707128lae.175.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 08:41:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.217.177 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id p5so5078832lbi.36 for ; Mon, 09 Sep 2013 08:41:23 -0700 (PDT) X-Received: by 10.152.18.131 with SMTP id w3mr563288lad.47.1378741283633; Mon, 09 Sep 2013 08:41:23 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ap7sm6681926lac.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Sep 2013 08:41:22 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Lennert Buytenhek , Dan Williams , Mikael Pettersson Cc: Alexandre Courbot , linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 8/8] ARM: plat-iop: pass physical base for GPIO Date: Mon, 9 Sep 2013 17:41:19 +0200 Message-Id: <1378741279-13143-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.220.178 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: Lennert Buytenhek Cc: Dan Williams Cc: Mikael Pettersson Signed-off-by: Linus Walleij --- arch/arm/mach-iop32x/iq31244.c | 2 +- arch/arm/mach-iop32x/iq80321.c | 2 +- arch/arm/mach-iop33x/iq80331.c | 2 +- arch/arm/mach-iop33x/iq80332.c | 2 +- drivers/gpio/gpio-iop.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 4441a87..cbe6df4 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c @@ -282,7 +282,7 @@ void ep80219_power_off(void) } static struct resource iq31244_gpio_res[] = { - DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4), 0x10), + DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x07c4), 0x10), }; static void __init iq31244_init_machine(void) diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index b41cd49..82a1998 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c @@ -169,7 +169,7 @@ static struct platform_device iq80321_serial_device = { }; static struct resource iq80321_gpio_res[] = { - DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4), 0x10), + DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x07c4), 0x10), }; static void __init iq80321_init_machine(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); }