From patchwork Thu Jun 21 13:40:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 139544 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2090000lji; Thu, 21 Jun 2018 06:42:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0mCDDV1aPxvFlWljMpsJJUC+fdGGNqD6KOiRJ/Z+vHRH+guwqX3Wk8dv29XefS/WINQCH X-Received: by 2002:a65:6142:: with SMTP id o2-v6mr23007476pgv.347.1529588545856; Thu, 21 Jun 2018 06:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529588545; cv=none; d=google.com; s=arc-20160816; b=JNgfhz0Uyr3srwD4hdgLmSZvsxEVZBQzXjx17VtOJbr4vJ27h8putgGRxWzipGtuVx eAbxtaUikMHEXx+5czuxFY0IRoCF5o695YXmoiiTG7REkwmFkOjKvGAZOHxZNr3ErCYs TN3d/QFfyVu/fUGPmTncI+YQ1gFCbfSpaAoMRJvdbBuik3A6jsOP+ZgRliSQB3IO3Si4 zfySveO46VFPT5zI0tSCrqDLKANSjE8PPQaHpmUWlegmssLAD+TjU9ISxURV6VVSrNSE fRM9yHVmDWZYvC7CKQFlTwyoZl+P/YyMM+bBjHZHSJZW/o1Ekvc/+gfUYqbGOcZn7r7Y E0Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=zMQ83yBLGub73Xfj3LtWVPAd/bKOb1tTm3TqV8d0Gs4=; b=TuIRhxqhnCB4lEr9cZ626GQVkK09QvSgU2H6cbBu6R0/c8sG49tShUxNrD82Ae0JKR McLEys6yYpSkhV017BRLRI9S9j31r1dK2rOYxUc5b9SIGZ3jvj1YWgfED0J9e/1MgG0j cRi5cKVvur3eE+12rp3ztUEUlefSSxY8wnX4ve+eNtwCy1TMMAKVH2o11hQlFhjbggen k9I4W1ZmYS7bZ7b/Sv3YBeOt+HEjChgICFIPzMdsYKzvnct0KcrlwbMe3j3EO56rKH1K 87Ur6YGiSqFkn/RN6OyLtTzlF2ZD9qdzYED22T+eSqSs2yxNGTSQOv8mh8mjMqpMAdEd SqIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QqIeFL6q; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p33-v6si4728132pld.318.2018.06.21.06.42.25; Thu, 21 Jun 2018 06:42:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QqIeFL6q; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933161AbeFUNmY (ORCPT + 13 others); Thu, 21 Jun 2018 09:42:24 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38573 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933039AbeFUNmW (ORCPT ); Thu, 21 Jun 2018 09:42:22 -0400 Received: by mail-wr0-f193.google.com with SMTP id e18-v6so3264809wrs.5 for ; Thu, 21 Jun 2018 06:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NfSv0nj1BuZ8P+/FSyMM6pwFQ6CZ25SaeF+dN18JqeM=; b=QqIeFL6qusIPLPBq9J6LZ7b/zfeb+s6727NxUovL5K0ZyLthP+qkVqjM9LVjJhkYu4 E3MvornFPUC7xVxBAKGQ8EuwrbX9BNCECl9bdW/KHCF/VQWlULkzCCISaSqWF1GfgKbT mirXVVEfkA34fJY2o8eqstMtfPPQ+GdTi7AaM= 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; bh=NfSv0nj1BuZ8P+/FSyMM6pwFQ6CZ25SaeF+dN18JqeM=; b=sSMqyBKecoq+o9NYBSBfJQOg150VHRSvnISJco9h5XCH/DJY3+JMLMK+y9A9aSh1Gm pGGTvQm1cE2T0nAHoqI2QV8QYjo6d6fE6r+Z+ZfPbZUhoCOd6cbDu4G+5rkxIwSj8nHJ FzaNTZO1Ksiqcu7vdsgqMzx070ifIIW5+XajWvJ06UMMkOU32CBXRvVt+c3H9AfgVbS+ EUikPNPxDMvn5vAxBPBRA/zWKfN2oKMqlEwSzYartVuMidmVisBQDqGvJ/DDfjiCBDsW SojlBuoq7eASCzczTRnFj5+STuBi8fP4Beoydfo/m7sb5wKHsD8O8prNjALv+Dj0+Uv/ EkUQ== X-Gm-Message-State: APt69E21fFQnu7zsLNWZ3mdq9aV8KQF20WG++GSaK4glfdObSmIvbbjM RdPimxwYbeZnOMQtVq1++9FvPw== X-Received: by 2002:adf:9b01:: with SMTP id b1-v6mr5185155wrc.181.1529588541654; Thu, 21 Jun 2018 06:42:21 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id r2-v6sm4797513wrq.55.2018.06.21.06.42.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jun 2018 06:42:20 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org, broonie@kernel.org Cc: sdharia@quicinc.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, ctatlor97@gmail.com, vkoul@kernel.org, Srinivas Kandagatla Subject: [PATCH 0/2] slimbus: Add Stream Support Date: Thu, 21 Jun 2018 14:40:07 +0100 Message-Id: <20180621134009.27116-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This patchset adds basic stream support for SLIMbus devices and controllers. Mostly inspired by soundwire stream patches. But slimbus stream is much simpler compared to soundwire >From slim_device side, we have below 6 new apis. slim_stream_allocate() - allocating runtime slim stream slim_stream_prepare() - to configure runtime stream with config slim_stream_enable() - enable channels/ports for data slim_stream_disable() - disable channels/ports. slim_stream_unprepare() - un configure runtime stream slim_stream_free() - free all associated memory. >From Controller side: Data channel Management and reconfiguration messages are applicable for all the controllers which are inline with SLIMbus specs. However light weight controller like NGD which have user specific implementation of some messages need to be invoked instead of standard message commands. For usecases like this simple enable/disable stream apis are provided. Assumptions: 1> Current design assumes that the channel and ports are statically allocated to the device during SoC integration, which is the case with all the Qualcomm SoCs. 2> One-to-One mapping between Port and Channel, SLIMBus versions earlier than 2.0 has only one endpoint per port. Current patchset can be extended to support more than one endpoints per port. 3> Only audio usecase, This patchset only supports Isochronous and Push/Pull transport protocols, which are sufficient for audio use cases. 4> DSP does all the data handling for the allocated channels. Which is true for Qcom SoCs. TODO: Bandwidth management. Dependency: This patchset has dependency on the NGD driver https://patchwork.kernel.org/patch/10474959/ Tested this patchset with WCD9335 codec playback on DB820c on top of 4.18-rc1 with qdsp6. I have pushed my working branch to [1] incase someone want to try. [1]:https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=slimbus-ngd Thanks, srini Srinivas Kandagatla (2): slimbus: stream: add stream support slimbus: ngd: add stream support Documentation/driver-api/slimbus.rst | 5 + drivers/slimbus/Makefile | 2 +- drivers/slimbus/core.c | 2 + drivers/slimbus/qcom-ngd-ctrl.c | 144 +++++++++- drivers/slimbus/slimbus.h | 206 +++++++++++++++ drivers/slimbus/stream.c | 493 +++++++++++++++++++++++++++++++++++ include/linux/slimbus.h | 56 ++++ 7 files changed, 905 insertions(+), 3 deletions(-) create mode 100644 drivers/slimbus/stream.c -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html