Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149176
b: refs/heads/master
c: cbaa6ca
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Sascha Hauer committed May 26, 2009
1 parent bdcb3d9 commit 26e8594
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1bc34f7964b1e8dee8d49d83cba8dad0a010df92
refs/heads/master: cbaa6ca1f5af59ec8d0d104c1f02b65a6cf0a8aa
45 changes: 45 additions & 0 deletions trunk/arch/arm/mach-mx3/mx31lilly.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <linux/types.h>
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/smsc911x.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand All @@ -46,6 +49,44 @@
* appropriate baseboard support code.
*/

/* SMSC ethernet support */

static struct resource smsc91x_resources[] = {
{
.start = CS4_BASE_ADDR,
.end = CS4_BASE_ADDR + 0xffff,
.flags = IORESOURCE_MEM,
},
{
.start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0),
.end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0),
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
}
};

static struct smsc911x_platform_config smsc911x_config = {
.phy_interface = PHY_INTERFACE_MODE_MII,
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
.flags = SMSC911X_USE_32BIT |
SMSC911X_SAVE_MAC_ADDRESS |
SMSC911X_FORCE_INTERNAL_PHY,
};

static struct platform_device smsc91x_device = {
.name = "smsc911x",
.id = -1,
.num_resources = ARRAY_SIZE(smsc91x_resources),
.resource = smsc91x_resources,
.dev = {
.platform_data = &smsc911x_config,
}
};

static struct platform_device *devices[] __initdata = {
&smsc91x_device,
};

static int mx31lilly_baseboard;
core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444);

Expand All @@ -61,6 +102,10 @@ static void __init mx31lilly_board_init(void)
printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n",
mx31lilly_baseboard);
}

mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS");

platform_add_devices(devices, ARRAY_SIZE(devices));
}

static void __init mx31lilly_timer_init(void)
Expand Down

0 comments on commit 26e8594

Please sign in to comment.