sh_eth: get SH7724 support out of #ifdef
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 7 Jun 2013 14:03:37 +0000 (14:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Jun 2013 06:38:24 +0000 (23:38 -0700)
Get the SH7724 code/data in the driver out of #ifdef by adding "r8a7724-ether"
to the platform driver's ID table. Change the Ether platform device's name in
the SH platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-se/7724/setup.c
arch/sh/kernel/cpu/sh4a/clock-sh7724.c
drivers/net/ethernet/renesas/sh_eth.c

index 764530c85aa9a30ba94dcf5a941c4ce300995fea..61fade0ffa965736427b2b2091ad50d097b59d39 100644 (file)
@@ -165,8 +165,8 @@ static struct sh_eth_plat_data sh_eth_plat = {
 };
 
 static struct platform_device sh_eth_device = {
-       .name = "sh-eth",
-       .id     = 0,
+       .name = "sh7724-ether",
+       .id = 0,
        .dev = {
                .platform_data = &sh_eth_plat,
        },
index 4010e63e82d8491422457d32459a8d216455d4ef..b70180ef3e2978832f33f2aec85322a183978b22 100644 (file)
@@ -380,8 +380,8 @@ static struct sh_eth_plat_data sh_eth_plat = {
 };
 
 static struct platform_device sh_eth_device = {
-       .name = "sh-eth",
-       .id     = 0,
+       .name = "sh7724-ether",
+       .id = 0,
        .dev = {
                .platform_data = &sh_eth_plat,
        },
index 5f30f805d2f237fe09588a9d1594e9f52a6974ba..0128af3399b7f69bb7e534247289a1c73b666b63 100644 (file)
@@ -329,7 +329,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[HWBLK_IIC0]),
        CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[HWBLK_IIC1]),
        CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[HWBLK_MMC]),
-       CLKDEV_DEV_ID("sh-eth.0", &mstp_clks[HWBLK_ETHER]),
+       CLKDEV_DEV_ID("sh7724-ether.0", &mstp_clks[HWBLK_ETHER]),
        CLKDEV_CON_ID("atapi0", &mstp_clks[HWBLK_ATAPI]),
        CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]),
        CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]),
index 9860fc028f3ddc7307c20bcaa888316470ea66b0..143e22e1b3298d79f7cb7b334c2f447347c78526 100644 (file)
@@ -392,9 +392,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
        .tpauser        = 1,
        .hw_swap        = 1,
 };
-#elif defined(CONFIG_CPU_SUBTYPE_SH7724)
+#endif
 
-static void sh_eth_set_rate(struct net_device *ndev)
+static void sh_eth_set_rate_sh7724(struct net_device *ndev)
 {
        struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -411,9 +411,9 @@ static void sh_eth_set_rate(struct net_device *ndev)
 }
 
 /* SH7724 */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+static struct sh_eth_cpu_data sh7724_data = {
        .set_duplex     = sh_eth_set_duplex,
-       .set_rate       = sh_eth_set_rate,
+       .set_rate       = sh_eth_set_rate_sh7724,
 
        .ecsr_value     = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD,
        .ecsipr_value   = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP,
@@ -431,7 +431,6 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
        .rpadir         = 1,
        .rpadir_value   = 0x00020000, /* NET_IP_ALIGN assumed to be 2 */
 };
-#endif
 
 static void sh_eth_set_rate_sh7757(struct net_device *ndev)
 {
@@ -2687,6 +2686,7 @@ static const struct dev_pm_ops sh_eth_dev_pm_ops = {
 static struct platform_device_id sh_eth_id_table[] = {
        { "sh7619-ether", (kernel_ulong_t)&sh7619_data },
        { "sh771x-ether", (kernel_ulong_t)&sh771x_data },
+       { "sh7724-ether", (kernel_ulong_t)&sh7724_data },
        { "sh7734-gether", (kernel_ulong_t)&sh7734_data },
        { "sh7757-ether", (kernel_ulong_t)&sh7757_data },
        { "sh7757-gether", (kernel_ulong_t)&sh7757_data_giga },