From nobody Mon Feb 9 23:15:23 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39E3AEB64DD for ; Wed, 28 Jun 2023 12:51:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230451AbjF1Mvb (ORCPT ); Wed, 28 Jun 2023 08:51:31 -0400 Received: from mga14.intel.com ([192.55.52.115]:59116 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbjF1Mu4 (ORCPT ); Wed, 28 Jun 2023 08:50:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687956656; x=1719492656; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nhJdx+gQkO+DhQGYkTpN0kiioR+GimInwgcOdzEXLAg=; b=CLHOklPebelNVeSI++KSo8CDfTowgvBFfjwUbWaOAE0nfhSSxhIdQTqC f7fCDebbGAzZv/N531F64h056PDLKkH6hJzDf4F5UinSTrfQecBOCAKEP RFy/jL6KI8BVfFAJQQj/9GxkUeIAfPenBpEO6QiVUYwwkF3T1hnPtwZW3 P/WzmmaOQY3Dd+w0xF5HZhWlxzfavCDmKkDWqfF2YSTaicFNY00edROeF gkpYs5jdTUW5YO96nAsdnAhrNpdcaxLbmg6nMRQpxeMxSI5HpbfmCEpV+ j3bNNjoX8Iwhq9kn8XTxpCB/x+rVXQYtKNlH0yA1V1wOZIhLU9UKmx4Hm A==; X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="361875605" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361875605" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 05:50:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="891035129" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="891035129" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga005.jf.intel.com with ESMTP; 28 Jun 2023 05:50:37 -0700 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: Bjorn Helgaas , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Cezary Rojewski , Pierre-Louis Bossart , Kai Vehmanen , Andy Shevchenko , =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Subject: [RFC PATCH 7/8] ASoC: Intel: Skylake: Update PCI ID list Date: Wed, 28 Jun 2023 22:51:34 +0200 Message-Id: <20230628205135.517241-8-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230628205135.517241-1-amadeuszx.slawinski@linux.intel.com> References: <20230628205135.517241-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use PCI device IDs from pci_ids.h header and while at it change to using PCI_DEVICE_DATA macro, to simplify declarations. Signed-off-by: Amadeusz S=C5=82awi=C5=84ski --- sound/soc/intel/skylake/skl-messages.c | 16 ++++++------ sound/soc/intel/skylake/skl.c | 36 +++++++------------------- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skyla= ke/skl-messages.c index d31509298a0a..fc2eb04da172 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -169,7 +169,7 @@ static struct skl_dsp_loader_ops bxt_get_loader_ops(voi= d) =20 static const struct skl_dsp_ops dsp_ops[] =3D { { - .id =3D 0x9d70, + .id =3D PCI_DEVICE_ID_INTEL_HDA_SKL_LP, .num_cores =3D 2, .loader_ops =3D skl_get_loader_ops, .init =3D skl_sst_dsp_init, @@ -177,7 +177,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D skl_sst_dsp_cleanup }, { - .id =3D 0x9d71, + .id =3D PCI_DEVICE_ID_INTEL_HDA_KBL_LP, .num_cores =3D 2, .loader_ops =3D skl_get_loader_ops, .init =3D skl_sst_dsp_init, @@ -185,7 +185,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D skl_sst_dsp_cleanup }, { - .id =3D 0x5a98, + .id =3D PCI_DEVICE_ID_INTEL_HDA_APL, .num_cores =3D 2, .loader_ops =3D bxt_get_loader_ops, .init =3D bxt_sst_dsp_init, @@ -193,7 +193,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D bxt_sst_dsp_cleanup }, { - .id =3D 0x3198, + .id =3D PCI_DEVICE_ID_INTEL_HDA_GML, .num_cores =3D 2, .loader_ops =3D bxt_get_loader_ops, .init =3D bxt_sst_dsp_init, @@ -201,7 +201,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D bxt_sst_dsp_cleanup }, { - .id =3D 0x9dc8, + .id =3D PCI_DEVICE_ID_INTEL_HDA_CNL_LP, .num_cores =3D 4, .loader_ops =3D bxt_get_loader_ops, .init =3D cnl_sst_dsp_init, @@ -209,7 +209,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D cnl_sst_dsp_cleanup }, { - .id =3D 0xa348, + .id =3D PCI_DEVICE_ID_INTEL_HDA_CNL_H, .num_cores =3D 4, .loader_ops =3D bxt_get_loader_ops, .init =3D cnl_sst_dsp_init, @@ -217,7 +217,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D cnl_sst_dsp_cleanup }, { - .id =3D 0x02c8, + .id =3D PCI_DEVICE_ID_INTEL_HDA_CML_LP, .num_cores =3D 4, .loader_ops =3D bxt_get_loader_ops, .init =3D cnl_sst_dsp_init, @@ -225,7 +225,7 @@ static const struct skl_dsp_ops dsp_ops[] =3D { .cleanup =3D cnl_sst_dsp_cleanup }, { - .id =3D 0x06c8, + .id =3D PCI_DEVICE_ID_INTEL_HDA_CML_H, .num_cores =3D 4, .loader_ops =3D bxt_get_loader_ops, .init =3D cnl_sst_dsp_init, diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 998bd0232cf1..b17bce07e401 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -608,8 +608,8 @@ struct skl_clk_parent_src *skl_get_parent_clk(u8 clk_id) static void init_skl_xtal_rate(int pci_id) { switch (pci_id) { - case 0x9d70: - case 0x9d71: + case PCI_DEVICE_ID_INTEL_HDA_SKL_LP: + case PCI_DEVICE_ID_INTEL_HDA_KBL_LP: skl_clk_src[0].rate =3D 24000000; return; =20 @@ -1145,44 +1145,28 @@ static void skl_remove(struct pci_dev *pci) /* PCI IDs */ static const struct pci_device_id skl_ids[] =3D { #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL) - /* Sunrise Point-LP */ - { PCI_DEVICE(0x8086, 0x9d70), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_skl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_SKL_LP, &snd_soc_acpi_intel_skl_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL) - /* BXT-P */ - { PCI_DEVICE(0x8086, 0x5a98), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_bxt_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_APL, &snd_soc_acpi_intel_bxt_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL) - /* KBL */ - { PCI_DEVICE(0x8086, 0x9D71), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_kbl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_KBL_LP, &snd_soc_acpi_intel_kbl_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_GLK) - /* GLK */ - { PCI_DEVICE(0x8086, 0x3198), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_glk_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_GML, &snd_soc_acpi_intel_glk_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_CNL) - /* CNL */ - { PCI_DEVICE(0x8086, 0x9dc8), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_cnl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_CNL_LP, &snd_soc_acpi_intel_cnl_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_CFL) - /* CFL */ - { PCI_DEVICE(0x8086, 0xa348), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_cnl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_CNL_H, &snd_soc_acpi_intel_cnl_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_CML_LP) - /* CML-LP */ - { PCI_DEVICE(0x8086, 0x02c8), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_cnl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_CML_LP, &snd_soc_acpi_intel_cnl_machines) }, #endif #if IS_ENABLED(CONFIG_SND_SOC_INTEL_CML_H) - /* CML-H */ - { PCI_DEVICE(0x8086, 0x06c8), - .driver_data =3D (unsigned long)&snd_soc_acpi_intel_cnl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_CML_H, &snd_soc_acpi_intel_cnl_machines) }, #endif { 0, } }; --=20 2.34.1