]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
net:smc911x Modify driver to also work with omap34xx
authorSteve Sakoman <steve@sakoman.com>
Thu, 8 May 2008 16:48:31 +0000 (09:48 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 9 May 2008 21:58:24 +0000 (14:58 -0700)
net:smc911x Modify driver to also work with omap34xx

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/net/Kconfig
drivers/net/smc911x.c
drivers/net/smc911x.h

index af46341827f27b2220ad63216e38fd7e1ae07366..70192b6278f01680bb8ef0484c309610ba9edc35 100644 (file)
@@ -955,7 +955,7 @@ config SMC911X
        tristate "SMSC LAN911[5678] support"
        select CRC32
        select MII
-       depends on ARCH_PXA || SH_MAGIC_PANEL_R2
+       depends on ARCH_PXA || SH_MAGIC_PANEL_R2 || ARCH_OMAP34XX
        help
          This is a driver for SMSC's LAN911x series of Ethernet chipsets
          including the new LAN9115, LAN9116, LAN9117, and LAN9118.
index 4e28002051899c21f0a6050b5b32f14b6f2c6dec..40ff2a54bdf97a948cbad92672440115106f5ae6 100644 (file)
@@ -2137,7 +2137,7 @@ static int smc911x_drv_probe(struct platform_device *pdev)
                ret = -ENODEV;
                goto out;
        }
-
+#ifndef SMC_MEM_RESERVED
        /*
         * Request the regions.
         */
@@ -2145,7 +2145,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);
@@ -2173,7 +2173,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);
        }
@@ -2212,8 +2214,9 @@ static int smc911x_drv_remove(struct platform_device *pdev)
 #endif
        iounmap((void *)ndev->base_addr);
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+#ifndef SMC_MEM_RESERVED
        release_mem_region(res->start, SMC911X_IO_EXTENT);
-
+#endif
        free_netdev(ndev);
        return 0;
 }
index 7defa63b9c747efd1cda1ea902079c0124340cac..dad93a8bfb0a1779eb94c2b6541ce292a48bd5dc 100644 (file)
   #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
 #endif