diff options
author | Minghuan Lian <Minghuan.Lian@freescale.com> | 2014-09-25 04:53:49 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:36:46 (GMT) |
commit | cde55c2fe38a7162e97db271c53988b7c5e5657d (patch) | |
tree | 2ddcfc503a915533fb0718859a15f44e3a88b946 /include/linux/of_pci.h | |
parent | bcb5f7f7f44f3df88f9703bc3caed9805175464a (diff) | |
download | linux-fsl-qoriq-cde55c2fe38a7162e97db271c53988b7c5e5657d.tar.xz |
of/irq: Add of_irq_parse_and_map_pci() and related function
The patch addes of_irq_parse_and_map_pci() and related function
which will be used by Layerscape PCIe driver.
of_irq_parse_raw() and of_irq_parse_one() are copied from
Linux 3.17 drivers/of/irq.c.
The related commit ID include:
7dc2e1134a22dc242175d5321c0c9e97d16eb87b
2361613206e66ce59cc0e08efa8d98ec15b84ed1
624cfca534f9b1ffb1326617b4e973a3d5ecff4a
a9ecdc0fdc54aa499604dbd43132988effcac9b4
355e62f5ad12b005c862838156262eb2df2f8dff
a7c194b007ec40a130207e9ace9cecf598fc6ac5
0c02c8007ea5554d028f99fd3e29fc201fdeeab3
530210c7814e83564c7ca7bca8192515042c0b63
of_irq_parse_pci() and of_irq_parse_and_map_pci() are copied
from Linux 3.17 drivers/of/of_pci_irq.c
The related commit ID include:
98d9f30c820d509145757e6ecbc36013aa02f7bc
2361613206e66ce59cc0e08efa8d98ec15b84ed1
16b84e5a505c790538e534ad8dfda9c288691e40
0c02c8007ea5554d028f99fd3e29fc201fdeeab3
530210c7814e83564c7ca7bca8192515042c0b63
irq_create_of_mapping_new() is copied from Linux 3.17
kernel/irq/irqdomain.c irq_create_of_mapping().
The related commit ID include:
e6d30ab1e7d1281784672c0fc2ffa385cfb7279e
The copyright is owned by the author of the related commit ID
You can find out the detailed copyright information based on
the commit ID in the upstream repository.
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Change-Id: I24bcaaea4c6cbe43229bccaceb80e74f57a9ef93
Reviewed-on: http://git.am.freescale.net:8181/19677
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Yang Li <LeoLi@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'include/linux/of_pci.h')
-rw-r--r-- | include/linux/of_pci.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index fd9c408..790db04 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h @@ -5,14 +5,50 @@ #include <linux/msi.h> struct pci_dev; +struct of_phandle_args; struct of_irq; int of_irq_map_pci(const struct pci_dev *pdev, struct of_irq *out_irq); struct device_node; + +#ifdef CONFIG_OF +int of_irq_parse_pci(const struct pci_dev *pdev, + struct of_phandle_args *out_irq); struct device_node *of_pci_find_child_device(struct device_node *parent, unsigned int devfn); int of_pci_get_devfn(struct device_node *np); +int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); int of_pci_parse_bus_range(struct device_node *node, struct resource *res); +#else +static inline int of_irq_parse_pci(const struct pci_dev *pdev, + struct of_phandle_args *out_irq) +{ + return 0; +} + +static inline struct device_node * +of_pci_find_child_device(struct device_node *parent, unsigned int devfn) +{ + return NULL; +} + +static inline int of_pci_get_devfn(struct device_node *np) +{ + return -EINVAL; +} + +static inline int +of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin) +{ + return 0; +} + +static inline int +of_pci_parse_bus_range(struct device_node *node, struct resource *res) +{ + return -EINVAL; +} +#endif #if defined(CONFIG_OF) && defined(CONFIG_PCI_MSI) int of_pci_msi_chip_add(struct msi_chip *chip); |