diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 3e4ab5b16b40..2e22c60e1860 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -185,10 +185,30 @@ static int rtl8211f_config_init(struct phy_device *phydev) } #ifdef CONFIG_AMLOGIC_ETH_PRIVE + +#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) +#include + +static u32 enable_wol = 0; + +static int __init enable_wol_setup(char *str) +{ + enable_wol = (str[0] != '0'); + support_external_phy_wol = enable_wol; + + return 0; +} +__setup("enable_wol=", enable_wol_setup); +#endif + int rtl8211f_suspend(struct phy_device *phydev) { int value = 0; +#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) + scpi_send_usr_data(SCPI_CL_WOL, &enable_wol, sizeof(enable_wol)); +#endif + if (support_external_phy_wol) { mutex_lock(&phydev->lock); phy_write(phydev, RTL8211F_PAGE_SELECT, 0xd8a); diff --git a/include/linux/amlogic/scpi_protocol.h b/include/linux/amlogic/scpi_protocol.h index c886ce4f522e..1fe5a19eb67d 100644 --- a/include/linux/amlogic/scpi_protocol.h +++ b/include/linux/amlogic/scpi_protocol.h @@ -27,6 +27,9 @@ enum scpi_client_id { SCPI_CL_THERMAL, SCPI_CL_REMOTE, SCPI_CL_LED_TIMER, +#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) + SCPI_CL_WOL, +#endif SCPI_MAX, };