aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-06-24 03:51:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-12 16:52:41 -0400
commit3aed74cdea09831db04bd0bdfc2f377f731c1879 (patch)
tree1fe1130c09262c4af126cf8eec907ad28cf9140b
parent52256c0e06e4a4df67134b951a21b50c713a9588 (diff)
[ARM] pxa: make lubbock to use new smc91x platform data
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>
-rw-r--r--arch/arm/mach-pxa/lubbock.c8
-rw-r--r--drivers/net/smc91x.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 3daffbe7bb86..ac26423cd20c 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -21,6 +21,7 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/smc91x.h>
24 25
25#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
26#include <linux/spi/ads7846.h> 27#include <linux/spi/ads7846.h>
@@ -284,11 +285,18 @@ static struct resource smc91x_resources[] = {
284 }, 285 },
285}; 286};
286 287
288static struct smc91x_platdata lubbock_smc91x_info = {
289 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_2,
290};
291
287static struct platform_device smc91x_device = { 292static struct platform_device smc91x_device = {
288 .name = "smc91x", 293 .name = "smc91x",
289 .id = -1, 294 .id = -1,
290 .num_resources = ARRAY_SIZE(smc91x_resources), 295 .num_resources = ARRAY_SIZE(smc91x_resources),
291 .resource = smc91x_resources, 296 .resource = smc91x_resources,
297 .dev = {
298 .platform_data = &lubbock_smc91x_info,
299 },
292}; 300};
293 301
294static struct resource flash_resources[] = { 302static struct resource flash_resources[] = {
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index f02cc6ac248b..a9c41d421c37 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -48,8 +48,7 @@
48#define SMC_CAN_USE_32BIT 0 48#define SMC_CAN_USE_32BIT 0
49#define SMC_NOWAIT 1 49#define SMC_NOWAIT 1
50 50
51/* The first two address lines aren't connected... */ 51#define SMC_IO_SHIFT (lp->io_shift)
52#define SMC_IO_SHIFT 2
53 52
54#define SMC_inw(a, r) readw((a) + (r)) 53#define SMC_inw(a, r) readw((a) + (r))
55#define SMC_outw(v, a, r) writew(v, (a) + (r)) 54#define SMC_outw(v, a, r) writew(v, (a) + (r))