Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp423850pxb; Wed, 24 Feb 2021 06:01:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwby/N9I4lvAgJ5SCPxfklCK8jTLC8PsRjH63BNKYbuALrQ4HZx6Xl0bLWkWo1arKIfezOa X-Received: by 2002:a17:906:a44:: with SMTP id x4mr30713328ejf.101.1614175315303; Wed, 24 Feb 2021 06:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614175315; cv=none; d=google.com; s=arc-20160816; b=DGgqpUIhQ1raEvDuBNWf/QMQJjSwvdaINPMmetoaIm9fMMX0nI5isgS7+h0/yuecI7 fUYuzTG/A3b2bCI3qMbGNZ9LrkQLwQaKvII72ipZ15HKPRrvUNqUWSB69qhaE+ncDwnG 39D+NR6AsWCIeUZnTSRcGiSuEgbc1JqJMVstAU4MHK1yczmgOyaBC9vZvxTij0ssfDst zewfgm1W8KaevMz5L572Ouv4KbJo3fdroJs14JPKdpU/UF5W7qxeCfvGDI9Pn58risX0 hhFwmMRC1XFpQ35vE+jaissMdmkhTrf5d9sTqDffRFuEPuXsAiHu+mCh934dytfTVTtT pzcw== 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=735r/tJSzTWc/i6peDZOO5eUJCYiawTB5lo6iG0SzcY=; b=SOJxtBVZUJb8ONOSK76RqgjCuhg1JpLpj15608zoW7JYrKhWb4UHlaDdz8cFsJED62 Xw4bRfZCyLNRzCiK/kRkejTJF/1UE2LdXnqYCqa/9orfEQWGdFU6w2zAE6LrEI+rR8z5 xWn+R8fWRBkptGogbh8u7ov99V9xaU9/+YmWNBgK1rU9V9TA5VUiHrt49Jm7+szmRiwt tZtdvmIzJfT+tpTMh/RUgXbKX1MC8JVeZGa6KiPDs5i5xSIGIDVjMO16X51Z/JqfnKhd a2qutNgdoIV+j6hQT9PgA0HEkqMv3g723q8pfddlZEmJGbd2Wo8Zu9T5u4cC3OaPR8iZ EBlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=miwGnw59; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz13si1331661ejc.411.2021.02.24.06.00.57; Wed, 24 Feb 2021 06:01:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=miwGnw59; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238123AbhBXN6s (ORCPT + 99 others); Wed, 24 Feb 2021 08:58:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:58412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235790AbhBXNGz (ORCPT ); Wed, 24 Feb 2021 08:06:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A46064F88; Wed, 24 Feb 2021 12:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614171262; bh=s9vVPdWIFvRr/kmwZ1hi1JZyRYorTUb5vuomNgauFSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=miwGnw59qgvFak3+bg5U8pZI0rbQnjfDkJ0oaWxqWv7vkxfqfundFOfH8RsWgpQDG llXNi6qOYbQS4Hmoh+ebRfMiELa+khs/gkBVB+ZnBaHqW31UGJ/7tPkjfTBvZejWxn Pi0D36ey/XXIn205C8thQAmeS14N6BZowKBRLA0Sc6z2mHrEjMkajN/RoCklrUElXE mIXa9lPZBn4CArOHqfVKaqsf5uD2fcoPpk/xPToyFfMgc2Z5tt7OtVVlPnGslsrIOC +6EPI/7GSFClNZjZ6heudNJbmPSEqM3Ry8WvBtuQwOfZr8odevQ4ISCmbNrVU3mBXJ fmcK13J6+T6XQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Andy Shevchenko , Pierre-Louis Bossart , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.4 31/40] ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr() Date: Wed, 24 Feb 2021 07:53:31 -0500 Message-Id: <20210224125340.483162-31-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210224125340.483162-1-sashal@kernel.org> References: <20210224125340.483162-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 8ade6d8b02b1ead741bd4f6c42921035caab6560 ] Some Bay Trail systems: 1. Use a non CR version of the Bay Trail SoC 2. Contain at least 6 interrupt resources so that the platform_get_resource(pdev, IORESOURCE_IRQ, 5) check to workaround non CR systems which list their IPC IRQ at index 0 despite being non CR does not work 3. Despite 1. and 2. still have their IPC IRQ at index 0 rather then 5 Add a DMI quirk table to check for the few known models with this issue, so that the right IPC IRQ index is used on these systems. Reviewed-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210120214957.140232-5-hdegoede@redhat.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/common/soc-intel-quirks.h | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sound/soc/intel/common/soc-intel-quirks.h b/sound/soc/intel/common/soc-intel-quirks.h index 863a477d34051..645baf0ed3dd1 100644 --- a/sound/soc/intel/common/soc-intel-quirks.h +++ b/sound/soc/intel/common/soc-intel-quirks.h @@ -11,6 +11,7 @@ #if IS_ENABLED(CONFIG_X86) +#include #include #include #include @@ -40,12 +41,36 @@ SOC_INTEL_IS_CPU(cml, INTEL_FAM6_KABYLAKE_L); static inline bool soc_intel_is_byt_cr(struct platform_device *pdev) { + /* + * List of systems which: + * 1. Use a non CR version of the Bay Trail SoC + * 2. Contain at least 6 interrupt resources so that the + * platform_get_resource(pdev, IORESOURCE_IRQ, 5) check below + * succeeds + * 3. Despite 1. and 2. still have their IPC IRQ at index 0 rather then 5 + * + * This needs to be here so that it can be shared between the SST and + * SOF drivers. We rely on the compiler to optimize this out in files + * where soc_intel_is_byt_cr is not used. + */ + static const struct dmi_system_id force_bytcr_table[] = { + { /* Lenovo Yoga Tablet 2 series */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"), + }, + }, + {} + }; struct device *dev = &pdev->dev; int status = 0; if (!soc_intel_is_byt()) return false; + if (dmi_check_system(force_bytcr_table)) + return true; + if (iosf_mbi_available()) { u32 bios_status; -- 2.27.0