diff options
Diffstat (limited to 'include/linux/cdx/cdx_bus.h')
| -rw-r--r-- | include/linux/cdx/cdx_bus.h | 27 | 
1 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/cdx/cdx_bus.h b/include/linux/cdx/cdx_bus.h index 18e95076d1d5..cf9738e3a957 100644 --- a/include/linux/cdx/cdx_bus.h +++ b/include/linux/cdx/cdx_bus.h @@ -39,6 +39,19 @@ typedef int (*cdx_dev_configure_cb)(struct cdx_controller *cdx,  				    struct cdx_device_config *dev_config);  /** + * CDX_DEVICE - macro used to describe a specific CDX device + * @vend: the 16 bit CDX Vendor ID + * @dev: the 16 bit CDX Device ID + * + * This macro is used to create a struct cdx_device_id that matches a + * specific device. The subvendor and subdevice fields will be set to + * CDX_ANY_ID. + */ +#define CDX_DEVICE(vend, dev) \ +	.vendor = (vend), .device = (dev), \ +	.subvendor = CDX_ANY_ID, .subdevice = CDX_ANY_ID + +/**   * CDX_DEVICE_DRIVER_OVERRIDE - macro used to describe a CDX device with   *                              override_only flags.   * @vend: the 16 bit CDX Vendor ID @@ -46,10 +59,12 @@ typedef int (*cdx_dev_configure_cb)(struct cdx_controller *cdx,   * @driver_override: the 32 bit CDX Device override_only   *   * This macro is used to create a struct cdx_device_id that matches only a - * driver_override device. + * driver_override device. The subvendor and subdevice fields will be set to + * CDX_ANY_ID.   */  #define CDX_DEVICE_DRIVER_OVERRIDE(vend, dev, driver_override) \ -	.vendor = (vend), .device = (dev), .override_only = (driver_override) +	.vendor = (vend), .device = (dev), .subvendor = CDX_ANY_ID,\ +	.subdevice = CDX_ANY_ID, .override_only = (driver_override)  /**   * struct cdx_ops - Callbacks supported by CDX controller. @@ -88,6 +103,10 @@ struct cdx_controller {   * @cdx: CDX controller associated with the device   * @vendor: Vendor ID for CDX device   * @device: Device ID for CDX device + * @subsystem_vendor: Subsystem Vendor ID for CDX device + * @subsystem_device: Subsystem Device ID for CDX device + * @class: Class for the CDX device + * @revision: Revision of the CDX device   * @bus_num: Bus number for this CDX device   * @dev_num: Device number for this device   * @res: array of MMIO region entries @@ -107,6 +126,10 @@ struct cdx_device {  	struct cdx_controller *cdx;  	u16 vendor;  	u16 device; +	u16 subsystem_vendor; +	u16 subsystem_device; +	u32 class; +	u8 revision;  	u8 bus_num;  	u8 dev_num;  	struct resource res[MAX_CDX_DEV_RESOURCES];  | 
