diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-12-11 20:07:39 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-12-11 20:07:39 +0000 |
commit | 3cc3c0a518292c6e500c08f17be000ece9675c28 (patch) | |
tree | c250a3ba9356d1585b0efb9b860b82198ec3071c /target/linux/octeon/patches-3.10 | |
parent | c095c7c2027b5f2896926f288bd1172a7a2fbc4f (diff) | |
download | mtk-20170518-3cc3c0a518292c6e500c08f17be000ece9675c28.zip mtk-20170518-3cc3c0a518292c6e500c08f17be000ece9675c28.tar.gz mtk-20170518-3cc3c0a518292c6e500c08f17be000ece9675c28.tar.bz2 |
octeon: remove linux 3.10 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43635
Diffstat (limited to 'target/linux/octeon/patches-3.10')
15 files changed, 0 insertions, 1111 deletions
diff --git a/target/linux/octeon/patches-3.10/0001-MIPS-Octeon-Fix-DT-pruning-bug-with-pip-ports.patch b/target/linux/octeon/patches-3.10/0001-MIPS-Octeon-Fix-DT-pruning-bug-with-pip-ports.patch deleted file mode 100644 index 0a905d5..0000000 --- a/target/linux/octeon/patches-3.10/0001-MIPS-Octeon-Fix-DT-pruning-bug-with-pip-ports.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ab2bb148c5932712d2717a7f3a452846f07a660a Mon Sep 17 00:00:00 2001 -From: Faidon Liambotis <paravoid@debian.org> -Date: Thu, 11 Jul 2013 21:08:09 +0000 -Subject: [PATCH] MIPS: Octeon: Fix DT pruning bug with pip ports - -During the pruning of the device tree octeon_fdt_pip_iface() is called -for each PIP interface and every port up to the port count is removed -from the device tree. However, the count was set to the return value of -cvmx_helper_interface_enumerate() which doesn't actually return the -count but just returns zero on success. This effectively removed *all* -ports from the tree. - -Use cvmx_helper_ports_on_interface() instead to fix this. This -successfully restores the 3 ports of my ERLite-3 and fixes the "kernel -assigns random MAC addresses" issue. - -Signed-off-by: Faidon Liambotis <paravoid@debian.org> -Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> -Acked-by: David Daney <david.daney@cavium.com> -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/5587/ -Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---- - arch/mips/cavium-octeon/octeon-platform.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/arch/mips/cavium-octeon/octeon-platform.c -+++ b/arch/mips/cavium-octeon/octeon-platform.c -@@ -334,9 +334,10 @@ static void __init octeon_fdt_pip_iface( - char name_buffer[20]; - int iface; - int p; -- int count; -+ int count = 0; - -- count = cvmx_helper_interface_enumerate(idx); -+ if (cvmx_helper_interface_enumerate(idx) == 0) -+ count = cvmx_helper_ports_on_interface(idx); - - snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx); - iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer); diff --git a/target/linux/octeon/patches-3.10/0002-MIPS-Octeon-Enable-interfaces-on-EdgeRouter-Lite.patch b/target/linux/octeon/patches-3.10/0002-MIPS-Octeon-Enable-interfaces-on-EdgeRouter-Lite.patch deleted file mode 100644 index 84b6600..0000000 --- a/target/linux/octeon/patches-3.10/0002-MIPS-Octeon-Enable-interfaces-on-EdgeRouter-Lite.patch +++ /dev/null @@ -1,68 +0,0 @@ -From a135a9b5d9683ace787c7d86f1e642d9acfacdde Mon Sep 17 00:00:00 2001 -From: Aaro Koskinen <aaro.koskinen@iki.fi> -Date: Sun, 23 Jun 2013 20:38:44 +0000 -Subject: [PATCH] MIPS: Octeon: Enable interfaces on EdgeRouter Lite - -Enable interfaces on EdgeRouter Lite. Tested with cavium_octeon_defconfig -and busybox shell. DHCP & ping works with eth0, eth1 and eth2. - -The board type "UBNT_E100" is taken from the sources of the vendor kernel -shipped with the product. - -Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> -Acked-by: David Daney <david.daney@cavium.com> -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/5546/ -Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---- - arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 13 +++++++++++++ - arch/mips/include/asm/octeon/cvmx-bootinfo.h | 2 ++ - 2 files changed, 15 insertions(+) - ---- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c -+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c -@@ -181,6 +181,11 @@ int cvmx_helper_board_get_mii_address(in - return ipd_port - 16 + 4; - else - return -1; -+ case CVMX_BOARD_TYPE_UBNT_E100: -+ if (ipd_port >= 0 && ipd_port <= 2) -+ return 7 - ipd_port; -+ else -+ return -1; - } - - /* Some unknown board. Somebody forgot to update this function... */ -@@ -706,6 +711,14 @@ int __cvmx_helper_board_hardware_enable( - } - } - } -+ } else if (cvmx_sysinfo_get()->board_type == -+ CVMX_BOARD_TYPE_UBNT_E100) { -+ cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(0, interface), 0); -+ cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(0, interface), 0x10); -+ cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(1, interface), 0); -+ cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(1, interface), 0x10); -+ cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(2, interface), 0); -+ cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(2, interface), 0x10); - } - return 0; - } ---- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h -+++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h -@@ -227,6 +227,7 @@ enum cvmx_board_types_enum { - * use any numbers in this range. - */ - CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, -+ CVMX_BOARD_TYPE_UBNT_E100 = 20002, - CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, - - /* The remaining range is reserved for future use. */ -@@ -325,6 +326,7 @@ 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_CUST_PRIVATE_MAX) - } - return "Unsupported Board"; diff --git a/target/linux/octeon/patches-3.10/0003-staging-MIPS-add-Octeon-USB-HCD-support.patch b/target/linux/octeon/patches-3.10/0003-staging-MIPS-add-Octeon-USB-HCD-support.patch deleted file mode 100644 index 7f60258..0000000 --- a/target/linux/octeon/patches-3.10/0003-staging-MIPS-add-Octeon-USB-HCD-support.patch +++ /dev/null @@ -1,83 +0,0 @@ -From b164935b38d64557a32892e7aa45e213e9d11ea8 Mon Sep 17 00:00:00 2001 -From: Aaro Koskinen <aaro.koskinen@iki.fi> -Date: Sat, 1 Jun 2013 21:42:58 +0300 -Subject: [PATCH] staging: MIPS: add Octeon USB HCD support - -Add support for Octeon USB HCD. Tested on EdgeRouter Lite with USB -mass storage. - -The driver has been extracted from GPL sources of EdgeRouter Lite firmware -(based on Linux 2.6.32.13). Some minor fixes and cleanups have been done -to make it work with 3.10-rc3. - -$ uname -a -Linux (none) 3.10.0-rc3-edge-00005-g86cb5bc #41 SMP PREEMPT Sat Jun 1 20:41:46 EEST 2013 mips64 GNU/Linux -$ modprobe octeon-usb -[ 37.971683] octeon_usb: module is from the staging directory, the quality is unknown, you have been warned. -[ 37.983649] OcteonUSB: Detected 1 ports -[ 37.999360] OcteonUSB OcteonUSB.0: Octeon Host Controller -[ 38.004847] OcteonUSB OcteonUSB.0: new USB bus registered, assigned bus number 1 -[ 38.012332] OcteonUSB OcteonUSB.0: irq 122, io mem 0x00000000 -[ 38.019970] hub 1-0:1.0: USB hub found -[ 38.023851] hub 1-0:1.0: 1 port detected -[ 38.028101] OcteonUSB: Registered HCD for port 0 on irq 122 -[ 38.391443] usb 1-1: new high-speed USB device number 2 using OcteonUSB -[ 38.586922] usb-storage 1-1:1.0: USB Mass Storage device detected -[ 38.597375] scsi0 : usb-storage 1-1:1.0 -[ 39.604111] scsi 0:0:0:0: Direct-Access USB DISK 2.0 PMAP PQ: 0 ANSI: 4 -[ 39.619113] sd 0:0:0:0: [sda] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB) -[ 39.630696] sd 0:0:0:0: [sda] Write Protect is off -[ 39.635945] sd 0:0:0:0: [sda] No Caching mode page present -[ 39.641464] sd 0:0:0:0: [sda] Assuming drive cache: write through -[ 39.651341] sd 0:0:0:0: [sda] No Caching mode page present -[ 39.656917] sd 0:0:0:0: [sda] Assuming drive cache: write through -[ 39.664296] sda: sda1 sda2 -[ 39.675574] sd 0:0:0:0: [sda] No Caching mode page present -[ 39.681093] sd 0:0:0:0: [sda] Assuming drive cache: write through -[ 39.687223] sd 0:0:0:0: [sda] Attached SCSI removable disk - -Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> -Cc: David Daney <ddaney.cavm@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/staging/Kconfig | 2 + - drivers/staging/Makefile | 1 + - drivers/staging/octeon-usb/Kconfig | 10 + - drivers/staging/octeon-usb/Makefile | 3 + - drivers/staging/octeon-usb/TODO | 11 + - drivers/staging/octeon-usb/cvmx-usb.c | 3344 ++++++++++++++++++++++++++ - drivers/staging/octeon-usb/cvmx-usb.h | 1085 +++++++++ - drivers/staging/octeon-usb/cvmx-usbcx-defs.h | 3086 ++++++++++++++++++++++++ - drivers/staging/octeon-usb/cvmx-usbnx-defs.h | 1596 ++++++++++++ - drivers/staging/octeon-usb/octeon-hcd.c | 854 +++++++ - 10 files changed, 9992 insertions(+) - create mode 100644 drivers/staging/octeon-usb/Kconfig - create mode 100644 drivers/staging/octeon-usb/Makefile - create mode 100644 drivers/staging/octeon-usb/TODO - create mode 100644 drivers/staging/octeon-usb/cvmx-usb.c - create mode 100644 drivers/staging/octeon-usb/cvmx-usb.h - create mode 100644 drivers/staging/octeon-usb/cvmx-usbcx-defs.h - create mode 100644 drivers/staging/octeon-usb/cvmx-usbnx-defs.h - create mode 100644 drivers/staging/octeon-usb/octeon-hcd.c - ---- a/drivers/staging/Kconfig -+++ b/drivers/staging/Kconfig -@@ -62,6 +62,8 @@ source "drivers/staging/line6/Kconfig" - - source "drivers/staging/octeon/Kconfig" - -+source "drivers/staging/octeon-usb/Kconfig" -+ - source "drivers/staging/serqt_usb2/Kconfig" - - source "drivers/staging/vt6655/Kconfig" ---- a/drivers/staging/Makefile -+++ b/drivers/staging/Makefile -@@ -25,6 +25,7 @@ obj-$(CONFIG_LINE6_USB) += line6/ - obj-$(CONFIG_NETLOGIC_XLR_NET) += netlogic/ - obj-$(CONFIG_USB_SERIAL_QUATECH2) += serqt_usb2/ - obj-$(CONFIG_OCTEON_ETHERNET) += octeon/ -+obj-$(CONFIG_OCTEON_USB) += octeon-usb/ - obj-$(CONFIG_VT6655) += vt6655/ - obj-$(CONFIG_VT6656) += vt6656/ - obj-$(CONFIG_VME_BUS) += vme/ diff --git a/target/linux/octeon/patches-3.10/0004-fix_hcd.patch b/target/linux/octeon/patches-3.10/0004-fix_hcd.patch deleted file mode 100644 index 318e59c..0000000 --- a/target/linux/octeon/patches-3.10/0004-fix_hcd.patch +++ /dev/null @@ -1,113 +0,0 @@ ---- a/drivers/staging/octeon-usb/octeon-hcd.c -+++ b/drivers/staging/octeon-usb/octeon-hcd.c -@@ -673,8 +673,9 @@ static const struct hc_driver octeon_hc_ - }; - - --static int octeon_usb_driver_probe(struct device *dev) -+static int octeon_usb_driver_probe(struct platform_device *pdev) - { -+ struct device *dev = &pdev->dev; - int status; - int usb_num = to_platform_device(dev)->id; - int irq = platform_get_irq(to_platform_device(dev), 0); -@@ -728,8 +729,9 @@ static int octeon_usb_driver_probe(struc - return 0; - } - --static int octeon_usb_driver_remove(struct device *dev) -+static int octeon_usb_driver_remove(struct platform_device *pdev) - { -+ struct device *dev = &pdev->dev; - int status; - struct usb_hcd *hcd = dev_get_drvdata(dev); - struct octeon_hcd *priv = hcd_to_octeon(hcd); -@@ -748,30 +750,35 @@ static int octeon_usb_driver_remove(stru - return 0; - } - --static struct device_driver octeon_usb_driver = { -- .name = "OcteonUSB", -- .bus = &platform_bus_type, -+static struct platform_driver octeon_usb_driver = { -+ .driver = { -+ .name = "OcteonUSB", -+ .owner = THIS_MODULE, -+ }, - .probe = octeon_usb_driver_probe, - .remove = octeon_usb_driver_remove, - }; - -+static struct resource octeon_usb_resources = { -+ .start = OCTEON_IRQ_USB0, -+ .end = OCTEON_IRQ_USB0, -+ .flags = IORESOURCE_IRQ, -+}; -+ -+static struct platform_device octeon_usb_device = { -+ .name = "OcteonUSB", -+ .id = 0, -+ .resource = &octeon_usb_resources, -+ .num_resources = 1, -+}; - --#define MAX_USB_PORTS 10 --static struct platform_device *pdev_glob[MAX_USB_PORTS]; --static int octeon_usb_registered; - static int __init octeon_usb_module_init(void) - { - int num_devices = cvmx_usb_get_num_ports(); -- int device; - - if (usb_disabled() || num_devices == 0) - return -ENODEV; - -- if (driver_register(&octeon_usb_driver)) -- return -ENOMEM; -- -- octeon_usb_registered = 1; -- - /* - * Only cn52XX and cn56XX have DWC_OTG USB hardware and the - * IOB priority registers. Under heavy network load USB -@@ -792,37 +799,14 @@ static int __init octeon_usb_module_init - cvmx_write_csr(CVMX_IOB_N2C_L2C_PRI_CNT, pri_cnt.u64); - } - -- for (device = 0; device < num_devices; device++) { -- struct resource irq_resource; -- struct platform_device *pdev; -- memset(&irq_resource, 0, sizeof(irq_resource)); -- irq_resource.start = (device == 0) ? OCTEON_IRQ_USB0 : OCTEON_IRQ_USB1; -- irq_resource.end = irq_resource.start; -- irq_resource.flags = IORESOURCE_IRQ; -- pdev = platform_device_register_simple((char *)octeon_usb_driver. name, device, &irq_resource, 1); -- if (IS_ERR(pdev)) { -- driver_unregister(&octeon_usb_driver); -- octeon_usb_registered = 0; -- return PTR_ERR(pdev); -- } -- if (device < MAX_USB_PORTS) -- pdev_glob[device] = pdev; -+ platform_device_register(&octeon_usb_device); - -- } -- return 0; -+ return platform_driver_register(&octeon_usb_driver); - } - - static void __exit octeon_usb_module_cleanup(void) - { -- int i; -- -- for (i = 0; i < MAX_USB_PORTS; i++) -- if (pdev_glob[i]) { -- platform_device_unregister(pdev_glob[i]); -- pdev_glob[i] = NULL; -- } -- if (octeon_usb_registered) -- driver_unregister(&octeon_usb_driver); -+ platform_driver_unregister(&octeon_usb_driver); - } - - MODULE_LICENSE("GPL"); diff --git a/target/linux/octeon/patches-3.10/0005-MIPS-Octeon-ethernet-dropped-napi.patch b/target/linux/octeon/patches-3.10/0005-MIPS-Octeon-ethernet-dropped-napi.patch deleted file mode 100644 index 43d0f8c..0000000 --- a/target/linux/octeon/patches-3.10/0005-MIPS-Octeon-ethernet-dropped-napi.patch +++ /dev/null @@ -1,45 +0,0 @@ -From patchwork Thu Sep 5 18:43:59 2013 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [1/3] staging: octeon-ethernet: make dropped packets to consume NAPI - budget -From: Aaro Koskinen <aaro.koskinen@iki.fi> -X-Patchwork-Id: 5809 -Message-Id: <1378406641-16530-2-git-send-email-aaro.koskinen@iki.fi> -To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, - devel@driverdev.osuosl.org, linux-mips@linux-mips.org -Cc: David Daney <david.daney@cavium.com>, - "Jason A. Donenfeld" <Jason@zx2c4.com>, richard@nod.at, - Aaro Koskinen <aaro.koskinen@iki.fi> -Date: Thu, 5 Sep 2013 21:43:59 +0300 - -We should count also dropped packets, otherwise the NAPI handler may -end up running too long. - -Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> - ---- -drivers/staging/octeon/ethernet-rx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c -index 34afc16..10e5416 100644 ---- a/drivers/staging/octeon/ethernet-rx.c -+++ b/drivers/staging/octeon/ethernet-rx.c -@@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) - if (backlog > budget * cores_in_use && napi != NULL) - cvm_oct_enable_one_cpu(); - } -+ rx_count++; - - skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1; - if (likely(skb_in_hw)) { -@@ -429,7 +430,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) - #endif - } - netif_receive_skb(skb); -- rx_count++; - } else { - /* Drop any packet received for a device that isn't up */ - /* diff --git a/target/linux/octeon/patches-3.10/0006-MIPS-Octeon-ethernet-remove-debug-noise.patch b/target/linux/octeon/patches-3.10/0006-MIPS-Octeon-ethernet-remove-debug-noise.patch deleted file mode 100644 index cc4f270..0000000 --- a/target/linux/octeon/patches-3.10/0006-MIPS-Octeon-ethernet-remove-debug-noise.patch +++ /dev/null @@ -1,60 +0,0 @@ -From patchwork Thu Sep 5 18:44:00 2013 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [2/3] staging: octeon-ethernet: remove skb alloc failure warnings -From: Aaro Koskinen <aaro.koskinen@iki.fi> -X-Patchwork-Id: 5811 -Message-Id: <1378406641-16530-3-git-send-email-aaro.koskinen@iki.fi> -To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, - devel@driverdev.osuosl.org, linux-mips@linux-mips.org -Cc: David Daney <david.daney@cavium.com>, - "Jason A. Donenfeld" <Jason@zx2c4.com>, richard@nod.at, - Aaro Koskinen <aaro.koskinen@iki.fi> -Date: Thu, 5 Sep 2013 21:44:00 +0300 - -Remove skb allocation failure warnings. They will trigger a page -allocation warning already. Also, one of the warnings was not ratelimited, -causing the box to lock up under heavy traffic & low memory. - -Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> -Acked-by: David Daney <david.daney@cavium.com> - ---- -drivers/staging/octeon/ethernet-mem.c | 7 +------ - drivers/staging/octeon/ethernet-rx.c | 3 --- - 2 files changed, 1 insertion(+), 9 deletions(-) - -diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c -index 78b6cb7..199059d 100644 ---- a/drivers/staging/octeon/ethernet-mem.c -+++ b/drivers/staging/octeon/ethernet-mem.c -@@ -48,13 +48,8 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) - while (freed) { - - struct sk_buff *skb = dev_alloc_skb(size + 256); -- if (unlikely(skb == NULL)) { -- pr_warning -- ("Failed to allocate skb for hardware pool %d\n", -- pool); -+ if (unlikely(skb == NULL)) - break; -- } -- - skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f)); - *(struct sk_buff **)(skb->data - sizeof(void *)) = skb; - cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128)); -diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c -index 10e5416..e14a1bb 100644 ---- a/drivers/staging/octeon/ethernet-rx.c -+++ b/drivers/staging/octeon/ethernet-rx.c -@@ -337,9 +337,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) - */ - skb = dev_alloc_skb(work->len); - if (!skb) { -- printk_ratelimited("Port %d failed to allocate " -- "skbuff, packet dropped\n", -- work->ipprt); - cvm_oct_free_work(work); - continue; - } diff --git a/target/linux/octeon/patches-3.10/0007-MIPS-Octeon-ethernet-irq-enable.patch b/target/linux/octeon/patches-3.10/0007-MIPS-Octeon-ethernet-irq-enable.patch deleted file mode 100644 index ea9a28a..0000000 --- a/target/linux/octeon/patches-3.10/0007-MIPS-Octeon-ethernet-irq-enable.patch +++ /dev/null @@ -1,81 +0,0 @@ -From patchwork Thu Sep 5 18:44:01 2013 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [3/3] staging: octeon-ethernet: rgmii: enable interrupts that we can - handle -From: Aaro Koskinen <aaro.koskinen@iki.fi> -X-Patchwork-Id: 5810 -Message-Id: <1378406641-16530-4-git-send-email-aaro.koskinen@iki.fi> -To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, - devel@driverdev.osuosl.org, linux-mips@linux-mips.org -Cc: David Daney <david.daney@cavium.com>, - "Jason A. Donenfeld" <Jason@zx2c4.com>, richard@nod.at, - Aaro Koskinen <aaro.koskinen@iki.fi> -Date: Thu, 5 Sep 2013 21:44:01 +0300 - -Enable only those interrupts that we can handle & acknowledge in the -interrupt handler. - -At least on EdgeRouter Lite, the hardware may occasionally interrupt with -some error condition when the physical link status changes frequently. -Since the interrupt condition is not acked properly, this leads to the -following warning and the IRQ gets disabled completely: - -[ 41.324700] eth0: Link down -[ 44.324721] eth0: 1000 Mbps Full duplex, port 0, queue 0 -[ 44.885590] irq 117: nobody cared (try booting with the "irqpoll" option) -[ 44.892397] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.11.0-rc5-edge-los.git-27d042f-dirty-00950-gaa42f2d-dirty #8 -[ 44.902825] Stack : ffffffff815c0000 0000000000000004 0000000000000003 0000000000000000 - ffffffff81fd0000 ffffffff815c0000 0000000000000004 ffffffff8118530c - ffffffff815c0000 ffffffff811858d8 0000000000000000 0000000000000000 - ffffffff81fd0000 ffffffff81fc0000 ffffffff8152f3a0 ffffffff815b7bf7 - ffffffff81fc6688 ffffffff815b8060 0000000000000000 0000000000000000 - 0000000000000000 ffffffff815346c8 ffffffff815346b0 ffffffff814a6a18 - ffffffff8158b848 ffffffff81145614 ffffffff81593800 ffffffff81187174 - ffffffff815b7d00 ffffffff8158b760 0000000000000000 ffffffff814a9184 - 0000000000000000 0000000000000000 0000000000000000 0000000000000000 - 0000000000000000 ffffffff811203b8 0000000000000000 0000000000000000 - ... -[ 44.968408] Call Trace: -[ 44.970873] [<ffffffff811203b8>] show_stack+0x68/0x80 -[ 44.975937] [<ffffffff814a9184>] dump_stack+0x78/0xb8 -[ 44.980999] [<ffffffff811aac54>] __report_bad_irq+0x44/0x108 -[ 44.986662] [<ffffffff811ab238>] note_interrupt+0x248/0x2a0 -[ 44.992240] [<ffffffff811a85e4>] handle_irq_event_percpu+0x144/0x200 -[ 44.998598] [<ffffffff811a86f4>] handle_irq_event+0x54/0x90 -[ 45.004176] [<ffffffff811ab908>] handle_level_irq+0xd0/0x148 -[ 45.009839] [<ffffffff811a7b04>] generic_handle_irq+0x34/0x50 -[ 45.015589] [<ffffffff8111dae8>] do_IRQ+0x18/0x30 -[ 45.020301] [<ffffffff8110486c>] plat_irq_dispatch+0x74/0xb8 -[ 45.025958] -[ 45.027451] handlers: -[ 45.029731] [<ffffffff813fca10>] cvm_oct_rgmii_rml_interrupt -[ 45.035397] Disabling IRQ #117 -[ 45.038742] Port 0 receive error code 13, packet dropped -[ 46.324719] eth0: Link down -[ 48.324733] eth0: 1000 Mbps Full duplex, port 0, queue 0 - -Reported-by: "Jason A. Donenfeld" <Jason@zx2c4.com> -Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> -Acked-by: David Daney <david.daney@cavium.com> - ---- -drivers/staging/octeon/ethernet-rgmii.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c -index d8f5f69..ea53af3 100644 ---- a/drivers/staging/octeon/ethernet-rgmii.c -+++ b/drivers/staging/octeon/ethernet-rgmii.c -@@ -373,9 +373,7 @@ int cvm_oct_rgmii_init(struct net_device *dev) - * Enable interrupts on inband status changes - * for this port. - */ -- gmx_rx_int_en.u64 = -- cvmx_read_csr(CVMX_GMXX_RXX_INT_EN -- (index, interface)); -+ gmx_rx_int_en.u64 = 0; - gmx_rx_int_en.s.phy_dupx = 1; - gmx_rx_int_en.s.phy_link = 1; - gmx_rx_int_en.s.phy_spd = 1; diff --git a/target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch b/target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch deleted file mode 100644 index 78194bf..0000000 --- a/target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8b75e77048a378339ada86eff548a5b253212859 Mon Sep 17 00:00:00 2001 -From: Aaro Koskinen <aaro.koskinen@nsn.com> -Date: Fri, 1 Nov 2013 17:06:03 +0200 -Subject: [PATCH] MIPS: cavium-octeon: fix out-of-bounds array access - -When booting with in-kernel DTBs, the pruning code will enumerate -interfaces 0-4. However, there is memory reserved only for 4 so some -other data will get overwritten by cvmx_helper_interface_enumerate(). - -Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com> -Acked-by: David Daney <david.daney@cavium.com> -Signed-off-by: John Crispin <blogic@openwrt.org> -Patchwork: http://patchwork.linux-mips.org/patch/6102/ ---- - arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/cavium-octeon/executive/cvmx-helper.c -+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c -@@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) - void (*cvmx_override_ipd_port_setup) (int ipd_port); - - /* Port count per interface */ --static int interface_port_count[4] = { 0, 0, 0, 0 }; -+static int interface_port_count[5]; - - /* Port last configured link info index by IPD/PKO port */ - static cvmx_helper_link_info_t diff --git a/target/linux/octeon/patches-3.10/0009-MIPS-cavium-octeon-fix-early-boot-hang-on-EBH5600-bo.patch b/target/linux/octeon/patches-3.10/0009-MIPS-cavium-octeon-fix-early-boot-hang-on-EBH5600-bo.patch deleted file mode 100644 index 6cbbe34..0000000 --- a/target/linux/octeon/patches-3.10/0009-MIPS-cavium-octeon-fix-early-boot-hang-on-EBH5600-bo.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b2e4f1560f7388f8157dd2c828211abbfad0e806 Mon Sep 17 00:00:00 2001 -From: Aaro Koskinen <aaro.koskinen@nsn.com> -Date: Fri, 1 Nov 2013 17:06:04 +0200 -Subject: [PATCH] MIPS: cavium-octeon: fix early boot hang on EBH5600 board - -The boot hangs early on EBH5600 board when octeon_fdt_pip_iface() is -trying enumerate a non-existant interface. The actual hang happens in -cvmx_helper_interface_get_mode(): - - mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); - -when interface == 4. We can avoid this situation by first checking that -the interface exists in the DTB. - -Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com> -Acked-by: David Daney <david.daney@cavium.com> -Signed-off-by: John Crispin <blogic@openwrt.org> -Patchwork: http://patchwork.linux-mips.org/patch/6101/ ---- - arch/mips/cavium-octeon/octeon-platform.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/arch/mips/cavium-octeon/octeon-platform.c -+++ b/arch/mips/cavium-octeon/octeon-platform.c -@@ -336,14 +336,14 @@ static void __init octeon_fdt_pip_iface( - int p; - int count = 0; - -- if (cvmx_helper_interface_enumerate(idx) == 0) -- count = cvmx_helper_ports_on_interface(idx); -- - snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx); - iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer); - if (iface < 0) - return; - -+ if (cvmx_helper_interface_enumerate(idx) == 0) -+ count = cvmx_helper_ports_on_interface(idx); -+ - for (p = 0; p < 16; p++) - octeon_fdt_pip_port(iface, idx, p, count - 1, pmac); - } diff --git a/target/linux/octeon/patches-3.10/0010-MIPS-octeon-Add-interface-mode-detection-for-Octeon-.patch b/target/linux/octeon/patches-3.10/0010-MIPS-octeon-Add-interface-mode-detection-for-Octeon-.patch deleted file mode 100644 index 2002dd1..0000000 --- a/target/linux/octeon/patches-3.10/0010-MIPS-octeon-Add-interface-mode-detection-for-Octeon-.patch +++ /dev/null @@ -1,202 +0,0 @@ -From d8ce75934b888df0bd73dfd9c030a2b034a04977 Mon Sep 17 00:00:00 2001 -From: Alex Smith <alex.smith@imgtec.com> -Date: Thu, 29 May 2014 11:10:01 +0100 -Subject: [PATCH] MIPS: octeon: Add interface mode detection for Octeon II - -Add interface mode detection for Octeon II. This is necessary to detect -the interface modes correctly on the UBNT E200 board. Code is taken -from the UBNT GPL source release, with some alterations: SRIO, ILK and -RXAUI interface modes are removed and instead return disabled as these -modes are not currently supported. - -Signed-off-by: Alex Smith <alex.smith@imgtec.com> -Tested-by: David Daney <david.daney@cavium.com> -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/7039/ -Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---- - arch/mips/cavium-octeon/executive/cvmx-helper.c | 166 ++++++++++++++++++++++++ - 1 file changed, 166 insertions(+) - ---- a/arch/mips/cavium-octeon/executive/cvmx-helper.c -+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c -@@ -104,6 +104,158 @@ int cvmx_helper_ports_on_interface(int i - } - - /** -+ * @INTERNAL -+ * Return interface mode for CN68xx. -+ */ -+static cvmx_helper_interface_mode_t __cvmx_get_mode_cn68xx(int interface) -+{ -+ union cvmx_mio_qlmx_cfg qlm_cfg; -+ switch (interface) { -+ case 0: -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(0)); -+ /* QLM is disabled when QLM SPD is 15. */ -+ if (qlm_cfg.s.qlm_spd == 15) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ if (qlm_cfg.s.qlm_cfg == 2) -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ else if (qlm_cfg.s.qlm_cfg == 3) -+ return CVMX_HELPER_INTERFACE_MODE_XAUI; -+ else -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ case 2: -+ case 3: -+ case 4: -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(interface)); -+ /* QLM is disabled when QLM SPD is 15. */ -+ if (qlm_cfg.s.qlm_spd == 15) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ if (qlm_cfg.s.qlm_cfg == 2) -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ else if (qlm_cfg.s.qlm_cfg == 3) -+ return CVMX_HELPER_INTERFACE_MODE_XAUI; -+ else -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ case 7: -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(3)); -+ /* QLM is disabled when QLM SPD is 15. */ -+ if (qlm_cfg.s.qlm_spd == 15) { -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } else if (qlm_cfg.s.qlm_cfg != 0) { -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(1)); -+ if (qlm_cfg.s.qlm_cfg != 0) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } -+ return CVMX_HELPER_INTERFACE_MODE_NPI; -+ case 8: -+ return CVMX_HELPER_INTERFACE_MODE_LOOP; -+ default: -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } -+} -+ -+/** -+ * @INTERNAL -+ * Return interface mode for an Octeon II -+ */ -+static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface) -+{ -+ union cvmx_gmxx_inf_mode mode; -+ -+ if (OCTEON_IS_MODEL(OCTEON_CN68XX)) -+ return __cvmx_get_mode_cn68xx(interface); -+ -+ if (interface == 2) -+ return CVMX_HELPER_INTERFACE_MODE_NPI; -+ -+ if (interface == 3) -+ return CVMX_HELPER_INTERFACE_MODE_LOOP; -+ -+ /* Only present in CN63XX & CN66XX Octeon model */ -+ if ((OCTEON_IS_MODEL(OCTEON_CN63XX) && -+ (interface == 4 || interface == 5)) || -+ (OCTEON_IS_MODEL(OCTEON_CN66XX) && -+ interface >= 4 && interface <= 7)) { -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } -+ -+ if (OCTEON_IS_MODEL(OCTEON_CN66XX)) { -+ union cvmx_mio_qlmx_cfg mio_qlm_cfg; -+ -+ /* QLM2 is SGMII0 and QLM1 is SGMII1 */ -+ if (interface == 0) -+ mio_qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(2)); -+ else if (interface == 1) -+ mio_qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(1)); -+ else -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ if (mio_qlm_cfg.s.qlm_spd == 15) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ if (mio_qlm_cfg.s.qlm_cfg == 9) -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ else if (mio_qlm_cfg.s.qlm_cfg == 11) -+ return CVMX_HELPER_INTERFACE_MODE_XAUI; -+ else -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } else if (OCTEON_IS_MODEL(OCTEON_CN61XX)) { -+ union cvmx_mio_qlmx_cfg qlm_cfg; -+ -+ if (interface == 0) { -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(2)); -+ if (qlm_cfg.s.qlm_cfg == 2) -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ else if (qlm_cfg.s.qlm_cfg == 3) -+ return CVMX_HELPER_INTERFACE_MODE_XAUI; -+ else -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } else if (interface == 1) { -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(0)); -+ if (qlm_cfg.s.qlm_cfg == 2) -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ else if (qlm_cfg.s.qlm_cfg == 3) -+ return CVMX_HELPER_INTERFACE_MODE_XAUI; -+ else -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } -+ } else if (OCTEON_IS_MODEL(OCTEON_CNF71XX)) { -+ if (interface == 0) { -+ union cvmx_mio_qlmx_cfg qlm_cfg; -+ qlm_cfg.u64 = cvmx_read_csr(CVMX_MIO_QLMX_CFG(0)); -+ if (qlm_cfg.s.qlm_cfg == 2) -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ } -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } -+ -+ if (interface == 1 && OCTEON_IS_MODEL(OCTEON_CN63XX)) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); -+ -+ if (OCTEON_IS_MODEL(OCTEON_CN63XX)) { -+ switch (mode.cn63xx.mode) { -+ case 0: -+ return CVMX_HELPER_INTERFACE_MODE_SGMII; -+ case 1: -+ return CVMX_HELPER_INTERFACE_MODE_XAUI; -+ default: -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ } -+ } else { -+ if (!mode.s.en) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ if (mode.s.type) -+ return CVMX_HELPER_INTERFACE_MODE_GMII; -+ else -+ return CVMX_HELPER_INTERFACE_MODE_RGMII; -+ } -+} -+ -+/** - * Get the operating mode of an interface. Depending on the Octeon - * chip and configuration, this function returns an enumeration - * of the type of packet I/O supported by an interface. -@@ -116,6 +268,20 @@ int cvmx_helper_ports_on_interface(int i - cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface) - { - union cvmx_gmxx_inf_mode mode; -+ -+ if (interface < 0 || -+ interface >= cvmx_helper_get_number_of_interfaces()) -+ return CVMX_HELPER_INTERFACE_MODE_DISABLED; -+ -+ /* -+ * Octeon II models -+ */ -+ if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)) -+ return __cvmx_get_mode_octeon2(interface); -+ -+ /* -+ * Octeon and Octeon Plus models -+ */ - if (interface == 2) - return CVMX_HELPER_INTERFACE_MODE_NPI; - diff --git a/target/linux/octeon/patches-3.10/0011-MIPS-Octeon-Add-twsi-interrupt-initialization-for-OC.patch b/target/linux/octeon/patches-3.10/0011-MIPS-Octeon-Add-twsi-interrupt-initialization-for-OC.patch deleted file mode 100644 index 382410f..0000000 --- a/target/linux/octeon/patches-3.10/0011-MIPS-Octeon-Add-twsi-interrupt-initialization-for-OC.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a53825ef4e9b2f42a21ad2b903f4d0ce691a5d63 Mon Sep 17 00:00:00 2001 -From: Eunbong Song <eunb.song@samsung.com> -Date: Tue, 22 Apr 2014 06:16:15 +0000 -Subject: [PATCH] MIPS: Octeon: Add twsi interrupt initialization for OCTEON - 3XXX, 5XXX, 63XX - -In octeon_3xxx.dts file, there is a definiton for twsi/twsi2 interrupts. -But there is no code for initialization of this interrupts. This patch adds -code for initialization of twsi interrupts. - -Signed-off-by: Eunbong Song <eunb.song@samsung.com> -Cc: linux-kernel@vger.kernel.org -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/6816/ -Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---- - arch/mips/cavium-octeon/octeon-irq.c | 2 ++ - arch/mips/include/asm/mach-cavium-octeon/irq.h | 2 ++ - 2 files changed, 4 insertions(+) - ---- a/arch/mips/cavium-octeon/octeon-irq.c -+++ b/arch/mips/cavium-octeon/octeon-irq.c -@@ -1260,11 +1260,13 @@ static void __init octeon_irq_init_ciu(v - for (i = 0; i < 4; i++) - octeon_irq_force_ciu_mapping(ciu_domain, i + OCTEON_IRQ_PCI_MSI0, 0, i + 40); - -+ octeon_irq_force_ciu_mapping(ciu_domain, OCTEON_IRQ_TWSI, 0, 45); - octeon_irq_force_ciu_mapping(ciu_domain, OCTEON_IRQ_RML, 0, 46); - for (i = 0; i < 4; i++) - octeon_irq_force_ciu_mapping(ciu_domain, i + OCTEON_IRQ_TIMER0, 0, i + 52); - - octeon_irq_force_ciu_mapping(ciu_domain, OCTEON_IRQ_USB0, 0, 56); -+ octeon_irq_force_ciu_mapping(ciu_domain, OCTEON_IRQ_TWSI2, 0, 59); - - /* CIU_1 */ - for (i = 0; i < 16; i++) ---- a/arch/mips/include/asm/mach-cavium-octeon/irq.h -+++ b/arch/mips/include/asm/mach-cavium-octeon/irq.h -@@ -35,6 +35,8 @@ enum octeon_irq { - OCTEON_IRQ_PCI_MSI2, - OCTEON_IRQ_PCI_MSI3, - -+ OCTEON_IRQ_TWSI, -+ OCTEON_IRQ_TWSI2, - OCTEON_IRQ_RML, - OCTEON_IRQ_TIMER0, - OCTEON_IRQ_TIMER1, diff --git a/target/linux/octeon/patches-3.10/100-ubnt_edgerouter2_support.patch b/target/linux/octeon/patches-3.10/100-ubnt_edgerouter2_support.patch deleted file mode 100644 index 7891e71..0000000 --- a/target/linux/octeon/patches-3.10/100-ubnt_edgerouter2_support.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- 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.10/110-er200-ethernet_probe_order.patch b/target/linux/octeon/patches-3.10/110-er200-ethernet_probe_order.patch deleted file mode 100644 index 3d39a04..0000000 --- a/target/linux/octeon/patches-3.10/110-er200-ethernet_probe_order.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/drivers/staging/octeon/ethernet.c -+++ b/drivers/staging/octeon/ethernet.c -@@ -623,6 +623,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(); -@@ -706,13 +707,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); - port_index++, port++) { diff --git a/target/linux/octeon/patches-3.10/120-octeon_platform_usb.patch b/target/linux/octeon/patches-3.10/120-octeon_platform_usb.patch deleted file mode 100644 index 2137b47..0000000 --- a/target/linux/octeon/patches-3.10/120-octeon_platform_usb.patch +++ /dev/null @@ -1,22 +0,0 @@ -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()) diff --git a/target/linux/octeon/patches-3.10/130-gpio.patch b/target/linux/octeon/patches-3.10/130-gpio.patch deleted file mode 100644 index 9312f33..0000000 --- a/target/linux/octeon/patches-3.10/130-gpio.patch +++ /dev/null @@ -1,214 +0,0 @@ -Index: linux-3.10.49/drivers/gpio/Kconfig -=================================================================== ---- linux-3.10.49.orig/drivers/gpio/Kconfig 2014-07-18 00:58:15.000000000 +0200 -+++ linux-3.10.49/drivers/gpio/Kconfig 2014-08-07 11:41:16.517169817 +0200 -@@ -171,6 +171,14 @@ - Qualcomm MSM chips. Most of the pins on the MSM can be - selected for GPIO, and are controlled by this driver. - -+config GPIO_OCTEON -+ tristate "Cavium OCTEON GPIO" -+ depends on GPIOLIB && CPU_CAVIUM_OCTEON -+ default y -+ help -+ Say yes here to support the on-chip GPIO lines on the OCTEON -+ family of SOCs. -+ - config GPIO_MVEBU - def_bool y - depends on PLAT_ORION -Index: linux-3.10.49/drivers/gpio/Makefile -=================================================================== ---- linux-3.10.49.orig/drivers/gpio/Makefile 2014-07-18 00:58:15.000000000 +0200 -+++ linux-3.10.49/drivers/gpio/Makefile 2014-08-07 11:41:16.517169817 +0200 -@@ -10,6 +10,7 @@ - # Device drivers. Generally keep list sorted alphabetically - obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o - -+obj-$(CONFIG_GPIO_OCTEON) += gpio-octeon.o - obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o - obj-$(CONFIG_GPIO_ADNP) += gpio-adnp.o - obj-$(CONFIG_GPIO_ADP5520) += gpio-adp5520.o -Index: linux-3.10.49/drivers/gpio/gpio-octeon.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-3.10.49/drivers/gpio/gpio-octeon.c 2014-08-07 11:53:14.733161106 +0200 -@@ -0,0 +1,166 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2011,2012 Cavium Inc. -+ */ -+ -+#include <linux/platform_device.h> -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/gpio.h> -+#include <linux/io.h> -+ -+#include <asm/octeon/octeon.h> -+#include <asm/octeon/cvmx-gpio-defs.h> -+ -+#define DRV_VERSION "1.0" -+#define DRV_DESCRIPTION "Cavium Inc. OCTEON GPIO Driver" -+ -+#define RX_DAT 0x80 -+#define TX_SET 0x88 -+#define TX_CLEAR 0x90 -+ -+int gpio_to_irq(unsigned gpio) -+{ -+ return -EINVAL; -+} -+EXPORT_SYMBOL(gpio_to_irq); -+ -+/* -+ * The address offset of the GPIO configuration register for a given -+ * line. -+ */ -+static unsigned int bit_cfg_reg(unsigned int gpio) -+{ -+ if (gpio < 16) -+ return 8 * gpio; -+ else -+ return 8 * (gpio - 16) + 0x100; -+} -+ -+struct octeon_gpio { -+ struct gpio_chip chip; -+ u64 register_base; -+}; -+ -+static int octeon_gpio_dir_in(struct gpio_chip *chip, unsigned offset) -+{ -+ struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); -+ -+ cvmx_write_csr(gpio->register_base + bit_cfg_reg(offset), 0); -+ return 0; -+} -+ -+static void octeon_gpio_set(struct gpio_chip *chip, unsigned offset, int value) -+{ -+ struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); -+ u64 mask = 1ull << offset; -+ u64 reg = gpio->register_base + (value ? TX_SET : TX_CLEAR); -+ cvmx_write_csr(reg, mask); -+} -+ -+static int octeon_gpio_dir_out(struct gpio_chip *chip, unsigned offset, -+ int value) -+{ -+ struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); -+ union cvmx_gpio_bit_cfgx cfgx; -+ -+ -+ octeon_gpio_set(chip, offset, value); -+ -+ cfgx.u64 = 0; -+ cfgx.s.tx_oe = 1; -+ -+ cvmx_write_csr(gpio->register_base + bit_cfg_reg(offset), cfgx.u64); -+ return 0; -+} -+ -+static int octeon_gpio_get(struct gpio_chip *chip, unsigned offset) -+{ -+ struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); -+ u64 read_bits = cvmx_read_csr(gpio->register_base + RX_DAT); -+ -+ return ((1ull << offset) & read_bits) != 0; -+} -+ -+static int octeon_gpio_probe(struct platform_device *pdev) -+{ -+ struct octeon_gpio *gpio; -+ struct gpio_chip *chip; -+ struct resource *res_mem; -+ int err = 0; -+ -+ gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); -+ if (!gpio) -+ return -ENOMEM; -+ chip = &gpio->chip; -+ -+ res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ if (res_mem == NULL) { -+ dev_err(&pdev->dev, "found no memory resource\n"); -+ err = -ENXIO; -+ goto out; -+ } -+ if (!devm_request_mem_region(&pdev->dev, res_mem->start, -+ resource_size(res_mem), -+ res_mem->name)) { -+ dev_err(&pdev->dev, "request_mem_region failed\n"); -+ err = -ENXIO; -+ goto out; -+ } -+ gpio->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start, -+ resource_size(res_mem)); -+ -+ -+ pdev->dev.platform_data = chip; -+ chip->label = "octeon-gpio"; -+ chip->dev = &pdev->dev; -+ chip->owner = THIS_MODULE; -+ chip->base = 0; -+ chip->can_sleep = 0; -+ chip->ngpio = 20; -+ chip->direction_input = octeon_gpio_dir_in; -+ chip->get = octeon_gpio_get; -+ chip->direction_output = octeon_gpio_dir_out; -+ chip->set = octeon_gpio_set; -+ err = gpiochip_add(chip); -+ if (err) -+ goto out; -+ -+ dev_info(&pdev->dev, "version: " DRV_VERSION "\n"); -+out: -+ return err; -+} -+ -+static int octeon_gpio_remove(struct platform_device *pdev) -+{ -+ struct gpio_chip *chip = pdev->dev.platform_data; -+ return gpiochip_remove(chip); -+} -+ -+static struct of_device_id octeon_gpio_match[] = { -+ { -+ .compatible = "cavium,octeon-3860-gpio", -+ }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, octeon_gpio_match); -+ -+static struct platform_driver octeon_gpio_driver = { -+ .probe = octeon_gpio_probe, -+ .remove = octeon_gpio_remove, -+ .driver = { -+ .name = "octeon_gpio", -+ .owner = THIS_MODULE, -+ .of_match_table = octeon_gpio_match, -+ }, -+}; -+ -+module_platform_driver(octeon_gpio_driver); -+ -+MODULE_DESCRIPTION(DRV_DESCRIPTION); -+MODULE_AUTHOR("David Daney"); -+MODULE_LICENSE("GPL"); -+MODULE_VERSION(DRV_VERSION); -Index: linux-3.10.49/arch/mips/Kconfig -=================================================================== ---- linux-3.10.49.orig/arch/mips/Kconfig 2014-08-07 11:41:14.809169838 +0200 -+++ linux-3.10.49/arch/mips/Kconfig 2014-08-07 11:41:16.521169817 +0200 -@@ -769,6 +769,7 @@ - select USB_ARCH_HAS_OHCI - select USB_ARCH_HAS_EHCI - select HOLES_IN_ZONE -+ select ARCH_REQUIRE_GPIOLIB - help - This option supports all of the Octeon reference boards from Cavium - Networks. It builds a kernel that dynamically determines the Octeon |