net/fs_enet: Allow use_rmii to be set in OF
PATCH 1/1 net/fs_enet: Allow use_rmii to be set in OF
Allow use_rmii in fs_platform_info to be set in the OF device tree using phy-mode="rmii".
Signed-off-by Ken MacLeod <[email protected]>
--- drivers/net/fs_enet/fs_enet-main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/fs_enet/fs_enet-main.c +5 -0
@@ -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 ;
Signature · 1 line
1.5.4.3