diff options
author | Yuanyuan Liu <yuanliu@codeaurora.org> | 2016-05-19 16:17:38 -0700 |
---|---|---|
committer | Vishwajith Upendra <vishwaji@codeaurora.org> | 2016-06-14 14:28:14 -0700 |
commit | 59f81e020e22ddd35b43632a7c1a911b04f43ae9 (patch) | |
tree | c809c05b1c3d140928a78a74aa27df6cdb5566eb /core/pld/src/pld_snoc.c | |
parent | 11f526acba141e43d85c4e2c713390c1a6d74d04 (diff) | |
download | qcacld-59f81e020e22ddd35b43632a7c1a911b04f43ae9.tar.gz |
qcacld-3.0: Add PCIE/SNOC wrapper functions in PLD
It is not flexible to call CNSS/ICNSS APIs directly in pld_common
as PCIE and SDIO share some CNSS APIs. It will introduce "duplicate
definition" errors when SDIO is added. Hence, add wrapper functions
for all used CNSS/ICNSS APIs.
CRs-Fixed: 1022778
Change-Id: I6a38434cfa99fc47543e995dd82b7d8ddc4453a7
Diffstat (limited to 'core/pld/src/pld_snoc.c')
-rw-r--r-- | core/pld/src/pld_snoc.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/core/pld/src/pld_snoc.c b/core/pld/src/pld_snoc.c index 9786d21919..2ae4ab1029 100644 --- a/core/pld/src/pld_snoc.c +++ b/core/pld/src/pld_snoc.c @@ -314,4 +314,68 @@ int pld_snoc_get_soc_info(struct pld_soc_info *info) return 0; } +/** + * pld_snoc_ce_request_irq() - Register IRQ for CE + * @ce_id: CE number + * @handler: IRQ callback function + * @flags: IRQ flags + * @name: IRQ name + * @ctx: IRQ context + * + * Return: 0 for success + * Non zero failure code for errors + */ +int pld_snoc_ce_request_irq(unsigned int ce_id, + irqreturn_t (*handler)(int, void *), + unsigned long flags, const char *name, void *ctx) +{ + return icnss_ce_request_irq(ce_id, handler, flags, name, ctx); +} + +/** + * pld_snoc_ce_free_irq() - Free IRQ for CE + * @ce_id: CE number + * @ctx: IRQ context + * + * Return: 0 for success + * Non zero failure code for errors + */ +int pld_snoc_ce_free_irq(unsigned int ce_id, void *ctx) +{ + return icnss_ce_free_irq(ce_id, ctx); +} + +/** + * pld_snoc_enable_irq() - Enable IRQ for CE + * @ce_id: CE number + * + * Return: void + */ +void pld_snoc_enable_irq(unsigned int ce_id) +{ + icnss_enable_irq(ce_id); +} + +/** + * pld_snoc_disable_irq() - Disable IRQ for CE + * @ce_id: CE number + * + * Return: void + */ +void pld_snoc_disable_irq(unsigned int ce_id) +{ + icnss_disable_irq(ce_id); +} + +/** + * pld_snoc_get_ce_id() - Get CE number for the provided IRQ + * @irq: IRQ number + * + * Return: CE number + */ +int pld_snoc_get_ce_id(int irq) +{ + icnss_get_ce_id(irq); +} + #endif |