From patchwork Wed May 15 05:56:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Walsh X-Patchwork-Id: 13664635 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 6DE633BBE6 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=1715752610; cv=none; b=KLND7irpLzTcDPsMgtw5SV7CaTN0QX69sJzANlDHJZJW5ep9O2kuapLCoz0F82r5FvCc/Yje/yDIaB1qA6lOy+U9f0SSmSaKIZd289PkvRx4sWZ9Iv6DewiK/V2U87tsJrywQXWz7X3aKfCHSnW8vxENgkXKHf3ncxa/+Q1tEOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752610; c=relaxed/simple; bh=rAt8YNpQKXXcDBfl3fABzFqpMOxWyaiM90IYalzeEDs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l+J5aXEUdDzXrPCVtkdTPYkJSnM/yBq1YDRcTxuDaIROpEP+6ra7pIn3GA2vrdLwDUxMpgffltWSiiG0zvzVvPHaZ+JncflEyq2qDDtS7gPjKnQE9c7DxpQZDKmHfEZ/XxTCoVyfE1XiEMT8sk+bqoWeIToPhKEU/cNUxtVx1K0= 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b="dq8WFuXJ" 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_Wei=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: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 */ } };