Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1977850pxb; Fri, 5 Mar 2021 04:37:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIN0hMeSWCykjq9HXXVLr6pqiGBUfHvq52U91Lq5QV8C9Ju6n+Z671VVFOgJ+fU7VN3JSj X-Received: by 2002:a17:906:a157:: with SMTP id bu23mr1953904ejb.491.1614947844552; Fri, 05 Mar 2021 04:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614947844; cv=none; d=google.com; s=arc-20160816; b=L4sBGR7/tFfbpWGaVFA/T+uZjKH9CU+gTbkUlX+gik0tHqeU9Kd8DXhALOunQyAVcj 7ZFVG/jVOV0f46+TS/tl7etIX9JnzjPooEsXwrl1wuN4FyRynvz6tMzYYdn3nmVVaTdP +URMV+Y+MrQW2PofHoFE2mp3LlqsJL4Dde4z/Z8mhd6vTFdu+ICApxPywl2G+zGr+opB X1Y0WrwoDUO7U9jaB9JtFzyjj5f/cWZ2DW/hcHXqUBOhs2znPBm9r9Stl0jNpUj6c6vG DLcGIPW5z++zw0a+Z+xJNQO6Bb1yAtfi+Q8ED9gEn1bNTqS1zPGRPA8X/EcryD1LALpD bg9A== 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=fs2YymzROBIKYdABVy5ie3+hvZoRL8U3RxWL/vpKoKE=; b=W7IfdoFvJYm9Uz+IJcsdQ2xJMhjv4HoJEEIF9yZHT2GLyXoTm8EoH53LKuyyQwhJNJ zO6kT4+lHRuTf4fPonrmjy4TJauLAGSywaGJbJXkBEkVruHYZtOnxnNbNDsKFdxPtO4f hnJkP3gXjpsOYL7EcSDQiM24IXezI9bxNDW3A6dwWPw1tX8OznH60Lp5uvBzP9SnaAvO YrMvk9+7gZz00Z1DG3SkkJO1zQautaPIj1mmqJL7vAEeLIZIBb3nmVZ8Bmr1266da9Rr XghBOWGVisvLSeE3hBxIbEQDwMoR38YOUN/OPSLF7q/+kwhbHSmzKlCYSZ5EIkE2uWFv f7Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dZ2ksjTB; 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 z17si1253270ejc.207.2021.03.05.04.37.02; Fri, 05 Mar 2021 04:37:24 -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=dZ2ksjTB; 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 S231468AbhCEMfj (ORCPT + 99 others); Fri, 5 Mar 2021 07:35:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:47086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbhCEMfD (ORCPT ); Fri, 5 Mar 2021 07:35:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FF8265027; Fri, 5 Mar 2021 12:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614947702; bh=nSLBRJkae14o4LfdVlB4deNlZUPcM16v7v/jx3/r8UU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZ2ksjTBrXdoBXh46mMD+n5MgIQ3Qi469PxeJKUfPav53GJNh93C33TCTPLsCGLtY mrVLdA+B+dH17JA84maERGJN95rQlqDqQz7nKkCqV/4Kr+O7nyzneC4pUVAwCGp98h UQBgzPgzP4p16xq1wErKs00Ea/o8eciBjzNwV3X0= 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.4 52/72] ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr() Date: Fri, 5 Mar 2021 13:21:54 +0100 Message-Id: <20210305120859.883539724@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305120857.341630346@linuxfoundation.org> References: <20210305120857.341630346@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 863a477d3405..645baf0ed3dd 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.30.1