armbian-build/patch/kernel/sun8i-default/opi_pc_one_disable_gmac.patch.disabled

90 lines
2.4 KiB
Plaintext

diff --git a/drivers/net/ethernet/sunxi/eth/Kconfig b/drivers/net/ethernet/sunxi/eth/Kconfig
index af930df..13787db 100755
--- a/drivers/net/ethernet/sunxi/eth/Kconfig
+++ b/drivers/net/ethernet/sunxi/eth/Kconfig
@@ -35,13 +35,5 @@ config GETH_PHY_POWER
If external PHY power is exist, and it want to be controled,
select it. If not, it mean the power of PHY already on.
-config GMAC_PHY_POWER
- bool "External PHY power control"
- depends on SUNXI_GETH
- default y
- ---help---
- If external PHY power is exist, and it want to be controled,
- select it. If not, it mean the power of PHY already on.
-
endif
diff --git a/drivers/net/ethernet/sunxi/eth/sunxi_geth.c b/drivers/net/ethernet/sunxi/eth/sunxi_geth.c
index 03931f2..8c9b912 100755
--- a/drivers/net/ethernet/sunxi/eth/sunxi_geth.c
+++ b/drivers/net/ethernet/sunxi/eth/sunxi_geth.c
@@ -154,9 +154,6 @@ struct geth_priv {
spinlock_t lock;
spinlock_t tx_lock;
-#ifdef CONFIG_GMAC_PHY_POWER
- u32 gpio_power_hd;
-#endif
};
#ifdef CONFIG_GETH_PHY_POWER
@@ -199,10 +196,6 @@ static int geth_power_on(struct geth_priv *priv)
{
int value;
-#ifdef CONFIG_GMAC_PHY_POWER
- gpio_set_value(priv->gpio_power_hd, 1);
-#endif
-
#ifdef CONFIG_GETH_PHY_POWER
struct regulator **regu;
int ret = 0, i = 0;
@@ -267,10 +260,6 @@ static void geth_power_off(struct geth_priv *priv)
{
int value;
-#ifdef CONFIG_GMAC_PHY_POWER
- gpio_set_value(priv->gpio_power_hd, 0);
-#endif
-
#ifdef CONFIG_GETH_PHY_POWER
struct regulator **regu = priv->power;
int i = 0;
@@ -1621,12 +1610,6 @@ static int geth_sys_request(struct platform_device *pdev)
int ret = 0;
struct resource *res;
-#ifdef CONFIG_GMAC_PHY_POWER
- script_item_value_type_e type;
- script_item_u item;
- int req_status;
-#endif
-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "geth_extclk");
if (unlikely(!res)){
ret = -ENODEV;
@@ -1701,21 +1684,6 @@ static int geth_sys_request(struct platform_device *pdev)
}
#endif
-#ifdef CONFIG_GMAC_PHY_POWER && CONFIG_GETH_SCRIPT_SYS
- type = script_get_item("gmac_phy_power", "gmac_phy_power_en", &item);
- if (SCIRPT_ITEM_VALUE_TYPE_PIO != type) {
- pr_err("script_get_item return type err\n");
- return -EFAULT;
- }
- /*request gpio*/
- req_status = gpio_request(item.gpio.gpio, NULL);
- if (0 != req_status) {
- pr_err("request gpio failed!\n");
- }
- gpio_direction_output(item.gpio.gpio, 1);
- priv->gpio_power_hd = item.gpio.gpio;
- #endif
-
return 0;
pin_err: