summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-12-11 16:31:12 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-22 14:36:23 +0100
commit877a32308600b065f376f8cf41e1bf9093aff64f (patch)
treee3cf2d81c37c896c483ebb27133749aba0922ecb
parentb083b71f913b5f703c9152b756d72eb4df0389a6 (diff)
apalis-tk1: fix wake on lan functionalityApalis-TK1_LXDE-Image_2.8b1.64-20171229
GPIO used for WOL is briefly used in i210 reset procedure. This patch makes sure it's freed and can be used for a wakeup source. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--drivers/pci/host/pci-tegra.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index e0e7998f57f3..bd521b77bc5b 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1040,8 +1040,6 @@ static void tegra_pcie_port_reset(struct tegra_pcie_port *pp, u32 reset_reg)
afi_writel(reg, reset_reg);
#ifdef CONFIG_MACH_APALIS_TK1
- gpio_set_value(LAN_RESET_N, 1);
-
if (g_pex_perst) gpio_set_value(PEX_PERST_N, 1);
/* Err_5: PEX_REFCLK_OUTpx/nx Clock Outputs is not Guaranteed Until
900 us After PEX_PERST# De-assertion */
@@ -2046,6 +2044,10 @@ static int __init tegra_pcie_init(void)
/* register pcie device as wakeup source */
device_init_wakeup(tegra_pcie.dev, true);
+#ifdef CONFIG_MACH_APALIS_TK1
+ /* Make sure LAN_WAKE_N gets freed again available as a wakeup source */
+ gpio_free(LAN_WAKE_N);
+#endif
return 0;
fail:
tegra_pcie_power_off(true);