#include <linux/list.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/firmware.h>
#include <drm/amdgpu_drm.h>
#include "amdgpu.h"
#include "atom.h"
#include "amdgpu_ucode.h"
struct amdgpu_cgs_device { … };
#define CGS_FUNC_ADEV …
static uint32_t amdgpu_cgs_read_register(struct cgs_device *cgs_device, unsigned int offset)
{ … }
static void amdgpu_cgs_write_register(struct cgs_device *cgs_device, unsigned int offset,
uint32_t value)
{ … }
static uint32_t amdgpu_cgs_read_ind_register(struct cgs_device *cgs_device,
enum cgs_ind_reg space,
unsigned int index)
{ … }
static void amdgpu_cgs_write_ind_register(struct cgs_device *cgs_device,
enum cgs_ind_reg space,
unsigned int index, uint32_t value)
{ … }
static uint32_t fw_type_convert(struct cgs_device *cgs_device, uint32_t fw_type)
{ … }
static uint16_t amdgpu_get_firmware_version(struct cgs_device *cgs_device,
enum cgs_ucode_id type)
{ … }
static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
enum cgs_ucode_id type,
struct cgs_firmware_info *info)
{ … }
static const struct cgs_ops amdgpu_cgs_ops = …;
struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev)
{ … }
void amdgpu_cgs_destroy_device(struct cgs_device *cgs_device)
{ … }