From patchwork Tue Oct 6 06:49:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 11818117 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C76366CB for ; Tue, 6 Oct 2020 06:56:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E061205ED for ; Tue, 6 Oct 2020 06:56:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="YQ+2PCLo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E061205ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B4CCF1765; Tue, 6 Oct 2020 08:56:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B4CCF1765 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601967403; bh=4SjNKtb35pmPeFmUD4OAfSYPgCTjzlYSSZJ8NnwdFr0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YQ+2PCLokrTNaGsnu2CJIFgXSAUUFBWb9CRRPhX4SIyBWgpzpkM3ctgV0TibtPuUe W/TJfZgBdpLNZ0BznfVj95z+wxEr8IJSc5AfPOKntN7Y1yZJf0wOl8yQq+7vnpN/zb nMpB+1p0NcPhXzCOJRJ7F/ojWXsAyVIw+Glwr67E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id ED6E0F80337; Tue, 6 Oct 2020 08:50:44 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 785E9F80321; Tue, 6 Oct 2020 08:50:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=PRX_BODY_65,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DF079F80307 for ; Tue, 6 Oct 2020 08:50:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DF079F80307 IronPort-SDR: nEUtG46pVRFaIBOan0Uojw7IJql67uLS1oZEiE2F9CohOMxWYUbodbdytQAXATsjSexH33SnpF J7X+wr//O2jw== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="249091348" X-IronPort-AV: E=Sophos;i="5.77,342,1596524400"; d="scan'208";a="249091348" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2020 23:50:32 -0700 IronPort-SDR: 9hbiMbS9o5CczUlGmKOSn56VuU1sst/2Wj8hkvbkTiJ0dteEV/y/1ZfiLOxyjYgNcWYHxkEVvd ap9NXRdXpmjQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,342,1596524400"; d="scan'208";a="315491313" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orsmga006.jf.intel.com with ESMTP; 05 Oct 2020 23:50:28 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org Subject: [PATCH v2 11/13] ASoC: Intel: Make atom components independent of sst-dsp Date: Tue, 6 Oct 2020 08:49:05 +0200 Message-Id: <20201006064907.16277-12-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201006064907.16277-1-cezary.rojewski@intel.com> References: <20201006064907.16277-1-cezary.rojewski@intel.com> Cc: pierre-louis.bossart@linux.intel.com, Cezary Rojewski , andriy.shevchenko@linux.intel.com, filip.kaczmarski@intel.com, harshapriya.n@intel.com, marcin.barlik@intel.com, zwisler@google.com, lgirdwood@gmail.com, tiwai@suse.com, filip.proborszcz@intel.com, broonie@kernel.org, amadeuszx.slawinski@linux.intel.com, michal.wasko@intel.com, cujomalainey@chromium.org, krzysztof.hejmowski@intel.com, ppapierkowski@habana.ai, vamshi.krishna.gopal@intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" With sound/soc/intel/haswell and /baytrail gone, registers left within sst-dsp header are atom-specific. Relocate these to atom internal header to make atom truely independent of sound/soc/common processing code. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko --- sound/soc/intel/atom/sst/sst.c | 1 - sound/soc/intel/atom/sst/sst.h | 7 +++++++ sound/soc/intel/atom/sst/sst_acpi.c | 1 - sound/soc/intel/atom/sst/sst_drv_interface.c | 3 --- sound/soc/intel/atom/sst/sst_ipc.c | 1 - sound/soc/intel/atom/sst/sst_loader.c | 1 - sound/soc/intel/atom/sst/sst_pvt.c | 1 - sound/soc/intel/atom/sst/sst_stream.c | 1 - sound/soc/intel/boards/bytcht_es8316.c | 1 - sound/soc/intel/boards/bytcr_rt5640.c | 1 - sound/soc/intel/common/sst-dsp.h | 10 ---------- 11 files changed, 7 insertions(+), 21 deletions(-) diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c index d450b9848028..e90590559185 100644 --- a/sound/soc/intel/atom/sst/sst.c +++ b/sound/soc/intel/atom/sst/sst.c @@ -26,7 +26,6 @@ #include #include "../sst-mfld-platform.h" #include "sst.h" -#include "../../common/sst-dsp.h" MODULE_AUTHOR("Vinod Koul "); MODULE_AUTHOR("Harsha Priya "); diff --git a/sound/soc/intel/atom/sst/sst.h b/sound/soc/intel/atom/sst/sst.h index 2bee646e81b8..4d37d39fd8f4 100644 --- a/sound/soc/intel/atom/sst/sst.h +++ b/sound/soc/intel/atom/sst/sst.h @@ -34,6 +34,13 @@ #define MRFLD_FW_FEATURE_BASE_OFFSET 0x4 #define MRFLD_FW_BSS_RESET_BIT 0 +/* SST Shim register map */ +#define SST_CSR 0x00 +#define SST_ISRX 0x18 +#define SST_IMRX 0x28 +#define SST_IPCX 0x38 /* IPC IA -> SST */ +#define SST_IPCD 0x40 /* IPC SST -> IA */ + extern const struct dev_pm_ops intel_sst_pm; enum sst_states { SST_FW_LOADING = 1, diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c index f3cfe83b9ac6..f943a0884976 100644 --- a/sound/soc/intel/atom/sst/sst_acpi.c +++ b/sound/soc/intel/atom/sst/sst_acpi.c @@ -31,7 +31,6 @@ #include #include #include "../sst-mfld-platform.h" -#include "../../common/sst-dsp.h" #include "../../common/soc-intel-quirks.h" #include "sst.h" diff --git a/sound/soc/intel/atom/sst/sst_drv_interface.c b/sound/soc/intel/atom/sst/sst_drv_interface.c index 762495385d5c..0af618dd8073 100644 --- a/sound/soc/intel/atom/sst/sst_drv_interface.c +++ b/sound/soc/intel/atom/sst/sst_drv_interface.c @@ -24,9 +24,6 @@ #include #include "../sst-mfld-platform.h" #include "sst.h" -#include "../../common/sst-dsp.h" - - #define NUM_CODEC 2 #define MIN_FRAGMENT 2 diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index c2851a829a64..a8a9aa0057d3 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -24,7 +24,6 @@ #include #include "../sst-mfld-platform.h" #include "sst.h" -#include "../../common/sst-dsp.h" struct sst_block *sst_create_block(struct intel_sst_drv *ctx, u32 msg_id, u32 drv_id) diff --git a/sound/soc/intel/atom/sst/sst_loader.c b/sound/soc/intel/atom/sst/sst_loader.c index 5c42cce90ce2..1c9b0c9ec483 100644 --- a/sound/soc/intel/atom/sst/sst_loader.c +++ b/sound/soc/intel/atom/sst/sst_loader.c @@ -29,7 +29,6 @@ #include #include "../sst-mfld-platform.h" #include "sst.h" -#include "../../common/sst-dsp.h" void memcpy32_toio(void __iomem *dst, const void *src, int count) { diff --git a/sound/soc/intel/atom/sst/sst_pvt.c b/sound/soc/intel/atom/sst/sst_pvt.c index c099f7df6168..e6a5c18a7018 100644 --- a/sound/soc/intel/atom/sst/sst_pvt.c +++ b/sound/soc/intel/atom/sst/sst_pvt.c @@ -26,7 +26,6 @@ #include #include "../sst-mfld-platform.h" #include "sst.h" -#include "../../common/sst-dsp.h" int sst_shim_write(void __iomem *addr, int offset, int value) { diff --git a/sound/soc/intel/atom/sst/sst_stream.c b/sound/soc/intel/atom/sst/sst_stream.c index c0221e103e79..ea1ef8a61fa6 100644 --- a/sound/soc/intel/atom/sst/sst_stream.c +++ b/sound/soc/intel/atom/sst/sst_stream.c @@ -23,7 +23,6 @@ #include #include "../sst-mfld-platform.h" #include "sst.h" -#include "../../common/sst-dsp.h" int sst_alloc_stream_mrfld(struct intel_sst_drv *sst_drv_ctx, void *params) { diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index 414ae4bb5224..9c09b44b4d33 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -28,7 +28,6 @@ #include #include #include "../atom/sst-atom-controls.h" -#include "../common/sst-dsp.h" #include "../common/soc-intel-quirks.h" /* jd-inv + terminating entry */ diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index fc202747ba83..9dadf6561444 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -28,7 +28,6 @@ #include #include "../../codecs/rt5640.h" #include "../atom/sst-atom-controls.h" -#include "../common/sst-dsp.h" #include "../common/soc-intel-quirks.h" enum { diff --git a/sound/soc/intel/common/sst-dsp.h b/sound/soc/intel/common/sst-dsp.h index f580e718b183..021a36b2398a 100644 --- a/sound/soc/intel/common/sst-dsp.h +++ b/sound/soc/intel/common/sst-dsp.h @@ -12,16 +12,6 @@ #include #include -/* SST Shim register map - * The register naming can differ between products. Some products also - * contain extra functionality. - */ -#define SST_CSR 0x00 -#define SST_ISRX 0x18 -#define SST_IMRX 0x28 -#define SST_IPCX 0x38 /* IPC IA -> SST */ -#define SST_IPCD 0x40 /* IPC SST -> IA */ - struct sst_dsp; /*