diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2013-06-07 09:57:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-08 02:38:24 -0400 |
commit | e5c9b4cd665106d9b5397114ea81a53059410b6a (patch) | |
tree | 8a452830a7c8bc3cd21ffaf2c08c5d735f967f76 /drivers | |
parent | c18a79abe31f555ec3b363b5b8c1d003230053b6 (diff) |
sh_eth: get R8A7740 support out of #ifdef
Get the R8A7740 code/data in the driver out of #ifdef by adding "r8a7740-gether"
to the platform driver's ID table. Change the GEther platform device's name in
the ARM platform code accordingly.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index e0568a9352e5..da620ecd4151 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -619,11 +619,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { | |||
619 | .irq_flags = IRQF_SHARED, | 619 | .irq_flags = IRQF_SHARED, |
620 | #endif | 620 | #endif |
621 | }; | 621 | }; |
622 | #endif | ||
622 | 623 | ||
623 | 624 | static void sh_eth_chip_reset_r8a7740(struct net_device *ndev) | |
624 | #elif defined(CONFIG_ARCH_R8A7740) | ||
625 | |||
626 | static void sh_eth_chip_reset(struct net_device *ndev) | ||
627 | { | 625 | { |
628 | struct sh_eth_private *mdp = netdev_priv(ndev); | 626 | struct sh_eth_private *mdp = netdev_priv(ndev); |
629 | 627 | ||
@@ -634,7 +632,7 @@ static void sh_eth_chip_reset(struct net_device *ndev) | |||
634 | sh_eth_select_mii(ndev); | 632 | sh_eth_select_mii(ndev); |
635 | } | 633 | } |
636 | 634 | ||
637 | static void sh_eth_set_rate(struct net_device *ndev) | 635 | static void sh_eth_set_rate_gether(struct net_device *ndev) |
638 | { | 636 | { |
639 | struct sh_eth_private *mdp = netdev_priv(ndev); | 637 | struct sh_eth_private *mdp = netdev_priv(ndev); |
640 | 638 | ||
@@ -654,10 +652,10 @@ static void sh_eth_set_rate(struct net_device *ndev) | |||
654 | } | 652 | } |
655 | 653 | ||
656 | /* R8A7740 */ | 654 | /* R8A7740 */ |
657 | static struct sh_eth_cpu_data sh_eth_my_cpu_data = { | 655 | static struct sh_eth_cpu_data r8a7740_data = { |
658 | .chip_reset = sh_eth_chip_reset, | 656 | .chip_reset = sh_eth_chip_reset_r8a7740, |
659 | .set_duplex = sh_eth_set_duplex, | 657 | .set_duplex = sh_eth_set_duplex, |
660 | .set_rate = sh_eth_set_rate, | 658 | .set_rate = sh_eth_set_rate_gether, |
661 | 659 | ||
662 | .ecsr_value = ECSR_ICD | ECSR_MPD, | 660 | .ecsr_value = ECSR_ICD | ECSR_MPD, |
663 | .ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP, | 661 | .ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP, |
@@ -680,7 +678,6 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { | |||
680 | .tsu = 1, | 678 | .tsu = 1, |
681 | .select_mii = 1, | 679 | .select_mii = 1, |
682 | }; | 680 | }; |
683 | #endif | ||
684 | 681 | ||
685 | static struct sh_eth_cpu_data sh7619_data = { | 682 | static struct sh_eth_cpu_data sh7619_data = { |
686 | .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, | 683 | .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, |
@@ -2701,6 +2698,7 @@ static const struct dev_pm_ops sh_eth_dev_pm_ops = { | |||
2701 | static struct platform_device_id sh_eth_id_table[] = { | 2698 | static struct platform_device_id sh_eth_id_table[] = { |
2702 | { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, | 2699 | { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, |
2703 | { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, | 2700 | { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, |
2701 | { "r8a7740-gether", (kernel_ulong_t)&r8a7740_data }, | ||
2704 | { CARDNAME }, | 2702 | { CARDNAME }, |
2705 | { } | 2703 | { } |
2706 | }; | 2704 | }; |