All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: linux-sh@vger.kernel.org
Subject: [PATCH 1/2] sh_eth Add SH7619 support (platform)
Date: Wed, 06 Aug 2008 23:53:31 +0000	[thread overview]
Message-ID: <87iqudzon8.wl%ysato@users.sourceforge.jp> (raw)

Add EDMAC endian infomation.

 arch/sh/boards/mach-se/770x/setup.c   |   10 ++++++++--
 arch/sh/kernel/cpu/sh2/setup-sh7619.c |    9 ++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/arch/sh/boards/mach-se/770x/setup.c b/arch/sh/boards/mach-se/770x/setup.c
index 9123d96..5f5af82 100644
--- a/arch/sh/boards/mach-se/770x/setup.c
+++ b/arch/sh/boards/mach-se/770x/setup.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/smc37c93x.h>
 #include <asm/heartbeat.h>
+#include <asm/sh_eth.h>
 
 /*
  * Configure the Super I/O chip
@@ -129,11 +130,16 @@ static struct resource sh_eth0_resources[] = {
 	},
 };
 
+static struct sh_eth_plat_data eth_platform_data = {
+	.phy = PHY_ID,
+	.edmac_endian = EDMAC_LITTLE_ENDIAN,
+};
+
 static struct platform_device sh_eth0_device = {
 	.name = "sh-eth",
 	.id	= 0,
 	.dev = {
-		.platform_data = PHY_ID,
+		.platform_data = &eth_platform_data,
 	},
 	.num_resources = ARRAY_SIZE(sh_eth0_resources),
 	.resource = sh_eth0_resources,
@@ -156,7 +162,7 @@ static struct platform_device sh_eth1_device = {
 	.name = "sh-eth",
 	.id	= 1,
 	.dev = {
-		.platform_data = PHY_ID,
+		.platform_data = &eth_platform_data,
 	},
 	.num_resources = ARRAY_SIZE(sh_eth1_resources),
 	.resource = sh_eth1_resources,
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index 56e5878..1f006e1 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -12,6 +12,8 @@
 #include <linux/serial.h>
 #include <linux/serial_sci.h>
 
+#include <asm/sh_eth.h>
+
 enum {
 	UNUSED = 0,
 
@@ -109,11 +111,16 @@ static struct resource eth_resources[] = {
 	},
 };
 
+static struct sh_eth_plat_data eth_platform_data = {
+	.phy = 1,
+	.edmac_endian = EDMAC_BIG_ENDIAN,
+};
+
 static struct platform_device eth_device = {
 	.name = "sh-eth",
 	.id	= -1,
 	.dev = {
-		.platform_data = (void *)1,
+		.platform_data = &eth_platform_data,
 	},
 	.num_resources = ARRAY_SIZE(eth_resources),
 	.resource = eth_resources,
-- 
1.5.6.3

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

             reply	other threads:[~2008-08-06 23:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 23:53 Yoshinori Sato [this message]
2008-08-08  5:25 ` [PATCH 1/2] sh_eth Add SH7619 support (platform) Nobuhiro Iwamatsu
2008-08-08  5:53 ` Paul Mundt

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=87iqudzon8.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-sh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.