Commit 57bf0f5a authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: pxa: use pdev resource for palmld mmio

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: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 225b5d37
...@@ -13,9 +13,10 @@ ...@@ -13,9 +13,10 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <mach/palmld.h>
#include <pcmcia/soc_common.h> #include <pcmcia/soc_common.h>
#include "palmld.h"
static struct gpio palmld_pcmcia_gpios[] = { static struct gpio palmld_pcmcia_gpios[] = {
{ GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" },
{ GPIO_NR_PALMLD_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" }, { GPIO_NR_PALMLD_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" },
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include "pxa27x.h" #include "pxa27x.h"
#include "palmld.h"
#include <linux/platform_data/asoc-pxa.h> #include <linux/platform_data/asoc-pxa.h>
#include <mach/palmld.h>
#include <linux/platform_data/mmc-pxamci.h> #include <linux/platform_data/mmc-pxamci.h>
#include <linux/platform_data/video-pxafb.h> #include <linux/platform_data/video-pxafb.h>
#include <linux/platform_data/irda-pxaficp.h> #include <linux/platform_data/irda-pxaficp.h>
...@@ -279,9 +279,15 @@ static inline void palmld_leds_init(void) {} ...@@ -279,9 +279,15 @@ static inline void palmld_leds_init(void) {}
* HDD * HDD
******************************************************************************/ ******************************************************************************/
#if defined(CONFIG_PATA_PALMLD) || defined(CONFIG_PATA_PALMLD_MODULE) #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 = { static struct platform_device palmld_ide_device = {
.name = "pata_palmld", .name = "pata_palmld",
.id = -1, .id = -1,
.resource = palmld_ide_resources,
.num_resources = ARRAY_SIZE(palmld_ide_resources),
}; };
static struct gpiod_lookup_table palmld_ide_gpio_table = { static struct gpiod_lookup_table palmld_ide_gpio_table = {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#ifndef _INCLUDE_PALMLD_H_ #ifndef _INCLUDE_PALMLD_H_
#define _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 **/ /** HERE ARE GPIOs **/
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <mach/palmld.h>
#define DRV_NAME "pata_palmld" #define DRV_NAME "pata_palmld"
...@@ -63,7 +62,7 @@ static int palmld_pata_probe(struct platform_device *pdev) ...@@ -63,7 +62,7 @@ static int palmld_pata_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
/* remap drive's physical memory address */ /* remap drive's physical memory address */
mem = devm_ioremap(dev, PALMLD_IDE_PHYS, 0x1000); mem = devm_platform_ioremap_resource(pdev, 0);
if (!mem) if (!mem)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment