From patchwork Mon Jun 8 20:43:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11593983 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 E7997913 for ; Mon, 8 Jun 2020 20:44:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4C1B206D5 for ; Mon, 8 Jun 2020 20:44:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="Sgn9TuqZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbgFHUow (ORCPT ); Mon, 8 Jun 2020 16:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726850AbgFHUoR (ORCPT ); Mon, 8 Jun 2020 16:44:17 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B85DC08C5C5 for ; Mon, 8 Jun 2020 13:44:14 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id c185so18702714qke.7 for ; Mon, 08 Jun 2020 13:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qvr9NfP23GG58EcPnVqv8kY5eMqO/csy7v+VjkFmFa8=; b=Sgn9TuqZIjfhLOZy23ytoH3J7BhvoT31XK9/G9VMHs6nkOQ+zTHub7Au0KgS7zmPMZ KLMLWIACvee3eD/5yN8gD3jWXkb1wAgfxvqQHKoU2vEBSwQBb2Vo6I3fS8fnze54tqJT LnyE61cHBJYjJctCX4HUGo87UUs2OUUn82Tp1p4q6Y/tj+dT/u6CgMP+0bXTn7MMlkBk agQwpuIBeEprg7HV3zR7/yUVp1py7fcH3zldZP0zCjThKkf2VM6nbhrK7Qy/J4BSvyJv sbqQ55cxprjY9h947Z5WmYn7lI/oQl73rmn9JGEJZAGqSFe1F1RSvVDOmw2hgMoKJqk/ YwWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qvr9NfP23GG58EcPnVqv8kY5eMqO/csy7v+VjkFmFa8=; b=Z5gO2GBsFlHlCN4sAVaEBqI6doaCeW+mA9PS4TIeS52E7E46d2/aYNTUM9NQHLb16N VAVBQqV+jF3KojHo/g4RyW+EcDOhh/j0SuIiAptaba4FM1Px+hXiPr+2IDxKwN7RhNMw PNIKgI1CQME8KVvtB+xp8wfXQfqWpo4pLM3t5ImgyYl7auGvCGdmAuvtopwsJjxQLLzW axj5cmIukKe8kJosnyXB0UyHyxYChPqgQW2X5Je0NmojLCP1QFUSDJKfamvIb+1pPxf+ pu6bIl2jTHsRI032CHbNPgLrELOKYk5NRwi3Hc6ZAqLYcie9E7fFUy0NmE9c1ZNd7G5v HKjw== X-Gm-Message-State: AOAM532YVM9R2gl+Wv7y83pZi//d6TgD3JmXgCXPz0V3iCIgfc2rquCZ WQPcA6rEUcMvCxFVtcq2rsqSPA== X-Google-Smtp-Source: ABdhPJwRnBMq8uQ6SZnA5t3+W1dY5KfhW+rUvHoY0ZFqRAUpsRl3443LXWlNkfL4jbqrfnKEqxi2qw== X-Received: by 2002:a37:be43:: with SMTP id o64mr23549112qkf.322.1591649052223; Mon, 08 Jun 2020 13:44:12 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id y16sm8895565qty.1.2020.06.08.13.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 13:44:11 -0700 (PDT) From: Jonathan Marek To: alsa-devel@alsa-project.org Cc: Andy Gross , Bjorn Andersson , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/5] soundwire: qcom: fix abh/ahb typo Date: Mon, 8 Jun 2020 16:43:42 -0400 Message-Id: <20200608204347.19685-2-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200608204347.19685-1-jonathan@marek.ca> References: <20200608204347.19685-1-jonathan@marek.ca> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The function name qcom_swrm_abh_reg_read should say ahb, fix that. Signed-off-by: Jonathan Marek Reviewed-by: Srinivas Kandagatla --- drivers/soundwire/qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index a1c2a44a3b4d..f38d1fd3679f 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -114,7 +114,7 @@ struct qcom_swrm_ctrl { #define to_qcom_sdw(b) container_of(b, struct qcom_swrm_ctrl, bus) -static int qcom_swrm_abh_reg_read(struct qcom_swrm_ctrl *ctrl, int reg, +static int qcom_swrm_ahb_reg_read(struct qcom_swrm_ctrl *ctrl, int reg, u32 *val) { struct regmap *wcd_regmap = ctrl->regmap; @@ -754,7 +754,7 @@ static int qcom_swrm_probe(struct platform_device *pdev) return -ENOMEM; if (dev->parent->bus == &slimbus_bus) { - ctrl->reg_read = qcom_swrm_abh_reg_read; + ctrl->reg_read = qcom_swrm_ahb_reg_read; ctrl->reg_write = qcom_swrm_ahb_reg_write; ctrl->regmap = dev_get_regmap(dev->parent, NULL); if (!ctrl->regmap) From patchwork Mon Jun 8 20:43:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11593991 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 4C2DB739 for ; Mon, 8 Jun 2020 20:45:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DAB4206D5 for ; Mon, 8 Jun 2020 20:45:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="wRgDcxO8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726909AbgFHUow (ORCPT ); Mon, 8 Jun 2020 16:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726848AbgFHUoR (ORCPT ); Mon, 8 Jun 2020 16:44:17 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B47CC08C5C6 for ; Mon, 8 Jun 2020 13:44:14 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id y1so15856836qtv.12 for ; Mon, 08 Jun 2020 13:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ONkKk00wU6bNoQuWZM5ia2OqgRGBJA5uMULpx0HvSVs=; b=wRgDcxO8BCqt6sdiblcfLzl4rgLVW/62I97WXOlaKayAc75G8dB2ExJqPheT4ByLEt 6cxtXG71WJOpGNCGV31RXojBl3HEazQ29hOJXTVdPdB13J3HwUTQfXi29Zq/YWVPLmCI Wjc0KEVayWJwjxHtT7veElQlljIyAMaJKwQHnTip2cpx71fX7nyG72RpYkLJoK6qlOCL tN+1/Olm0Xt53eSz3slJZ47LEfZL6KEVA12NLG5qdwzbLQGhNc11JI48dxrVF1XeoMX9 b+XX4TW7K0e/R2gSg9vVBsveDp9Zpv8P94+TU6lp3CGs89n0l0Li3vwl9bWg13u6kr9L pd1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ONkKk00wU6bNoQuWZM5ia2OqgRGBJA5uMULpx0HvSVs=; b=d9FBubmBSksfFa1OiaK/nfJApqPocG1LIoyJxKTWTemqODiKnkGI1UKupM23gDffkp psP3/HieMY0l6+TOCFMXCcWZ9YQi3/TzwVG/5wByuTJTuKehZIsn/rSjLSEYuZaNrHfw uu7qtWvKU9lSRG0WqLg2pxEW56mkPvtEOa2/8gmurp2ig8AAKDGB+3fZw5UU3XHtKE3i qhFEOn9LnW+zswMp6NJX3vlEHEa4N1LzRCF6KztRv2jihlTta4l0V2CXLjSYqkrbbmbI zx2a0NRrNuTqTft4oK97VHnEa1OHSMu4fN/iF+24+ZXT2WaYg4WrqEZcGEuMIM1kCFxZ IGWA== X-Gm-Message-State: AOAM530zTa7kA6ZFuVZiGP6I1T57Hf/uai2PMSzu2mK4cbf8veYZivJT K6fG6KcFXvp5Mo7PA7lHvARBeg== X-Google-Smtp-Source: ABdhPJxFZ1JGmX+g9epu/PQEnKM/WSRYvOq/NrosWYsQIOnyJyLKXgl4JFeGXodB4BO3846UKpvcBg== X-Received: by 2002:ac8:176f:: with SMTP id u44mr26539726qtk.0.1591649053340; Mon, 08 Jun 2020 13:44:13 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id y16sm8895565qty.1.2020.06.08.13.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 13:44:12 -0700 (PDT) From: Jonathan Marek To: alsa-devel@alsa-project.org Cc: Andy Gross , Bjorn Andersson , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/5] soundwire: qcom: add support for mmio soundwire devices Date: Mon, 8 Jun 2020 16:43:43 -0400 Message-Id: <20200608204347.19685-3-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200608204347.19685-1-jonathan@marek.ca> References: <20200608204347.19685-1-jonathan@marek.ca> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Adds support for qcom soundwire devices with memory mapped IO registers. Signed-off-by: Jonathan Marek --- drivers/soundwire/qcom.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index f38d1fd3679f..628747df1c75 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -90,6 +90,7 @@ struct qcom_swrm_ctrl { struct sdw_bus bus; struct device *dev; struct regmap *regmap; + void __iomem *mmio; struct completion *comp; struct work_struct slave_work; /* read/write lock */ @@ -154,6 +155,20 @@ static int qcom_swrm_ahb_reg_write(struct qcom_swrm_ctrl *ctrl, return SDW_CMD_OK; } +static int qcom_swrm_cpu_reg_read(struct qcom_swrm_ctrl *ctrl, int reg, + u32 *val) +{ + *val = readl(ctrl->mmio + reg); + return SDW_CMD_OK; +} + +static int qcom_swrm_cpu_reg_write(struct qcom_swrm_ctrl *ctrl, int reg, + int val) +{ + writel(val, ctrl->mmio + reg); + return SDW_CMD_OK; +} + static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *ctrl, u8 cmd_data, u8 dev_addr, u16 reg_addr) { @@ -746,6 +761,7 @@ static int qcom_swrm_probe(struct platform_device *pdev) struct sdw_master_prop *prop; struct sdw_bus_params *params; struct qcom_swrm_ctrl *ctrl; + struct resource *res; int ret; u32 val; @@ -760,8 +776,13 @@ static int qcom_swrm_probe(struct platform_device *pdev) if (!ctrl->regmap) return -EINVAL; } else { - /* Only WCD based SoundWire controller is supported */ - return -ENOTSUPP; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + + ctrl->reg_read = qcom_swrm_cpu_reg_read; + ctrl->reg_write = qcom_swrm_cpu_reg_write; + ctrl->mmio = devm_ioremap_resource(dev, res); + if (IS_ERR(ctrl->mmio)) + return PTR_ERR(ctrl->mmio); } ctrl->irq = of_irq_get(dev->of_node, 0); From patchwork Mon Jun 8 20:43:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11593979 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 621E1912 for ; Mon, 8 Jun 2020 20:44:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4776E20774 for ; Mon, 8 Jun 2020 20:44:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="TbEEcd0e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbgFHUoi (ORCPT ); Mon, 8 Jun 2020 16:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbgFHUo1 (ORCPT ); Mon, 8 Jun 2020 16:44:27 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28459C08C5C9 for ; Mon, 8 Jun 2020 13:44:15 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id l17so4890284qki.9 for ; Mon, 08 Jun 2020 13:44:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mdQIVrxrcWgdEfMxOy8k0QA3bySSLO8hLrFtwiG/Nyg=; b=TbEEcd0epDDJxtIhsogl5/yVZrtqN8SILEvvnLZ04uF86KSRpPvl6jjeQ5Bs6pzHzZ 5UFr1cbWg585VsBfEbgtnx25trM0iBAtoajfQf7SxJ0uNRyDzLxGyb7xdDwNpixUcQrm ogVx/qiWyyCfviUbwYRvXxLOFfwhEgNFigF5l4XH8xjImCG22+dhmbJFPyfWcomU5grl 3rKuZ0VJlJbOoVufDpACJ1IqJ9lYJo8Nla5Mg1u5r82zlbljt7746AHKw+mWX5n7hLrm GerYChWxLd9wH/y9cIhGmE0c4nomibogPkmtXbbUJx6i4AJ1P/TNHdYIRvNVb3ENX92y LrjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mdQIVrxrcWgdEfMxOy8k0QA3bySSLO8hLrFtwiG/Nyg=; b=XZ0ifr4eEWUmYM1MMKnUe8j7fUKbpQ/Vy5P8fygmlQC3pRbzRQXLGJ4rEFtmWdohHU FMpUiTChJg35wwvGngdGAyttI080AUSRF3nmuMwVTn/QrQ/C4TNcKHCSmvE3bR2M9eDX DpTb+B0NqFrM9/MJrH3rpaViR0bteZjkNtKYIcYt2Om3mspEH2ORpTcFrPR4S8yrKnOY FGfFDd24SnB4/ng/zz3otyz7o5/AHDIEZloCWN1gWPX1P8BCbt2APREF6rmqi29Wn2hE pFWTgkjsIILTovGO70dc7hfY8HQGXBxUe3aq5+wiUJVDOKJ4xQiPDq43l9RBaSBjBUub 8i2Q== X-Gm-Message-State: AOAM532XwGezMnG/+z53+cbcSfA2GtoSCpgrqWEQCGteZ0p6e7QD/C7D 7JLjKHnsHl53vs8opSM5Hu1UYA== X-Google-Smtp-Source: ABdhPJzI8WbUQ4+5LY+YoO9q2MUZma7oEMCKrRsz1GX/pV0LBOaUljnGhawiLinbYjlLdD5jPvsB7Q== X-Received: by 2002:a37:b14:: with SMTP id 20mr24490042qkl.401.1591649054370; Mon, 08 Jun 2020 13:44:14 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id y16sm8895565qty.1.2020.06.08.13.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 13:44:14 -0700 (PDT) From: Jonathan Marek To: alsa-devel@alsa-project.org Cc: Andy Gross , Bjorn Andersson , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/5] soundwire: qcom: add v1.5.1 compatible Date: Mon, 8 Jun 2020 16:43:44 -0400 Message-Id: <20200608204347.19685-4-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200608204347.19685-1-jonathan@marek.ca> References: <20200608204347.19685-1-jonathan@marek.ca> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a compatible string for HW version v1.5.1 on sm8250 SoCs. Signed-off-by: Jonathan Marek --- drivers/soundwire/qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 628747df1c75..14334442615f 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -880,6 +880,7 @@ static int qcom_swrm_remove(struct platform_device *pdev) static const struct of_device_id qcom_swrm_of_match[] = { { .compatible = "qcom,soundwire-v1.3.0", }, + { .compatible = "qcom,soundwire-v1.5.1", }, {/* sentinel */}, }; From patchwork Mon Jun 8 20:43:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11593981 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 25776912 for ; Mon, 8 Jun 2020 20:44:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 047DE20774 for ; Mon, 8 Jun 2020 20:44:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="izdEU63J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbgFHUol (ORCPT ); Mon, 8 Jun 2020 16:44:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbgFHUo0 (ORCPT ); Mon, 8 Jun 2020 16:44:26 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 418FBC08C5CA for ; Mon, 8 Jun 2020 13:44:16 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id fc4so9055592qvb.1 for ; Mon, 08 Jun 2020 13:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GeS57nqw38MaaFBYUxKJYofMdDxv41hdDhrvNhyT71U=; b=izdEU63JBRBlTIYJi2dlajVxsC8GIc4Ja/EpX8IoEH9m3Yn7PzeiCBuziBJZcx7QTH eivbQrpXFzyiiTg2BOzbVMqeIqULBRWtbCi2XF63rprhzLG8fC1njxBHqij2l+CFNQ7b KQrcLbl2n+GQTAtCjAr0JSThSCzSBvqRVda8jbeh6/7SlCmdGkxeIoegb/trCvXaXV0u /yCRDWK0omQYvulLWHYXOrBD8c6OWcsydoLf9GPU3vc16Jick4vv1eLmeI0Ayrw+XKKC +WFK8YNB4rWVq5uPOXneIjJOb3ysYiOCA5nlkV9Vw3SucwkKjU6lcSAen7GhoROgV/jC +S2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GeS57nqw38MaaFBYUxKJYofMdDxv41hdDhrvNhyT71U=; b=kcR3zUEA8ejI4m5q2pGBbgjGJ07jvyo7zqH4Z/p1gUQSfltiEJFsdG3ANZJMna7uKR NO+nrB0PIpDBp7RRp/SYJJtnL+SuC8xmqE3o1fUWnOSJ0qL72JXxAxXqFRY7q+4v6ilk rtu/S8K0O/aIZClBBFhsBJfXFrV9tl+DGx3OqOSzcHn16GJnsTxbcdnHSp+w2KDN0UC6 pJvrvlKCEvyQA/XfEQBjuRsIT4n7LT9tffiI3yELltVyIsQC0nymitgQQuswF1du4WtX RC/t6AARzFP6SE7THT6KKMxwns//X6lfTeKXwVW/4qoInG0/REDoHm5NkLPB4JMnxR70 ZwrA== X-Gm-Message-State: AOAM532PdSOveP7fGwJWTkyb+FTnsFwL5PpLCoPAHg/xrwIbHgTbpZ9Q 8tJCfv+0uUTMsUKpx9HwthiH2w== X-Google-Smtp-Source: ABdhPJzp1kY0Eq7ZnTPcv/fOpYkKQkoZv/tdIOc8Qlnkptw4yJZWeRurqIVGk4BRqBQE3LECzd3F8w== X-Received: by 2002:a05:6214:aaf:: with SMTP id ew15mr576826qvb.110.1591649055572; Mon, 08 Jun 2020 13:44:15 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id y16sm8895565qty.1.2020.06.08.13.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 13:44:15 -0700 (PDT) From: Jonathan Marek To: alsa-devel@alsa-project.org Cc: Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , Andy Gross , Bjorn Andersson , linux-kernel@vger.kernel.org (open list), linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT) Subject: [PATCH 4/5] soundwire: qcom: avoid dependency on CONFIG_SLIMBUS Date: Mon, 8 Jun 2020 16:43:45 -0400 Message-Id: <20200608204347.19685-5-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200608204347.19685-1-jonathan@marek.ca> References: <20200608204347.19685-1-jonathan@marek.ca> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The driver may be used without slimbus, so don't depend on slimbus. Signed-off-by: Jonathan Marek --- drivers/soundwire/Kconfig | 1 - drivers/soundwire/qcom.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig index fa2b4ab92ed9..d121cf739090 100644 --- a/drivers/soundwire/Kconfig +++ b/drivers/soundwire/Kconfig @@ -33,7 +33,6 @@ config SOUNDWIRE_INTEL config SOUNDWIRE_QCOM tristate "Qualcomm SoundWire Master driver" - depends on SLIMBUS depends on SND_SOC help SoundWire Qualcomm Master driver. diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 14334442615f..ac81c64768ea 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -769,13 +769,18 @@ static int qcom_swrm_probe(struct platform_device *pdev) if (!ctrl) return -ENOMEM; +#ifdef CONFIG_SLIMBUS if (dev->parent->bus == &slimbus_bus) { +#else + if (false) { +#endif ctrl->reg_read = qcom_swrm_ahb_reg_read; ctrl->reg_write = qcom_swrm_ahb_reg_write; ctrl->regmap = dev_get_regmap(dev->parent, NULL); if (!ctrl->regmap) return -EINVAL; } else { + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ctrl->reg_read = qcom_swrm_cpu_reg_read; From patchwork Mon Jun 8 20:43:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11593977 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 8934E912 for ; Mon, 8 Jun 2020 20:44:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E5C520774 for ; Mon, 8 Jun 2020 20:44:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="SJTSV2+Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgFHUog (ORCPT ); Mon, 8 Jun 2020 16:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbgFHUo2 (ORCPT ); Mon, 8 Jun 2020 16:44:28 -0400 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7105C08C5D1 for ; Mon, 8 Jun 2020 13:44:17 -0700 (PDT) Received: by mail-qv1-xf41.google.com with SMTP id e20so9059071qvu.0 for ; Mon, 08 Jun 2020 13:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=acHevj3wQIcryhB7O2ZRO4PATF9eIWbo+G1WRkznV+0=; b=SJTSV2+Z6VNkFlhdlnWtITIVaf5vYoqSYKr/f34664q6R+QXXEV+tgRZ1FHi/+E000 Me6yk+QNbCBGelQ4P8PI20FbKZAZLoNFWmZ3HZE4EqK4iuDEH60ryY2dISsf9y3argHu UMPAB4Swt6oUhedie/XcWLz2KkFOcXE+6wCHKUGd2O9Tq444VcZvSUQc8hYhHY1pn3NX GQ/Crp3r1oq3LYlCpjCS9HmMuxEiEK9ZKef+xUVC+ih5B+N98Y8rB9YafCduk4sQKpit m1kjz5WQ6UsujVM0dfRYbpOYlCQLsp+Ps7L+DqkjqhiCv+PUA2Fc3tPXduqWNHZnTe7s ExJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=acHevj3wQIcryhB7O2ZRO4PATF9eIWbo+G1WRkznV+0=; b=Gx4ilKryddLc+f724RmaBNqxWHHsmAFmGLGLDVcLOiAGC2vc/okrN/SJodINaaT/V5 Vz3PJC1NXwuflUbJSG2KfHdjGxynpHI/61tr9hQfF+ijo/zCPRgnZR9wkCvlw5ZPZyXT 0Omz0zXiXNMgN9G55z4AOgNWU0R32fcGGsh84dEfGSmBsXdfAD4tFdZEunijfLfuXqas +bHxdfsFbcNdXXunZ6rVpigmgJ6EREZ4wwOos2vNIM+5D7+VosrjWOijVFyuESwEsnQd 9OE/2aPZM4Fd0jbULv5HBGeZSgjJLoxQ/YWZ27rHLldcnaClkdCDcjmF2LMErswuOHPy /y7w== X-Gm-Message-State: AOAM532HqryckqsgkB8W9m3D2PvOjbH3h8ojRWyHypjDi4bgSKZJxY9Y p42vXpFLgNFMLr1wDMqCdMWTQw== X-Google-Smtp-Source: ABdhPJzOla+D8EOOeekqVt/wBj46R/nJoH0uM20TvTKVjJNwP4MBDNiTWp7yPIFrDtsJ9VawFCxsyA== X-Received: by 2002:ad4:5668:: with SMTP id bm8mr549681qvb.248.1591649056614; Mon, 08 Jun 2020 13:44:16 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id y16sm8895565qty.1.2020.06.08.13.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 13:44:16 -0700 (PDT) From: Jonathan Marek To: alsa-devel@alsa-project.org Cc: Andy Gross , Bjorn Andersson , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 5/5] soundwire: qcom: enable CPU interrupts for mmio devices Date: Mon, 8 Jun 2020 16:43:46 -0400 Message-Id: <20200608204347.19685-6-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200608204347.19685-1-jonathan@marek.ca> References: <20200608204347.19685-1-jonathan@marek.ca> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This allows the CPU to receive interrupts. Signed-off-by: Jonathan Marek --- drivers/soundwire/qcom.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index ac81c64768ea..58ffb46e0d64 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -34,6 +34,7 @@ #define SWRM_INTERRUPT_STATUS_SPECIAL_CMD_ID_FINISHED BIT(10) #define SWRM_INTERRUPT_MASK_ADDR 0x204 #define SWRM_INTERRUPT_CLEAR 0x208 +#define SWRM_INTERRUPT_CPU_EN 0x210 #define SWRM_CMD_FIFO_WR_CMD 0x300 #define SWRM_CMD_FIFO_RD_CMD 0x304 #define SWRM_CMD_FIFO_CMD 0x308 @@ -325,6 +326,12 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl) ctrl->reg_write(ctrl, SWRM_COMP_CFG_ADDR, SWRM_COMP_CFG_IRQ_LEVEL_OR_PULSE_MSK | SWRM_COMP_CFG_ENABLE_MSK); + + /* enable CPU IRQs */ + if (ctrl->mmio) { + ctrl->reg_write(ctrl, SWRM_INTERRUPT_CPU_EN, + SWRM_INTERRUPT_STATUS_RMSK); + } return 0; }