diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-09 08:49:50 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-09 08:49:50 +0200 |
commit | 5c83ce6091f7ec0ea25cd9c1fadbb8f3438fa2e4 (patch) | |
tree | 8d0679e366a3969e7357a68cd28924ce59acb9cb /include | |
parent | fd2f990204d5519acf766e2b486a69f0854b86cb (diff) | |
parent | d34b5ffc7f3972e91c9411e48b45b17b846fd555 (diff) | |
download | barebox-5c83ce6091f7ec0ea25cd9c1fadbb8f3438fa2e4.tar.gz barebox-5c83ce6091f7ec0ea25cd9c1fadbb8f3438fa2e4.tar.xz |
Merge branch 'for-next/pci'
Diffstat (limited to 'include')
-rw-r--r-- | include/mfd/imx6q-iomuxc-gpr.h | 1 | ||||
-rw-r--r-- | include/of_device.h | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/include/mfd/imx6q-iomuxc-gpr.h b/include/mfd/imx6q-iomuxc-gpr.h index a7ef1c8915..b2c9da6579 100644 --- a/include/mfd/imx6q-iomuxc-gpr.h +++ b/include/mfd/imx6q-iomuxc-gpr.h @@ -95,6 +95,7 @@ #define IMX6Q_GPR0_DMAREQ_MUX_SEL0_IOMUX BIT(0) #define IMX6Q_GPR1_PCIE_REQ_MASK (0x3 << 30) +#define IMX6Q_GPR1_PCIE_SW_RST BIT(29) #define IMX6Q_GPR1_PCIE_EXIT_L1 BIT(28) #define IMX6Q_GPR1_PCIE_RDY_L23 BIT(27) #define IMX6Q_GPR1_PCIE_ENTER_L1 BIT(26) diff --git a/include/of_device.h b/include/of_device.h new file mode 100644 index 0000000000..e84fc9c377 --- /dev/null +++ b/include/of_device.h @@ -0,0 +1,48 @@ +#ifndef __OF_DEVICE_H +#define __OF_DEVICE_H + +#include <driver.h> +#include <of.h> + + +#ifdef CONFIG_OFTREE +extern const struct of_device_id *of_match_device( + const struct of_device_id *matches, const struct device_d *dev); + +/** + * of_driver_match_device - Tell if a driver's of_match_table matches a device. + * @drv: the device_driver structure to test + * @dev: the device structure to match against + */ +static inline int of_driver_match_device(struct device_d *dev, + const struct driver_d *drv) +{ + return of_match_device(drv->of_compatible, dev) != NULL; +} + +extern const void *of_device_get_match_data(const struct device_d *dev); + +#else /* CONFIG_OF */ + +static inline int of_driver_match_device(struct device_d *dev, + const struct device_d *drv) +{ + return 0; +} + +static inline const void *of_device_get_match_data(const struct device_d *dev) +{ + return NULL; +} + +static inline const struct of_device_id *__of_match_device( + const struct of_device_id *matches, const struct device_d *dev) +{ + return NULL; +} +#define of_match_device(matches, dev) \ + __of_match_device(of_match_ptr(matches), (dev)) + +#endif /* CONFIG_OF */ + +#endif /* _LINUX_OF_DEVICE_H */ |