Commit ba54b958 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Sascha Hauer

[ARM] pcm037: add support for the on-board LAN9217 network controller

smc911x now also supports LAN921{5,7,8} network controllers.
Signed-off-by: default avatarGuennadi Liakhovetski <lg@denx.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 3620c0dc
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/memory.h> #include <linux/memory.h>
#include <linux/gpio.h>
#include <linux/smc911x.h>
#include <linux/interrupt.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -59,8 +62,37 @@ static struct imxuart_platform_data uart_pdata = { ...@@ -59,8 +62,37 @@ static struct imxuart_platform_data uart_pdata = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
static struct resource smc911x_resources[] = {
[0] = {
.start = CS1_BASE_ADDR + 0x300,
.end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
.end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
.flags = IORESOURCE_IRQ,
},
};
static struct smc911x_platdata smc911x_info = {
.flags = SMC911X_USE_32BIT,
.irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW,
};
static struct platform_device pcm037_eth = {
.name = "smc911x",
.id = -1,
.num_resources = ARRAY_SIZE(smc911x_resources),
.resource = smc911x_resources,
.dev = {
.platform_data = &smc911x_info,
},
};
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&pcm037_flash, &pcm037_flash,
&pcm037_eth,
}; };
/* /*
...@@ -84,6 +116,11 @@ static void __init mxc_board_init(void) ...@@ -84,6 +116,11 @@ static void __init mxc_board_init(void)
mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE);
mxc_register_device(&mxc_w1_master_device, NULL); mxc_register_device(&mxc_w1_master_device, NULL);
/* SMSC9215 IRQ pin */
mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO));
if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth"))
gpio_direction_input(MX31_PIN_GPIO3_1);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment