Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3114241lqo; Tue, 14 May 2024 23:07:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUgKoKhgSikhST9i4IxXf5QTznMS+qsAf4aV7OBNqi34PbGyc8/la5nVJEDwYmxjZDaS9g7cP+p5rHZnNfcRHOV/ZfjjofldAXlr62w1Q== X-Google-Smtp-Source: AGHT+IHrGm12ldGc2GMJ1vnw3xcJNj4XBAq2uUMoHs/TSXjYhAw9z/Py0JZBqTTpDEgv7K5on+Qo X-Received: by 2002:a50:c010:0:b0:572:2264:76ec with SMTP id 4fb4d7f45d1cf-5734d5bfbc1mr10372468a12.2.1715753225649; Tue, 14 May 2024 23:07:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715753225; cv=pass; d=google.com; s=arc-20160816; b=XvuLWJD+zDizMvFt6hxiWDxheXPBRyzcMxmRYLV+e3hhM001EE2QSFOPcm0mBXR0TB l1Y/64avG0FQJIvEAQkQfeKH5OxtW1Cc+HWH+oLmKSCmfukL3LY5ue6/BD69Gq41MY0w tcUTEnZcJOMHBENCQZK/T9AMPfWFWj6Wim1/a74RsNB9lab+czy4I1FwN0L4eVzSWe7K a1qKMhs8ID5+x44nNnFmn6zeAcZhI6FwcRhTr9VqWpefrxaOHS+ff7DeO2JresDypwW5 ewqH6v5GZ7OFTIu8uhd8phCOgW5R+Mvq6k8Kj9a2EfFC5nccrI+K8UIndPuYDe1f3esk 77PA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AnqCSCUcBf38TreUS2aZDdjexDedf0EYPbjnTnEk6Wg=; fh=TB40nJxdONdf4WtVAnDt8DWbDrzJeBBXgHK/mPL12mo=; b=Y5N12EIqMN8Yl093k5HNZJ/DMArRwgVIZhrnO8ngh2XdFSbCNrvIk/RQRhXAKXHqU6 3ls1c9ZEw2WyFVwdzmVbgfoUXW3Z3v/pjFYBCwwVUmAkwtPBa9BbAL/SNN5b0mpoLR3m 3B8gDVIR1OgZcIHrPm7MIsajc0uY5j5Sc7pkQ5KV7ThbOfc+zmFExkMyMgHTSKhcTsJL 1AokL8+AQrlBqKOIfibyFqZGUKx8Wl2aZvObHbMc4GltyzGTDdHatecSZMRsIeITkqkg cWRo2etPs8OJAKj0BE7hdY1E5Dj7LH2GghtIWx9qdQwS+45iMQzO1zMow+V3j5943YAV EwRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@jubnut.com header.s=MBO0001 header.b=dq8WFuXJ; arc=pass (i=1 spf=pass spfdomain=jubnut.com dkim=pass dkdomain=jubnut.com dmarc=pass fromdomain=jubnut.com); spf=pass (google.com: domain of linux-kernel+bounces-179483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=jubnut.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d5526si7272145a12.321.2024.05.14.23.07.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 23:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@jubnut.com header.s=MBO0001 header.b=dq8WFuXJ; arc=pass (i=1 spf=pass spfdomain=jubnut.com dkim=pass dkdomain=jubnut.com dmarc=pass fromdomain=jubnut.com); spf=pass (google.com: domain of linux-kernel+bounces-179483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=jubnut.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D6A0F1F23044 for ; Wed, 15 May 2024 05:57:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DE2741A91; Wed, 15 May 2024 05:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b="dq8WFuXJ" Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DE303BBE2 for ; Wed, 15 May 2024 05:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752611; cv=none; b=Mk1t47Fz41homosqIdhXtL47DvSfdxCVr74UpqhE8PmerS/2LcjYKZnvtBn0kSMfYWhXk4GhexG4FSRTLFTh8vttz341ovvC8Yn9d49KHh9ew/RNTahkoKXukt/HT1h6McdTL+PjCizyxDfIKMoXTmLlNW/UGxZwGT3lOLJWU5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752611; c=relaxed/simple; bh=rAt8YNpQKXXcDBfl3fABzFqpMOxWyaiM90IYalzeEDs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eXlKdfCR5hxrq6ABXMfi0D3hcvhNeOzcpQM/gxvnraF1aHXF0+8qg5OPujqDkl2Mu5nqu/QBHsJYp3wfBkypX0hvfm3Az4HNu9wh6w6WPXq+IeRXgRTtvNl8u5hLLRZDd6JfAb4mvdMWjtQHDvghOOUYl/AAbXJQSv052jF6pL4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jubnut.com; spf=pass smtp.mailfrom=jubnut.com; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b=dq8WFuXJ; arc=none smtp.client-ip=80.241.56.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jubnut.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jubnut.com Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4VfMtQ60KSz9spP; Wed, 15 May 2024 07:56:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jubnut.com; s=MBO0001; t=1715752606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AnqCSCUcBf38TreUS2aZDdjexDedf0EYPbjnTnEk6Wg=; b=dq8WFuXJUyCJLCr2/SeARo6yMchJxAqd+agNYVAstyhQbe00OCzKvSesNU49uQJymeURgE +1tzgo1Peah8V4JSwmVyWQZQrh70pvvRAbxzajvsG0ePlGc/xAVBVH2PLNJQp5Rx9Kj7Rg cOwyzZ7ycG7rG2G1j32QB5h+8A6Rlhhi91Fi3RSHE4UkJW28GPVQeQuzhfNjz5VgCUDCpD 4+Y+lWkMIQy26eUrWSliOYwy0Q0yIdYIitOslTBtUwe9sXDvJ61RIcXlGie40DOlDZkBo7 ZiHrwwr74crol1sDGMAK0CJyekiGgxkUcP49lnT0ehz1OsKrhO7puV0e1hWIVQ== From: Ben Walsh To: Benson Leung , Tzung-Bi Shih , Guenter Roeck , "Dustin L. Howett" , Kieran Levin , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Mario Limonciello , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Ben Walsh Subject: [PATCH 6/6] platform/chrome: cros_ec_lpc: Add AML mutex for Framework Laptop Date: Wed, 15 May 2024 06:56:31 +0100 Message-ID: <20240515055631.5775-7-ben@jubnut.com> In-Reply-To: <20240515055631.5775-1-ben@jubnut.com> References: <20240515055631.5775-1-ben@jubnut.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4VfMtQ60KSz9spP For Framework Laptops with Microchip EC (MEC), use the AML mutex "ECMT" to protect EC memory access. Signed-off-by: Ben Walsh --- drivers/platform/chrome/cros_ec_lpc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c index a9200f0a1a37..eebc66a39a23 100644 --- a/drivers/platform/chrome/cros_ec_lpc.c +++ b/drivers/platform/chrome/cros_ec_lpc.c @@ -611,6 +611,11 @@ static const struct lpc_driver_data framework_laptop_amd_lpc_driver_data __initc .quirk_mmio_memory_base = 0xE00, }; +static const struct lpc_driver_data framework_laptop_11_lpc_driver_data __initconst = { + .quirks = CROS_EC_LPC_QUIRK_AML_MUTEX, + .quirk_aml_mutex_name = "ECMT", +}; + static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = { { /* @@ -679,6 +684,7 @@ static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = { DMI_MATCH(DMI_SYS_VENDOR, "Framework"), DMI_MATCH(DMI_PRODUCT_NAME, "Laptop"), }, + .driver_data = (void *)&framework_laptop_11_lpc_driver_data, }, { /* sentinel */ } }; -- 2.45.0