From 074824db49dfbb0d601f002f81063ba9395162f1 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 11 Nov 2008 15:12:00 +0100 Subject: [PATCH] --- yaml --- r: 123772 b: refs/heads/master c: ba54b95899838610c8c23fb7ab88831016b81fb3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-mx3/pcm037.c | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4904e2ce5a8c..906f7d02976e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3620c0dccfd35cd39324508d8c962d10f9a44ead +refs/heads/master: ba54b95899838610c8c23fb7ab88831016b81fb3 diff --git a/trunk/arch/arm/mach-mx3/pcm037.c b/trunk/arch/arm/mach-mx3/pcm037.c index 8cd1fdf1897c..1707096d3623 100644 --- a/trunk/arch/arm/mach-mx3/pcm037.c +++ b/trunk/arch/arm/mach-mx3/pcm037.c @@ -22,6 +22,9 @@ #include #include #include +#include +#include +#include #include #include @@ -59,8 +62,37 @@ static struct imxuart_platform_data uart_pdata = { .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 = { &pcm037_flash, + &pcm037_eth, }; /* @@ -84,6 +116,11 @@ static void __init mxc_board_init(void) mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); 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); } /*