aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/board-ldp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 09:05:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 09:05:40 -0700
commit31e6e2dac575c9d21a6ec56ca52ae89086baa705 (patch)
treea83dc42a3e4ff2e49e532031ec3e86c402e4baa1 /arch/arm/mach-omap2/board-ldp.c
parentea02259fdf47ca81ff3ca0c22906d989094fb8ff (diff)
parent67a52bb90b515c2a96ec51a3571bcd70a2fadb50 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] fix build-breaking 7a192ec commit ARM: Add SMSC911X support to Overo platform (V2) arm: update omap_ldp defconfig to use smsc911x arm: update realview defconfigs to use smsc911x arm: update pcm037 defconfig to use smsc911x arm: convert omap ldp platform to use smsc911x arm: convert realview platform to use smsc911x arm: convert pcm037 platform to use smsc911x [ARM] 5444/1: ARM: Realview: Fix event-device multiplicators in localtimer.c [ARM] 5442/1: pxa/cm-x255: fix reverse RDY gpios in PCMCIA driver [ARM] 5441/1: Use pr_err on error paths in at91 pm [ARM] 5440/1: Fix VFP state corruption due to preemption during VFP exceptions [ARM] 5439/1: Do not clear bit 10 of DFSR during abort handling on ARMv6 [ARM] 5437/1: Add documentation for "nohlt" kernel parameter [ARM] 5436/1: ARM: OMAP: Fix compile for rx51 [ARM] arch_reset() now takes a second parameter [ARM] Kirkwood: small L2 code cleanup [ARM] Kirkwood: invalidate L2 cache before enabling it
Diffstat (limited to 'arch/arm/mach-omap2/board-ldp.c')
-rw-r--r--arch/arm/mach-omap2/board-ldp.c47
1 files changed, 29 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index e096f776f99..da57b0fcda1 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -23,6 +23,7 @@
#include <linux/spi/ads7846.h>
#include <linux/i2c/twl4030.h>
#include <linux/io.h>
+#include <linux/smsc911x.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
@@ -41,12 +42,12 @@
#include "mmc-twl4030.h"
-#define LDP_SMC911X_CS 1
-#define LDP_SMC911X_GPIO 152
+#define LDP_SMSC911X_CS 1
+#define LDP_SMSC911X_GPIO 152
#define DEBUG_BASE 0x08000000
#define LDP_ETHR_START DEBUG_BASE
-static struct resource ldp_smc911x_resources[] = {
+static struct resource ldp_smsc911x_resources[] = {
[0] = {
.start = LDP_ETHR_START,
.end = LDP_ETHR_START + SZ_4K,
@@ -59,40 +60,50 @@ static struct resource ldp_smc911x_resources[] = {
},
};
-static struct platform_device ldp_smc911x_device = {
- .name = "smc911x",
+static struct smsc911x_platform_config ldp_smsc911x_config = {
+ .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+ .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+ .flags = SMSC911X_USE_32BIT,
+ .phy_interface = PHY_INTERFACE_MODE_MII,
+};
+
+static struct platform_device ldp_smsc911x_device = {
+ .name = "smsc911x",
.id = -1,
- .num_resources = ARRAY_SIZE(ldp_smc911x_resources),
- .resource = ldp_smc911x_resources,
+ .num_resources = ARRAY_SIZE(ldp_smsc911x_resources),
+ .resource = ldp_smsc911x_resources,
+ .dev = {
+ .platform_data = &ldp_smsc911x_config,
+ },
};
static struct platform_device *ldp_devices[] __initdata = {
- &ldp_smc911x_device,
+ &ldp_smsc911x_device,
};
-static inline void __init ldp_init_smc911x(void)
+static inline void __init ldp_init_smsc911x(void)
{
int eth_cs;
unsigned long cs_mem_base;
int eth_gpio = 0;
- eth_cs = LDP_SMC911X_CS;
+ eth_cs = LDP_SMSC911X_CS;
if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
- printk(KERN_ERR "Failed to request GPMC mem for smc911x\n");
+ printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n");
return;
}
- ldp_smc911x_resources[0].start = cs_mem_base + 0x0;
- ldp_smc911x_resources[0].end = cs_mem_base + 0xff;
+ ldp_smsc911x_resources[0].start = cs_mem_base + 0x0;
+ ldp_smsc911x_resources[0].end = cs_mem_base + 0xff;
udelay(100);
- eth_gpio = LDP_SMC911X_GPIO;
+ eth_gpio = LDP_SMSC911X_GPIO;
- ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
+ ldp_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
- if (gpio_request(eth_gpio, "smc911x irq") < 0) {
- printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
+ if (gpio_request(eth_gpio, "smsc911x irq") < 0) {
+ printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
eth_gpio);
return;
}
@@ -104,7 +115,7 @@ static void __init omap_ldp_init_irq(void)
omap2_init_common_hw(NULL);
omap_init_irq();
omap_gpio_init();
- ldp_init_smc911x();
+ ldp_init_smsc911x();
}
static struct omap_uart_config ldp_uart_config __initdata = {