From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB9CAC433F5 for ; Tue, 19 Apr 2022 16:40:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F1AEA10F02C; Tue, 19 Apr 2022 16:40:37 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id E523710F018 for ; Tue, 19 Apr 2022 16:40:36 +0000 (UTC) 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 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 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , linux-usb@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar , linux-fbdev@vger.kernel.org, Dominik Brodowski , linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, Tomas Cech , linux-clk@vger.kernel.org, linux-leds@vger.kernel.org, linux-rtc@vger.kernel.org, Helge Deller , Bartlomiej Zolnierkiewicz , Marek Vasut , Paul Parsons , Sergey Lapin , Arnd Bergmann , linux-pm@vger.kernel.org, linux-input@vger.kernel.org, Haojian Zhuang , Lubomir Rintel , Mark Brown , dri-devel@lists.freedesktop.org, Jens Axboe , Thomas Bogendoerfer , Stephen Boyd , patches@opensource.cirrus.com, Dmitry Torokhov , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Turquette , alsa-devel@alsa-project.org, Daniel Mack Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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.29.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CDD2C47081 for ; Tue, 19 Apr 2022 16:42:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346968AbiDSQoe (ORCPT ); Tue, 19 Apr 2022 12:44:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355040AbiDSQnS (ORCPT ); Tue, 19 Apr 2022 12:43:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FEF228E0E; Tue, 19 Apr 2022 09:40:35 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id E336E60B34; Tue, 19 Apr 2022 16:40:34 +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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.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 --- 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.29.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56F13C433EF for ; Tue, 19 Apr 2022 16:53:39 +0000 (UTC) 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-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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.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 --- 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.29.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA0A5C433EF for ; Tue, 19 Apr 2022 16:54:05 +0000 (UTC) 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=mz1NtjMweKFMLtnSyEF97VDzexdUWytqj5acNakAn6g=; b=uZYAAdInFVnlX3 nAzYQafyJNbyd85+pbZD47EtwQRHqH6S/pmH6y5T0GfBTv1BN41/e6KFEgI2cPL11Nl1K7Un00coE xCKCGasAUdamBndcK4MZuJael0ghwmAZLN5l+Ww++HpNCf52dTYiuLAxLpvyfQE1lB24QUK/xJYYy kG5YfN6LxOXyHW25iXesajVAYG0pj/uGXKsu7pyvug3NVrN02TDDccONNlrPH+Y/aUbllOPZtZXuz 2BQyKHGUVRVxx03rYjEtA32ksCP7G6lz13dhAc9l3aVMB6UAwTULs7MG7Ef3T2/GMk+ExNkgviLuO hXGVc8qCMpGjzWQbrreA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngr5Q-0052Ym-Qq; Tue, 19 Apr 2022 16:52:21 +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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.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 --- 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.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB519C433F5 for ; Fri, 22 Apr 2022 13:39:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2ACAE1687; Fri, 22 Apr 2022 15:38:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2ACAE1687 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650634765; bh=Me5Zax9Cglx1LkHOlA8xV8JEJklryJyWSe6dcCjrrgY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jONktRN+k4XirejqyrUUejlF3gvPNlkOy0oEVu/jjXcX3XbeP+GI2SlUC80BfZ3o+ f2VYRRV3CEsSZZo6L0NNUtJgHfwxKFoE8wyMDXCiVsxcHYJNHCmOf6pPXu4dpzSsX/ pcSMsdVWm8KpEFXFGC+hnDkCkxTK381yfeLTUm/Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E14D3F805E6; Fri, 22 Apr 2022 15:32:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BD493F8025D; Tue, 19 Apr 2022 18:40:38 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3F1BAF80121 for ; Tue, 19 Apr 2022 18:40:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3F1BAF80121 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sakbeqPI" 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 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 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 22 Apr 2022 15:31:41 +0200 Cc: Ulf Hansson , linux-usb@vger.kernel.org, Philipp Zabel , "Rafael J. Wysocki" , Viresh Kumar , Sergey Lapin , linux-fbdev@vger.kernel.org, Dominik Brodowski , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, Tomas Cech , linux-clk@vger.kernel.org, linux-leds@vger.kernel.org, linux-rtc@vger.kernel.org, Helge Deller , Bartlomiej Zolnierkiewicz , Marek Vasut , Paul Parsons , Linus Walleij , Arnd Bergmann , linux-pm@vger.kernel.org, linux-input@vger.kernel.org, Haojian Zhuang , Lubomir Rintel , Mark Brown , dri-devel@lists.freedesktop.org, Jens Axboe , Thomas Bogendoerfer , Stephen Boyd , patches@opensource.cirrus.com, Dmitry Torokhov , linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, Michael Turquette , alsa-devel@alsa-project.org, Daniel Mack X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 --- 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.29.2