Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19165057rwd; Wed, 28 Jun 2023 06:03:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4oRxAh8JtkXOJru6a0cCE3I3CQCalsXVFtfMGWVaw71ibralzlt/6Y68FJBgUJOuVHE9Lu X-Received: by 2002:a05:6402:759:b0:51a:7bcf:c8f5 with SMTP id p25-20020a056402075900b0051a7bcfc8f5mr19533167edy.1.1687957429055; Wed, 28 Jun 2023 06:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687957429; cv=none; d=google.com; s=arc-20160816; b=SjnoYI0mW64/Tk48jVwrbND4af9X9ee4c4ajXmNGYZZc61K98kjEq53Skvs7RuW649 a03GBHsO5edJie6wzMN3NSZ8xoLYlHwgxSRarJAK3uThNTSHvlBStzLZJq0UK9wl82yE cXfjdEvf63Vdv50mEczobStjDNjbOnjjjZt8VMRwCe6b1D5O5Ymwg/y8Wa0hnl5oySMY EePB42ohF2oIi3elVPPglsygcdzGxfKJIicjvRAUEOWcNbE4G0YyMkS0MXrN+oFfIxXV V+YBQq0E0T20l+Jw0HH8tUKvkrtuWkA8kVO9pjAtxWXgFm4rn/bE3HXUd3alYY8R2NkH 1WzA== 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=tfxIcmFnbrZON6UD9fclErABk9qzIbuyen5s7bVPOSw=; fh=4hmkLMGNpQ+PocmVypGauCnPZxjmrElQ8gsuUAuM8xE=; b=ssLA+tsPWtozhdW5GmuDHJPXL2KLmgSeuCK3L14n6r/OT03kOOzFPIihvYGZGK4PEX qxORF4BLvGkadOwe5+mVTz/yWoiCuM2gswknzZvUP7XnQqHFZbI4AlCdBgDQFTAjN451 1JtSHJec5JDBFnYa8QHdUUM6dyY5soZjkMIObweq3XsUKLmabjDyElz0n6XIhdrtito9 szuDr4YvqptblGnFilbbTrc/6DehMvkV0SfldPmuxBOlsVTNGm1bYmUrwRi7fsyPeTjH dQKR08Z4EGt2fcPo4+aWU2eQEFdggavThdPSKeX23UhHqfcAx+9U121xjg15bru3d622 VGsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CLHOklPe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020a056402034900b0051da02e98dasi3114352edw.242.2023.06.28.06.03.19; Wed, 28 Jun 2023 06:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CLHOklPe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231954AbjF1Mva (ORCPT + 99 others); Wed, 28 Jun 2023 08:51:30 -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: 8bit 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ławiński --- 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/skylake/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(void) static const struct skl_dsp_ops dsp_ops[] = { { - .id = 0x9d70, + .id = PCI_DEVICE_ID_INTEL_HDA_SKL_LP, .num_cores = 2, .loader_ops = skl_get_loader_ops, .init = skl_sst_dsp_init, @@ -177,7 +177,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = skl_sst_dsp_cleanup }, { - .id = 0x9d71, + .id = PCI_DEVICE_ID_INTEL_HDA_KBL_LP, .num_cores = 2, .loader_ops = skl_get_loader_ops, .init = skl_sst_dsp_init, @@ -185,7 +185,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = skl_sst_dsp_cleanup }, { - .id = 0x5a98, + .id = PCI_DEVICE_ID_INTEL_HDA_APL, .num_cores = 2, .loader_ops = bxt_get_loader_ops, .init = bxt_sst_dsp_init, @@ -193,7 +193,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = bxt_sst_dsp_cleanup }, { - .id = 0x3198, + .id = PCI_DEVICE_ID_INTEL_HDA_GML, .num_cores = 2, .loader_ops = bxt_get_loader_ops, .init = bxt_sst_dsp_init, @@ -201,7 +201,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = bxt_sst_dsp_cleanup }, { - .id = 0x9dc8, + .id = PCI_DEVICE_ID_INTEL_HDA_CNL_LP, .num_cores = 4, .loader_ops = bxt_get_loader_ops, .init = cnl_sst_dsp_init, @@ -209,7 +209,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = cnl_sst_dsp_cleanup }, { - .id = 0xa348, + .id = PCI_DEVICE_ID_INTEL_HDA_CNL_H, .num_cores = 4, .loader_ops = bxt_get_loader_ops, .init = cnl_sst_dsp_init, @@ -217,7 +217,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = cnl_sst_dsp_cleanup }, { - .id = 0x02c8, + .id = PCI_DEVICE_ID_INTEL_HDA_CML_LP, .num_cores = 4, .loader_ops = bxt_get_loader_ops, .init = cnl_sst_dsp_init, @@ -225,7 +225,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .cleanup = cnl_sst_dsp_cleanup }, { - .id = 0x06c8, + .id = PCI_DEVICE_ID_INTEL_HDA_CML_H, .num_cores = 4, .loader_ops = bxt_get_loader_ops, .init = 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 = 24000000; return; @@ -1145,44 +1145,28 @@ static void skl_remove(struct pci_dev *pci) /* PCI IDs */ static const struct pci_device_id skl_ids[] = { #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL) - /* Sunrise Point-LP */ - { PCI_DEVICE(0x8086, 0x9d70), - .driver_data = (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 = (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 = (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 = (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 = (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 = (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 = (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 = (unsigned long)&snd_soc_acpi_intel_cnl_machines}, + { PCI_DEVICE_DATA(INTEL, HDA_CML_H, &snd_soc_acpi_intel_cnl_machines) }, #endif { 0, } }; -- 2.34.1