From patchwork Tue Apr 19 16:37:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 563346 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3437493map; Tue, 19 Apr 2022 09:54:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYB20iG7zGIJNl5KBvb1IBl3051nywL11/kIDOIHx+oCF/hHzimNXYh3VE06FMhpri6R5o X-Received: by 2002:a63:ec50:0:b0:39d:2d53:76e7 with SMTP id r16-20020a63ec50000000b0039d2d5376e7mr15436293pgj.338.1650387269475; Tue, 19 Apr 2022 09:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650387269; cv=none; d=google.com; s=arc-20160816; b=ZwTK+hA6tvdaXuoVhtjz/wK0Bl0RerBCQ/kPqABvgjXGE4u2wgcz65NU93MS49qX7Z 2bS+pQ4GFsoKVM537M79v5sLTMZ5Sic0pg2Rx+6mvcwqDXAzYHmhrp4OLkCalCqEJKAz nIZLq677Zer3aq/lvnlDSX0KMph00bbELAlKwU+mRyRwye9tnFZaWJ5Hv4vTb64gUHiT zMFcPjc8mne2o8ompHsEOwBhVDfu2IbNWdUEnDyzg1hzaTHMHJ2zdMefmvUeqwzuK5yL PtKnbt5tJ+fluXrVZLv0T2xT3IcOPnOPQK1IZZC2fZosL/p4mNUzWpZEIntgDd7B5N5p u4Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=9Yem8AAFQVyVEbTN4UxslvyZ+gVJT4onIurUNWFaEzw=; b=alFgduCNJASYgrCicObpKqq6LkvCxmlrf5jFSHf6NAqyc5ySbxcLZfx8TEfCWENdxj pCv2mdMJEosZn3I8ydqsQCZ+ETQmp0aLLF49A7mTinZHe4RZlk2f8HeotC4HAayRm7kh 8T88F0j2zRqHVlkOsjwBWnUjijDnyH1yKhac2sVII6a9FUKIhtPdX3HLx9pFcUKhoc5M 8SyNdFR//ol0JoDIcShD/P+1DHJHj++o2FTYmYACNOere0Hvh/oz5m6M3z7vpnBT8HqR Eg4oUp57eVPXzKjCCBql6Ps3QVs5tiRAVbB5Dnw25v4cPXuj2MmvBzL0TarE1KaJHqgu GCZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=3qDQQ3rC; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=sakbeqPI; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id a25-20020a634d19000000b0039dfb122c33si12529317pgb.514.2022.04.19.09.54.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 09:54:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=3qDQQ3rC; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=sakbeqPI; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9Yem8AAFQVyVEbTN4UxslvyZ+gVJT4onIurUNWFaEzw=; b=3qDQQ3rCCHJjk/ VB/7L/39t6Cx3y+E9H7SL4V8kkXdJtf27NdWu5EkQON0jrgJ8VeHBJVtIQJr/X3cTAgc+0uLNDePs 70KpxdeukFDX1C1iebveevySsMpSdog3Zp9dW7xS97j9LYr6eL5xSyBgL5CZbEynmZgvBNEUvsDih YT0Ajmpup/qelzpad93OcQlrI3aY5Wa6I5qyHVxBDpGUnqfWPwYvGaNHapIZ23hb/9Ly9U7X3w4l/ D8/GPghdfQDFOycKGJKxLVojKAEXopSWH7k9awX0ruTN6B5oiV3e89EjtZDmwe5FbR1nhCnAIlqMF nnd8hqHInJkpgPYUsUtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngr6X-00534x-Hc; Tue, 19 Apr 2022 16:53:29 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngqu5-004wWK-0T; Tue, 19 Apr 2022 16:40:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97611B8196F; Tue, 19 Apr 2022 16:40:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E156C385AD; Tue, 19 Apr 2022 16:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386434; bh=Me5Zax9Cglx1LkHOlA8xV8JEJklryJyWSe6dcCjrrgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sakbeqPI29Om+/FQz0qrFAi7y4JGvalfYfkXPgEmDAHQE5JutGOtnitKMdhD/p0lN DhEAF01KwxuyAz3UGi3jwRt2GxBEtmj4vxHkA3PItSOKP3X54DH90IyriUJPKRYV1X BIAvtuns7tePi7NLdUUzAV57aLC7hbjqxyX7AZDclAvUdWuFIT078ADdlzcICL/9+M wgI5g6kwYoVtQAA0Eymt32oBHJZSCTUcWvhwf1aLMMuBWcXT5wyS3qq8oCJZh/mBF4 UDot9x1fEXjfgm7bXqg4vfaXPFcwtqapRVe3zSRHwo/Vvq34alxLUDf9aCVWAxKea7 RZ4Ev5Hjil72g== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Cc: Arnd Bergmann , Daniel Mack , Haojian Zhuang , Marek Vasut , Philipp Zabel , Lubomir Rintel , Paul Parsons , Tomas Cech , Sergey Lapin , Thomas Bogendoerfer , Michael Turquette , Stephen Boyd , "Rafael J. Wysocki" , Viresh Kumar , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Helge Deller , Mark Brown , Linus Walleij , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, patches@opensource.cirrus.com, linux-leds@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org, Jens Axboe , Bartlomiej Zolnierkiewicz Subject: [PATCH 13/48] ARM: pxa: use pdev resource for palmld mmio Date: Tue, 19 Apr 2022 18:37:35 +0200 Message-Id: <20220419163810.2118169-14-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220419_094037_442201_2D175FFB X-CRM114-Status: GOOD ( 19.94 ) X-Spam-Score: -5.4 (-----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arnd Bergmann 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: Jens Axboe Cc: linux-ide@vger.kernel.org Acked-by: Robert Jarzmik Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Arnd Berg [...] Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [145.40.68.75 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org From: Arnd Bergmann 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: Jens Axboe Cc: linux-ide@vger.kernel.org Acked-by: Robert Jarzmik Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Arnd Bergmann Acked-by: Damien Le Moal --- 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;