From owner-svn-src-all@freebsd.org Wed Jun 8 21:31:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4300EB70364; Wed, 8 Jun 2016 21:31:35 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00C28189C; Wed, 8 Jun 2016 21:31:34 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u58LVYvY022444; Wed, 8 Jun 2016 21:31:34 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58LVXLo022436; Wed, 8 Jun 2016 21:31:33 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201606082131.u58LVXLo022436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Wed, 8 Jun 2016 21:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301697 - in head/sys: dev/bhnd dev/bhnd/cores/chipc dev/bhnd/cores/pci dev/bhnd/cores/pcie2 dev/bhnd/siba mips/broadcom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 21:31:35 -0000 Author: landonf Date: Wed Jun 8 21:31:33 2016 New Revision: 301697 URL: https://svnweb.freebsd.org/changeset/base/301697 Log: 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 Modified: head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/cores/chipc/chipc.c head/sys/dev/bhnd/cores/pci/bhnd_pci.c head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c head/sys/dev/bhnd/siba/siba_bhndb.c head/sys/mips/broadcom/bcm_mipscore.c Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/bhnd.h Wed Jun 8 21:31:33 2016 (r301697) @@ -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 } Modified: head/sys/dev/bhnd/cores/chipc/chipc.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/cores/chipc/chipc.c Wed Jun 8 21:31:33 2016 (r301697) @@ -84,7 +84,7 @@ static struct bhnd_device_quirk chipc_qu /* 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 }; Modified: head/sys/dev/bhnd/cores/pci/bhnd_pci.c ============================================================================== --- head/sys/dev/bhnd/cores/pci/bhnd_pci.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/cores/pci/bhnd_pci.c Wed Jun 8 21:31:33 2016 (r301697) @@ -68,8 +68,8 @@ static struct bhnd_device_quirk bhnd_pci #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 { Modified: head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c ============================================================================== --- head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c Wed Jun 8 21:31:33 2016 (r301697) @@ -87,7 +87,7 @@ static int bhnd_pci_wars_hwdown(struct b */ #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), Modified: head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c ============================================================================== --- head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c Wed Jun 8 21:31:33 2016 (r301697) @@ -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), Modified: head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c ============================================================================== --- head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c Wed Jun 8 21:31:33 2016 (r301697) @@ -83,7 +83,7 @@ static int bhnd_pcie2_wars_hwdown(struct */ #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), Modified: head/sys/dev/bhnd/siba/siba_bhndb.c ============================================================================== --- head/sys/dev/bhnd/siba/siba_bhndb.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/dev/bhnd/siba/siba_bhndb.c Wed Jun 8 21:31:33 2016 (r301697) @@ -74,7 +74,7 @@ static struct bhnd_device_quirk bridge_q }; static struct bhnd_device bridge_devs[] = { - BHND_DEVICE(PCI, NULL, bridge_quirks), + BHND_DEVICE(BCM, PCI, NULL, bridge_quirks), }; static int Modified: head/sys/mips/broadcom/bcm_mipscore.c ============================================================================== --- head/sys/mips/broadcom/bcm_mipscore.c Wed Jun 8 20:54:56 2016 (r301696) +++ head/sys/mips/broadcom/bcm_mipscore.c Wed Jun 8 21:31:33 2016 (r301697) @@ -54,9 +54,9 @@ static const struct resource_spec mipsco }; 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 };