From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
To: kernel@wantstofly.org, linux-arm-kernel@lists.arm.linux.org.uk,
linux-kernel@vger.kernel.org
Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Subject: [PATCH] [ARM] ep93xx: add ethernet support for edb9302
Date: Sun, 21 Sep 2008 19:00:43 -0300 [thread overview]
Message-ID: <1222034443-6732-1-git-send-email-cascardo@holoscopio.com> (raw)
EDB9302 board use EP9302 controller, which include an ethernet device.
Register the platform device to enable it.
Using edb9302a won't work for these boards because they do not include
the chip ID. Ethernet wouldn't work without this patch and it seems
there is no edb9302 board without ethernet. So, this is the correct fix.
---
arch/arm/mach-ep93xx/edb9302.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c
index 97550c0..fb34289 100644
--- a/arch/arm/mach-ep93xx/edb9302.c
+++ b/arch/arm/mach-ep93xx/edb9302.c
@@ -43,10 +43,40 @@ static struct platform_device edb9302_flash = {
.resource = &edb9302_flash_resource,
};
+static struct ep93xx_eth_data edb9302_eth_data = {
+ .phy_id = 1,
+};
+
+static struct resource edb9302_eth_resource[] = {
+ {
+ .start = EP93XX_ETHERNET_PHYS_BASE,
+ .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = IRQ_EP93XX_ETHERNET,
+ .end = IRQ_EP93XX_ETHERNET,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct platform_device edb9302_eth_device = {
+ .name = "ep93xx-eth",
+ .id = -1,
+ .dev = {
+ .platform_data = &edb9302_eth_data,
+ },
+ .num_resources = 2,
+ .resource = edb9302_eth_resource,
+};
+
static void __init edb9302_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9302_flash);
+
+ memcpy(edb9302_eth_data.dev_addr,
+ (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
+ platform_device_register(&edb9302_eth_device);
}
MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
--
1.5.6.5
next reply other threads:[~2008-09-21 22:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-21 22:00 Thadeu Lima de Souza Cascardo [this message]
2008-09-22 11:17 ` Lennert Buytenhek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1222034443-6732-1-git-send-email-cascardo@holoscopio.com \
--to=cascardo@holoscopio.com \
--cc=kernel@wantstofly.org \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®