public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [PATCH] net/fs_enet: Allow use_rmii to be set in OF
@ 2009-06-12 21:34 Ken MacLeod
  0 siblings, 0 replies; only message in thread
From: Ken MacLeod @ 2009-06-12 21:34 UTC (permalink / raw)
  To: linuxppc-dev

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-12 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 21:34 [PATCH] net/fs_enet: Allow use_rmii to be set in OF Ken MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox