lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Jul 2023 17:10:38 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Amadeusz Sławiński 
        <amadeuszx.slawinski@...ux.intel.com>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>,
        alsa-devel@...a-project.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Cezary Rojewski <cezary.rojewski@...el.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH 11/13] ASoC: Intel: Skylake: Convert to PCI device IDs
 defines

On Tue, Jul 11, 2023 at 02:57:24PM +0200, Amadeusz Sławiński wrote:
> Use PCI device IDs from pci_ids.h header and while at it change to using
> PCI_DEVICE_DATA() macro, to simplify declarations.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

BXT --> APL ?

> Acked-by: Mark Brown <broonie@...nel.org>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@...ux.intel.com>
> ---
>  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..77408a981b97 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
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ