diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2015-04-16 15:51:54 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:44:36 +0900 |
commit | 52b9b223b8214f99a760295010676189c734eec3 (patch) | |
tree | 0e8123e916848041ce7f37c2582554593758ca2a | |
parent | 731cae2020c6dbb2f233196d72be10ef0128f926 (diff) |
local/pci: pcie-designware: add callback function to check whether power is enabled or not
Add callback function to check whether wifi power is on 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/pcie-designware.c | 7 | ||||
-rw-r--r-- | drivers/pci/host/pcie-designware.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 7c775c95e667..b32975f61b49 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -676,6 +676,13 @@ static int dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus, static int dw_pcie_valid_config(struct pcie_port *pp, struct pci_bus *bus, int dev) { + + /* Workaround */ + if (pp->ops->power_enabled) { + if (!pp->ops->power_enabled(pp)) + return 0; + } + /* If there is no link, then there is no device */ if (bus->number != pp->root_bus_nr) { if (!dw_pcie_link_up(pp)) diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h index 97ed547b0f45..1332d3ef52c4 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h @@ -75,6 +75,7 @@ struct pcie_host_ops { u32 (*get_msi_data)(struct pcie_port *pp, int pos); void (*scan_bus)(struct pcie_port *pp); int (*msi_host_init)(struct pcie_port *pp, struct msi_controller *chip); + int (*power_enabled)(struct pcie_port *pp); }; int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val); |