public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Ken MacLeod <ken@bitsko•slc.ut.us>
To: linuxppc-dev@ozlabs•org
Subject: [PATCH] net/fs_enet: Allow use_rmii to be set in OF
Date: Fri, 12 Jun 2009 16:34:37 -0500	[thread overview]
Message-ID: <m3fxe516he.fsf@bitsko.slc.ut.us> (raw)

Allow use_rmii in fs_platform_info to be set in the OF device tree
using phy-mode="rmii".

Signed-off-by: Ken MacLeod <ken@bitsko•slc.ut.us>
---
 drivers/net/fs_enet/fs_enet-main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index a9cbc31..57879be 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1043,6 +1043,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
 	struct fs_platform_info *fpi;
 	const u32 *data;
 	const u8 *mac_addr;
+	const char *str;
 	int privsize, len, ret = -ENODEV;
 
 	fpi = kzalloc(sizeof(*fpi), GFP_KERNEL);
@@ -1057,6 +1058,10 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
 		fpi->cp_command = *data;
 	}
 
+	str = of_get_property(ofdev->node, "phy-mode", &len);
+	if (str != NULL && !strcasecmp(str, "rmii"))
+		fpi->use_rmii = 1;
+
 	fpi->rx_ring = 32;
 	fpi->tx_ring = 32;
 	fpi->rx_copybreak = 240;
-- 
1.5.4.3

                 reply	other threads:[~2009-06-12 21:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=m3fxe516he.fsf@bitsko.slc.ut.us \
    --to=ken@bitsko$(echo .)slc.ut.us \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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