mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
ODROID-COMMON: phy/realtek: add to support Wake On Lan enable
Adding new kernel command line "enable_wol=<1|0>" will configure the WOL features on next power off. Change-Id: I4830aeb1651e90d4699887199000def1163fb6db Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
@@ -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 <linux/amlogic/scpi_protocol.h>
|
||||
|
||||
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);
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user