Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1976180pxb; Fri, 5 Mar 2021 04:35:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJypui+qIvMbevpnXlLbzZeUR1gE9rZJuqMVS67yTD8152ociaXOgepWltrCbru0A5ALaI5Y X-Received: by 2002:a17:906:f1c8:: with SMTP id gx8mr2089971ejb.385.1614947707255; Fri, 05 Mar 2021 04:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614947707; cv=none; d=google.com; s=arc-20160816; b=ZlOTxluORSoYc01Cr54OKOHVvEunXaKV3ZB1zyGIlOFCD9yjujnPLZoHmZzzT61MPk 5Nx8HWGyuWa51aerOcGqV98EMaWhtvqpr48LRdZsfFuSN7wovucbjHb13yfvmaLDQW9g 5n5YU6wQtBwrvB/JAzoXmiIC8XiqZaVX/7g0+eyYp0mNo1QcHB1k3F4+Y1p0wTUfhQ71 xZMF0G4RLoA8zkVvvMP1yM5kWMEmkLjevgjqR07LRQqHt0Nk/Hryzw67cPn0f0iBy49g pnBKfRh4aIUvKh3LVBx/E/gA8ePpIb440uozqGia8zC92xlCQV7IO+Yc8fCA8T9E3ip1 fO4w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s/I3etQqEgQk9jI8Ikbkl0j8LjasoEUXpXbr+iXW1fU=; b=tzkG9q8HvzvMOqC80Iur0vlwCc0lrwpkL4UIeV0Q9MjQC6ofi596Om3dd37CT11AYE UhjriYAbTx/reCSdvJNwdDfI/Ljv13n0sgNqmIV+irmUcMOn6rFAqSGc3mBfQivfTsZX RE3YOG7ytfQvDUbp/mdE4PAyPQwfkR63J93t9i2CeivLsUv84q6AQolWuKMAfDAs8zLP /MPMoXSq+1/5h7zeL2FCx27tCMt/GvUmNWkpARGbrwMcz0kyYKE+BI2dWibt3L7rg+JD yhdcjSAEGB5Sa50GcSlv6sBjs878BharrjZLX0gys0rwlw12l47i4vvtXrmd0AM6liwM thtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZPSEO3DJ; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr29si1005701ejc.220.2021.03.05.04.34.42; Fri, 05 Mar 2021 04:35:07 -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=@linuxfoundation.org header.s=korg header.b=ZPSEO3DJ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232323AbhCEMbm (ORCPT + 99 others); Fri, 5 Mar 2021 07:31:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:40940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbhCEMa4 (ORCPT ); Fri, 5 Mar 2021 07:30:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CDE9C65004; Fri, 5 Mar 2021 12:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614947456; bh=brhiVKkxow1Hh7c1OLyBLR0OnSmKzxmkCMQlMWBeOkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZPSEO3DJ5KnMgmeLF86GKkeZ/ckhmDeZC1m62WBj0r8n3U5DiYyxQcNw2uFyuwpMV cZ6uM/gHbLh4v0JZyq1b8328gzFcyX3bzf0ZiUtAVdcLBisvQ+o2h1KJkTeoOOTz1f CMoLqF3P7I8i2YJaDKL/sCaHatzOAvIYWbQFqOWY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Pierre-Louis Bossart , Hans de Goede , Mark Brown , Sasha Levin Subject: [PATCH 5.10 071/102] ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr() Date: Fri, 5 Mar 2021 13:21:30 +0100 Message-Id: <20210305120906.771132198@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305120903.276489876@linuxfoundation.org> References: <20210305120903.276489876@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 b07df3059926..a93987ab7f4d 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 @@ -38,12 +39,36 @@ SOC_INTEL_IS_CPU(cml, 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.30.1