bhnd(4): Add a vendor parameter to BHND_DEVICE(), replacing vendor-specific
BHND_*_DEVICE macros. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6736
This commit is contained in:
parent
2c7da872aa
commit
b0b9c8546b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301697
@ -232,16 +232,8 @@ struct bhnd_device {
|
||||
BHND_COREID_ ## _device) }, _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(BCM, _device, _desc, _quirks, \
|
||||
#define BHND_DEVICE(_vendor, _device, _desc, _quirks, ...) \
|
||||
_BHND_DEVICE(_vendor, _device, _desc, _quirks, \
|
||||
## __VA_ARGS__, 0)
|
||||
|
||||
#define BHND_DEVICE_END { { BHND_MATCH_ANY }, NULL, NULL, 0 }
|
||||
|
@ -84,7 +84,7 @@ static struct bhnd_device_quirk chipc_quirks[];
|
||||
|
||||
/* Supported device identifiers */
|
||||
static const struct bhnd_device chipc_devices[] = {
|
||||
BHND_DEVICE(CC, NULL, chipc_quirks),
|
||||
BHND_DEVICE(BCM, CC, NULL, chipc_quirks),
|
||||
BHND_DEVICE_END
|
||||
};
|
||||
|
||||
|
@ -68,8 +68,8 @@ static struct bhnd_device_quirk bhnd_pcie_quirks[];
|
||||
|
||||
#define BHND_PCI_QUIRKS bhnd_pci_quirks
|
||||
#define BHND_PCIE_QUIRKS bhnd_pcie_quirks
|
||||
#define BHND_PCI_DEV(_core, _desc, ...) \
|
||||
{ BHND_DEVICE(_core, _desc, BHND_ ## _core ## _QUIRKS, \
|
||||
#define BHND_PCI_DEV(_core, _desc, ...) \
|
||||
{ BHND_DEVICE(BCM, _core, _desc, BHND_ ## _core ## _QUIRKS, \
|
||||
## __VA_ARGS__), BHND_PCI_REGFMT_ ## _core }
|
||||
|
||||
static const struct bhnd_pci_device {
|
||||
|
@ -87,7 +87,7 @@ static int bhnd_pci_wars_hwdown(struct bhnd_pcihb_softc *sc,
|
||||
*/
|
||||
|
||||
#define BHND_PCI_DEV(_core, _quirks) \
|
||||
BHND_DEVICE(_core, NULL, _quirks, BHND_DF_HOSTB)
|
||||
BHND_DEVICE(BCM, _core, NULL, _quirks, BHND_DF_HOSTB)
|
||||
|
||||
static const struct bhnd_device bhnd_pci_devs[] = {
|
||||
BHND_PCI_DEV(PCI, bhnd_pci_quirks),
|
||||
|
@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
|
||||
static struct bhnd_device_quirk bhnd_pcie2_quirks[];
|
||||
|
||||
#define BHND_PCIE_DEV(_core, _desc, ...) \
|
||||
BHND_DEVICE(_core, _desc, bhnd_pcie2_quirks, ## __VA_ARGS__)
|
||||
BHND_DEVICE(BCM, _core, _desc, bhnd_pcie2_quirks, ## __VA_ARGS__)
|
||||
|
||||
static const struct bhnd_device bhnd_pcie2_devs[] = {
|
||||
BHND_PCIE_DEV(PCIE2, "PCIe-G2 Host-PCI bridge", BHND_DF_HOSTB),
|
||||
|
@ -83,7 +83,7 @@ static int bhnd_pcie2_wars_hwdown(struct bhnd_pcie2hb_softc *sc);
|
||||
*/
|
||||
|
||||
#define BHND_PCI_DEV(_core, _quirks) \
|
||||
BHND_DEVICE(_core, NULL, _quirks, BHND_DF_HOSTB)
|
||||
BHND_DEVICE(BCM, _core, NULL, _quirks, BHND_DF_HOSTB)
|
||||
|
||||
static const struct bhnd_device bhnd_pcie2_devs[] = {
|
||||
BHND_PCI_DEV(PCIE2, bhnd_pcie2_quirks),
|
||||
|
@ -74,7 +74,7 @@ static struct bhnd_device_quirk bridge_quirks[] = {
|
||||
};
|
||||
|
||||
static struct bhnd_device bridge_devs[] = {
|
||||
BHND_DEVICE(PCI, NULL, bridge_quirks),
|
||||
BHND_DEVICE(BCM, PCI, NULL, bridge_quirks),
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -54,9 +54,9 @@ static const struct resource_spec mipscore_rspec[MIPSCORE_MAX_RSPEC] = {
|
||||
};
|
||||
|
||||
struct bhnd_device mipscore_match[] = {
|
||||
BHND_MIPS_DEVICE(MIPS, "BHND MIPS processor", NULL),
|
||||
BHND_MIPS_DEVICE(MIPS33, "BHND MIPS3302 processor", NULL),
|
||||
BHND_MIPS_DEVICE(MIPS74K, "BHND MIPS74K processor", NULL),
|
||||
BHND_DEVICE(BCM, MIPS, NULL, NULL),
|
||||
BHND_DEVICE(BCM, MIPS33, NULL, NULL),
|
||||
BHND_DEVICE(MIPS, MIPS74K, NULL, NULL),
|
||||
BHND_DEVICE_END
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user