From owner-svn-src-all@freebsd.org Mon May 16 23:37:19 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 75158B3E757; Mon, 16 May 2016 23:37:19 +0000 (UTC) (envelope-from adrian@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 45B5711BB; Mon, 16 May 2016 23:37:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4GNbI6Y089009; Mon, 16 May 2016 23:37:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4GNbIZb089008; Mon, 16 May 2016 23:37:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201605162337.u4GNbIZb089008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 16 May 2016 23:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299989 - head/sys/dev/bhnd 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: Mon, 16 May 2016 23:37:19 -0000 Author: adrian Date: Mon May 16 23:37:18 2016 New Revision: 299989 URL: https://svnweb.freebsd.org/changeset/base/299989 Log: [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 Modified: head/sys/dev/bhnd/bhnd.h Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Mon May 16 23:29:04 2016 (r299988) +++ head/sys/dev/bhnd/bhnd.h Mon May 16 23:37:18 2016 (r299989) @@ -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 }