summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-04-20 11:34:14 +0200
committerStefan Agner <stefan.agner@toradex.com>2018-06-18 09:16:23 +0200
commit7da6da579b7d90b7ca6560c880bd3f58ecb73df2 (patch)
tree18cdb41fc5f5ef195335ca056f27fba1d06e8ab7
parent4b2804c9fbbe84ecc997a292f95136d4e2140317 (diff)
linux-toradex-mainline: more patches also for apalis t30
Move the USB device aka gadget fix from Tezi to here. Add patches to force fixed IDs for SDMMC controllers. Add patch to fix for PLL_U rate configuration (T30). Add Apalis T30 specific patch for PCIe fix hacks. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0013-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra30.patch30
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0014-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra114-124.patch39
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0015-Revert-mmc-core-fix-error-path-in-mmc_host_alloc.patch31
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0016-Revert-mmc-core-simplify-ida-handling.patch64
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0017-mmc-read-mmc-alias-from-device-tree.patch69
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0018-apalis-t30-mainline-force-fixed-ids-for-sdmmc-contro.patch45
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/0019-clk-tegra-Fix-pll_u-rate-configuration.patch60
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-4.14/apalis-t30-mainline/0024-apalis-t30-mainline-apply-pcie-fix-hacks.patch31
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline_4.14.bb20
9 files changed, 386 insertions, 3 deletions
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0013-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra30.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0013-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra30.patch
new file mode 100644
index 0000000..f60ce2d
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0013-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra30.patch
@@ -0,0 +1,30 @@
+From 061e20e9899e2fef170135a5d68f62d2a9514b3b Mon Sep 17 00:00:00 2001
+From: Dmitry Osipenko <digetx@gmail.com>
+Date: Tue, 19 Dec 2017 05:58:07 +0300
+Subject: usb: chipidea: tegra: Use aligned DMA on Tegra30
+
+USB Ethernet gadget now works on Tegra30.
+
+Acked-by: Thierry Reding <treding@nvidia.com>
+Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
+Signed-off-by: Peter Chen <peter.chen@nxp.com>
+---
+ drivers/usb/chipidea/ci_hdrc_tegra.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
+index 7b65a10..7f4d2b6 100644
+--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
++++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
+@@ -29,7 +29,7 @@ static const struct tegra_udc_soc_info tegra20_udc_soc_info = {
+ };
+
+ static const struct tegra_udc_soc_info tegra30_udc_soc_info = {
+- .flags = 0,
++ .flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
+ };
+
+ static const struct tegra_udc_soc_info tegra114_udc_soc_info = {
+--
+cgit v1.1
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0014-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra114-124.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0014-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra114-124.patch
new file mode 100644
index 0000000..0410751
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0014-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra114-124.patch
@@ -0,0 +1,39 @@
+From bf0fcafdd7388c74abb0e646fa31d0032ce9a635 Mon Sep 17 00:00:00 2001
+Message-Id: <bf0fcafdd7388c74abb0e646fa31d0032ce9a635.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+Date: Tue, 19 Dec 2017 05:58:07 +0300
+Subject: [PATCH 14/27] usb: chipidea: tegra: Use aligned DMA on Tegra114/124
+
+USB Ethernet gadget now works on Tegra114 and Tegra124.
+
+Similar to commit 061e20e9899e ("usb: chipidea: tegra: Use aligned DMA
+on Tegra30").
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+ drivers/usb/chipidea/ci_hdrc_tegra.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
+index 85ae796b75b1..1af8afd92873 100644
+--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
++++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
+@@ -36,11 +36,11 @@ static const struct tegra_udc_soc_info tegra30_udc_soc_info = {
+ };
+
+ static const struct tegra_udc_soc_info tegra114_udc_soc_info = {
+- .flags = 0,
++ .flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
+ };
+
+ static const struct tegra_udc_soc_info tegra124_udc_soc_info = {
+- .flags = 0,
++ .flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
+ };
+
+ static const struct of_device_id tegra_udc_of_match[] = {
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0015-Revert-mmc-core-fix-error-path-in-mmc_host_alloc.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0015-Revert-mmc-core-fix-error-path-in-mmc_host_alloc.patch
new file mode 100644
index 0000000..1ce78a1
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0015-Revert-mmc-core-fix-error-path-in-mmc_host_alloc.patch
@@ -0,0 +1,31 @@
+From 221424e20f51fd7e9603da30c4ad0970b2dfd868 Mon Sep 17 00:00:00 2001
+Message-Id: <221424e20f51fd7e9603da30c4ad0970b2dfd868.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Date: Thu, 19 Apr 2018 13:49:00 +0200
+Subject: [PATCH 15/27] Revert "mmc: core: fix error path in mmc_host_alloc"
+
+This reverts commit 1ed2171944888cf6787990a0f6387b717ba72e24.
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+ drivers/mmc/core/host.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
+index ad88deb2e8f3..3740fb0052a4 100644
+--- a/drivers/mmc/core/host.c
++++ b/drivers/mmc/core/host.c
+@@ -376,8 +376,6 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
+
+ if (mmc_gpio_alloc(host)) {
+ put_device(&host->class_dev);
+- ida_simple_remove(&mmc_host_ida, host->index);
+- kfree(host);
+ return NULL;
+ }
+
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0016-Revert-mmc-core-simplify-ida-handling.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0016-Revert-mmc-core-simplify-ida-handling.patch
new file mode 100644
index 0000000..4a8ba85
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0016-Revert-mmc-core-simplify-ida-handling.patch
@@ -0,0 +1,64 @@
+From 50a063a5271868aaf17ee86741e6452a6c405a50 Mon Sep 17 00:00:00 2001
+Message-Id: <50a063a5271868aaf17ee86741e6452a6c405a50.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Date: Thu, 19 Apr 2018 13:49:30 +0200
+Subject: [PATCH 16/27] Revert "mmc: core: simplify ida handling"
+
+This reverts commit 7413d1f509eb0ee605973c1a6da9911700c80012.
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+ drivers/mmc/core/host.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
+index 3740fb0052a4..841b9ce01a8e 100644
+--- a/drivers/mmc/core/host.c
++++ b/drivers/mmc/core/host.c
+@@ -35,11 +35,14 @@
+ #define cls_dev_to_mmc_host(d) container_of(d, struct mmc_host, class_dev)
+
+ static DEFINE_IDA(mmc_host_ida);
++static DEFINE_SPINLOCK(mmc_host_lock);
+
+ static void mmc_host_classdev_release(struct device *dev)
+ {
+ struct mmc_host *host = cls_dev_to_mmc_host(dev);
+- ida_simple_remove(&mmc_host_ida, host->index);
++ spin_lock(&mmc_host_lock);
++ ida_remove(&mmc_host_ida, host->index);
++ spin_unlock(&mmc_host_lock);
+ kfree(host);
+ }
+
+@@ -358,13 +361,22 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
+ /* scanning will be enabled when we're ready */
+ host->rescan_disable = 1;
+
+- err = ida_simple_get(&mmc_host_ida, 0, 0, GFP_KERNEL);
+- if (err < 0) {
++again:
++ if (!ida_pre_get(&mmc_host_ida, GFP_KERNEL)) {
+ kfree(host);
+ return NULL;
+ }
+
+- host->index = err;
++ spin_lock(&mmc_host_lock);
++ err = ida_get_new(&mmc_host_ida, &host->index);
++ spin_unlock(&mmc_host_lock);
++
++ if (err == -EAGAIN) {
++ goto again;
++ } else if (err) {
++ kfree(host);
++ return NULL;
++ }
+
+ dev_set_name(&host->class_dev, "mmc%d", host->index);
+
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0017-mmc-read-mmc-alias-from-device-tree.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0017-mmc-read-mmc-alias-from-device-tree.patch
new file mode 100644
index 0000000..1fdf688
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0017-mmc-read-mmc-alias-from-device-tree.patch
@@ -0,0 +1,69 @@
+From 1caa89027b94c5d52f9459890f123ebb6fb5d5a9 Mon Sep 17 00:00:00 2001
+Message-Id: <1caa89027b94c5d52f9459890f123ebb6fb5d5a9.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Stefan Agner <stefan@agner.ch>
+Date: Fri, 29 Apr 2016 10:32:17 -0700
+Subject: [PATCH 17/27] mmc: read mmc alias from device tree
+
+To get the SD/MMC host device ID, read the alias from the device
+tree.
+
+This is useful in case a SoC has multipe SD/MMC host controllers while
+the second controller should logically be the first device (e.g. if
+the second controller is connected to an internal eMMC). Combined
+with block device numbering using MMC/SD host device ID, this
+results in predictable name assignment of the internal eMMC block
+device.
+
+Signed-off-by: Stefan Agner <stefan@agner.ch>
+Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
+[dianders: rebase + roll in http://crosreview.com/259916]
+Signed-off-by: Douglas Anderson <dianders@chromium.org>
+---
+ drivers/mmc/core/host.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
+index 841b9ce01a8e..e4fdd5c0ec0b 100644
+--- a/drivers/mmc/core/host.c
++++ b/drivers/mmc/core/host.c
+@@ -353,11 +353,26 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
+ {
+ int err;
+ struct mmc_host *host;
++ int id;
+
+ host = kzalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL);
+ if (!host)
+ return NULL;
+
++ /* If OF aliases exist, start dynamic assignment after highest */
++ id = of_alias_get_highest_id("mmc");
++ id = (id < 0) ? 0 : id + 1;
++
++ /* If this devices has OF node, maybe it has an alias */
++ if (dev->of_node) {
++ int of_id = of_alias_get_id(dev->of_node, "mmc");
++
++ if (of_id < 0)
++ dev_warn(dev, "/aliases ID not available\n");
++ else
++ id = of_id;
++ }
++
+ /* scanning will be enabled when we're ready */
+ host->rescan_disable = 1;
+
+@@ -368,7 +383,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
+ }
+
+ spin_lock(&mmc_host_lock);
+- err = ida_get_new(&mmc_host_ida, &host->index);
++ err = ida_get_new_above(&mmc_host_ida, id, &host->index);
+ spin_unlock(&mmc_host_lock);
+
+ if (err == -EAGAIN) {
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0018-apalis-t30-mainline-force-fixed-ids-for-sdmmc-contro.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0018-apalis-t30-mainline-force-fixed-ids-for-sdmmc-contro.patch
new file mode 100644
index 0000000..80ab0cb
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0018-apalis-t30-mainline-force-fixed-ids-for-sdmmc-contro.patch
@@ -0,0 +1,45 @@
+From 84faf19eb6451b55bd34e39a08555e1ebe623088 Mon Sep 17 00:00:00 2001
+Message-Id: <84faf19eb6451b55bd34e39a08555e1ebe623088.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Date: Thu, 19 Apr 2018 14:01:58 +0200
+Subject: [PATCH 18/27] apalis-t30-mainline: force fixed ids for sdmmc
+ controllers
+
+The following, together with the previous 3 kernel patches, forces a
+fixed assignment between device id and sdmmc controller.
+
+I.e. the eMMC on SDMMC4 will be /dev/mmcblk0.
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+ arch/arm/boot/dts/tegra30-apalis-eval.dts | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
+index 07b945b0391a..785217d9f70b 100644
+--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
++++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
+@@ -8,6 +8,18 @@
+ model = "Toradex Apalis T30 on Apalis Evaluation Board";
+ compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30", "nvidia,tegra30";
+
++ aliases {
++ /*
++ * The following, together with kernel patches, forces a fixed
++ * assignment between device id and SDMMC controllers.
++ *
++ * I.e. the eMMC on SDMMC4 will be /dev/mmcblk0.
++ */
++ mmc0 = "/sdhci@78000600"; /* eMMC */
++ mmc1 = &mmc1; /* MMC1 8-bit slot */
++ mmc2 = &sd1; /* SD1 4-bit slot */
++ };
++
+ aliases {
+ rtc0 = "/i2c@7000c000/rtc@68";
+ rtc1 = "/i2c@7000d000/tps65911@2d";
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/0019-clk-tegra-Fix-pll_u-rate-configuration.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/0019-clk-tegra-Fix-pll_u-rate-configuration.patch
new file mode 100644
index 0000000..9c846b2
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/0019-clk-tegra-Fix-pll_u-rate-configuration.patch
@@ -0,0 +1,60 @@
+From 03f99b544b9e6e1e79bb73c9e35d3ea7047e706c Mon Sep 17 00:00:00 2001
+Message-Id: <03f99b544b9e6e1e79bb73c9e35d3ea7047e706c.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Marcel Ziswiler <marcel@ziswiler.com>
+Date: Fri, 23 Feb 2018 00:04:51 +0100
+Subject: [PATCH 19/27] clk: tegra: Fix pll_u rate configuration
+
+Turns out latest upstream U-Boot does not configure/enable pll_u which
+leaves it at some default rate of 500 kHz:
+
+root@apalis-t30:~# cat /sys/kernel/debug/clk/clk_summary | grep pll_u
+ pll_u 3 3 0 500000 0
+
+Of course this won't quite work leading to the following messages:
+
+[ 6.559593] usb 2-1: new full-speed USB device number 2 using tegra-
+ehci
+[ 11.759173] usb 2-1: device descriptor read/64, error -110
+[ 27.119453] usb 2-1: device descriptor read/64, error -110
+[ 27.389217] usb 2-1: new full-speed USB device number 3 using tegra-
+ehci
+[ 32.559454] usb 2-1: device descriptor read/64, error -110
+[ 47.929777] usb 2-1: device descriptor read/64, error -110
+[ 48.049658] usb usb2-port1: attempt power cycle
+[ 48.759475] usb 2-1: new full-speed USB device number 4 using tegra-
+ehci
+[ 59.349457] usb 2-1: device not accepting address 4, error -110
+[ 59.509449] usb 2-1: new full-speed USB device number 5 using tegra-
+ehci
+[ 70.069457] usb 2-1: device not accepting address 5, error -110
+[ 70.079721] usb usb2-port1: unable to enumerate USB device
+
+Fix this by actually allowing the rate also being set from within
+the Linux kernel.
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Tested-by: Jon Hunter <jonathanh@nvidia.com>
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+(cherry picked from commit c35b518f9ba06c9de79fb3ff62eed7462d804995)
+---
+ drivers/clk/tegra/clk-pll.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
+index 7c369e21c91c..830d1c87fa7c 100644
+--- a/drivers/clk/tegra/clk-pll.c
++++ b/drivers/clk/tegra/clk-pll.c
+@@ -1151,6 +1151,8 @@ static const struct clk_ops tegra_clk_pllu_ops = {
+ .enable = clk_pllu_enable,
+ .disable = clk_pll_disable,
+ .recalc_rate = clk_pll_recalc_rate,
++ .round_rate = clk_pll_round_rate,
++ .set_rate = clk_pll_set_rate,
+ };
+
+ static int _pll_fixed_mdiv(struct tegra_clk_pll_params *pll_params,
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline-4.14/apalis-t30-mainline/0024-apalis-t30-mainline-apply-pcie-fix-hacks.patch b/recipes-kernel/linux/linux-toradex-mainline-4.14/apalis-t30-mainline/0024-apalis-t30-mainline-apply-pcie-fix-hacks.patch
new file mode 100644
index 0000000..22975ec
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-4.14/apalis-t30-mainline/0024-apalis-t30-mainline-apply-pcie-fix-hacks.patch
@@ -0,0 +1,31 @@
+From 50c98b667b749119f705504d0a4ff752c27be5ec Mon Sep 17 00:00:00 2001
+Message-Id: <50c98b667b749119f705504d0a4ff752c27be5ec.1529072479.git.marcel.ziswiler@toradex.com>
+In-Reply-To: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+References: <fb4764e8eb658d35e8fc62ae79c77e1f6e2b0ef3.1529072479.git.marcel.ziswiler@toradex.com>
+From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Date: Fri, 20 Apr 2018 10:07:58 +0200
+Subject: [PATCH 24/27] apalis-t30-mainline: apply pcie fix hacks
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+ drivers/pci/host/pci-tegra.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
+index 0c6237159243..bdc7e7592cc8 100644
+--- a/drivers/pci/host/pci-tegra.c
++++ b/drivers/pci/host/pci-tegra.c
+@@ -51,8 +51,8 @@
+ #include <soc/tegra/cpuidle.h>
+ #include <soc/tegra/pmc.h>
+
+-//#define CONFIG_MACH_APALIS_T30
+-#define CONFIG_MACH_APALIS_TK1
++#define CONFIG_MACH_APALIS_T30
++//#define CONFIG_MACH_APALIS_TK1
+ #if defined(CONFIG_MACH_APALIS_T30) || defined(CONFIG_MACH_APALIS_TK1)
+ #include <linux/gpio.h>
+
+--
+2.14.4
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline_4.14.bb b/recipes-kernel/linux/linux-toradex-mainline_4.14.bb
index 54224ac..b30a2ff 100644
--- a/recipes-kernel/linux/linux-toradex-mainline_4.14.bb
+++ b/recipes-kernel/linux/linux-toradex-mainline_4.14.bb
@@ -16,7 +16,7 @@ PR = "${TDX_VER_ITEM}"
PV = "${LINUX_VERSION}"
S = "${WORKDIR}/linux-${PV}"
-TK1-PATCHES = " \
+GENERIC_PATCHES = " \
file://0001-apalis-t30-tk1-mainline-customize-defconfig.patch \
file://0002-apalis_t30-tk1-fix-pcie-clock-and-reset-not-conformi.patch \
file://0003-igb-integrate-tools-only-device-support.patch \
@@ -29,10 +29,23 @@ TK1-PATCHES = " \
file://0010-drm-tegra-gem-Make-__tegra_gem_mmap-available-more-w.patch \
file://0011-drm-tegra-fb-Implement-fb_mmap-callback.patch \
file://0012-apalis-tk1-support-for-k20-mfd.patch \
+ file://0013-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra30.patch \
+ file://0014-usb-chipidea-tegra-Use-aligned-DMA-on-Tegra114-124.patch \
+ file://0015-Revert-mmc-core-fix-error-path-in-mmc_host_alloc.patch \
+ file://0016-Revert-mmc-core-simplify-ida-handling.patch \
+ file://0017-mmc-read-mmc-alias-from-device-tree.patch \
+ file://0018-apalis-t30-mainline-force-fixed-ids-for-sdmmc-contro.patch \
+ file://0019-clk-tegra-Fix-pll_u-rate-configuration.patch \
+"
+MACHINE_PATCHES = " \
+"
+MACHINE_PATCHES_apalis-t30-mainline = " \
+ file://0024-apalis-t30-mainline-apply-pcie-fix-hacks.patch \
"
SRC_URI = " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \
- ${TK1-PATCHES} \
+ ${GENERIC_PATCHES} \
+ ${MACHINE_PATCHES} \
"
SRC_URI[md5sum] = "1f25f5abe06404f9c3d41fbf25d8a22e"
SRC_URI[sha256sum] = "7c5bb02feb48f1b7ab9a9c3ff051f325c0c6474fb0e25d9d7bcee91b2cfe6645"
@@ -45,7 +58,8 @@ S_use-head-next = "${WORKDIR}/git"
SRCBRANCH_use-head-next = "linux-4.14.y"
SRC_URI_use-head-next = " \
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;protocol=git;branch=${SRCBRANCH} \
- ${TK1-PATCHES} \
+ ${GENERIC_PATCHES} \
+ ${MACHINE_PATCHES} \
"
COMPATIBLE_MACHINE = "(apalis-tk1-mainline|apalis-t30-mainline)"