summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-07-24 14:40:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-07-24 14:40:23 +0000
commit1afe8a0726b3e55b9467211b6dc9ea6b604f55e7 (patch)
tree2f8693d76a92376dff6ec849dfad639b72fd8ba9 /target
parent00dd85d8f61db55d6e08d224ed30f077075e9766 (diff)
downloadmtk-20170518-1afe8a0726b3e55b9467211b6dc9ea6b604f55e7.zip
mtk-20170518-1afe8a0726b3e55b9467211b6dc9ea6b604f55e7.tar.gz
mtk-20170518-1afe8a0726b3e55b9467211b6dc9ea6b604f55e7.tar.bz2
rtl8366: unify rtl8366s and rtl8366rb platform data
SVN-Revision: 27754
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c6
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c4
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c4
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c4
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c14
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366rb.c4
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366s.c6
-rw-r--r--target/linux/generic/files/include/linux/rtl8366.h (renamed from target/linux/generic/files/include/linux/rtl8366s.h)16
-rw-r--r--target/linux/generic/files/include/linux/rtl8366rb.h21
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt288x/mach-rt-n15.c4
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c4
11 files changed, 31 insertions, 56 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
index 84fb184..25eb26a 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
@@ -14,7 +14,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/delay.h>
-#include <linux/rtl8366s.h>
+#include <linux/rtl8366.h>
#include <asm/mach-ar71xx/ar71xx.h>
@@ -131,11 +131,11 @@ static struct gpio_keys_button dir825b1_gpio_keys[] __initdata = {
}
};
-static struct rtl8366s_initval dir825b1_rtl8366s_initvals[] = {
+static struct rtl8366_initval dir825b1_rtl8366s_initvals[] = {
{ .reg = 0x06, .val = 0x0108 },
};
-static struct rtl8366s_platform_data dir825b1_rtl8366s_data = {
+static struct rtl8366_platform_data dir825b1_rtl8366s_data = {
.gpio_sda = DIR825B1_GPIO_RTL8366_SDA,
.gpio_sck = DIR825B1_GPIO_RTL8366_SCK,
.num_initvals = ARRAY_SIZE(dir825b1_rtl8366s_initvals),
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c
index 7d81618..e1d9592 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c
@@ -14,7 +14,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/delay.h>
-#include <linux/rtl8366s.h>
+#include <linux/rtl8366.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
@@ -166,7 +166,7 @@ static void __devinit nbg460n_i2c_init(void)
}
-static struct rtl8366s_platform_data nbg460n_rtl8366s_data = {
+static struct rtl8366_platform_data nbg460n_rtl8366s_data = {
.gpio_sda = NBG460N_GPIO_RTL8366_SDA,
.gpio_sck = NBG460N_GPIO_RTL8366_SCK,
};
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
index 1cf0168..77262d7 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
@@ -11,7 +11,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/platform_device.h>
-#include <linux/rtl8366rb.h>
+#include <linux/rtl8366.h>
#include <asm/mach-ar71xx/ar71xx.h>
#include "machtype.h"
@@ -109,7 +109,7 @@ static struct gpio_keys_button tl_wr1043nd_gpio_keys[] __initdata = {
}
};
-static struct rtl8366rb_platform_data tl_wr1043nd_rtl8366rb_data = {
+static struct rtl8366_platform_data tl_wr1043nd_rtl8366rb_data = {
.gpio_sda = TL_WR1043ND_GPIO_RTL8366_SDA,
.gpio_sck = TL_WR1043ND_GPIO_RTL8366_SCK,
};
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
index 15bc055..0df9c7f 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
@@ -13,7 +13,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/delay.h>
-#include <linux/rtl8366s.h>
+#include <linux/rtl8366.h>
#include <asm/mach-ar71xx/ar71xx.h>
@@ -205,7 +205,7 @@ static struct gpio_keys_button wndr3700_gpio_keys[] __initdata = {
}
};
-static struct rtl8366s_platform_data wndr3700_rtl8366s_data = {
+static struct rtl8366_platform_data wndr3700_rtl8366s_data = {
.gpio_sda = WNDR3700_GPIO_RTL8366_SDA,
.gpio_sck = WNDR3700_GPIO_RTL8366_SCK,
};
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c
index 13a17db..35f2165 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c
@@ -12,8 +12,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/nxp_74hc153.h>
-#include <linux/rtl8366s.h>
-#include <linux/rtl8366rb.h>
+#include <linux/rtl8366.h>
#include <asm/mips_machine.h>
#include <asm/mach-ar71xx/ar71xx.h>
@@ -214,7 +213,7 @@ static struct platform_device wzrhpg300nh_74hc153_device = {
}
};
-static struct rtl8366s_platform_data wzrhpg300nh_rtl8366s_data = {
+static struct rtl8366_platform_data wzrhpg300nh_rtl8366_data = {
.gpio_sda = WZRHPG300NH_GPIO_RTL8366_SDA,
.gpio_sck = WZRHPG300NH_GPIO_RTL8366_SCK,
};
@@ -223,20 +222,15 @@ static struct platform_device wzrhpg300nh_rtl8366s_device = {
.name = RTL8366S_DRIVER_NAME,
.id = -1,
.dev = {
- .platform_data = &wzrhpg300nh_rtl8366s_data,
+ .platform_data = &wzrhpg300nh_rtl8366_data,
}
};
-static struct rtl8366rb_platform_data wzrhpg301nh_rtl8366rb_data = {
- .gpio_sda = WZRHPG300NH_GPIO_RTL8366_SDA,
- .gpio_sck = WZRHPG300NH_GPIO_RTL8366_SCK,
-};
-
static struct platform_device wzrhpg301nh_rtl8366rb_device = {
.name = RTL8366RB_DRIVER_NAME,
.id = -1,
.dev = {
- .platform_data = &wzrhpg301nh_rtl8366rb_data,
+ .platform_data = &wzrhpg300nh_rtl8366_data,
}
};
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
index 640ed51..c953681 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
@@ -16,7 +16,7 @@
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/skbuff.h>
-#include <linux/rtl8366rb.h>
+#include <linux/rtl8366.h>
#include "rtl8366_smi.h"
@@ -1224,7 +1224,7 @@ static struct rtl8366_smi_ops rtl8366rb_smi_ops = {
static int __devinit rtl8366rb_probe(struct platform_device *pdev)
{
static int rtl8366_smi_version_printed;
- struct rtl8366rb_platform_data *pdata;
+ struct rtl8366_platform_data *pdata;
struct rtl8366_smi *smi;
int err;
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c
index 3f3d6f6..8fa1ed1 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c
@@ -15,7 +15,7 @@
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/skbuff.h>
-#include <linux/rtl8366s.h>
+#include <linux/rtl8366.h>
#include "rtl8366_smi.h"
@@ -250,7 +250,7 @@ static int rtl8366s_reset_chip(struct rtl8366_smi *smi)
static int rtl8366s_hw_init(struct rtl8366_smi *smi)
{
- struct rtl8366s_platform_data *pdata;
+ struct rtl8366_platform_data *pdata;
int err;
pdata = smi->parent->platform_data;
@@ -1053,7 +1053,7 @@ static struct rtl8366_smi_ops rtl8366s_smi_ops = {
static int __devinit rtl8366s_probe(struct platform_device *pdev)
{
static int rtl8366_smi_version_printed;
- struct rtl8366s_platform_data *pdata;
+ struct rtl8366_platform_data *pdata;
struct rtl8366_smi *smi;
int err;
diff --git a/target/linux/generic/files/include/linux/rtl8366s.h b/target/linux/generic/files/include/linux/rtl8366.h
index 7d5daa4..654d42e 100644
--- a/target/linux/generic/files/include/linux/rtl8366s.h
+++ b/target/linux/generic/files/include/linux/rtl8366.h
@@ -1,5 +1,5 @@
/*
- * Platform data definition for the Realtek RTL8366S ethernet switch driver
+ * Platform data definition for the Realtek RTL8366RB/S ethernet switch driver
*
* Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
*
@@ -8,21 +8,23 @@
* by the Free Software Foundation.
*/
-#ifndef _RTL8366S_H
-#define _RTL8366S_H
+#ifndef _RTL8366_H
+#define _RTL8366_H
+#define RTL8366_DRIVER_NAME "rtl8366"
#define RTL8366S_DRIVER_NAME "rtl8366s"
+#define RTL8366RB_DRIVER_NAME "rtl8366rb"
-struct rtl8366s_initval {
+struct rtl8366_initval {
unsigned reg;
u16 val;
};
-struct rtl8366s_platform_data {
+struct rtl8366_platform_data {
unsigned gpio_sda;
unsigned gpio_sck;
unsigned num_initvals;
- struct rtl8366s_initval *initvals;
+ struct rtl8366_initval *initvals;
};
-#endif /* _RTL8366_SMI_H */
+#endif /* _RTL8366_H */
diff --git a/target/linux/generic/files/include/linux/rtl8366rb.h b/target/linux/generic/files/include/linux/rtl8366rb.h
deleted file mode 100644
index 053e2ec..0000000
--- a/target/linux/generic/files/include/linux/rtl8366rb.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Platform data definition for the Realtek RTL8366S ethernet switch driver
- *
- * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- */
-
-#ifndef _RTL8366RB_H
-#define _RTL8366RB_H
-
-#define RTL8366RB_DRIVER_NAME "rtl8366rb"
-
-struct rtl8366rb_platform_data {
- unsigned gpio_sda;
- unsigned gpio_sck;
-};
-
-#endif /* _RTL8366RB_SMI_H */
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/mach-rt-n15.c b/target/linux/ramips/files/arch/mips/ralink/rt288x/mach-rt-n15.c
index 066667e..fb04891 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt288x/mach-rt-n15.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/mach-rt-n15.c
@@ -13,7 +13,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
-#include <linux/rtl8366s.h>
+#include <linux/rtl8366.h>
#include <linux/ethtool.h>
#include <asm/mach-ralink/machine.h>
@@ -100,7 +100,7 @@ static struct gpio_button rt_n15_gpio_buttons[] __initdata = {
}
};
-static struct rtl8366s_platform_data rt_n15_rtl8366s_data = {
+static struct rtl8366_platform_data rt_n15_rtl8366s_data = {
.gpio_sda = RT_N15_GPIO_RTL8366_SDA,
.gpio_sck = RT_N15_GPIO_RTL8366_SCK,
};
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c
index e8c0297..b406281 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c
@@ -14,7 +14,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
-#include <linux/rtl8366rb.h>
+#include <linux/rtl8366.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
@@ -109,7 +109,7 @@ static struct physmap_flash_data f5d8235v2_flash_data = {
};
-static struct rtl8366rb_platform_data f5d8235v2_switch_data = {
+static struct rtl8366_platform_data f5d8235v2_switch_data = {
.gpio_sda = RT305X_GPIO_I2C_SD,
.gpio_sck = RT305X_GPIO_I2C_SCLK,
};