diff options
author | John Crispin <john@openwrt.org> | 2014-12-05 00:20:10 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-12-05 00:20:10 +0000 |
commit | dcc8a8ca9eac90b3e70104c893464c27e62daed5 (patch) | |
tree | f4a4888fecac4526d87bce595280a0288d4f1e79 /target/linux/octeon/patches-3.18 | |
parent | 6f665ea7b8565a39a2cd7367e6322a2efa9f2eb8 (diff) | |
download | upstream-dcc8a8ca9eac90b3e70104c893464c27e62daed5.tar.gz upstream-dcc8a8ca9eac90b3e70104c893464c27e62daed5.tar.bz2 upstream-dcc8a8ca9eac90b3e70104c893464c27e62daed5.zip |
octeon: add support for 3.18 kernel
Runtime tested on Ubiquiti EdgeRouter Lite.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
SVN-Revision: 43519
Diffstat (limited to 'target/linux/octeon/patches-3.18')
3 files changed, 85 insertions, 0 deletions
diff --git a/target/linux/octeon/patches-3.18/100-ubnt_edgerouter2_support.patch b/target/linux/octeon/patches-3.18/100-ubnt_edgerouter2_support.patch new file mode 100644 index 0000000000..5b51b66fe8 --- /dev/null +++ b/target/linux/octeon/patches-3.18/100-ubnt_edgerouter2_support.patch @@ -0,0 +1,31 @@ +--- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h ++++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h +@@ -228,6 +228,8 @@ enum cvmx_board_types_enum { + */ + CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, + CVMX_BOARD_TYPE_UBNT_E100 = 20002, ++ CVMX_BOARD_TYPE_UBNT_E200 = 20003, ++ CVMX_BOARD_TYPE_UBNT_E220 = 20005, + CVMX_BOARD_TYPE_CUST_DSR1000N = 20006, + CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, + +@@ -328,6 +330,8 @@ static inline const char *cvmx_board_typ + /* Customer private range */ + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100) ++ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E200) ++ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E220) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DSR1000N) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX) + } +--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c ++++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +@@ -195,6 +195,8 @@ int cvmx_helper_board_get_mii_address(in + return 8; + else + return -1; ++ case CVMX_BOARD_TYPE_UBNT_E200: ++ return -1; + } + + /* Some unknown board. Somebody forgot to update this function... */ diff --git a/target/linux/octeon/patches-3.18/110-er200-ethernet_probe_order.patch b/target/linux/octeon/patches-3.18/110-er200-ethernet_probe_order.patch new file mode 100644 index 0000000000..f5a943cf46 --- /dev/null +++ b/target/linux/octeon/patches-3.18/110-er200-ethernet_probe_order.patch @@ -0,0 +1,34 @@ +--- a/drivers/staging/octeon/ethernet.c ++++ b/drivers/staging/octeon/ethernet.c +@@ -620,6 +620,7 @@ static int cvm_oct_probe(struct platform + int interface; + int fau = FAU_NUM_PACKET_BUFFERS_TO_FREE; + int qos; ++ int i; + struct device_node *pip; + + octeon_mdiobus_force_mod_depencency(); +@@ -705,13 +706,19 @@ static int cvm_oct_probe(struct platform + } + + num_interfaces = cvmx_helper_get_number_of_interfaces(); +- for (interface = 0; interface < num_interfaces; interface++) { +- cvmx_helper_interface_mode_t imode = +- cvmx_helper_interface_get_mode(interface); +- int num_ports = cvmx_helper_ports_on_interface(interface); ++ for (i = 0; i < num_interfaces; i++) { ++ cvmx_helper_interface_mode_t imode; ++ int interface; ++ int num_ports; + int port; + int port_index; + ++ interface = i; ++ if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_UBNT_E200) ++ interface = num_interfaces - (i + 1); ++ ++ num_ports = cvmx_helper_ports_on_interface(interface); ++ imode = cvmx_helper_interface_get_mode(interface); + for (port_index = 0, + port = cvmx_helper_get_ipd_port(interface, 0); + port < cvmx_helper_get_ipd_port(interface, num_ports); diff --git a/target/linux/octeon/patches-3.18/120-octeon_platform_usb.patch b/target/linux/octeon/patches-3.18/120-octeon_platform_usb.patch new file mode 100644 index 0000000000..7cffaf621f --- /dev/null +++ b/target/linux/octeon/patches-3.18/120-octeon_platform_usb.patch @@ -0,0 +1,20 @@ +--- a/arch/mips/cavium-octeon/octeon-platform.c ++++ b/arch/mips/cavium-octeon/octeon-platform.c +@@ -82,7 +82,7 @@ static int __init octeon_ehci_device_ini + }; + + /* Only Octeon2 has ehci/ohci */ +- if (!OCTEON_IS_MODEL(OCTEON_CN63XX)) ++ if (!OCTEON_IS_MODEL(OCTEON_CN6XXX)) + return 0; + + if (octeon_is_simulation() || usb_disabled()) +@@ -131,7 +131,7 @@ static int __init octeon_ohci_device_ini + }; + + /* Only Octeon2 has ehci/ohci */ +- if (!OCTEON_IS_MODEL(OCTEON_CN63XX)) ++ if (!OCTEON_IS_MODEL(OCTEON_CN6XXX)) + return 0; + + if (octeon_is_simulation() || usb_disabled()) |