From b035792891a6bf97f740d70e6aebb91780530fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Sun, 13 Nov 2016 11:49:41 -0300 Subject: linux-libre-xen: minor fix for armv7h --- ...RM-atags-add-support-for-Marvell-s-u-boot.patch | 6 +- ...dt-retrieve-MAC-addresses-from-Marvell-bo.patch | 6 +- .../0003-SMILE-Plug-device-tree-file.patch | 6 +- .../0004-fix-mvsdio-eMMC-timing.patch | 6 +- ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 6 +- ...IC23-SoC-Audio-Codec-Fix-errors-reported-.patch | 6 +- .../0007-set-default-cubietruck-led-triggers.patch | 6 +- .../linux-libre-xen/0008-USB-armory-support.patch | 6 +- ...M-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch | 6 +- ...odroid-set-higher-minimum-buck2-regulator.patch | 6 +- ...sb-Call-pm_runtime-from-musb_gadget_queue.patch | 56 ++++++++++++++ ...x-hardirq-safe-hardirq-unsafe-lock-order-.patch | 86 ---------------------- ...30-usb-better-handle-musb_mailbox-failure.patch | 62 ++++++++++++++++ ...sb-Call-pm_runtime-from-musb_gadget_queue.patch | 56 -------------- ...drm-omapdrm-dss-of-add-missing-of_node_pu.patch | 38 ++++++++++ ...30-usb-better-handle-musb_mailbox-failure.patch | 62 ---------------- ...drm-omapdrm-dss-of-add-missing-of_node_pu.patch | 38 ---------- kernels/linux-libre-xen/PKGBUILD | 43 +++++------ kernels/linux-libre-xen/config.armv7h | 3 +- 19 files changed, 208 insertions(+), 296 deletions(-) create mode 100644 kernels/linux-libre-xen/0011-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch delete mode 100644 kernels/linux-libre-xen/0011-usb-musb-Fix-hardirq-safe-hardirq-unsafe-lock-order-.patch create mode 100644 kernels/linux-libre-xen/0012-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch delete mode 100644 kernels/linux-libre-xen/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch create mode 100644 kernels/linux-libre-xen/0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch delete mode 100644 kernels/linux-libre-xen/0013-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch delete mode 100644 kernels/linux-libre-xen/0014-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch (limited to 'kernels/linux-libre-xen') diff --git a/kernels/linux-libre-xen/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/kernels/linux-libre-xen/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch index 42eec62da..be5d01500 100644 --- a/kernels/linux-libre-xen/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ b/kernels/linux-libre-xen/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch @@ -1,7 +1,7 @@ -From 3df18d4dd1d141b3f3c7bff820019e15eafa20a9 Mon Sep 17 00:00:00 2001 +From 8537ea66c09bebc2be88c7e319b27e763842d89f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:59:28 +0100 -Subject: [PATCH 01/14] ARM: atags: add support for Marvell's u-boot +Subject: [PATCH 01/13] ARM: atags: add support for Marvell's u-boot Marvell uses a specific atag in its u-boot which includes among other information the MAC addresses for up to 4 network interfaces. @@ -47,5 +47,5 @@ index 979ff40..d1d0c19 100644 }; -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/kernels/linux-libre-xen/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch index 12a452e68..242b4cad4 100644 --- a/kernels/linux-libre-xen/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ b/kernels/linux-libre-xen/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch @@ -1,7 +1,7 @@ -From d048aa94a7e9a77bd30ca477b1134a40b5e5cbac Mon Sep 17 00:00:00 2001 +From 139fe01610d1c78c6ea9e402b9548f90e95a99bb Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:56:58 +0100 -Subject: [PATCH 02/14] ARM: atags/fdt: retrieve MAC addresses from Marvell +Subject: [PATCH 02/13] ARM: atags/fdt: retrieve MAC addresses from Marvell boot loader The atags are parsed and if a Marvell atag is found, up to 4 MAC @@ -43,5 +43,5 @@ index 9448aa0..ac7b6ae 100644 } -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0003-SMILE-Plug-device-tree-file.patch b/kernels/linux-libre-xen/0003-SMILE-Plug-device-tree-file.patch index 3055f7d4a..bf8f012eb 100644 --- a/kernels/linux-libre-xen/0003-SMILE-Plug-device-tree-file.patch +++ b/kernels/linux-libre-xen/0003-SMILE-Plug-device-tree-file.patch @@ -1,7 +1,7 @@ -From a4b60b3619816e275328bdef6bd511cc0a579f34 Mon Sep 17 00:00:00 2001 +From 9d676096d4aa4d2cdd03c242dcb59862e6476562 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:41:19 -0600 -Subject: [PATCH 03/14] SMILE Plug device tree file +Subject: [PATCH 03/13] SMILE Plug device tree file This adds a dts file for the SMILE Plug, which only differs from the Mirabox dts with the LED definitions. @@ -205,5 +205,5 @@ index 0000000..d01308a + }; +}; -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0004-fix-mvsdio-eMMC-timing.patch b/kernels/linux-libre-xen/0004-fix-mvsdio-eMMC-timing.patch index 6fbf4f4ad..70288fa71 100644 --- a/kernels/linux-libre-xen/0004-fix-mvsdio-eMMC-timing.patch +++ b/kernels/linux-libre-xen/0004-fix-mvsdio-eMMC-timing.patch @@ -1,7 +1,7 @@ -From 7863afeb305484f5ce7f9c16c36f2e809b832a6f Mon Sep 17 00:00:00 2001 +From d6bde52e9ae175a59da46054f13e392481b9ca20 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:43:56 -0600 -Subject: [PATCH 04/14] fix mvsdio eMMC timing +Subject: [PATCH 04/13] fix mvsdio eMMC timing These changes from Globalscale change the MMC timing to allow the eMMC versions of the Mirabox and SMILE Plug to work. @@ -34,5 +34,5 @@ index 42296e5..e5ce6d2 100644 host->clock = ios->clock; host->ns_per_clk = 1000000000 / (host->base_clock / (m+1)); -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/kernels/linux-libre-xen/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch index 1d0698763..291b9c0b4 100644 --- a/kernels/linux-libre-xen/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ b/kernels/linux-libre-xen/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch @@ -1,7 +1,7 @@ -From 7cdb4b24dc687480eee4cc0908acb5ee582394fd Mon Sep 17 00:00:00 2001 +From 82c2da591ba6285523566a5323962f5fb95b3869 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Feb 2014 01:43:50 -0300 -Subject: [PATCH 05/14] net/smsc95xx: Allow mac address to be set as a +Subject: [PATCH 05/13] net/smsc95xx: Allow mac address to be set as a parameter --- @@ -92,5 +92,5 @@ index dc989a8..912be75 100644 /* maybe the boot loader passed the MAC address in devicetree */ -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch b/kernels/linux-libre-xen/0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch index 11601121e..9c678243c 100644 --- a/kernels/linux-libre-xen/0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch +++ b/kernels/linux-libre-xen/0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch @@ -1,7 +1,7 @@ -From 755e5fb29244c9d343ab791588e1c8e7c543aae4 Mon Sep 17 00:00:00 2001 +From e888e5f96c57ea0d8e75084d4bc9e7c6c8812786 Mon Sep 17 00:00:00 2001 From: dobatog Date: Thu, 26 Feb 2015 12:32:27 +0100 -Subject: [PATCH 06/14] ARM: TLV320AIC23 SoC Audio Codec: Fix errors reported +Subject: [PATCH 06/13] ARM: TLV320AIC23 SoC Audio Codec: Fix errors reported related to input routing signals. The following patch, based on stable v3.19, corrects the errors that are reported in the boot trace in reference to the Input Signals of the audio codec TLV320AIC23: @@ -45,5 +45,5 @@ index cd8c02b..95e6b11 100644 /* input mux */ {"Capture Source", "Line", "Line Input"}, -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0007-set-default-cubietruck-led-triggers.patch b/kernels/linux-libre-xen/0007-set-default-cubietruck-led-triggers.patch index c4b90ec20..a24f5f9ee 100644 --- a/kernels/linux-libre-xen/0007-set-default-cubietruck-led-triggers.patch +++ b/kernels/linux-libre-xen/0007-set-default-cubietruck-led-triggers.patch @@ -1,7 +1,7 @@ -From ef88d745d8d3e2672f5ba252010da8a1f5b3b136 Mon Sep 17 00:00:00 2001 +From 9332f8007064d41fe06611671ba7cecffe18cb0b Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 14 Feb 2015 12:32:27 +0100 -Subject: [PATCH 07/14] set default cubietruck led triggers +Subject: [PATCH 07/13] set default cubietruck led triggers Signed-off-by: Kevin Mihelich --- @@ -29,5 +29,5 @@ index 83f39b0..15e9626 100644 }; -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0008-USB-armory-support.patch b/kernels/linux-libre-xen/0008-USB-armory-support.patch index d79fc70c9..41fac31b4 100644 --- a/kernels/linux-libre-xen/0008-USB-armory-support.patch +++ b/kernels/linux-libre-xen/0008-USB-armory-support.patch @@ -1,7 +1,7 @@ -From 7f2f9131be193f8d49271ccb7e11841c4d182da9 Mon Sep 17 00:00:00 2001 +From 8289d8d3cdc80e9093d65d36b73eacfc75c67569 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 7 Feb 2015 12:32:27 +0100 -Subject: [PATCH 08/14] USB armory support +Subject: [PATCH 08/13] USB armory support --- arch/arm/boot/dts/Makefile | 5 + @@ -677,5 +677,5 @@ index 0000000..33719f7 + status = "okay"; +}; -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0009-ARM-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch b/kernels/linux-libre-xen/0009-ARM-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch index 3746f7c5c..167dae8c6 100644 --- a/kernels/linux-libre-xen/0009-ARM-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch +++ b/kernels/linux-libre-xen/0009-ARM-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch @@ -1,7 +1,7 @@ -From c0531d926d5c9951e4405d87ad22ed8469e5abf9 Mon Sep 17 00:00:00 2001 +From 8b1c799d72b295a039618b61f5934008b62a15bb Mon Sep 17 00:00:00 2001 From: Vanessa Maegima Date: Mon, 1 Aug 2016 09:54:14 -0300 -Subject: [PATCH 09/14] ARM: dts: imx6ul-pico-hobbit: Add Wifi support +Subject: [PATCH 09/13] ARM: dts: imx6ul-pico-hobbit: Add Wifi support imx6ul-pico-hobbit has a bcm4339 wifi chip connected to usdhc2 port. @@ -59,5 +59,5 @@ index 86f68fa..d3dfa5f 100644 fsl,pins = < MX6UL_PAD_ENET1_TX_DATA1__ENET2_MDIO 0x1b0b0 -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0010-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/kernels/linux-libre-xen/0010-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch index ba2c25b79..dce300629 100644 --- a/kernels/linux-libre-xen/0010-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ b/kernels/linux-libre-xen/0010-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch @@ -1,7 +1,7 @@ -From 6d06f98be65397f6b80d8af6924a250830c7b587 Mon Sep 17 00:00:00 2001 +From cf306f4ec83a1f645d01e01d1d18c555e6b766e5 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 11 Aug 2016 00:42:37 -0600 -Subject: [PATCH 10/14] exynos4412-odroid: set higher minimum buck2 regulator +Subject: [PATCH 10/13] exynos4412-odroid: set higher minimum buck2 regulator voltage Set a higher minimum voltage to help reboot issue. @@ -26,5 +26,5 @@ index 58ad48e7..f7c5571 100644 regulator-always-on; regulator-boot-on; -- -2.10.0 +2.10.2 diff --git a/kernels/linux-libre-xen/0011-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch b/kernels/linux-libre-xen/0011-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch new file mode 100644 index 000000000..88d30a42a --- /dev/null +++ b/kernels/linux-libre-xen/0011-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch @@ -0,0 +1,56 @@ +From 17998b802d18651bd4bfd6ee32e10c166f484e76 Mon Sep 17 00:00:00 2001 +From: Tony Lindgren +Date: Fri, 30 Sep 2016 11:10:10 -0700 +Subject: [PATCH 11/13] usb: musb: Call pm_runtime from musb_gadget_queue + +If we're booting pandaboard using NFSroot over built-in g_ether, we +can get the following after booting once and doing a warm reset: + +g_ether gadget: ecm_open +g_ether gadget: notify connect true +... +WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147 +l3_interrupt_handler+0x220/0x34c +44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Read): +Data Access in User mode du ring Functional access +... + +Fix the issue by calling pm_runtime functions from +musb_gadget_queue. + +Note that in the long run we should be able to queue the pending +transfers if pm_runtime is not active, and flush the queue from +pm_runtime_resume. + +Reported-by: Laurent Pinchart +Tested-by: Laurent Pinchart +Signed-off-by: Tony Lindgren +--- + drivers/usb/musb/musb_gadget.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c +index 6d1e975..8ccc1b1 100644 +--- a/drivers/usb/musb/musb_gadget.c ++++ b/drivers/usb/musb/musb_gadget.c +@@ -1255,6 +1255,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, + + map_dma_buffer(request, musb, musb_ep); + ++ pm_runtime_get_sync(musb->controller); + spin_lock_irqsave(&musb->lock, lockflags); + + /* don't queue if the ep is down */ +@@ -1275,6 +1276,9 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, + + unlock: + spin_unlock_irqrestore(&musb->lock, lockflags); ++ pm_runtime_mark_last_busy(musb->controller); ++ pm_runtime_put_autosuspend(musb->controller); ++ + return status; + } + +-- +2.10.2 + diff --git a/kernels/linux-libre-xen/0011-usb-musb-Fix-hardirq-safe-hardirq-unsafe-lock-order-.patch b/kernels/linux-libre-xen/0011-usb-musb-Fix-hardirq-safe-hardirq-unsafe-lock-order-.patch deleted file mode 100644 index 9c53526b9..000000000 --- a/kernels/linux-libre-xen/0011-usb-musb-Fix-hardirq-safe-hardirq-unsafe-lock-order-.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b947f36e0453d0bc466fd88a883f3c4a50e6f6a1 Mon Sep 17 00:00:00 2001 -From: Tony Lindgren -Date: Fri, 30 Sep 2016 11:10:09 -0700 -Subject: [PATCH 11/14] usb: musb: Fix hardirq-safe hardirq-unsafe lock order - error - -If we configure musb with 2430 glue as a peripheral, and then rmmod -omap2430 module, we'll get the following error: - -[ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] -... -rmmod/413 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: - (&phy->mutex){+.+.+.}, at: [] phy_power_off+0x1c/0xb8 -[ 204.678710] - and this task is already holding: - (&(&musb->lock)->rlock){-.-...}, at: [] - musb_gadget_stop+0x24/0xec [musb_hdrc] -which would create a new lock dependency: - (&(&musb->lock)->rlock){-.-...} -> (&phy->mutex){+.+.+.} -... - -This is because some glue layers expect musb_platform_enable/disable -to be called with spinlock held, and 2430 glue layer has USB PHY on -the I2C bus using a mutex. - -We could fix the glue layers to take the spinlock, but we still have -a problem of musb_plaform_enable/disable being called in an unbalanced -manner. So that would still lead into USB PHY enable/disable related -problems for omap2430 glue layer. - -While it makes sense to only enable USB PHY when needed from PM point -of view, in this case we just can't do it yet without breaking things. -So let's just revert phy_enable/disable related changes instead and -reconsider this after we have fixed musb_platform_enable/disable to -be balanced. - -Fixes: a83e17d0f73b ("usb: musb: Improve PM runtime and phy handling -for 2430 glue layer") -Signed-off-by: Tony Lindgren -Reviewed-by: Laurent Pinchart ---- - drivers/usb/musb/omap2430.c | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c -index 0b4cec9..dae92de 100644 ---- a/drivers/usb/musb/omap2430.c -+++ b/drivers/usb/musb/omap2430.c -@@ -337,6 +337,7 @@ static int omap2430_musb_init(struct musb *musb) - } - musb->isr = omap2430_musb_interrupt; - phy_init(musb->phy); -+ phy_power_on(musb->phy); - - l = musb_readl(musb->mregs, OTG_INTERFSEL); - -@@ -373,8 +374,6 @@ static void omap2430_musb_enable(struct musb *musb) - struct musb_hdrc_platform_data *pdata = dev_get_platdata(dev); - struct omap_musb_board_data *data = pdata->board_data; - -- if (!WARN_ON(!musb->phy)) -- phy_power_on(musb->phy); - - omap2430_set_power(musb, true, glue->cable_connected); - -@@ -413,9 +412,6 @@ static void omap2430_musb_disable(struct musb *musb) - struct device *dev = musb->controller; - struct omap2430_glue *glue = dev_get_drvdata(dev->parent); - -- if (!WARN_ON(!musb->phy)) -- phy_power_off(musb->phy); -- - if (glue->status != MUSB_UNKNOWN) - omap_control_usb_set_mode(glue->control_otghs, - USB_MODE_DISCONNECT); -@@ -429,6 +425,7 @@ static int omap2430_musb_exit(struct musb *musb) - struct omap2430_glue *glue = dev_get_drvdata(dev->parent); - - omap2430_low_level_exit(musb); -+ phy_power_off(musb->phy); - phy_exit(musb->phy); - musb->phy = NULL; - cancel_work_sync(&glue->omap_musb_mailbox_work); --- -2.10.0 - diff --git a/kernels/linux-libre-xen/0012-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch b/kernels/linux-libre-xen/0012-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch new file mode 100644 index 000000000..2229f46c9 --- /dev/null +++ b/kernels/linux-libre-xen/0012-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch @@ -0,0 +1,62 @@ +From d2c0d2c702b3847a0b1bf06996998c142254952e Mon Sep 17 00:00:00 2001 +From: Andreas Kemnade +Date: Mon, 22 Aug 2016 21:24:22 +0200 +Subject: [PATCH 12/13] phy-twl4030-usb: better handle musb_mailbox() failure + +setting twl->linkstat = MUSB_UNKNOWN upon error in musb_mailbox as +introduced in +commit 12b7db2bf8b8 ("usb: musb: Return error value from musb_mailbox") +causes twl4030_usb_irq() to not detect a state change form cable connected +to cable disconnected after such an error so that +pm_runtime_put_autosuspend() will not be called and the usage counter +gets unbalanced. Such errors happen e.g. if the omap2430 module is not +(yet) loaded during plug/unplug events. + +This patch introduces a flag instead that indicates whether there is +information for the musb_mailbox pending and calls musb_mailbox() if +that flag is set. + +Signed-off-by: Andreas Kemnade +Tested-by: Tony Lindgren +--- + drivers/phy/phy-twl4030-usb.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c +index d9b10a3..81067b4 100644 +--- a/drivers/phy/phy-twl4030-usb.c ++++ b/drivers/phy/phy-twl4030-usb.c +@@ -172,6 +172,7 @@ struct twl4030_usb { + int irq; + enum musb_vbus_id_status linkstat; + bool vbus_supplied; ++ bool musb_mailbox_pending; + + struct delayed_work id_workaround_work; + }; +@@ -569,9 +570,12 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) + pm_runtime_mark_last_busy(twl->dev); + pm_runtime_put_autosuspend(twl->dev); + } ++ twl->musb_mailbox_pending = true; ++ } ++ if (twl->musb_mailbox_pending) { + err = musb_mailbox(status); +- if (err) +- twl->linkstat = MUSB_UNKNOWN; ++ if (!err) ++ twl->musb_mailbox_pending = false; + } + + /* don't schedule during sleep - irq works right then */ +@@ -676,6 +680,7 @@ static int twl4030_usb_probe(struct platform_device *pdev) + twl->irq = platform_get_irq(pdev, 0); + twl->vbus_supplied = false; + twl->linkstat = MUSB_UNKNOWN; ++ twl->musb_mailbox_pending = false; + + twl->phy.dev = twl->dev; + twl->phy.label = "twl4030"; +-- +2.10.2 + diff --git a/kernels/linux-libre-xen/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch b/kernels/linux-libre-xen/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch deleted file mode 100644 index 16ae76b8b..000000000 --- a/kernels/linux-libre-xen/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 25245e060b4626a625e1849b027b3bebc9696ff4 Mon Sep 17 00:00:00 2001 -From: Tony Lindgren -Date: Fri, 30 Sep 2016 11:10:10 -0700 -Subject: [PATCH 12/14] usb: musb: Call pm_runtime from musb_gadget_queue - -If we're booting pandaboard using NFSroot over built-in g_ether, we -can get the following after booting once and doing a warm reset: - -g_ether gadget: ecm_open -g_ether gadget: notify connect true -... -WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147 -l3_interrupt_handler+0x220/0x34c -44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Read): -Data Access in User mode du ring Functional access -... - -Fix the issue by calling pm_runtime functions from -musb_gadget_queue. - -Note that in the long run we should be able to queue the pending -transfers if pm_runtime is not active, and flush the queue from -pm_runtime_resume. - -Reported-by: Laurent Pinchart -Tested-by: Laurent Pinchart -Signed-off-by: Tony Lindgren ---- - drivers/usb/musb/musb_gadget.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c -index 6d1e975..8ccc1b1 100644 ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -1255,6 +1255,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, - - map_dma_buffer(request, musb, musb_ep); - -+ pm_runtime_get_sync(musb->controller); - spin_lock_irqsave(&musb->lock, lockflags); - - /* don't queue if the ep is down */ -@@ -1275,6 +1276,9 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, - - unlock: - spin_unlock_irqrestore(&musb->lock, lockflags); -+ pm_runtime_mark_last_busy(musb->controller); -+ pm_runtime_put_autosuspend(musb->controller); -+ - return status; - } - --- -2.10.0 - diff --git a/kernels/linux-libre-xen/0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch b/kernels/linux-libre-xen/0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch new file mode 100644 index 000000000..b69fc6709 --- /dev/null +++ b/kernels/linux-libre-xen/0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch @@ -0,0 +1,38 @@ +From cff4d7ad9abccf3693bc4e7bf01009a5254e3175 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Tue, 4 Oct 2016 22:15:41 -0600 +Subject: [PATCH 13/13] Revert "gpu: drm: omapdrm: dss-of: add missing + of_node_put after calling of_parse_phandle" + +This reverts commit 2ab9f5879162499e1c4e48613287e3f59e593c4f. +--- + drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c b/drivers/gpu/drm/omapdrm/dss/dss-of.c +index e256d87..dfd4e96 100644 +--- a/drivers/gpu/drm/omapdrm/dss/dss-of.c ++++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c +@@ -125,16 +125,15 @@ u32 dss_of_port_get_port_number(struct device_node *port) + + static struct device_node *omapdss_of_get_remote_port(const struct device_node *node) + { +- struct device_node *np, *np_parent; ++ struct device_node *np; + + np = of_parse_phandle(node, "remote-endpoint", 0); + if (!np) + return NULL; + +- np_parent = of_get_next_parent(np); +- of_node_put(np); ++ np = of_get_next_parent(np); + +- return np_parent; ++ return np; + } + + struct device_node * +-- +2.10.2 + diff --git a/kernels/linux-libre-xen/0013-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch b/kernels/linux-libre-xen/0013-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch deleted file mode 100644 index de2501214..000000000 --- a/kernels/linux-libre-xen/0013-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 04facfb4b4b49337f83bcb87eb40ce54cebfab5c Mon Sep 17 00:00:00 2001 -From: Andreas Kemnade -Date: Mon, 22 Aug 2016 21:24:22 +0200 -Subject: [PATCH 13/14] phy-twl4030-usb: better handle musb_mailbox() failure - -setting twl->linkstat = MUSB_UNKNOWN upon error in musb_mailbox as -introduced in -commit 12b7db2bf8b8 ("usb: musb: Return error value from musb_mailbox") -causes twl4030_usb_irq() to not detect a state change form cable connected -to cable disconnected after such an error so that -pm_runtime_put_autosuspend() will not be called and the usage counter -gets unbalanced. Such errors happen e.g. if the omap2430 module is not -(yet) loaded during plug/unplug events. - -This patch introduces a flag instead that indicates whether there is -information for the musb_mailbox pending and calls musb_mailbox() if -that flag is set. - -Signed-off-by: Andreas Kemnade -Tested-by: Tony Lindgren ---- - drivers/phy/phy-twl4030-usb.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c -index d9b10a3..81067b4 100644 ---- a/drivers/phy/phy-twl4030-usb.c -+++ b/drivers/phy/phy-twl4030-usb.c -@@ -172,6 +172,7 @@ struct twl4030_usb { - int irq; - enum musb_vbus_id_status linkstat; - bool vbus_supplied; -+ bool musb_mailbox_pending; - - struct delayed_work id_workaround_work; - }; -@@ -569,9 +570,12 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) - pm_runtime_mark_last_busy(twl->dev); - pm_runtime_put_autosuspend(twl->dev); - } -+ twl->musb_mailbox_pending = true; -+ } -+ if (twl->musb_mailbox_pending) { - err = musb_mailbox(status); -- if (err) -- twl->linkstat = MUSB_UNKNOWN; -+ if (!err) -+ twl->musb_mailbox_pending = false; - } - - /* don't schedule during sleep - irq works right then */ -@@ -676,6 +680,7 @@ static int twl4030_usb_probe(struct platform_device *pdev) - twl->irq = platform_get_irq(pdev, 0); - twl->vbus_supplied = false; - twl->linkstat = MUSB_UNKNOWN; -+ twl->musb_mailbox_pending = false; - - twl->phy.dev = twl->dev; - twl->phy.label = "twl4030"; --- -2.10.0 - diff --git a/kernels/linux-libre-xen/0014-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch b/kernels/linux-libre-xen/0014-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch deleted file mode 100644 index c11b48b68..000000000 --- a/kernels/linux-libre-xen/0014-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch +++ /dev/null @@ -1,38 +0,0 @@ -From c92dd30d2a3a73ebbc01e351d8c3b23b18b52350 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Tue, 4 Oct 2016 22:15:41 -0600 -Subject: [PATCH 14/14] Revert "gpu: drm: omapdrm: dss-of: add missing - of_node_put after calling of_parse_phandle" - -This reverts commit 2ab9f5879162499e1c4e48613287e3f59e593c4f. ---- - drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c b/drivers/gpu/drm/omapdrm/dss/dss-of.c -index e256d87..dfd4e96 100644 ---- a/drivers/gpu/drm/omapdrm/dss/dss-of.c -+++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c -@@ -125,16 +125,15 @@ u32 dss_of_port_get_port_number(struct device_node *port) - - static struct device_node *omapdss_of_get_remote_port(const struct device_node *node) - { -- struct device_node *np, *np_parent; -+ struct device_node *np; - - np = of_parse_phandle(node, "remote-endpoint", 0); - if (!np) - return NULL; - -- np_parent = of_get_next_parent(np); -- of_node_put(np); -+ np = of_get_next_parent(np); - -- return np_parent; -+ return np; - } - - struct device_node * --- -2.10.0 - diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD index 43b86e3ec..33aeb0e1f 100644 --- a/kernels/linux-libre-xen/PKGBUILD +++ b/kernels/linux-libre-xen/PKGBUILD @@ -57,10 +57,9 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li '0008-USB-armory-support.patch' '0009-ARM-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch' '0010-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch' - '0011-usb-musb-Fix-hardirq-safe-hardirq-unsafe-lock-order-.patch' - '0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch' - '0013-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch' - '0014-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch') + '0011-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch' + '0012-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch' + '0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch') sha256sums=('d54e0f8a27e24f3666c19b395c19dba194635db26929c89e78ffa4b2b0e8ca3a' 'SKIP' '06e62971a07bbfb35c7a7e4c88ab127b00aced3d36416feb03de4d37021b1c00' @@ -72,27 +71,26 @@ sha256sums=('d54e0f8a27e24f3666c19b395c19dba194635db26929c89e78ffa4b2b0e8ca3a' '6de8a8319271809ffdb072b68d53d155eef12438e6d04ff06a5a4db82c34fa8a' 'SKIP' 'ffc0fb9c1c7549a56f6e24c2fe26fd11eb4f1d0b9d551bbab52295693ef51ef3' - 'ffa8f48cfbf0bc3968d92c7c4b4c396f86ed2b5661c477f47041420688dde942' + '9f71b6c1c6a8ac86b596f7ae8da98ed1b6821305279869c418e061363c7a84b1' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' '0376bd5efa31d4e2a9d52558777cebd9f0941df8e1adab916c868bf0c05f2fc3' '351fd96be8cd5ebd0435c0a8a978673fc023e3b1026085e67f86d815b2285e25' '418ec05d82775756fa53e267dee2b4f75beeafb94446c1b5bbd3c3ffc40c6b08' 'SKIP' - 'ed9595e2736386e70f9c16ce2d933885bd2f298fa6f8e95dd10c93d99c8addf7' - 'c17b6f6fe8c1949472d6f4421ca498dda386933e2640b8fe18e907fb9a1cdf11' - '6d376399d862c201ef953b663a8008849a8cb4e154d9918d919ab24bf3263c4e' - 'c0cd1d852e266ac493dcbfe5c25bf64d995344268e0754a1405906e48b1d9e7f' - 'b974cb919fb4b836df87d5c5088ce4a886b9f49683d143708faacf689357939a' - 'df91889cc95f4748419b59f5ebf352e489b4d8ccaa7c27b9021cc3c1fbc0fe57' - 'b1b96244a7301addd1a73965362741d262240eac5482d005e64ff8a60a6e1ac4' - '117ae47c9de4ecee666fb85bbe26b4f4733ac114b6746483c4f7c1474ff0b3b0' - '122fecf9a187f0182d67d6f7bded420ebf6ff1a8a49e536232d52a6a133466b0' - '9ca332918ade3685aafabb7d68bfc4fc68c5133dafefd0540f30e9a1a1063d90' - '412819f091e13f541605f935bc1f39c266fc8bc5e396142241c078e2c11be90e' - 'a90170710bba55f6b0c4a01261e10a669644777e5f70ce1f75ec8e9f33f40bf7' - '6561eccea49c9467e86d926932f16a6b93a293e9cbc5a1bb9ca6934f7eba663b' - 'aac8865bd9c0a583f3d589215683332931049a60a666b2dace37e70d7e68592d') + '858eac5f4aadb7a4157a36b31d101d75d841a9c58199e580201d8305356044e3' + 'eee25f5fa6e6b0fb3d5ab913521af67adf788b8613cad1b6d38711261f70646f' + 'ece5581c6b19073ccb191a6c49d50cd17ff61916ab53c7eb3039e5ecbcf2d0e3' + '0b7f588d1bccef7ac116f4d64e8877aefdf9099f16177a75ffc0c1bcd5d2fff9' + '9b504e544345119660fc50875decc1b9ee59ca9783bc5b466461410b307974f2' + '1b2eb7f52cf0f5481bdaca484cbd3175b2e472e63e46887cc0ed003e39e57ff3' + 'c7bba5a22db69e50ea8c7c7abc6bb8d133a30b27b2e7d77fc1f7e435f328366a' + 'f485923217433862978af1029d6d0573b39d6779796fb8f85ab4d588466ec0d2' + '5b21335a3a23345f8296e9258c20f7d70d9668a771019f4ea52eda3e916915b5' + '616970b049d597e994930d323c5a5efdd3e1344275c53792840a1898a52bb5dd' + '9b0afd186edf6dae0fe0c89ca1c83e5cfa207640859d5c560defead6897478b2' + 'e565ff56ec6b4dcb43a45cb4d79060d5311e6363f6f0dcfe209cb0efb49df65c' + '10055949d09efc74b1586df4d74531910b551a8a8e047ab3800942881e97c974') validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva 'C92BAA713B8D53D3CAE63FC9E6974752F9704456' # André Silva @@ -135,10 +133,9 @@ prepare() { patch -p1 -i "${srcdir}/0008-USB-armory-support.patch" patch -p1 -i "${srcdir}/0009-ARM-dts-imx6ul-pico-hobbit-Add-Wifi-support.patch" patch -p1 -i "${srcdir}/0010-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch" - patch -p1 -i "${srcdir}/0011-usb-musb-Fix-hardirq-safe-hardirq-unsafe-lock-order-.patch" - patch -p1 -i "${srcdir}/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch" - patch -p1 -i "${srcdir}/0013-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch" - patch -p1 -i "${srcdir}/0014-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch" + patch -p1 -i "${srcdir}/0011-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch" + patch -p1 -i "${srcdir}/0012-phy-twl4030-usb-better-handle-musb_mailbox-failure.patch" + patch -p1 -i "${srcdir}/0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch" fi # add freedo as boot logo diff --git a/kernels/linux-libre-xen/config.armv7h b/kernels/linux-libre-xen/config.armv7h index b1947da97..a32dfd2c7 100644 --- a/kernels/linux-libre-xen/config.armv7h +++ b/kernels/linux-libre-xen/config.armv7h @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 4.8.3-gnu-1-xen Kernel Configuration +# Linux/arm 4.8.7-gnu-1-xen Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -2120,6 +2120,7 @@ CONFIG_SRAM=y CONFIG_VEXPRESS_SYSCFG=y CONFIG_BONE_CAPEMGR=y # CONFIG_DEV_OVERLAYMGR is not set +CONFIG_TIEQEP=m CONFIG_C2PORT=m # -- cgit v1.2.2