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