linux-imx/include/linux/fsl/netc_prb_ierb.h
Clark Wang 438c5e9014 LF-11880-2 net: enetc: Add power off suspend/resume and WOL supports
In previous implementations, NETCMIX does not power off during suspend.
If NETCMIX powers off, all NETCMIX devices need to be reinitialized in the
resume process.
So, add this function support.

Support Wake-on-LAN functionality in suspend at the same time.
Need to execute the following command to set it as WOL mode.
 # ethtool -s ethX wol g

When using WOL mode, NETCMIX will not power off during suspend.

Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
2024-04-29 18:37:45 +08:00

46 lines
857 B
C

/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
/* Copyright 2023 NXP
* Copyright (C) 2023 Wei Fang <wei.fang@nxp.com>
*/
#include <linux/platform_device.h>
#define NETCCLKCR_FRAC GENMASK(31, 0)
#define NETCCLKCR_PERIOD GENMASK(25, 16)
#define NETCCLKCR_FREQ GENMASK(10, 0)
#if IS_ENABLED(CONFIG_FSL_NETC_PRB_IERB)
int netc_ierb_get_init_status(void);
u64 netc_ierb_get_clk_config(void);
void netc_ierb_enable_wakeonlan(void);
void netc_ierb_disable_wakeonlan(void);
int netc_ierb_may_wakeonlan(void);
#else
static inline int netc_ierb_get_init_status(void)
{
return -ENODEV;
}
static inline u64 netc_ierb_get_clk_config(void)
{
return 0;
}
static inline void netc_ierb_enable_wakeonlan(void)
{
}
static inline void netc_ierb_disable_wakeonlan(void)
{
}
static inline int netc_ierb_may_wakeonlan(void)
{
return -EINVAL;
}
#endif