Openwrt/target/linux/layerscape/patches-5.4/701-net-0099-sdk_fman-suspend-the-FMan-to-Deep-Sleep-on-PPC-only.patch
Yangbo Lu cddd459140 layerscape: add patches-5.4
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release
which was tagged LSDK-20.04-V5.4.
https://source.codeaurora.org/external/qoriq/qoriq-components/linux/

For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in
LSDK, port the dts patches from 4.14.

The patches are sorted into the following categories:
  301-arch-xxxx
  302-dts-xxxx
  303-core-xxxx
  701-net-xxxx
  801-audio-xxxx
  802-can-xxxx
  803-clock-xxxx
  804-crypto-xxxx
  805-display-xxxx
  806-dma-xxxx
  807-gpio-xxxx
  808-i2c-xxxx
  809-jailhouse-xxxx
  810-keys-xxxx
  811-kvm-xxxx
  812-pcie-xxxx
  813-pm-xxxx
  814-qe-xxxx
  815-sata-xxxx
  816-sdhc-xxxx
  817-spi-xxxx
  818-thermal-xxxx
  819-uart-xxxx
  820-usb-xxxx
  821-vfio-xxxx

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2020-05-07 12:53:06 +02:00

57 lines
1.9 KiB
Diff

From 2223efd48766e22bbf56ba6000078af9e32c7772 Mon Sep 17 00:00:00 2001
From: Camelia Groza <camelia.groza@nxp.com>
Date: Mon, 17 Dec 2018 15:20:42 +0200
Subject: [PATCH] sdk_fman: suspend the FMan to Deep Sleep on PPC only
The SCFG_FMCLKDPSLPCR register is present on PPC targets only. This
feature does not apply to ARM SoCs.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
.../net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c
+++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c
@@ -251,7 +251,7 @@ static irqreturn_t fm_irq(int irq, void
#ifdef CONFIG_PM_SLEEP
if (fman_get_normal_pending(p_Fm->p_FmFpmRegs) & INTR_EN_WAKEUP)
{
- pm_wakeup_event(p_LnxWrpFmDev->dev, 200);
+ pm_wakeup_event(p_LnxWrpFmDev->dev, 200);
}
#endif
FM_EventIsr(p_LnxWrpFmDev->h_Dev);
@@ -1107,7 +1107,7 @@ static t_Error InitFmDev(t_LnxWrpFmDev
p_LnxWrpFmDev->fmDevSettings.param.fmMacClkRatio =
!!(get_rcwsr(4) & 0x1); /* RCW[FM_MAC_RAT1] */
- {
+ {
/* T4 Devices ClkRatio is always 1 regardless of RCW[FM_MAC_RAT1] */
uint32_t svr;
svr = mfspr(SPRN_SVR);
@@ -1320,7 +1320,7 @@ static const struct of_device_id fm_matc
MODULE_DEVICE_TABLE(of, fm_match);
#endif /* !MODULE */
-#ifdef CONFIG_PM
+#if defined CONFIG_PM && (defined CONFIG_PPC || defined CONFIG_PPC64)
#define SCFG_FMCLKDPSLPCR_ADDR 0xFFE0FC00C
#define SCFG_FMCLKDPSLPCR_DS_VAL 0x48402000
@@ -1373,11 +1373,11 @@ static const struct dev_pm_ops fm_pm_ops
#define FM_PM_OPS (&fm_pm_ops)
-#else /* CONFIG_PM */
+#else /* CONFIG_PM && (CONFIG_PPC || CONFIG_PPC64) */
#define FM_PM_OPS NULL
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && (CONFIG_PPC || CONFIG_PPC64) */
static struct platform_driver fm_driver = {
.driver = {