aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/include
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-07 19:36:31 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-07 19:36:31 +0000
commitdcb14852cf841353b446934f06c94218e9c0fead (patch)
tree997ec327e6251e992c2a1a86eac26691efffb684 /target/linux/generic/files/include
parent7005c737ab7817fb8e059ec2fdb4def859468324 (diff)
downloadupstream-dcb14852cf841353b446934f06c94218e9c0fead.tar.gz
upstream-dcb14852cf841353b446934f06c94218e9c0fead.tar.bz2
upstream-dcb14852cf841353b446934f06c94218e9c0fead.zip
generic: add driver for the RTL8367R/M switches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29678 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/include')
-rw-r--r--target/linux/generic/files/include/linux/rtl8367.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/generic/files/include/linux/rtl8367.h b/target/linux/generic/files/include/linux/rtl8367.h
new file mode 100644
index 0000000000..aab553e229
--- /dev/null
+++ b/target/linux/generic/files/include/linux/rtl8367.h
@@ -0,0 +1,58 @@
+/*
+ * Platform data definition for the Realtek RTL8367 ethernet switch driver
+ *
+ * Copyright (C) 2011 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 _RTL8367_H
+#define _RTL8367_H
+
+#define RTL8367_DRIVER_NAME "rtl8367"
+
+enum rtl8367_port_speed {
+ RTL8367_PORT_SPEED_10 = 0,
+ RTL8367_PORT_SPEED_100,
+ RTL8367_PORT_SPEED_1000,
+};
+
+struct rtl8367_port_ability {
+ int force_mode;
+ int nway;
+ int txpause;
+ int rxpause;
+ int link;
+ int duplex;
+ enum rtl8367_port_speed speed;
+};
+
+enum rtl8367_extif_mode {
+ RTL8367_EXTIF_MODE_DISABLED = 0,
+ RTL8367_EXTIF_MODE_RGMII,
+ RTL8367_EXTIF_MODE_MII_MAC,
+ RTL8367_EXTIF_MODE_MII_PHY,
+ RTL8367_EXTIF_MODE_TMII_MAC,
+ RTL8367_EXTIF_MODE_TMII_PHY,
+ RTL8367_EXTIF_MODE_GMII,
+ RTL8367_EXTIF_MODE_RGMII_33V,
+};
+
+struct rtl8367_extif_config {
+ unsigned int txdelay;
+ unsigned int rxdelay;
+ enum rtl8367_extif_mode mode;
+ struct rtl8367_port_ability ability;
+};
+
+struct rtl8367_platform_data {
+ unsigned gpio_sda;
+ unsigned gpio_sck;
+
+ struct rtl8367_extif_config *extif0_cfg;
+ struct rtl8367_extif_config *extif1_cfg;
+};
+
+#endif /* _RTL8367_H */