aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2018-04-29 17:38:07 +0300
committerJohn Crispin <john@phrozen.org>2018-05-05 06:57:00 +0200
commit4f74957584cd50786d1d33a3f26867b06a58510f (patch)
treeb89da58c3fadff9b15a3d4595927d3fbdf2704ff /target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch
parent55c9aa27be0f70d886276b93084002f18d980904 (diff)
downloadupstream-4f74957584cd50786d1d33a3f26867b06a58510f.tar.gz
upstream-4f74957584cd50786d1d33a3f26867b06a58510f.tar.bz2
upstream-4f74957584cd50786d1d33a3f26867b06a58510f.zip
gemini: add 4.14 support
This adds the patches to get fairly complete Gemini support using kernel v4.14. It is mainly a backport of patches from kernel v4.16 with omissions of things like graphics that require substantial changes and will be better handled once we move to the v4.16 kernel proper. On top of this are some WIP patches for USB support. Tested on Raidsonic NAS4220B and D-link DNS-313. ChangeLog v4->v5: - Fix ethernet single gmac usecase - Fix USB reset (patch from Hans) - Fix Raidsonic ethernet skew delay - Fix kernel config (bridge, squashfs, jffs2, usb) - Disable second usb port on Raidsonic board until fotg210_hcd is fixed ChangeLog v3->v4: - Make sure to use tabs rather than spaces in base-files. - Use the dns313 image tool from the firmware-utils. - Break out the addition of the v4.14 patches and the removal of the v4.4 patches to separate (big) patches. ChangeLog v2->v3: - Update the kernel config as indicated by Hauke Martens: - Regenerate again after rebasing using kernel_oldconfig dropping a few optimization settings that are now generic - Drop CFG80211 stuff (module) - Drop CIFS stuff (module) - Drop MAC80211 (module) - Drop wireless drivers (module) - Enabled OverlayFS - Added proper DNS-313 boot image generation with the special file header tool. - Disable CMA in the kernel - Enable LZMA compression of the kernel - Consequently name the nas4220b images nas4220b - Update preinit MAC detection script to handle also DNS-313 - Add board.d/03_hdparm to set the disk to spin down after 1 minute by default, if we have the hdparm tool installed ChangeLog v1->v2: - Processed config through kernel_oldconfig - Processed patches through make target/linux/{clean,refresh} V=99 Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch')
-rw-r--r--target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch b/target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch
new file mode 100644
index 0000000000..862cb64909
--- /dev/null
+++ b/target/linux/gemini/patches-4.14/0028-usb-host-fotg2-add-device-tree-probing.patch
@@ -0,0 +1,61 @@
+From 5662c553e89ac4179ec2a7a94a342ba3e5d78cf7 Mon Sep 17 00:00:00 2001
+From: Hans Ulli Kroll <ulli.kroll@googlemail.com>
+Date: Thu, 9 Feb 2017 15:20:49 +0100
+Subject: [PATCH 28/31] usb: host: fotg2: add device tree probing
+
+Add device tree probing to the fotg2 driver.
+
+Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+---
+ChangeLog v2->v3:
+- Change compatible to "faraday,fotg210" simply.
+---
+ drivers/usb/host/fotg210-hcd.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+--- a/drivers/usb/host/fotg210-hcd.c
++++ b/drivers/usb/host/fotg210-hcd.c
+@@ -23,6 +23,7 @@
+ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+ #include <linux/module.h>
++#include <linux/of.h>
+ #include <linux/device.h>
+ #include <linux/dmapool.h>
+ #include <linux/kernel.h>
+@@ -5600,6 +5601,15 @@ static int fotg210_hcd_probe(struct plat
+ if (usb_disabled())
+ return -ENODEV;
+
++ /* Right now device-tree probed devices don't get dma_mask set.
++ * Since shared usb code relies on it, set it here for now.
++ * Once we have dma capability bindings this can go away.
++ */
++
++ retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
++ if (retval)
++ goto fail_create_hcd;
++
+ pdev->dev.power.power_state = PMSG_ON;
+
+ res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+@@ -5676,9 +5686,18 @@ static int fotg210_hcd_remove(struct pla
+ return 0;
+ }
+
++#ifdef CONFIG_OF
++static const struct of_device_id fotg210_of_match[] = {
++ { .compatible = "faraday,fotg210" },
++ {},
++};
++MODULE_DEVICE_TABLE(of, fotg210_of_match);
++#endif
++
+ static struct platform_driver fotg210_hcd_driver = {
+ .driver = {
+ .name = "fotg210-hcd",
++ .of_match_table = of_match_ptr(fotg210_of_match),
+ },
+ .probe = fotg210_hcd_probe,
+ .remove = fotg210_hcd_remove,