From patchwork Tue Mar 4 16:28:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Mengdong" X-Patchwork-Id: 3758661 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 939299F1EE for ; Tue, 4 Mar 2014 03:27:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9964203DF for ; Tue, 4 Mar 2014 03:27:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 03D51203DA for ; Tue, 4 Mar 2014 03:27:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4DFCFB4FE; Mon, 3 Mar 2014 19:27:09 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E12AFB4FE for ; Mon, 3 Mar 2014 19:27:07 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 03 Mar 2014 19:27:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,582,1389772800"; d="scan'208";a="485545455" Received: from amanda-hsw-pc.sh.intel.com ([10.239.37.140]) by fmsmga001.fm.intel.com with ESMTP; 03 Mar 2014 19:27:06 -0800 From: mengdong.lin@intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 4 Mar 2014 11:28:37 -0500 Message-Id: X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: Subject: [Intel-gfx] [PATCH 3/7] intel_audio_dump: define IS_HASWELL_PLUS to cover Haswell and its successors X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_12_24, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mengdong Lin A macro IS_HASWELL_PLUS(devid) is defined to cover Haswell and its successors, for code sharing. Now it covers HSW and BDW. Signed-off-by: Mengdong Lin Reviewed-by: Haihao Xiang diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c index faa577e..ffd8288 100644 --- a/tools/intel_audio_dump.c +++ b/tools/intel_audio_dump.c @@ -40,6 +40,8 @@ static uint32_t devid; static int aud_reg_base = 0; /* base address of audio registers */ static int disp_reg_base = 0; /* base address of display registers */ +#define IS_HASWELL_PLUS(devid) (IS_HASWELL(devid) || IS_BROADWELL(devid)) + #define BITSTO(n) (n >= sizeof(long) * 8 ? ~0 : (1UL << (n)) - 1) #define BITMASK(high, low) (BITSTO(high+1) & ~BITSTO(low)) #define BITS(reg, high, low) (((reg) & (BITMASK(high, low))) >> (low))