Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1747160ybg; Sat, 19 Oct 2019 01:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6TL/4raM8O6wxjQQo683cV/UZJgJpNFbRab2USmOhfQsBvyyzfTudoQ9/CovoRTJ5uoDv X-Received: by 2002:a05:6402:1686:: with SMTP id a6mr14059270edv.174.1571474257854; Sat, 19 Oct 2019 01:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474257; cv=none; d=google.com; s=arc-20160816; b=n0NWh+xt4TDFa73GyEAxrbdjfyAY0x3GmIFMYUU0vuNkxn1Ov9ET8JuKDYxpQYcqeB wNG4nz18EWLyE/fRleO+kfFvViLwHZy6UwFvbLLyv3gVBY7kngevtDvrNNZlgnMCsBlj tci54vER/ndBobHMwXFTtZbY9it+t4bQLoBijJbazsi6imLRBpFDa1Z0iw0mmJXFTLA1 Q/SDhDGOKYJx3x2sibNTUe/pHr5Y5XPIw8ze/TsogMY0ny2lNd3Qt/Co+PHJH0F7Op/p cZRis+PDANv5JJrsWeheOjXj+giZqXYrAWRD6JyzjflgwGxjgR38ON9Qh60xpFtJYUbw HXWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fOR4nKa8hcifKUGSnUJ4w3eYP5WQo0z+Gl4oOqzt/go=; b=lw6+YonPUlEwOT7D5c4BXUToL+5WwGnH2NFWWCmLGKBpH6CzKiyA5obWstPj9kdd92 pl3QPOX0it25si1G85B2u/jBHHjef4jHvhR0sK6zvyLBYSeuA/4Z1SzMIEORR0tv3DYU k1O5jCRPHrbirxeGIqxBrzMTRcGBKl+XoLNPYws6/vXO0uGK33h3+S1ukRdM28wF36fX kz8Zpo4MoPclRPz1wDeBIoUTrN4SLUWmF02iaN88mHtA3wImTt7TELLABVnaqAV1z68k nXlWyVeu3xnWUnW8Iimfc5GONJVUA35PfSHyop5T+oP/eTNlbApZfXSY0B0B9jA9lIEw jyAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz25si4607174ejb.175.2019.10.19.01.37.15; Sat, 19 Oct 2019 01:37:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502068AbfJRPmh (ORCPT + 99 others); Fri, 18 Oct 2019 11:42:37 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:51295 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2501966AbfJRPme (ORCPT ); Fri, 18 Oct 2019 11:42:34 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MNKqC-1ifkHC3J4k-00Orkl; Fri, 18 Oct 2019 17:42:24 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Jens Axboe , linux-ide@vger.kernel.org Subject: [PATCH 14/46] ARM: pxa: use pdev resource for palmld mmio Date: Fri, 18 Oct 2019 17:41:29 +0200 Message-Id: <20191018154201.1276638-14-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:9s9xjur6L83/idKD1YLwArjJyhyl8Cp7qlwCvaEgeO21rFy+Txo lkGteYOQn0MBqAMwkJi0uRdkZLsfImWHPdYLE7PLW21Sd3U+j5xmJVqizean3Yo6tGIyt4j b1FTAdx0jX4nBBwGdwJ6o8pC+wzWxEhYJyN0mswYrz7qjItCmmaKqVNf3OcjWcOw+Au25rz dMaGUYwa0lBQt8U9W94dw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:CGnzZHc3OD0=:1UpnXV4WJndTPk7c3U4mVT 58XASwopJp2Pwtju3qRPQf7vELH43tB/mnU3w9S1XGNK2fKElPNqbLdX9BoaoFCn2E43lKsGF 1k7jJBif/36MpjBUMzqOuHQkJSUwfurbA0nLOTsKz+dvxxR+s/E9dJrb2FN3K7J1oRAl0kEQQ UMjGv9xBTAxrHHVMoHxIGTqBx6VqHLXKW4ntZPFJl8OMnxHeJp5J7qXk0xS4UhrE1mOeoxUtR xmWF+qAp/KSrMZvQOYHiuRjNN7QgR6GVaCBLcVEN2wvHLml4jsRtWWJdcgvrwzioOGFjiwlh6 s+gEbfWpIHBId2plMIweDQmCWORT+CRxcWsEYEzcrXFDdyA092E6OqKzicnGMuw+gL2I6qrLI osG4LuHgVUkphSW7aOg4kBviIGnWDjQjzzU7njddgQ6SgzEJiDSt14MsT0q8bGY/RcMrPm8/+ HVDQwKwSmGR09sO96wMI5oKvzXwZeW1HFYATOlw9bbgTKpnYiQ2f79SbVO2YHcKjFulZsXCiI pFUxCUAJ1J40OGkqr01masMQecvHN+gbyt0L4r5M2KVdZ5Hcw52J9lFNGrKIkvImIaNIQL4ZJ lZCQBtZ1r3RcCRgxeJNWEOFkZbEfHV7beKkonkUlPpMbgur3MAu1PSMPDciZw8+4CCZoRU4Ll 4NZ/jDpVOVwFdDHEsY21mQW07Qhxy942y0cUYlEWYZnmVoYwKF/WtXdeX99tqzk2meV657IHA n6/zsOBjfI2E3hIN08dSwgB8KAS8R4OOti2DQcxhPCzraPjhD+zU6E6L4rpqqFZ0xfT+QBuUk XeACZjHjrhwQ+lau79HXI35qmO1otzkjAuHOFjjfMIHDYmjuBTkWdV+2NJEf5cR8G1OOTg1JR FDDTyCTRoc9JoCXNmHbw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The palmld header is almost unused in drivers, the only remaining thing now is the PATA device address, which should really be passed as a resource. Cc: Bartlomiej Zolnierkiewicz Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/palmld-pcmcia.c | 3 ++- arch/arm/mach-pxa/palmld.c | 12 +++++++++--- arch/arm/mach-pxa/{include/mach => }/palmld.h | 2 +- drivers/ata/pata_palmld.c | 3 +-- 4 files changed, 13 insertions(+), 7 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/palmld.h (98%) diff --git a/arch/arm/mach-pxa/palmld-pcmcia.c b/arch/arm/mach-pxa/palmld-pcmcia.c index 07e0f7438db1..720294a50864 100644 --- a/arch/arm/mach-pxa/palmld-pcmcia.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -13,9 +13,10 @@ #include #include -#include #include +#include "palmld.h" + static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, { GPIO_NR_PALMLD_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" }, diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index d85146957004..d821606ce0b5 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c @@ -29,8 +29,8 @@ #include #include "pxa27x.h" +#include "palmld.h" #include -#include #include #include #include @@ -279,9 +279,15 @@ static inline void palmld_leds_init(void) {} * HDD ******************************************************************************/ #if defined(CONFIG_PATA_PALMLD) || defined(CONFIG_PATA_PALMLD_MODULE) +static struct resource palmld_ide_resources[] = { + DEFINE_RES_MEM(PALMLD_IDE_PHYS, 0x1000), +}; + static struct platform_device palmld_ide_device = { - .name = "pata_palmld", - .id = -1, + .name = "pata_palmld", + .id = -1, + .resource = palmld_ide_resources, + .num_resources = ARRAY_SIZE(palmld_ide_resources), }; static struct gpiod_lookup_table palmld_ide_gpio_table = { diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/palmld.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmld.h rename to arch/arm/mach-pxa/palmld.h index 99a6d8b3a1e3..ee3bc15b71a2 100644 --- a/arch/arm/mach-pxa/include/mach/palmld.h +++ b/arch/arm/mach-pxa/palmld.h @@ -9,7 +9,7 @@ #ifndef _INCLUDE_PALMLD_H_ #define _INCLUDE_PALMLD_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c index 2448441571ed..400e65190904 100644 --- a/drivers/ata/pata_palmld.c +++ b/drivers/ata/pata_palmld.c @@ -25,7 +25,6 @@ #include #include -#include #define DRV_NAME "pata_palmld" @@ -63,7 +62,7 @@ static int palmld_pata_probe(struct platform_device *pdev) return -ENOMEM; /* remap drive's physical memory address */ - mem = devm_ioremap(dev, PALMLD_IDE_PHYS, 0x1000); + mem = devm_platform_ioremap_resource(pdev, 0); if (!mem) return -ENOMEM; -- 2.20.0