[bhnd] Add support for matching of MIPS & ARM cores

Extend macros for MIPS & ARM cores. Now only BCM cores can be matched by matching mechanism.

Submitted by:	Michael Zhilin <mizhka@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D6246
This commit is contained in:
adrian 2016-05-16 23:37:18 +00:00
parent db9ff4b77a
commit 3881e66abc

View File

@ -316,12 +316,18 @@ struct bhnd_device {
uint32_t device_flags; /**< required BHND_DF_* flags */
};
#define _BHND_DEVICE(_device, _desc, _quirks, _flags, ...) \
{ BHND_CORE_MATCH(BHND_MFGID_BCM, BHND_COREID_ ## _device, \
#define _BHND_DEVICE(_vendor, _device, _desc, _quirks, _flags, ...) \
{ BHND_CORE_MATCH(BHND_MFGID_ ## _vendor, BHND_COREID_ ## _device, \
BHND_HWREV_ANY), _desc, _quirks, _flags }
#define BHND_MIPS_DEVICE(_device, _desc, _quirks, ...) \
_BHND_DEVICE(MIPS, _device, _desc, _quirks, ## __VA_ARGS__, 0)
#define BHND_ARM_DEVICE(_device, _desc, _quirks, ...) \
_BHND_DEVICE(ARM, _device, _desc, _quirks, ## __VA_ARGS__, 0)
#define BHND_DEVICE(_device, _desc, _quirks, ...) \
_BHND_DEVICE(_device, _desc, _quirks, ## __VA_ARGS__, 0)
_BHND_DEVICE(BCM, _device, _desc, _quirks, ## __VA_ARGS__, 0)
#define BHND_DEVICE_END { BHND_CORE_MATCH_ANY, NULL, NULL, 0 }