提交 150647fb 编写于 作者: Y Yoshihiro Shimoda 提交者: David S. Miller

net: sh_eth: change the condition of initialization

The SH7757 has 2 Fast Ethernet and 2 Gigabit Ethernet, and the first
Gigabit channel needs the initialization. So, this patch adds the
parameter of "needs_init", and if the sh_eth_plat_data is set it
to 1, the driver will initialize the channel.
Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3acbc971
...@@ -1859,8 +1859,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev) ...@@ -1859,8 +1859,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
/* read and set MAC address */ /* read and set MAC address */
read_mac_address(ndev, pd->mac_addr); read_mac_address(ndev, pd->mac_addr);
/* First device only init */ /* initialize first or needed device */
if (!devno) { if (!devno || pd->needs_init) {
if (mdp->cd->tsu) { if (mdp->cd->tsu) {
struct resource *rtsu; struct resource *rtsu;
rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1); rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);
......
...@@ -20,6 +20,7 @@ struct sh_eth_plat_data { ...@@ -20,6 +20,7 @@ struct sh_eth_plat_data {
unsigned char mac_addr[6]; unsigned char mac_addr[6];
unsigned no_ether_link:1; unsigned no_ether_link:1;
unsigned ether_link_active_low:1; unsigned ether_link_active_low:1;
unsigned needs_init:1;
}; };
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册