summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2015-04-16 15:54:32 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:44:36 +0900
commit5ab40d1263410ef516e2e1dacc041d4fc2cfccfb (patch)
treee14706b81a9dd3ed593056e50a3036b564856831
parent52b9b223b8214f99a760295010676189c734eec3 (diff)
local/pci: pci-exynos5433: add callback function to check whether wifi is enabled or not
This patch is workaround code for exynos5433 wifi. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/pci/host/pci-exynos5433.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-exynos5433.c b/drivers/pci/host/pci-exynos5433.c
index 243776080d6f..d6510165c7d8 100644
--- a/drivers/pci/host/pci-exynos5433.c
+++ b/drivers/pci/host/pci-exynos5433.c
@@ -53,6 +53,8 @@ struct exynos_pcie {
struct clk *bus_clk;
struct pcie_port pp;
struct regmap *pmureg;
+ /* workaround */
+ int power_on;
};
/* PCIe ELBI registers */
@@ -432,6 +434,11 @@ static int exynos_pcie_wr_own_conf(struct pcie_port *pp, int where, int size,
return ret;
}
+static int exynos_pcie_power_enabled(struct pcie_port *pp)
+{
+ return g_pcie->power_on;
+}
+
static struct pcie_host_ops exynos_pcie_host_ops = {
.readl_rc = exynos_pcie_readl_rc,
.writel_rc = exynos_pcie_writel_rc,
@@ -439,6 +446,7 @@ static struct pcie_host_ops exynos_pcie_host_ops = {
.wr_own_conf = exynos_pcie_wr_own_conf,
.host_init = exynos_pcie_host_init,
.link_up = exynos_pcie_link_up,
+ .power_enabled = exynos_pcie_power_enabled,
};
static int __init exynos_pcie_probe(struct platform_device *pdev)
@@ -510,6 +518,7 @@ static int __init exynos_pcie_probe(struct platform_device *pdev)
/* Workaround code to use broadcom device driver */
g_pcie = exynos_pcie;
+ g_pcie->power_on = 1;
pp->irq = platform_get_irq(pdev, 0);
if (!pp->irq) {
@@ -569,6 +578,7 @@ void exynos_pcie_poweron(void)
val = exynos_pcie_readl(g_pcie->elbi_base, PCIE_IRQ_SPECIAL);
exynos_pcie_writel(g_pcie->elbi_base, val, PCIE_IRQ_SPECIAL);
+ g_pcie->power_on = 1;
}
}
@@ -598,6 +608,7 @@ void exynos_pcie_poweroff(void)
clk_disable_unprepare(g_pcie->bus_clk);
clk_disable_unprepare(g_pcie->clk);
+ g_pcie->power_on = 0;
}
}