#include <linux/firmware.h>
#include "radeon.h"
#include "cikd.h"
#include "ppsmc.h"
#include "radeon_ucode.h"
#include "ci_dpm.h"
static int ci_set_smc_sram_address(struct radeon_device *rdev,
u32 smc_address, u32 limit)
{ … }
int ci_copy_bytes_to_smc(struct radeon_device *rdev,
u32 smc_start_address,
const u8 *src, u32 byte_count, u32 limit)
{ … }
void ci_start_smc(struct radeon_device *rdev)
{ … }
void ci_reset_smc(struct radeon_device *rdev)
{ … }
int ci_program_jump_on_start(struct radeon_device *rdev)
{ … }
void ci_stop_smc_clock(struct radeon_device *rdev)
{ … }
void ci_start_smc_clock(struct radeon_device *rdev)
{ … }
bool ci_is_smc_running(struct radeon_device *rdev)
{ … }
#if 0
PPSMC_Result ci_wait_for_smc_inactive(struct radeon_device *rdev)
{
u32 tmp;
int i;
if (!ci_is_smc_running(rdev))
return PPSMC_Result_OK;
for (i = 0; i < rdev->usec_timeout; i++) {
tmp = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0);
if ((tmp & CKEN) == 0)
break;
udelay(1);
}
return PPSMC_Result_OK;
}
#endif
int ci_load_smc_ucode(struct radeon_device *rdev, u32 limit)
{ … }
int ci_read_smc_sram_dword(struct radeon_device *rdev,
u32 smc_address, u32 *value, u32 limit)
{ … }
int ci_write_smc_sram_dword(struct radeon_device *rdev,
u32 smc_address, u32 value, u32 limit)
{ … }