aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx3/pcm037.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index 8cd1fdf1897c..1707096d3623 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -22,6 +22,9 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/memory.h> 24#include <linux/memory.h>
25#include <linux/gpio.h>
26#include <linux/smc911x.h>
27#include <linux/interrupt.h>
25 28
26#include <mach/hardware.h> 29#include <mach/hardware.h>
27#include <asm/mach-types.h> 30#include <asm/mach-types.h>
@@ -59,8 +62,37 @@ static struct imxuart_platform_data uart_pdata = {
59 .flags = IMXUART_HAVE_RTSCTS, 62 .flags = IMXUART_HAVE_RTSCTS,
60}; 63};
61 64
65static struct resource smc911x_resources[] = {
66 [0] = {
67 .start = CS1_BASE_ADDR + 0x300,
68 .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1,
69 .flags = IORESOURCE_MEM,
70 },
71 [1] = {
72 .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
73 .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
74 .flags = IORESOURCE_IRQ,
75 },
76};
77
78static struct smc911x_platdata smc911x_info = {
79 .flags = SMC911X_USE_32BIT,
80 .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW,
81};
82
83static struct platform_device pcm037_eth = {
84 .name = "smc911x",
85 .id = -1,
86 .num_resources = ARRAY_SIZE(smc911x_resources),
87 .resource = smc911x_resources,
88 .dev = {
89 .platform_data = &smc911x_info,
90 },
91};
92
62static struct platform_device *devices[] __initdata = { 93static struct platform_device *devices[] __initdata = {
63 &pcm037_flash, 94 &pcm037_flash,
95 &pcm037_eth,
64}; 96};
65 97
66/* 98/*
@@ -84,6 +116,11 @@ static void __init mxc_board_init(void)
84 116
85 mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); 117 mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE);
86 mxc_register_device(&mxc_w1_master_device, NULL); 118 mxc_register_device(&mxc_w1_master_device, NULL);
119
120 /* SMSC9215 IRQ pin */
121 mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO));
122 if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth"))
123 gpio_direction_input(MX31_PIN_GPIO3_1);
87} 124}
88 125
89/* 126/*