Commit 651e4890 authored by Pradeep Tewani's avatar Pradeep Tewani Committed by Mark Brown

ASoC: Intel: Skylake: Unify the fw ops for SKL and KBL

SKL and KBL driver used separate set of fw ops for library loading.
However, with the unification of fw binary, use the common set of fw
ops for both
Signed-off-by: default avatarPradeep Tewani <pradeep.d.tewani@intel.com>
Signed-off-by: default avatarSriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 179c2e86
...@@ -225,7 +225,7 @@ static const struct skl_dsp_ops dsp_ops[] = { ...@@ -225,7 +225,7 @@ static const struct skl_dsp_ops dsp_ops[] = {
.id = 0x9d71, .id = 0x9d71,
.num_cores = 2, .num_cores = 2,
.loader_ops = skl_get_loader_ops, .loader_ops = skl_get_loader_ops,
.init = kbl_sst_dsp_init, .init = skl_sst_dsp_init,
.init_fw = skl_sst_init_fw, .init_fw = skl_sst_init_fw,
.cleanup = skl_sst_dsp_cleanup .cleanup = skl_sst_dsp_cleanup
}, },
......
...@@ -231,9 +231,6 @@ int skl_dsp_boot(struct sst_dsp *ctx); ...@@ -231,9 +231,6 @@ int skl_dsp_boot(struct sst_dsp *ctx);
int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
const char *fw_name, struct skl_dsp_loader_ops dsp_ops, const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
struct skl_sst **dsp); struct skl_sst **dsp);
int kbl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
struct skl_sst **dsp);
int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
const char *fw_name, struct skl_dsp_loader_ops dsp_ops, const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
struct skl_sst **dsp); struct skl_sst **dsp);
......
...@@ -390,7 +390,7 @@ static int skl_transfer_module(struct sst_dsp *ctx, const void *data, ...@@ -390,7 +390,7 @@ static int skl_transfer_module(struct sst_dsp *ctx, const void *data,
} }
static int static int
kbl_load_library(struct sst_dsp *ctx, struct skl_lib_info *linfo, int lib_count) skl_load_library(struct sst_dsp *ctx, struct skl_lib_info *linfo, int lib_count)
{ {
struct skl_sst *skl = ctx->thread_context; struct skl_sst *skl = ctx->thread_context;
struct firmware stripped_fw; struct firmware stripped_fw;
...@@ -508,16 +508,7 @@ static const struct skl_dsp_fw_ops skl_fw_ops = { ...@@ -508,16 +508,7 @@ static const struct skl_dsp_fw_ops skl_fw_ops = {
.set_state_D3 = skl_set_dsp_D3, .set_state_D3 = skl_set_dsp_D3,
.load_fw = skl_load_base_firmware, .load_fw = skl_load_base_firmware,
.get_fw_errcode = skl_get_errorcode, .get_fw_errcode = skl_get_errorcode,
.load_mod = skl_load_module, .load_library = skl_load_library,
.unload_mod = skl_unload_module,
};
static const struct skl_dsp_fw_ops kbl_fw_ops = {
.set_state_D0 = skl_set_dsp_D0,
.set_state_D3 = skl_set_dsp_D3,
.load_fw = skl_load_base_firmware,
.get_fw_errcode = skl_get_errorcode,
.load_library = kbl_load_library,
.load_mod = skl_load_module, .load_mod = skl_load_module,
.unload_mod = skl_unload_module, .unload_mod = skl_unload_module,
}; };
...@@ -573,27 +564,6 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, ...@@ -573,27 +564,6 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
} }
EXPORT_SYMBOL_GPL(skl_sst_dsp_init); EXPORT_SYMBOL_GPL(skl_sst_dsp_init);
int kbl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
struct skl_sst **dsp)
{
struct sst_dsp *sst;
int ret;
ret = skl_sst_dsp_init(dev, mmio_base, irq, fw_name, dsp_ops, dsp);
if (ret < 0) {
dev_err(dev, "%s: Init failed %d\n", __func__, ret);
return ret;
}
sst = (*dsp)->dsp;
sst->fw_ops = kbl_fw_ops;
return 0;
}
EXPORT_SYMBOL_GPL(kbl_sst_dsp_init);
int skl_sst_init_fw(struct device *dev, struct skl_sst *ctx) int skl_sst_init_fw(struct device *dev, struct skl_sst *ctx)
{ {
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment