diff mbox

[1/2] Add SMC_MEM_RESERVED for OMAP platform.

Message ID 1226914195-20473-1-git-send-email-stanley.miao@windriver.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Stanley.Miao Nov. 17, 2008, 9:29 a.m. UTC
The iomem resource for Ethernet device  has been reserved on omap24xx and
omap34xx. So, define SMC_MEM_RESERVED for them.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 drivers/net/smc911x.c |    6 ++++--
 drivers/net/smc911x.h |   10 ++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

Comments

Steve Glendinning Nov. 17, 2008, 10:31 a.m. UTC | #1
Hi Stanley,

Jeff has merged the smsc911x driver into -next, this is intended to 
replace smc911x moving forward.  I'll forward the patchset to you 
off-list, it includes platform_data support for several platforms so 
adding support for omap should be simple.

> diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
> index cc7d85b..d1b3b9b 100644
> --- a/drivers/net/smc911x.h
> +++ b/drivers/net/smc911x.h
> @@ -42,6 +42,16 @@
>    #define SMC_USE_16BIT      0
>    #define SMC_USE_32BIT      1
>    #define SMC_IRQ_SENSE      IRQF_TRIGGER_LOW
> +#elif defined(CONFIG_ARCH_OMAP34XX)
> +  #define SMC_USE_16BIT      0
> +  #define SMC_USE_32BIT      1
> +  #define SMC_IRQ_SENSE      IRQF_TRIGGER_LOW
> +  #define SMC_MEM_RESERVED   1
> +#elif defined(CONFIG_ARCH_OMAP24XX)
> +  #define SMC_USE_16BIT      0
> +  #define SMC_USE_32BIT      1
> +  #define SMC_IRQ_SENSE      IRQF_TRIGGER_LOW
> +  #define SMC_MEM_RESERVED   1
>  #else
>  /*
>   * Default configuration

nack - this platform-specific configuration shouldn't be in the driver, 
SMC_DYNAMIC_BUS_CONFIG was added so this can be specified in 
platform_data.

Regards,
--
Steve Glendinning
SMSC GmbH
m: +44 777 933 9124
e: steve.glendinning@smsc.com

--
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
Stanley.Miao Nov. 18, 2008, 1:37 a.m. UTC | #2
On Mon, 2008-11-17 at 10:31 +0000, Steve.Glendinning@smsc.com wrote:
> Hi Stanley,
> 
> Jeff has merged the smsc911x driver into -next, this is intended to 
> replace smc911x moving forward.  I'll forward the patchset to you 
> off-list, it includes platform_data support for several platforms so 
> adding support for omap should be simple.

OK, Thanks.

Stanley.

> 
> > diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
> > index cc7d85b..d1b3b9b 100644
> > --- a/drivers/net/smc911x.h
> > +++ b/drivers/net/smc911x.h
> > @@ -42,6 +42,16 @@
> >    #define SMC_USE_16BIT      0
> >    #define SMC_USE_32BIT      1
> >    #define SMC_IRQ_SENSE      IRQF_TRIGGER_LOW
> > +#elif defined(CONFIG_ARCH_OMAP34XX)
> > +  #define SMC_USE_16BIT      0
> > +  #define SMC_USE_32BIT      1
> > +  #define SMC_IRQ_SENSE      IRQF_TRIGGER_LOW
> > +  #define SMC_MEM_RESERVED   1
> > +#elif defined(CONFIG_ARCH_OMAP24XX)
> > +  #define SMC_USE_16BIT      0
> > +  #define SMC_USE_32BIT      1
> > +  #define SMC_IRQ_SENSE      IRQF_TRIGGER_LOW
> > +  #define SMC_MEM_RESERVED   1
> >  #else
> >  /*
> >   * Default configuration
> 
> nack - this platform-specific configuration shouldn't be in the driver, 
> SMC_DYNAMIC_BUS_CONFIG was added so this can be specified in 
> platform_data.
> 
> Regards,
> --
> Steve Glendinning
> SMSC GmbH
> m: +44 777 933 9124
> e: steve.glendinning@smsc.com
> 
--
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
diff mbox

Patch

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 1f26ab0..291ee46 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -2065,7 +2065,7 @@  static int smc911x_drv_probe(struct platform_device *pdev)
 		ret = -ENODEV;
 		goto out;
 	}
-
+#ifndef SMC_MEM_RESERVED
 	/*
 	 * Request the regions.
 	 */
@@ -2073,7 +2073,7 @@  static int smc911x_drv_probe(struct platform_device *pdev)
 		 ret = -EBUSY;
 		 goto out;
 	}
-
+#endif
 	ndev = alloc_etherdev(sizeof(struct smc911x_local));
 	if (!ndev) {
 		printk("%s: could not allocate device.\n", CARDNAME);
@@ -2110,7 +2110,9 @@  static int smc911x_drv_probe(struct platform_device *pdev)
 release_both:
 		free_netdev(ndev);
 release_1:
+#ifndef SMC_MEM_RESERVED
 		release_mem_region(res->start, SMC911X_IO_EXTENT);
+#endif
 out:
 		printk("%s: not found (%d).\n", CARDNAME, ret);
 	}
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index cc7d85b..d1b3b9b 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -42,6 +42,16 @@ 
   #define SMC_USE_16BIT		0
   #define SMC_USE_32BIT		1
   #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
+#elif defined(CONFIG_ARCH_OMAP34XX)
+  #define SMC_USE_16BIT		0
+  #define SMC_USE_32BIT		1
+  #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED	1
+#elif defined(CONFIG_ARCH_OMAP24XX)
+  #define SMC_USE_16BIT		0
+  #define SMC_USE_32BIT		1
+  #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED	1
 #else
 /*
  * Default configuration