From patchwork Wed Jun 28 20:51:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 113855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8913309vqr; Wed, 28 Jun 2023 06:10:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Ae+pqkSy5LKzGHfmaE8YOU/qc2+hXTGTf1b4l5E4awa3/dxy0UYchoTzW2hYruzJe/41D X-Received: by 2002:a17:906:7399:b0:98d:470d:9335 with SMTP id f25-20020a170906739900b0098d470d9335mr13352869ejl.23.1687957824506; Wed, 28 Jun 2023 06:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687957824; cv=none; d=google.com; s=arc-20160816; b=OLVPDOucXdYSuMAZTUrmRKnwTK6LUiI5vxy+Mkjs8wSaOM1dQjkh0zZg7CiM85cF/M PSxkJ64BhbMrWlnfKx7ihzI/Rvhq+m7xjQv7Ll43OZ0vrCybuvv8bhAgzpsCmU+Kotb+ c7doqFh3S3gIYYHSQtre67sN6BRenbnmmZr6npO4RU/0amO5Lx4eQ/AVe1u43gJEni6e xFkTmaROrjs3jMWGy9sgto4kF7ZqjILbBbN02qZezbGGCnpRjzxvtFpi/Tfb5QyBAvad 0r6Cn6IpHStFI49G5maG95CcuBz0Ca+zVTyfnBi6o0IHuimDvMEqNa70/NUijtBzn0jg 4Ggg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a1709062b5200b0099295afb9cdsi268794ejg.419.2023.06.28.06.10.00; Wed, 28 Jun 2023 06:10:24 -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 S230324AbjF1Mva (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_S=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_S=C5=82aw?= =?utf-8?q?i=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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769952063692542259?= X-GMAIL-MSGID: =?utf-8?q?1769952063692542259?= 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, } };