]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
omap: gpmc-smsc911x: always set irq flags to IORESOURCE_IRQ_LOWLEVEL
authorMike Rapoport <mike@compulab.co.il>
Sat, 16 Apr 2011 22:29:29 +0000 (22:29 +0000)
committerTony Lindgren <tony@atomide.com>
Wed, 20 Apr 2011 15:53:59 +0000 (08:53 -0700)
SMSC911x devices attached to OMAP GPMC always use low level irqs.
Setting the appropriate flag in the irq resourse strucure allows using
.flags field in the omap_smsc911x_platform_data for driver specific
flags

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/gpmc-smsc911x.c

index b726943d7c93da3b92b79c71d10e790f51cb1539..a49e6cff55abe1107eb11f32dc2cdf711c61fe2e 100644 (file)
@@ -147,7 +147,6 @@ static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
        .cs             = OMAP3LOGIC_SMSC911X_CS,
        .gpio_irq       = -EINVAL,
        .gpio_reset     = -EINVAL,
-       .flags          = IORESOURCE_IRQ_LOWLEVEL,
 };
 
 /* TODO/FIXME (comment by Peter Barada, LogicPD):
index 703f150dd01dbd7b86f54e279ddb116d48fe6316..b331f3cd38f1221a928cc9d61412269774ff3526 100644 (file)
@@ -30,7 +30,7 @@ static struct resource gpmc_smsc911x_resources[] = {
                .flags          = IORESOURCE_MEM,
        },
        [1] = {
-               .flags          = IORESOURCE_IRQ,
+               .flags          = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
        },
 };
 
@@ -79,8 +79,6 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
 
        gpio_direction_input(gpmc_cfg->gpio_irq);
        gpmc_smsc911x_resources[1].start = gpio_to_irq(gpmc_cfg->gpio_irq);
-       gpmc_smsc911x_resources[1].flags |=
-                                       (gpmc_cfg->flags & IRQF_TRIGGER_MASK);
 
        if (gpio_is_valid(gpmc_cfg->gpio_reset)) {
                ret = gpio_request(gpmc_cfg->gpio_reset, "smsc911x reset");
@@ -96,6 +94,9 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
                gpio_set_value(gpmc_cfg->gpio_reset, 1);
        }
 
+       if (gpmc_cfg->flags)
+               gpmc_smsc911x_config.flags = gpmc_cfg->flags;
+
        if (platform_device_register(&gpmc_smsc911x_device) < 0) {
                printk(KERN_ERR "Unable to register smsc911x device\n");
                gpio_free(gpmc_cfg->gpio_reset);