void memcpy32_toio(void __iomem *dst, constvoid *src, int count)
{ /* __iowrite32_copy uses 32-bit count values so divide by 4 for * right count in words
*/
__iowrite32_copy(dst, src, count / 4);
}
void memcpy32_fromio(void *dst, constvoid __iomem *src, int count)
{ /* __ioread32_copy uses 32-bit count values so divide by 4 for * right count in words
*/
__ioread32_copy(dst, src, count / 4);
}
/** * intel_sst_reset_dsp_mrfld - Resetting SST DSP * @sst_drv_ctx: intel_sst_drv context pointer * * This resets DSP in case of MRFLD platfroms
*/ int intel_sst_reset_dsp_mrfld(struct intel_sst_drv *sst_drv_ctx)
{ union config_status_reg_mrfld csr;
dev_dbg(sst_drv_ctx->dev, "sst: Resetting the DSP in mrfld\n");
csr.full = sst_shim_read64(sst_drv_ctx->shim, SST_CSR);
/* * sst_fill_memcpy_list - Fill the memcpy list * * @memcpy_list: List to be filled * @destn: Destination addr to be filled in the list * @src: Source addr to be filled in the list * @size: Size to be filled in the list * * Adds the node to the list after required fields * are populated in the node
*/ staticint sst_fill_memcpy_list(struct list_head *memcpy_list, void *destn, constvoid *src, u32 size, bool is_io)
{ struct sst_memcpy_list *listnode;
/** * sst_parse_module_memcpy - Parse audio FW modules and populate the memcpy list * * @sst_drv_ctx : driver context * @module : FW module header * @memcpy_list : Pointer to the list to be populated * Create the memcpy list as the number of block to be copied * returns error or 0 if module sizes are proper
*/ staticint sst_parse_module_memcpy(struct intel_sst_drv *sst_drv_ctx, struct fw_module_header *module, struct list_head *memcpy_list)
{ struct fw_block_info *block;
u32 count; int ret_val = 0; void __iomem *ram_iomem;
/** * sst_parse_fw_memcpy - parse the firmware image & populate the list for memcpy * * @ctx : pointer to drv context * @size : size of the firmware * @fw_list : pointer to list_head to be populated * This function parses the FW image and saves the parsed image in the list * for memcpy
*/ staticint sst_parse_fw_memcpy(struct intel_sst_drv *ctx, unsignedlong size, struct list_head *fw_list)
{ struct fw_module_header *module;
u32 count, num_modules; int ret_val;
ret_val = sst_validate_fw_image(ctx, size, &module, &num_modules); if (ret_val) return ret_val;
/** * sst_do_memcpy - function initiates the memcpy * * @memcpy_list: Pter to memcpy list on which the memcpy needs to be initiated * * Triggers the memcpy
*/ staticvoid sst_do_memcpy(struct list_head *memcpy_list)
{ struct sst_memcpy_list *listnode;
/* * sst_request_fw - requests audio fw from kernel and saves a copy * * This function requests the SST FW from the kernel, parses it and * saves a copy in the driver context
*/ staticint sst_request_fw(struct intel_sst_drv *sst)
{ int retval = 0; conststruct firmware *fw;
retval = request_firmware(&fw, sst->firmware_name, sst->dev); if (retval) {
dev_err(sst->dev, "request fw failed %d\n", retval); return retval;
} if (fw == NULL) {
dev_err(sst->dev, "fw is returning as null\n"); return -EINVAL;
}
mutex_lock(&sst->sst_lock);
retval = sst_cache_and_parse_fw(sst, fw);
mutex_unlock(&sst->sst_lock);
return retval;
}
/* * Writing the DDR physical base to DCCM offset * so that FW can use it to setup TLB
*/ staticvoid sst_dccm_config_write(void __iomem *dram_base, unsignedint ddr_base)
{ void __iomem *addr;
u32 bss_reset = 0;
void sst_post_download_mrfld(struct intel_sst_drv *ctx)
{
sst_dccm_config_write(ctx->dram, ctx->ddr_base);
dev_dbg(ctx->dev, "config written to DCCM\n");
}
/** * sst_load_fw - function to load FW into DSP * @sst_drv_ctx: intel_sst_drv context pointer * * Transfers the FW to DSP using dma/memcpy
*/ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx)
{ int ret_val = 0; struct sst_block *block;
dev_dbg(sst_drv_ctx->dev, "sst_load_fw\n");
if (sst_drv_ctx->sst_state != SST_RESET) return -EAGAIN;
if (!sst_drv_ctx->fw_in_mem) {
dev_dbg(sst_drv_ctx->dev, "sst: FW not in memory retry to download\n");
ret_val = sst_request_fw(sst_drv_ctx); if (ret_val) return ret_val;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.