]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] pxa: make lubbock to use new smc91x platform data
authorEric Miao <eric.miao@marvell.com>
Tue, 24 Jun 2008 07:51:02 +0000 (15:51 +0800)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 12 Jul 2008 20:52:41 +0000 (21:52 +0100)
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/lubbock.c
drivers/net/smc91x.h

index 3daffbe7bb8644b081fc8b6c04e6f4be53c1bd18..ac26423cd20cbda2ce8db0667887625c4ef466da 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/interrupt.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/smc91x.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
@@ -284,11 +285,18 @@ static struct resource smc91x_resources[] = {
        },
 };
 
+static struct smc91x_platdata lubbock_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_2,
+};
+
 static struct platform_device smc91x_device = {
        .name           = "smc91x",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(smc91x_resources),
        .resource       = smc91x_resources,
+       .dev            = {
+               .platform_data = &lubbock_smc91x_info,
+       },
 };
 
 static struct resource flash_resources[] = {
index f02cc6ac248b7831f0c8eb614c922819e5509975..a9c41d421c379a5db5d999e0addcb9d5329e6ce3 100644 (file)
@@ -48,8 +48,7 @@
 #define SMC_CAN_USE_32BIT      0
 #define SMC_NOWAIT             1
 
-/* The first two address lines aren't connected... */
-#define SMC_IO_SHIFT           2
+#define SMC_IO_SHIFT           (lp->io_shift)
 
 #define SMC_inw(a, r)          readw((a) + (r))
 #define SMC_outw(v, a, r)      writew(v, (a) + (r))