linux/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c

/*
 * Copyright 2015 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

#include <linux/irqdomain.h>
#include <linux/pci.h>
#include <linux/pm_domain.h>
#include <linux/platform_device.h>
#include <sound/designware_i2s.h>
#include <sound/pcm.h>
#include <linux/acpi.h>
#include <linux/dmi.h>

#include "amdgpu.h"
#include "atom.h"
#include "amdgpu_acp.h"

#include "acp_gfx_if.h"

#define ST_JADEITE
#define ACP_TILE_ON_MASK
#define ACP_TILE_OFF_MASK
#define ACP_TILE_ON_RETAIN_REG_MASK
#define ACP_TILE_OFF_RETAIN_REG_MASK

#define ACP_TILE_P1_MASK
#define ACP_TILE_P2_MASK
#define ACP_TILE_DSP0_MASK
#define ACP_TILE_DSP1_MASK

#define ACP_TILE_DSP2_MASK

#define ACP_DMA_REGS_END
#define ACP_I2S_PLAY_REGS_START
#define ACP_I2S_PLAY_REGS_END
#define ACP_I2S_CAP_REGS_START
#define ACP_I2S_CAP_REGS_END

#define ACP_I2S_COMP1_CAP_REG_OFFSET
#define ACP_I2S_COMP2_CAP_REG_OFFSET
#define ACP_I2S_COMP1_PLAY_REG_OFFSET
#define ACP_I2S_COMP2_PLAY_REG_OFFSET
#define ACP_BT_PLAY_REGS_START
#define ACP_BT_PLAY_REGS_END
#define ACP_BT_COMP1_REG_OFFSET
#define ACP_BT_COMP2_REG_OFFSET

#define mmACP_PGFSM_RETAIN_REG
#define mmACP_PGFSM_CONFIG_REG
#define mmACP_PGFSM_READ_REG_0

#define mmACP_MEM_SHUT_DOWN_REQ_LO
#define mmACP_MEM_SHUT_DOWN_REQ_HI
#define mmACP_MEM_SHUT_DOWN_STS_LO
#define mmACP_MEM_SHUT_DOWN_STS_HI

#define mmACP_CONTROL
#define mmACP_STATUS
#define mmACP_SOFT_RESET
#define ACP_CONTROL__ClkEn_MASK
#define ACP_SOFT_RESET__SoftResetAud_MASK
#define ACP_SOFT_RESET__SoftResetAudDone_MASK
#define ACP_CLOCK_EN_TIME_OUT_VALUE
#define ACP_SOFT_RESET_DONE_TIME_OUT_VALUE

#define ACP_TIMEOUT_LOOP
#define ACP_DEVS
#define ACP_SRC_ID

static unsigned long acp_machine_id;

enum {};

static int acp_sw_init(void *handle)
{}

static int acp_sw_fini(void *handle)
{}

struct acp_pm_domain {};

static int acp_poweroff(struct generic_pm_domain *genpd)
{}

static int acp_poweron(struct generic_pm_domain *genpd)
{}

static int acp_genpd_add_device(struct device *dev, void *data)
{}

static int acp_genpd_remove_device(struct device *dev, void *data)
{}

static int acp_quirk_cb(const struct dmi_system_id *id)
{}

static const struct dmi_system_id acp_quirk_table[] =;

/**
 * acp_hw_init - start and test ACP block
 *
 * @handle: handle used to pass amdgpu_device pointer
 *
 */
static int acp_hw_init(void *handle)
{}

/**
 * acp_hw_fini - stop the hardware block
 *
 * @handle: handle used to pass amdgpu_device pointer
 *
 */
static int acp_hw_fini(void *handle)
{}

static int acp_suspend(void *handle)
{}

static int acp_resume(void *handle)
{}

static int acp_early_init(void *handle)
{}

static bool acp_is_idle(void *handle)
{}

static int acp_wait_for_idle(void *handle)
{}

static int acp_soft_reset(void *handle)
{}

static int acp_set_clockgating_state(void *handle,
				     enum amd_clockgating_state state)
{}

static int acp_set_powergating_state(void *handle,
				     enum amd_powergating_state state)
{}

static const struct amd_ip_funcs acp_ip_funcs =;

const struct amdgpu_ip_block_version acp_ip_block =;