From 3881e66abc72863f73f9e86d0dab2a7fc9659022 Mon Sep 17 00:00:00 2001 From: adrian Date: Mon, 16 May 2016 23:37:18 +0000 Subject: [PATCH] [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 Differential Revision: https://reviews.freebsd.org/D6246 --- sys/dev/bhnd/bhnd.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/dev/bhnd/bhnd.h b/sys/dev/bhnd/bhnd.h index dca986720eed..6abdf2f156c4 100644 --- a/sys/dev/bhnd/bhnd.h +++ b/sys/dev/bhnd/bhnd.h @@ -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 }