linux/sound/soc/sof/amd/pci-acp63.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
//
// This file is provided under a dual BSD/GPLv2 license. When using or
// redistributing this file, you may do so under either license.
//
// Copyright(c) 2023 Advanced Micro Devices, Inc. All rights reserved.
//
// Authors: Vijendar Mukunda <[email protected]>

/*.
 * PCI interface for ACP6.3 device
 */

#include <linux/module.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <sound/sof.h>
#include <sound/soc-acpi.h>

#include "../ops.h"
#include "../sof-pci-dev.h"
#include "../../amd/mach-config.h"
#include "acp.h"
#include "acp-dsp-offset.h"

#define ACP6X_FUTURE_REG_ACLK_0
#define ACP6x_REG_START
#define ACP6x_REG_END

static const struct sof_amd_acp_desc acp63_chip_info =;

static const struct sof_dev_desc acp63_desc =;

static int acp63_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
{
	unsigned int flag;

	if (pci->revision != ACP63_PCI_ID)
		return -ENODEV;

	flag = snd_amd_acp_find_config(pci);
	if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC)
		return -ENODEV;

	return sof_pci_probe(pci, pci_id);
};

static void acp63_pci_remove(struct pci_dev *pci)
{}

/* PCI IDs */
static const struct pci_device_id acp63_pci_ids[] =;
MODULE_DEVICE_TABLE(pci, acp63_pci_ids);

/* pci_driver definition */
static struct pci_driver snd_sof_pci_amd_acp63_driver =;
module_pci_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_IMPORT_NS();
MODULE_IMPORT_NS();