From: Steve Sakoman <sakoman@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>,
linux-arm-kernel@lists.arm.linux.org.uk,
linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/4] ARM: OMAP3: Add SMSC911X support to Overo platform (V2)
Date: Sun, 15 Mar 2009 09:36:25 -0700 [thread overview]
Message-ID: <5e088bd90903150936w45e68b63k1252cea38b48a5fc@mail.gmail.com> (raw)
In-Reply-To: <20090315153827.GA10541@n2100.arm.linux.org.uk>
On Sun, Mar 15, 2009 at 8:38 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Mar 13, 2009 at 03:44:53PM -0700, Tony Lindgren wrote:
>> Gumstix will soon be shipping a variant of their Summit board that
>> includes an SMSC LAN9221 ethernet interface. This patch provides
>> support via the smsc911x driver when enabled in kernel config.
>
> Does this actually work with the smsc911x driver which is in mainline,
> or is it dependent on the smsc911x patches from Steve Glendinning?
For the shipping Overo kernel, I build with 2 of Steve's patches, copied below.
Steve
======================================================
From: Steve Glendinning <steve.glendinning@smsc.com>
This patch adds support for the platform_device's resources to indicate
additional flags to use when registering the irq, for example
IORESOURCE_IRQ_LOWLEVEL (which corresponds to IRQF_TRIGGER_LOW). These
should be set in the irq resource flags field.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
drivers/net/smsc911x.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index f513bdf..3565df1 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1892,9 +1892,9 @@ static int __devinit smsc911x_drv_probe(struct
platform_device *pdev)
struct net_device *dev;
struct smsc911x_data *pdata;
struct smsc911x_platform_config *config = pdev->dev.platform_data;
- struct resource *res;
+ struct resource *res, *irq_res;
unsigned int intcfg = 0;
- int res_size;
+ int res_size, irq_flags;
int retval;
DECLARE_MAC_BUF(mac);
@@ -1919,6 +1919,14 @@ static int __devinit smsc911x_drv_probe(struct
platform_device *pdev)
}
res_size = res->end - res->start;
+ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ if (!irq_res) {
+ pr_warning("%s: Could not allocate irq resource.\n",
+ SMSC_CHIPNAME);
+ retval = -ENODEV;
+ goto out_0;
+ }
+
if (!request_mem_region(res->start, res_size, SMSC_CHIPNAME)) {
retval = -EBUSY;
goto out_0;
@@ -1935,7 +1943,8 @@ static int __devinit smsc911x_drv_probe(struct
platform_device *pdev)
pdata = netdev_priv(dev);
- dev->irq = platform_get_irq(pdev, 0);
+ dev->irq = irq_res->start;
+ irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
pdata->ioaddr = ioremap_nocache(res->start, res_size);
/* copy config parameters across to pdata */
@@ -1968,8 +1977,8 @@ static int __devinit smsc911x_drv_probe(struct
platform_device *pdev)
smsc911x_reg_write(pdata, INT_EN, 0);
smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF);
- retval = request_irq(dev->irq, smsc911x_irqhandler, IRQF_DISABLED,
- dev->name, dev);
+ retval = request_irq(dev->irq, smsc911x_irqhandler,
+ irq_flags | IRQF_DISABLED, dev->name, dev);
if (retval) {
SMSC_WARNING(PROBE,
"Unable to claim requested irq: %d", dev->irq);
======================================================
From: Steve Glendinning <steve.glendinning@smsc.com>
The isr supports shared operation, so register it with the IRQF_SHARED
flag to indicate this.
This patch also removes the IRQF_DISABLED flag. This driver doesn't
need it, and IRQF_DISABLED isn't guaranteed when using shared interrupts.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
drivers/net/smsc911x.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 3565df1..f882fd5 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1978,7 +1978,7 @@ static int __devinit smsc911x_drv_probe(struct
platform_device *pdev)
smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF);
retval = request_irq(dev->irq, smsc911x_irqhandler,
- irq_flags | IRQF_DISABLED, dev->name, dev);
+ irq_flags | IRQF_SHARED, dev->name, dev);
if (retval) {
SMSC_WARNING(PROBE,
"Unable to claim requested irq: %d", dev->irq);
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-03-15 16:36 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 22:43 [PATCH 0/4] Omap board updates for merge window after 2.6.29 Tony Lindgren
2009-03-13 22:44 ` [PATCH 1/4] ARM: OMAP3: Add SMSC911X support to Overo platform (V2) Tony Lindgren
2009-03-15 15:38 ` Russell King - ARM Linux
2009-03-15 16:36 ` Steve Sakoman [this message]
2009-03-15 17:00 ` Russell King - ARM Linux
2009-03-15 17:13 ` Steve Sakoman
2009-03-15 17:37 ` Russell King - ARM Linux
2009-03-16 18:08 ` Tony Lindgren
2009-03-17 8:18 ` Steve.Glendinning
2009-03-13 22:46 ` [PATCH 2/4] ARM: OMAP3: Add ADS7846 touchscreen support to Overo platform Tony Lindgren
2009-03-16 20:38 ` [PATCH 2/4] ARM: OMAP3: Add ADS7846 touchscreen support to Overo platform, v2 Tony Lindgren
2009-03-16 21:57 ` Felipe Balbi
2009-03-24 3:54 ` [PATCH 2/4] ARM: OMAP3: Add ADS7846 touchscreen support to Overo platform, v3 Tony Lindgren
2009-03-13 22:47 ` [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP Tony Lindgren
2009-03-15 15:47 ` Russell King - ARM Linux
2009-03-15 15:48 ` Russell King - ARM Linux
2009-03-16 18:14 ` [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v2 Tony Lindgren
2009-03-16 18:22 ` [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v3 Tony Lindgren
2009-03-23 19:05 ` [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v4 Tony Lindgren
2009-03-31 11:42 ` [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v3 Gadiyar, Anand
2009-03-31 13:37 ` Gadiyar, Anand
2009-03-31 14:50 ` Tony Lindgren
2009-03-31 18:48 ` Russell King - ARM Linux
2009-04-01 8:25 ` Gadiyar, Anand
2009-04-01 8:47 ` Syed Mohammed, Khasim
2009-04-01 19:04 ` Paul Walmsley
2009-04-01 22:07 ` Tony Lindgren
2009-04-01 23:18 ` Kevin Hilman
2009-04-02 0:00 ` [PATCH] ARM: Do early I/O mapping if spinlock debugging is enabled (Re: [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v3) Tony Lindgren
2009-04-02 7:38 ` Russell King - ARM Linux
2009-04-02 14:54 ` Tony Lindgren
2009-04-02 4:33 ` [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v3 Pandita, Vikram
2009-04-02 20:01 ` Pandita, Vikram
2009-04-03 19:14 ` Paul Walmsley
2009-04-03 19:25 ` Gadiyar, Anand
2009-04-04 11:18 ` Gadiyar, Anand
2009-04-03 23:12 ` Kevin Hilman
2009-04-03 23:29 ` Paul Walmsley
2009-03-13 22:48 ` [PATCH 4/4] ARM OMAP3: Initial support for Nokia RX-51 Tony Lindgren
2009-03-15 15:47 ` Russell King - ARM Linux
2009-03-16 18:21 ` [PATCH 4/4] ARM OMAP3: Initial support for Nokia RX-51, v2 Tony Lindgren
2009-03-24 2:52 ` [PATCH 0/4] Omap board updates for merge window after 2.6.29 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=5e088bd90903150936w45e68b63k1252cea38b48a5fc@mail.gmail.com \
--to=sakoman@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).