From 860e01d7c443985dc583cbf2da189790054b9e0e Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 18 Aug 2014 13:09:24 +0000 Subject: octeon: update to 3.14 Signed-off-by: John Crispin SVN-Revision: 42187 --- .../100-ubnt_edgerouter2_support.patch | 31 +++++++++++++++++++ .../110-er200-ethernet_probe_order.patch | 36 ++++++++++++++++++++++ .../patches-3.14/120-octeon_platform_usb.patch | 22 +++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 target/linux/octeon/patches-3.14/100-ubnt_edgerouter2_support.patch create mode 100644 target/linux/octeon/patches-3.14/110-er200-ethernet_probe_order.patch create mode 100644 target/linux/octeon/patches-3.14/120-octeon_platform_usb.patch (limited to 'target/linux/octeon/patches-3.14') diff --git a/target/linux/octeon/patches-3.14/100-ubnt_edgerouter2_support.patch b/target/linux/octeon/patches-3.14/100-ubnt_edgerouter2_support.patch new file mode 100644 index 0000000000..7891e7129a --- /dev/null +++ b/target/linux/octeon/patches-3.14/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_PRIVATE_MAX = 30000, + + /* The remaining range is reserved for future use. */ +@@ -327,6 +329,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_PRIVATE_MAX) + } + return "Unsupported Board"; +--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c ++++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +@@ -186,6 +186,8 @@ int cvmx_helper_board_get_mii_address(in + return 7 - ipd_port; + 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.14/110-er200-ethernet_probe_order.patch b/target/linux/octeon/patches-3.14/110-er200-ethernet_probe_order.patch new file mode 100644 index 0000000000..0670f616cd --- /dev/null +++ b/target/linux/octeon/patches-3.14/110-er200-ethernet_probe_order.patch @@ -0,0 +1,36 @@ +Index: linux-3.14.14/drivers/staging/octeon/ethernet.c +=================================================================== +--- linux-3.14.14.orig/drivers/staging/octeon/ethernet.c 2014-08-07 17:03:44.000000000 +0200 ++++ linux-3.14.14/drivers/staging/octeon/ethernet.c 2014-08-07 17:07:31.768932379 +0200 +@@ -624,6 +624,7 @@ + int interface; + int fau = FAU_NUM_PACKET_BUFFERS_TO_FREE; + int qos; ++ int i; + struct device_node *pip; + + octeon_mdiobus_force_mod_depencency(); +@@ -707,13 +708,19 @@ + } + + 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.14/120-octeon_platform_usb.patch b/target/linux/octeon/patches-3.14/120-octeon_platform_usb.patch new file mode 100644 index 0000000000..2137b4733e --- /dev/null +++ b/target/linux/octeon/patches-3.14/120-octeon_platform_usb.patch @@ -0,0 +1,22 @@ +Index: linux-3.10.49/arch/mips/cavium-octeon/octeon-platform.c +=================================================================== +--- linux-3.10.49.orig/arch/mips/cavium-octeon/octeon-platform.c 2014-07-26 20:39:48.109010152 +0100 ++++ linux-3.10.49/arch/mips/cavium-octeon/octeon-platform.c 2014-07-26 20:41:10.005008627 +0100 +@@ -82,7 +82,7 @@ + }; + + /* 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 @@ + }; + + /* 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()) -- cgit v1.2.3