]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: Intel: Skylake: Use the fw name from ACPI mach table
authorVinod Koul <vinod.koul@intel.com>
Thu, 5 Nov 2015 16:04:15 +0000 (21:34 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 16 Nov 2015 10:08:09 +0000 (10:08 +0000)
The firmware name is hard coded which doesnt allow to load
different platforms for various platforms so get this name from
available machine table and pass it to dsp context for loading

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-sst-dsp.h
sound/soc/intel/skylake/skl-sst.c
sound/soc/intel/skylake/skl.c
sound/soc/intel/skylake/skl.h

index bfde60bb8119ab68f04b1dd88c17c08419310776..d71b58322cc77a71f325c0a2180045f5fd255b6e 100644 (file)
@@ -96,7 +96,7 @@ int skl_init_dsp(struct skl *skl)
        }
 
        ret = skl_sst_dsp_init(bus->dev, mmio_base, irq,
-                       loader_ops, &skl->skl_sst);
+                       skl->fw_name, loader_ops, &skl->skl_sst);
        if (ret < 0)
                return ret;
 
index 6bfcef449bdc59a2b9c933642113aaedc642da40..f2a69d9e56b34856ba48e30137c6821064105857 100644 (file)
@@ -139,7 +139,8 @@ void skl_dsp_free(struct sst_dsp *dsp);
 
 int skl_dsp_boot(struct sst_dsp *ctx);
 int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
-               struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp);
+               const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
+               struct skl_sst **dsp);
 void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx);
 
 #endif /*__SKL_SST_DSP_H__*/
index 5c5a244942efcd54126cc9950aadbd7c49cda9a6..0c5039f2bd09a7890398e5daaa7bd232ed39e2e3 100644 (file)
@@ -77,7 +77,7 @@ static int skl_load_base_firmware(struct sst_dsp *ctx)
        init_waitqueue_head(&skl->boot_wait);
 
        if (ctx->fw == NULL) {
-               ret = request_firmware(&ctx->fw, "dsp_fw_release.bin", ctx->dev);
+               ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
                if (ret < 0) {
                        dev_err(ctx->dev, "Request firmware failed %d\n", ret);
                        skl_dsp_disable_core(ctx);
@@ -223,7 +223,7 @@ static struct sst_dsp_device skl_dev = {
 };
 
 int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
-               struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp)
+               const char *fw_name, struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp)
 {
        struct skl_sst *skl;
        struct sst_dsp *sst;
@@ -244,6 +244,7 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
 
        sst = skl->dsp;
 
+       sst->fw_name = fw_name;
        sst->addr.lpe = mmio_base;
        sst->addr.shim = mmio_base;
        sst_dsp_mailbox_init(sst, (SKL_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),
index 59336cbc10dd3e5b823aeca0ae22041b6b172757..390f839d61685b3c4237aaa78f8caa307268b45b 100644 (file)
@@ -264,6 +264,7 @@ static int skl_machine_device_register(struct skl *skl, void *driver_data)
                dev_err(bus->dev, "No matching machine driver found\n");
                return -ENODEV;
        }
+       skl->fw_name = mach->fw_filename;
 
        pdev = platform_device_alloc(mach->drv_name, -1);
        if (pdev == NULL) {
index 9b1beed26f0f4dbe3718c83a47a2c4dfa21b0759..774c29cf84dc53890e42abc072863a076dfa4fee 100644 (file)
@@ -68,6 +68,8 @@ struct skl {
 
        struct skl_dsp_resource resource;
        struct list_head ppl_list;
+
+       const char *fw_name;
 };
 
 #define skl_to_ebus(s) (&(s)->ebus)