From 985b8b7e76dadf2e2a8871d0412d9089180296b5 Mon Sep 17 00:00:00 2001 From: Alex Bee Date: Sun, 22 Aug 2021 19:07:35 +1000 Subject: [PATCH] Rockchip: linux: update configs for 5.14 --- .../RK3288/linux/default/linux.arm.conf | 3 +- .../RK3399/linux/default/linux.aarch64.conf | 2 + .../default/linux-1002-for-libreelec.patch | 70 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf b/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf index 7603c8dc79..29950f0048 100644 --- a/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf +++ b/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf @@ -1484,7 +1484,7 @@ CONFIG_FIXED_PHY=y # CONFIG_AMD_PHY is not set # CONFIG_ADIN_PHY is not set # CONFIG_AQUANTIA_PHY is not set -# CONFIG_AX88796B_PHY is not set +CONFIG_AX88796B_PHY=m # CONFIG_BROADCOM_PHY is not set # CONFIG_BCM54140_PHY is not set CONFIG_BCM7XXX_PHY=m @@ -1528,6 +1528,7 @@ CONFIG_SMSC_PHY=m # CONFIG_MICREL_KS8995MA is not set CONFIG_MDIO_DEVICE=y CONFIG_MDIO_BUS=y +CONFIG_FWNODE_MDIO=y CONFIG_OF_MDIO=y CONFIG_MDIO_DEVRES=y # CONFIG_MDIO_BITBANG is not set diff --git a/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf b/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf index 2660f6b3ea..b086ee0250 100644 --- a/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf +++ b/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf @@ -3413,6 +3413,7 @@ CONFIG_VIDEO_V4L2_SUBDEV_API=y # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set CONFIG_VIDEO_TUNER=m CONFIG_V4L2_H264=m +CONFIG_V4L2_VP9=m CONFIG_V4L2_MEM2MEM_DEV=m CONFIG_V4L2_FLASH_LED_CLASS=m CONFIG_V4L2_FWNODE=m @@ -6939,6 +6940,7 @@ CONFIG_DEBUG_MEMORY_INIT=y # CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_HAVE_ARCH_KASAN=y CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y +CONFIG_HAVE_ARCH_KASAN_HW_TAGS=y CONFIG_HAVE_ARCH_KASAN_VMALLOC=y CONFIG_CC_HAS_KASAN_GENERIC=y CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y diff --git a/projects/Rockchip/patches/linux/default/linux-1002-for-libreelec.patch b/projects/Rockchip/patches/linux/default/linux-1002-for-libreelec.patch index 474a2b40bc..1a39f05dc1 100644 --- a/projects/Rockchip/patches/linux/default/linux-1002-for-libreelec.patch +++ b/projects/Rockchip/patches/linux/default/linux-1002-for-libreelec.patch @@ -643,3 +643,73 @@ index 3d98e2251ea5..b201700ccc8a 100644 .codec_ops = rk3399_vpu_codec_ops, .irqs = rockchip_vdpu2_irqs, .num_irqs = ARRAY_SIZE(rockchip_vdpu2_irqs), + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Alex Bee +Date: wed, 1 Sep 2021 14:00:00 +1000 +Subject: [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings + +This LE11 REVERTS 5.14.0 commit +- reverts 2d26f6e39afb88d32b8f39e76a51b542c3c51674 + +BETWEEN THE LINE + +This reverts commit 2c896fb02e7f65299646f295a007bda043e0f382 +"net: stmmac: dwmac-rk: add pd_gmac support for rk3399" and fixes +unbalanced pm_runtime_enable warnings. + +In the commit to be reverted, support for power management was +introduced to the Rockchip glue code. Later, power management support +was introduced to the stmmac core code, resulting in multiple +invocations of pm_runtime_{enable,disable,get_sync,put_sync}. + +The multiple invocations happen in rk_gmac_powerup and +stmmac_{dvr_probe, resume} as well as in rk_gmac_powerdown and +stmmac_{dvr_remove, suspend}, respectively, which are always called +in conjunction. + +Fixes: 5ec55823438e850c91c6b92aec93fb04ebde29e2 ("net: stmmac: add clocks management for gmac driver") +Signed-off-by: Michael Riesch +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 --------- + 1 file changed, 9 deletions(-) + +ABOVE THE LINE + +diff -Nu a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "stmmac_platform.h" + +@@ -1528,6 +1529,9 @@ + return ret; + } + ++ pm_runtime_enable(dev); ++ pm_runtime_get_sync(dev); ++ + if (bsp_priv->integrated_phy) + rk_gmac_integrated_phy_powerup(bsp_priv); + +@@ -1536,9 +1540,14 @@ + + static void rk_gmac_powerdown(struct rk_priv_data *gmac) + { ++ struct device *dev = &gmac->pdev->dev; ++ + if (gmac->integrated_phy) + rk_gmac_integrated_phy_powerdown(gmac); + ++ pm_runtime_put_sync(dev); ++ pm_runtime_disable(dev); ++ + phy_power_on(gmac, false); + gmac_clk_enable(gmac, false); + }