From: Mike Rapoport <mike@compulab.co.il> To: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org, Mike Rapoport <mike@compulab.co.il> Subject: [PATCH 1/2] OMAP: gpmc-smsc911x: always set irq flags to IORESOURCE_IRQ_LOWLEVEL Date: Sun, 17 Apr 2011 01:29:29 +0300 [thread overview] Message-ID: <7cf1c52880f0f32922c8973cb90aadcd2e728be1.1302992702.git.mike@compulab.co.il> (raw) In-Reply-To: <cover.1302992702.git.mike@compulab.co.il> 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> --- arch/arm/mach-omap2/board-omap3logic.c | 1 - arch/arm/mach-omap2/gpmc-smsc911x.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index b726943..a49e6cf 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c @@ -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): diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 703f150..b331f3c 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c @@ -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); -- 1.7.3.1
WARNING: multiple messages have this Message-ID (diff)
From: mike@compulab.co.il (Mike Rapoport) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] OMAP: gpmc-smsc911x: always set irq flags to IORESOURCE_IRQ_LOWLEVEL Date: Tue, 19 Apr 2011 15:04:14 +0300 [thread overview] Message-ID: <7cf1c52880f0f32922c8973cb90aadcd2e728be1.1302992702.git.mike@compulab.co.il> (raw) In-Reply-To: <cover.1302992702.git.mike@compulab.co.il> 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> --- arch/arm/mach-omap2/board-omap3logic.c | 1 - arch/arm/mach-omap2/gpmc-smsc911x.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index b726943..a49e6cf 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c @@ -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): diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 703f150..b331f3c 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c @@ -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); -- 1.7.3.1
next prev parent reply other threads:[~2011-04-16 23:00 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-16 22:29 [PATCH 0/2] OMAP: convert boards that use SMSC911x to use gpmc-smsc911x Mike Rapoport 2011-04-19 12:04 ` Mike Rapoport 2011-04-16 22:29 ` Mike Rapoport [this message] 2011-04-19 12:04 ` [PATCH 1/2] OMAP: gpmc-smsc911x: always set irq flags to IORESOURCE_IRQ_LOWLEVEL Mike Rapoport 2011-05-31 10:32 ` Tony Lindgren 2011-06-01 11:33 ` Igor Grinberg 2011-06-01 11:45 ` Tony Lindgren 2011-04-16 22:29 ` [PATCH 2/2] OMAP: convert boards that use SMSC911x to use gpmc-smsc911x Mike Rapoport 2011-04-19 12:04 ` Mike Rapoport 2011-04-18 11:21 ` [PATCH 0/2] " Tony Lindgren 2011-04-19 11:35 ` Mike Rapoport 2011-04-19 11:45 ` Tony Lindgren 2011-04-19 11:47 ` Tony Lindgren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7cf1c52880f0f32922c8973cb90aadcd2e728be1.1302992702.git.mike@compulab.co.il \ --to=mike@compulab.co.il \ --cc=linux-omap@vger.kernel.org \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.