Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1945627imi; Sun, 24 Jul 2022 01:44:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpb1yzbWVg5W9JTf/f0/fiEFgh7dZZgewEtYYlq67PpjOx/H6JFQq5Auv7Kj0yAnqOBPuA X-Received: by 2002:a05:6402:90a:b0:439:c144:24cd with SMTP id g10-20020a056402090a00b00439c14424cdmr7795075edz.209.1658652243827; Sun, 24 Jul 2022 01:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658652243; cv=none; d=google.com; s=arc-20160816; b=Ywes3Wn3wkEq5nZwWpWjtNBNy93zOBjQpsVbkKf9N/VLR7xXRk2yYFtgJr13nsX2em zmfSKCzbhqW6pLq6RBlnIzHgUkBE+rJOV36XSz8US5GrthQR2mlNsNTp/UnEabH3zEor EdSIIq/c/lL5hyCKQxnz3SaOPBYzrNCHbUKF4cGozaVXQH9HgkSHaIsiWHMwx74GLnQh 1VNcbFZqPsYdNLYdUWNporexmFGMEO0VjPz6faWsxsUMQVXQsvohMXabvrnjcV28/Tks dxbfwxkdJiiNWe5kHOWuvn/A9xnbPQmYdeS4If1pmt7AB0qm0EngRXOlQwjicQKJaQ2l owkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xp/r94K+2mSjK1rIEsy/50nmpgxaoqC/F0vHfGcOxKo=; b=t2VJxui1GIoVom7FQ2T3uFxkgWTwdrsKa88GMQbYJv2iadfc886TEYP0X76RbWzSNs l2EHAjXAi7rxPoIxud4EK82wzmSQKoQ3P/Bhgtd30UpLqtujT8mzWGczVyxwdbmhu+Zg 6uL88J/4mE/CpMX269k+HLxp8iIaLrqb3sSIwNMM+KAkQt1hIM8d4CdWP2jF6H5T5fxW meRybvfbRVYO6RtMTmesL2woYgXrJTPiTCMRyNRf5G2jzTNrRcNJUqtOK3cfDmOFxebR mAm54XAERi97gKMDiQC2VUrmmaw1ujMOS0iz5AGY/N+Efcq4TNnmScsHLidQal809jxM YdWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P2EX7+8S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a056402084d00b0043b5531e9acsi12486762edz.469.2022.07.24.01.43.33; Sun, 24 Jul 2022 01:44:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P2EX7+8S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230506AbiGXIZz (ORCPT + 99 others); Sun, 24 Jul 2022 04:25:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231454AbiGXIZW (ORCPT ); Sun, 24 Jul 2022 04:25:22 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B6C31167 for ; Sun, 24 Jul 2022 01:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658651117; x=1690187117; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mlTCVZv8mTBjyLhG0WK1HvAbL3eDySDiNoODzpcCgTA=; b=P2EX7+8SENvOLrNfB1d1EUfaxq4gflCB/ONRwjGOgoHuhetiQZV/bJpJ I6AoGu12GCon96DebWHGVex63qWKuisIeascXLpeXWDr91m+jZvV5dPon nNix3N9QGPhlxssp5ZsXnNoIq+/LHK+8SnMjyDOgFLTQgpSM1FxXL1pjO qCH3DyxPtUkLjLK3uYc+3L5H/S7AU9iyRFh4Tc41R2VQFHO5dFpY+Z5Qq KMHV6fwwbvQ+7xANXaIIb48xu6hxgh7vfRsLxx/NepoGeRDqBcMR3Bwca EZs9uiZJPXq31YDc8iEpbBlMkvS5GJaI8Ajl0fOkoE1EkJt3OTIF3HLus A==; X-IronPort-AV: E=McAfee;i="6400,9594,10417"; a="288708502" X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="288708502" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 01:25:16 -0700 X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="657756335" Received: from twinkler-lnx.jer.intel.com ([10.12.87.143]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 01:25:13 -0700 From: Tomas Winkler To: Greg Kroah-Hartman , David Airlie , Daniel Vetter Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomas Winkler , Alexander Usyskin , Vitaly Lubart Subject: [PATCH v6 08/14] mei: bus: export common mkhi definitions into a separate header Date: Sun, 24 Jul 2022 11:24:22 +0300 Message-Id: <20220724082428.218628-9-tomas.winkler@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220724082428.218628-1-tomas.winkler@intel.com> References: <20220724082428.218628-1-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Lubart Exported common mkhi definitions from bus-fixup.c into a separate header file mkhi.h for other driver usage. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin --- drivers/misc/mei/bus-fixup.c | 31 +------------------------ drivers/misc/mei/mkhi.h | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 30 deletions(-) create mode 100644 drivers/misc/mei/mkhi.h diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 24e91a9ea558..811c94ebf250 100644 --- a/drivers/misc/mei/bus-fixup.c +++ b/drivers/misc/mei/bus-fixup.c @@ -15,6 +15,7 @@ #include "mei_dev.h" #include "client.h" +#include "mkhi.h" #define MEI_UUID_NFC_INFO UUID_LE(0xd2de1625, 0x382d, 0x417d, \ 0x48, 0xa4, 0xef, 0xab, 0xba, 0x8a, 0x12, 0x06) @@ -89,20 +90,6 @@ struct mei_os_ver { u8 reserved2; } __packed; -#define MKHI_FEATURE_PTT 0x10 - -struct mkhi_rule_id { - __le16 rule_type; - u8 feature_id; - u8 reserved; -} __packed; - -struct mkhi_fwcaps { - struct mkhi_rule_id id; - u8 len; - u8 data[]; -} __packed; - struct mkhi_fw_ver_block { u16 minor; u8 major; @@ -115,22 +102,6 @@ struct mkhi_fw_ver { struct mkhi_fw_ver_block ver[MEI_MAX_FW_VER_BLOCKS]; } __packed; -#define MKHI_FWCAPS_GROUP_ID 0x3 -#define MKHI_FWCAPS_SET_OS_VER_APP_RULE_CMD 6 -#define MKHI_GEN_GROUP_ID 0xFF -#define MKHI_GEN_GET_FW_VERSION_CMD 0x2 -struct mkhi_msg_hdr { - u8 group_id; - u8 command; - u8 reserved; - u8 result; -} __packed; - -struct mkhi_msg { - struct mkhi_msg_hdr hdr; - u8 data[]; -} __packed; - #define MKHI_OSVER_BUF_LEN (sizeof(struct mkhi_msg_hdr) + \ sizeof(struct mkhi_fwcaps) + \ sizeof(struct mei_os_ver)) diff --git a/drivers/misc/mei/mkhi.h b/drivers/misc/mei/mkhi.h new file mode 100644 index 000000000000..27a9b476904e --- /dev/null +++ b/drivers/misc/mei/mkhi.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2003-2020, Intel Corporation. All rights reserved. + * Intel Management Engine Interface (Intel MEI) Linux driver + */ + +#ifndef _MEI_MKHI_H_ +#define _MEI_MKHI_H_ + +#include "mei_dev.h" + +#define MKHI_FEATURE_PTT 0x10 + +#define MKHI_FWCAPS_GROUP_ID 0x3 +#define MKHI_FWCAPS_SET_OS_VER_APP_RULE_CMD 6 +#define MKHI_GEN_GROUP_ID 0xFF +#define MKHI_GEN_GET_FW_VERSION_CMD 0x2 + +#define MCHI_GROUP_ID 0xA + +struct mkhi_rule_id { + __le16 rule_type; + u8 feature_id; + u8 reserved; +} __packed; + +struct mkhi_fwcaps { + struct mkhi_rule_id id; + u8 len; + u8 data[]; +} __packed; + +struct mkhi_msg_hdr { + u8 group_id; + u8 command; + u8 reserved; + u8 result; +} __packed; + +struct mkhi_msg { + struct mkhi_msg_hdr hdr; + u8 data[]; +} __packed; + +#endif /* _MEI_MKHI_H_ */ -- 2.35.3