From patchwork Fri Jul 14 18:56:15 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: 120428 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2432643vqm; Fri, 14 Jul 2023 04:24:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGTXp2iPGBom2YEpZPrxsQGJ5oGfoRkmL/EbM9NPFfTxiCIOg9y0n8YrbvFlY+YfevEn6JW X-Received: by 2002:a05:6a00:16c4:b0:674:1dde:4c59 with SMTP id l4-20020a056a0016c400b006741dde4c59mr3819063pfc.28.1689333870971; Fri, 14 Jul 2023 04:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689333870; cv=none; d=google.com; s=arc-20160816; b=ZyS/soLiNdCP12vEc7lxu2dvVEYDyQokOcmEKM2oHO2XE4KCtlyLEoqWGUhm2sMykX qP1Kb4JC0SPNv4KEvRM+4tx+RzTQi9lPOGTpx/vxxIQCdq++Vgxholm9Ppixj2FVgc8y Mf0NyvGsAzGPjjf0lw7a+KUk3lLAOsuuw9TOL5qfeNycSo80Kq+olSW3A4C2nyTIYAz4 R1g/paiM7gc+M9DgIrUIAZtPwFc4Rm69RDAH3aUKhSILT4jaC0tFYhoKB6HeKMTTiL+E aMKExFyCGjCRHJyFi5coDF8zuO/FWsDuHphuP4dvnralV+FgcW+OAN525nmehljSLUp3 XfCg== 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=MqIDXra7jR4fB/dIEcH7/RbA/1ubIplL1xXbIktA6DY=; fh=sKxO7Xj+YIOQJw2gBVYevujm0+5GA4/lF0Hs7SAhyQ0=; b=m9x/L7zGb/RRAUXKdksuxibvmxNH/rEmMIQ/SwMW5zoQSQ8F9uA4NqAZzmcZ3xtBq5 UCoDXTT/tWCimY2B7GJSTsGHnVl06tubSK8VzN7IYLAw/Th2GNoUvr5UVHuwpC9GlXhE YIcxYT3Mf1K0jda99XeWgsDVSCTzc4UJGDYeQ6KxtZkGjg50Z6wmheEAqaa7se6ZZEMv ebYPnNqz38CcFqhKG3ELRtNXqR5t9XyjM1m9COr+KVZ+SxT+fYtyCcFqsGxbKfbcvxdJ Sxu7MQLaq+iuTVsXDt7UtLswhS2x9eDoNfRjxEMA11btFHn+jUBzdSGr5J2xxdXc5k2x /Q8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=D64CT1E3; 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 ct8-20020a056a000f8800b00682399fa4f9si6973988pfb.300.2023.07.14.04.24.18; Fri, 14 Jul 2023 04:24:30 -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=D64CT1E3; 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 S236347AbjGNK4q (ORCPT + 99 others); Fri, 14 Jul 2023 06:56:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbjGNK4a (ORCPT ); Fri, 14 Jul 2023 06:56:30 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454223C3A; Fri, 14 Jul 2023 03:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689332154; x=1720868154; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g0WaMz10MmiDZgZOz+x0E2A2UYntgNbZ+38tvXaJXpM=; b=D64CT1E3SqX3NRwbNMQvX6mFFbzpI1kQCvyjwUwoUUn7SjJXYT7gZQWz NG9IYgSaC8eX3LK92b79B9sS5eu0nDLYvXhdnSJrfghI5YFU+4GtOcpeg EguEljdAbbu7XDPXXFXn6Z3Cn65Io4vtHkb10VP0HDRGK7/KgA6u1VtOi IgZvzRZVYcWIdY0KGlOHLmQsbaEiCT2ksWVB5rkkQVqXIgJq9SSDg6zLF MoBn0lUTlbugVGzOQdiVqPaq27mwVqUqP9fGUopSDllxyJUUmrjGoPykc VcVUd4MdOWiOgFn9jOzwqe/I0XogYSLjNzh0v92rpJZoztZ1fA7RO/QVT w==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="364321261" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="364321261" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 03:55:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="722365649" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="722365649" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2023 03:55:45 -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 , Hans de Goede , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH v2 15/15] ASoC: Intel: sst: Convert to PCI device IDs defines Date: Fri, 14 Jul 2023 20:56:15 +0200 Message-Id: <20230714185615.370597-16-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230714185615.370597-1-amadeuszx.slawinski@linux.intel.com> References: <20230714185615.370597-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771394953172098689 X-GMAIL-MSGID: 1771394953172098689 Use PCI device IDs from pci_ids.h header. Signed-off-by: Amadeusz Sławiński --- sound/soc/intel/atom/sst/sst.c | 7 ++++--- sound/soc/intel/atom/sst/sst.h | 3 --- sound/soc/intel/atom/sst/sst_pci.c | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c index a0d29510d2bc..74614f9b086a 100644 --- a/sound/soc/intel/atom/sst/sst.c +++ b/sound/soc/intel/atom/sst/sst.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -174,9 +175,9 @@ int sst_driver_ops(struct intel_sst_drv *sst) { switch (sst->dev_id) { - case SST_MRFLD_PCI_ID: - case SST_BYT_ACPI_ID: - case SST_CHV_ACPI_ID: + case PCI_DEVICE_ID_INTEL_SST_TNG: + case PCI_DEVICE_ID_INTEL_SST_BYT: + case PCI_DEVICE_ID_INTEL_SST_CHV: sst->tstamp = SST_TIME_STAMP_MRFLD; sst->ops = &mrfld_ops; return 0; diff --git a/sound/soc/intel/atom/sst/sst.h b/sound/soc/intel/atom/sst/sst.h index 4d37d39fd8f4..eab374bf0066 100644 --- a/sound/soc/intel/atom/sst/sst.h +++ b/sound/soc/intel/atom/sst/sst.h @@ -20,9 +20,6 @@ /* driver names */ #define SST_DRV_NAME "intel_sst_driver" -#define SST_MRFLD_PCI_ID 0x119A -#define SST_BYT_ACPI_ID 0x80860F28 -#define SST_CHV_ACPI_ID 0x808622A8 #define SST_SUSPEND_DELAY 2000 #define FW_CONTEXT_MEM (64*1024) diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c index 4058b4f80a0c..7ed142bb3dc0 100644 --- a/sound/soc/intel/atom/sst/sst_pci.c +++ b/sound/soc/intel/atom/sst/sst_pci.c @@ -32,7 +32,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) /* map registers */ /* DDR base */ - if (ctx->dev_id == SST_MRFLD_PCI_ID) { + if (ctx->dev_id == PCI_DEVICE_ID_INTEL_SST_TNG) { ctx->ddr_base = pci_resource_start(pci, 0); /* check that the relocated IMR base matches with FW Binary */ ddr_base = relocate_imr_addr_mrfld(ctx->ddr_base); @@ -173,7 +173,7 @@ static void intel_sst_remove(struct pci_dev *pci) /* PCI Routines */ static const struct pci_device_id intel_sst_ids[] = { - { PCI_VDEVICE(INTEL, SST_MRFLD_PCI_ID), 0}, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_SST_TNG), 0}, { 0, } };