linux/sound/soc/sof/amd/pci-rn.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) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Authors: Ajit Kumar Pandey <[email protected]>

/*
 * PCI interface for Renoir ACP 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 ACP3x_REG_START
#define ACP3x_REG_END
#define ACP3X_FUTURE_REG_ACLK_0

static const struct sof_amd_acp_desc renoir_chip_info =;

static const struct sof_dev_desc renoir_desc =;

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

	if (pci->revision != ACP_RN_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 acp_pci_rn_remove(struct pci_dev *pci)
{}

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

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

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