From patchwork Mon Apr 2 06:45:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Periyasamy X-Patchwork-Id: 10319467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52CAB602C8 for ; Mon, 2 Apr 2018 06:55:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43BDE26AE3 for ; Mon, 2 Apr 2018 06:55:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37D8D27C05; Mon, 2 Apr 2018 06:55:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7684A26AE3 for ; Mon, 2 Apr 2018 06:55:15 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C118E2673DF; Mon, 2 Apr 2018 08:54:52 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9ECD92673CB; Mon, 2 Apr 2018 08:54:49 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by alsa0.perex.cz (Postfix) with ESMTP id 738FD2673C8 for ; Mon, 2 Apr 2018 08:54:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2018 23:54:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,394,1517904000"; d="scan'208";a="44145064" Received: from mtbf-optiplex-9010.iind.intel.com ([10.223.96.13]) by orsmga001.jf.intel.com with ESMTP; 01 Apr 2018 23:54:43 -0700 From: Sriram Periyasamy To: ALSA ML , Mark Brown Date: Mon, 2 Apr 2018 12:15:50 +0530 Message-Id: <1522651550-27236-4-git-send-email-sriramx.periyasamy@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522651550-27236-1-git-send-email-sriramx.periyasamy@intel.com> References: <1522651550-27236-1-git-send-email-sriramx.periyasamy@intel.com> Cc: Pradeep Tewani , Takashi Iwai , Sriram Periyasamy , Patches Audio , Liam Girdwood , Vinod Koul Subject: [alsa-devel] [PATCH 3/3] ASoC: Intel: Skylake: Unify the fw ops for SKL and KBL X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pradeep Tewani 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: Pradeep Tewani Signed-off-by: Sriram Periyasamy --- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 3 --- sound/soc/intel/skylake/skl-sst.c | 34 ++-------------------------------- 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index 57d4a58522a6..dd590a1c58e2 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -225,7 +225,7 @@ static const struct skl_dsp_ops dsp_ops[] = { .id = 0x9d71, .num_cores = 2, .loader_ops = skl_get_loader_ops, - .init = kbl_sst_dsp_init, + .init = skl_sst_dsp_init, .init_fw = skl_sst_init_fw, .cleanup = skl_sst_dsp_cleanup }, diff --git a/sound/soc/intel/skylake/skl-sst-dsp.h b/sound/soc/intel/skylake/skl-sst-dsp.h index 12fc9a73dc8a..e1d6f6719f7e 100644 --- a/sound/soc/intel/skylake/skl-sst-dsp.h +++ b/sound/soc/intel/skylake/skl-sst-dsp.h @@ -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, const char *fw_name, struct skl_dsp_loader_ops dsp_ops, 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, const char *fw_name, struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp); diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c index 5a7e41b65ef3..5951bbdf1f1a 100644 --- a/sound/soc/intel/skylake/skl-sst.c +++ b/sound/soc/intel/skylake/skl-sst.c @@ -390,7 +390,7 @@ static int skl_transfer_module(struct sst_dsp *ctx, const void *data, } 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 firmware stripped_fw; @@ -508,16 +508,7 @@ static const struct skl_dsp_fw_ops skl_fw_ops = { .set_state_D3 = skl_set_dsp_D3, .load_fw = skl_load_base_firmware, .get_fw_errcode = skl_get_errorcode, - .load_mod = skl_load_module, - .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_library = skl_load_library, .load_mod = skl_load_module, .unload_mod = skl_unload_module, }; @@ -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); -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 ret;