]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ARM: pxa: use pdev resource for palmld mmio
authorArnd Bergmann <arnd@arndb.de>
Wed, 11 Sep 2019 07:36:03 +0000 (09:36 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 20 Apr 2022 11:29:34 +0000 (13:29 +0200)
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: linux-ide@vger.kernel.org
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-pxa/palmld-pcmcia.c
arch/arm/mach-pxa/palmld.c
arch/arm/mach-pxa/palmld.h [moved from arch/arm/mach-pxa/include/mach/palmld.h with 98% similarity]
drivers/ata/pata_palmld.c

index 07e0f7438db183e6ffb3b5bea3adef418bf4bb4b..720294a50864dd12af69c374a2c8fe6feffabeaf 100644 (file)
 #include <linux/gpio.h>
 
 #include <asm/mach-types.h>
-#include <mach/palmld.h>
 #include <pcmcia/soc_common.h>
 
+#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" },
index d85146957004c928d13468abd748679221229846..d821606ce0b503b4401a912dfb1095f9022e01ae 100644 (file)
@@ -29,8 +29,8 @@
 #include <asm/mach/map.h>
 
 #include "pxa27x.h"
+#include "palmld.h"
 #include <linux/platform_data/asoc-pxa.h>
-#include <mach/palmld.h>
 #include <linux/platform_data/mmc-pxamci.h>
 #include <linux/platform_data/video-pxafb.h>
 #include <linux/platform_data/irda-pxaficp.h>
@@ -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 = {
similarity index 98%
rename from arch/arm/mach-pxa/include/mach/palmld.h
rename to arch/arm/mach-pxa/palmld.h
index 99a6d8b3a1e390c247b0b4977f8f2f23e36da667..ee3bc15b71a227863a56618d35d67293efd36110 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef _INCLUDE_PALMLD_H_
 #define _INCLUDE_PALMLD_H_
 
-#include "irqs.h" /* PXA_GPIO_TO_IRQ */
+#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
 
 /** HERE ARE GPIOs **/
 
index 2448441571ed64fb5d031edf1bab5d5a995c816c..400e65190904fd04868871df36491b36de53fa00 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/gpio/consumer.h>
 
 #include <scsi/scsi_host.h>
-#include <mach/palmld.h>
 
 #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;