diff options
-rw-r--r-- | arch/sh/boards/board-espt.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-sh7763rdp/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7734.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 67 |
4 files changed, 39 insertions, 34 deletions
diff --git a/arch/sh/boards/board-espt.c b/arch/sh/boards/board-espt.c index d71a0bcf8145..4d94dff9015c 100644 --- a/arch/sh/boards/board-espt.c +++ b/arch/sh/boards/board-espt.c | |||
@@ -85,7 +85,7 @@ static struct sh_eth_plat_data sh7763_eth_pdata = { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | static struct platform_device espt_eth_device = { | 87 | static struct platform_device espt_eth_device = { |
88 | .name = "sh-eth", | 88 | .name = "sh7763-gether", |
89 | .resource = sh_eth_resources, | 89 | .resource = sh_eth_resources, |
90 | .num_resources = ARRAY_SIZE(sh_eth_resources), | 90 | .num_resources = ARRAY_SIZE(sh_eth_resources), |
91 | .dev = { | 91 | .dev = { |
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c index b7c75298dfb5..50ba481fa240 100644 --- a/arch/sh/boards/mach-sh7763rdp/setup.c +++ b/arch/sh/boards/mach-sh7763rdp/setup.c | |||
@@ -93,7 +93,7 @@ static struct sh_eth_plat_data sh7763_eth_pdata = { | |||
93 | }; | 93 | }; |
94 | 94 | ||
95 | static struct platform_device sh7763rdp_eth_device = { | 95 | static struct platform_device sh7763rdp_eth_device = { |
96 | .name = "sh-eth", | 96 | .name = "sh7763-gether", |
97 | .resource = sh_eth_resources, | 97 | .resource = sh_eth_resources, |
98 | .num_resources = ARRAY_SIZE(sh_eth_resources), | 98 | .num_resources = ARRAY_SIZE(sh_eth_resources), |
99 | .dev = { | 99 | .dev = { |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7734.c b/arch/sh/kernel/cpu/sh4a/clock-sh7734.c index deb683abacf0..ed9501519ab3 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7734.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7734.c | |||
@@ -238,7 +238,7 @@ static struct clk_lookup lookups[] = { | |||
238 | CLKDEV_CON_ID("adc0", &mstp_clks[MSTP313]), | 238 | CLKDEV_CON_ID("adc0", &mstp_clks[MSTP313]), |
239 | CLKDEV_CON_ID("mtu0", &mstp_clks[MSTP312]), | 239 | CLKDEV_CON_ID("mtu0", &mstp_clks[MSTP312]), |
240 | CLKDEV_CON_ID("iebus0", &mstp_clks[MSTP304]), | 240 | CLKDEV_CON_ID("iebus0", &mstp_clks[MSTP304]), |
241 | CLKDEV_DEV_ID("sh-eth.0", &mstp_clks[MSTP114]), | 241 | CLKDEV_DEV_ID("sh7734-gether.0", &mstp_clks[MSTP114]), |
242 | CLKDEV_CON_ID("rtc0", &mstp_clks[MSTP303]), | 242 | CLKDEV_CON_ID("rtc0", &mstp_clks[MSTP303]), |
243 | CLKDEV_CON_ID("hif0", &mstp_clks[MSTP302]), | 243 | CLKDEV_CON_ID("hif0", &mstp_clks[MSTP302]), |
244 | CLKDEV_CON_ID("stif0", &mstp_clks[MSTP301]), | 244 | CLKDEV_CON_ID("stif0", &mstp_clks[MSTP301]), |
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index da620ecd4151..6d44a43e5884 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -556,8 +556,7 @@ static struct sh_eth_cpu_data *sh_eth_get_cpu_data(struct sh_eth_private *mdp) | |||
556 | else | 556 | else |
557 | return &sh_eth_my_cpu_data; | 557 | return &sh_eth_my_cpu_data; |
558 | } | 558 | } |
559 | 559 | #endif | |
560 | #elif defined(CONFIG_CPU_SUBTYPE_SH7734) || defined(CONFIG_CPU_SUBTYPE_SH7763) | ||
561 | 560 | ||
562 | static void sh_eth_chip_reset(struct net_device *ndev) | 561 | static void sh_eth_chip_reset(struct net_device *ndev) |
563 | { | 562 | { |
@@ -568,7 +567,7 @@ static void sh_eth_chip_reset(struct net_device *ndev) | |||
568 | mdelay(1); | 567 | mdelay(1); |
569 | } | 568 | } |
570 | 569 | ||
571 | static void sh_eth_set_rate(struct net_device *ndev) | 570 | static void sh_eth_set_rate_gether(struct net_device *ndev) |
572 | { | 571 | { |
573 | struct sh_eth_private *mdp = netdev_priv(ndev); | 572 | struct sh_eth_private *mdp = netdev_priv(ndev); |
574 | 573 | ||
@@ -587,11 +586,40 @@ static void sh_eth_set_rate(struct net_device *ndev) | |||
587 | } | 586 | } |
588 | } | 587 | } |
589 | 588 | ||
590 | /* sh7763 */ | 589 | /* SH7734 */ |
591 | static struct sh_eth_cpu_data sh_eth_my_cpu_data = { | 590 | static struct sh_eth_cpu_data sh7734_data = { |
592 | .chip_reset = sh_eth_chip_reset, | 591 | .chip_reset = sh_eth_chip_reset, |
593 | .set_duplex = sh_eth_set_duplex, | 592 | .set_duplex = sh_eth_set_duplex, |
594 | .set_rate = sh_eth_set_rate, | 593 | .set_rate = sh_eth_set_rate_gether, |
594 | |||
595 | .ecsr_value = ECSR_ICD | ECSR_MPD, | ||
596 | .ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP, | ||
597 | .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, | ||
598 | |||
599 | .tx_check = EESR_TC1 | EESR_FTC, | ||
600 | .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \ | ||
601 | EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \ | ||
602 | EESR_ECI, | ||
603 | .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \ | ||
604 | EESR_TFE, | ||
605 | |||
606 | .apr = 1, | ||
607 | .mpr = 1, | ||
608 | .tpauser = 1, | ||
609 | .bculr = 1, | ||
610 | .hw_swap = 1, | ||
611 | .no_trimd = 1, | ||
612 | .no_ade = 1, | ||
613 | .tsu = 1, | ||
614 | .hw_crc = 1, | ||
615 | .select_mii = 1, | ||
616 | }; | ||
617 | |||
618 | /* SH7763 */ | ||
619 | static struct sh_eth_cpu_data sh7763_data = { | ||
620 | .chip_reset = sh_eth_chip_reset, | ||
621 | .set_duplex = sh_eth_set_duplex, | ||
622 | .set_rate = sh_eth_set_rate_gether, | ||
595 | 623 | ||
596 | .ecsr_value = ECSR_ICD | ECSR_MPD, | 624 | .ecsr_value = ECSR_ICD | ECSR_MPD, |
597 | .ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP, | 625 | .ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP, |
@@ -612,14 +640,8 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { | |||
612 | .no_trimd = 1, | 640 | .no_trimd = 1, |
613 | .no_ade = 1, | 641 | .no_ade = 1, |
614 | .tsu = 1, | 642 | .tsu = 1, |
615 | #if defined(CONFIG_CPU_SUBTYPE_SH7734) | ||
616 | .hw_crc = 1, | ||
617 | .select_mii = 1, | ||
618 | #else | ||
619 | .irq_flags = IRQF_SHARED, | 643 | .irq_flags = IRQF_SHARED, |
620 | #endif | ||
621 | }; | 644 | }; |
622 | #endif | ||
623 | 645 | ||
624 | static void sh_eth_chip_reset_r8a7740(struct net_device *ndev) | 646 | static void sh_eth_chip_reset_r8a7740(struct net_device *ndev) |
625 | { | 647 | { |
@@ -632,25 +654,6 @@ static void sh_eth_chip_reset_r8a7740(struct net_device *ndev) | |||
632 | sh_eth_select_mii(ndev); | 654 | sh_eth_select_mii(ndev); |
633 | } | 655 | } |
634 | 656 | ||
635 | static void sh_eth_set_rate_gether(struct net_device *ndev) | ||
636 | { | ||
637 | struct sh_eth_private *mdp = netdev_priv(ndev); | ||
638 | |||
639 | switch (mdp->speed) { | ||
640 | case 10: /* 10BASE */ | ||
641 | sh_eth_write(ndev, GECMR_10, GECMR); | ||
642 | break; | ||
643 | case 100:/* 100BASE */ | ||
644 | sh_eth_write(ndev, GECMR_100, GECMR); | ||
645 | break; | ||
646 | case 1000: /* 1000BASE */ | ||
647 | sh_eth_write(ndev, GECMR_1000, GECMR); | ||
648 | break; | ||
649 | default: | ||
650 | break; | ||
651 | } | ||
652 | } | ||
653 | |||
654 | /* R8A7740 */ | 657 | /* R8A7740 */ |
655 | static struct sh_eth_cpu_data r8a7740_data = { | 658 | static struct sh_eth_cpu_data r8a7740_data = { |
656 | .chip_reset = sh_eth_chip_reset_r8a7740, | 659 | .chip_reset = sh_eth_chip_reset_r8a7740, |
@@ -2698,6 +2701,8 @@ static const struct dev_pm_ops sh_eth_dev_pm_ops = { | |||
2698 | static struct platform_device_id sh_eth_id_table[] = { | 2701 | static struct platform_device_id sh_eth_id_table[] = { |
2699 | { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, | 2702 | { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, |
2700 | { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, | 2703 | { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, |
2704 | { "sh7734-gether", (kernel_ulong_t)&sh7734_data }, | ||
2705 | { "sh7763-gether", (kernel_ulong_t)&sh7763_data }, | ||
2701 | { "r8a7740-gether", (kernel_ulong_t)&r8a7740_data }, | 2706 | { "r8a7740-gether", (kernel_ulong_t)&r8a7740_data }, |
2702 | { CARDNAME }, | 2707 | { CARDNAME }, |
2703 | { } | 2708 | { } |