From patchwork Wed Sep 4 11:36:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 172923 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1106136ily; Wed, 4 Sep 2019 04:36:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxsgoJFFno8BOEpwmRi11axDysQ8MBJ9xMIQNN+Vaf72fFCfusaUCIdqeooa+RXwwY/7fo X-Received: by 2002:a63:5648:: with SMTP id g8mr33993342pgm.81.1567596979923; Wed, 04 Sep 2019 04:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567596979; cv=none; d=google.com; s=arc-20160816; b=qu5fILTf4aQS8v4ZfFB2ezUJFD/Zhpm9NYXIvmBAckcVuBRQ5WfLSgs3nDCvfe/Rsl DB7r/7k/47pN6fiUiZ3dVeuYTd02MF7Hc9FtGdBxtsunkodqvZK2wq51NOwEKEQe3LeQ kMZkl4+tMUG/4DJqZxN4wQ7pf1u683+rxYUPLziXKwidTX5ALdwaaDKu78sOzHH3Oema V0wjGbwhjFPnWqN0lYXDqmq9VJ59fVE8iDvtfZQgHrSvcCUS1LvgAmZKum9tZ+hJA6S3 LnZeG5xfQDrKef3pf4YyR5zR41DqZVGKbx3Z/hfIrm8mKv+NCuQwNsFwcwIv2h+KfN0y WN1w== 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; bh=6n1x8bAGsyaVUn7RCRrZd6pcUeSbUTUlFO1sD7W+jdE=; b=0Nj0+Yt0t8gPmGeI4wj0nGlgxy63DAuKIgA1cr7BuEiuwlMIXrqExYpHkt4EJw+H3L iMtAQcCKw8ZxEeX2tJGz4p7m8JRG6VLv92X4R77QyJphRlxyZWHSckLSG8uaH/ieSaa8 4J9rn6ZfM1uQIR7of3QOnAV1mnrvXfXfgp3YR9Jbxfsu2CX/g/AqnzZcJ5DLLDkuYnia eT8RbPXQuZzPlSkTq0VP85elPV9QcvvOSW+wMGhtzB8frwC9TQhdN1406oO65ELMd+MK I3QuAtGV5DJjOeZpcwTS/kPxGixcYOUy/xP76PUDfsGBs5ZPdMHLJTmnVSkyhopVnCPa F8/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h6B+fLtp; 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=pass (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 u22si7639429pfn.157.2019.09.04.04.36.19; Wed, 04 Sep 2019 04:36:19 -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=pass header.i=@linaro.org header.s=google header.b=h6B+fLtp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727156AbfIDLgT (ORCPT + 16 others); Wed, 4 Sep 2019 07:36:19 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:34939 "EHLO mail-wm1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfIDLgT (ORCPT ); Wed, 4 Sep 2019 07:36:19 -0400 Received: by mail-wm1-f50.google.com with SMTP id n10so3305401wmj.0 for ; Wed, 04 Sep 2019 04:36:17 -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=6n1x8bAGsyaVUn7RCRrZd6pcUeSbUTUlFO1sD7W+jdE=; b=h6B+fLtpSONhSBxg/IJPOu8ZrT+zjGIRlQ9PafT3Q+SZuugLTW6Ms+HeiIs199by73 /y+NK2ynYGk5Q1wiraznmv2S5N8Lz0qJIog53PZqHuAG5OFvBaAac4XnhbVk0k+0NGWi IUHCcEYDqbyRKZZp2QJ8hxBdm7rxewdpV32Cn9jFMFQB3McBI0q5ZjtIQTG3kzNunl+J wd5cfQNbtsC+bA9G4OAwDPM+UzwfqTBSFiXdOXS2MFlj5hQCg4AYNsTJ3GCer+YjaTp7 TYsyWv5RGnBfWrv689OK75VW6sakK4tDIkVN+13SPqxEk7zGNRbD7F3Sp3yWfKoTo0bU rcdQ== 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=6n1x8bAGsyaVUn7RCRrZd6pcUeSbUTUlFO1sD7W+jdE=; b=GE5kNZkMks7cYnFopicbNQTkIWaWUsaThxUo87m9Lfgn3N5WIb6o2cplOPskED58qG 0f1EbOtn2zjUVIgGh4IsVnwESTd2wEErsnlXOI3RASTq64j4zHPd0MI8Ol0aHyLSgZbQ WC2pUXOjvrePq4zrzjuxLdWOaOAFgKHlHJsEvcvvqMRFQfQJwgE0rFayyaUB8a0kVO/D dv3NxxOYujinCBsOAn++REWbd984KQotG3rVCMVLOgLi4/N5wZh7nQV4sBRrE2KQF+Z8 bbGQqo78TEvR7X8/OCjWfrkfNXsn53fpqtJh83jKNx+otLKuCJujXWpIgAonUOGciEY3 G+MA== X-Gm-Message-State: APjAAAU5zrn+C6I9ZuVM2usQqocsKR1oUqn5mot8LvZk3Zoec1jA+24O 2xjzNgbqiCeiNkC3JeEJZLpvrw== X-Received: by 2002:a1c:20cf:: with SMTP id g198mr4199256wmg.66.1567596977066; Wed, 04 Sep 2019 04:36:17 -0700 (PDT) Received: from localhost.localdomain ([95.147.198.36]) by smtp.gmail.com with ESMTPSA id d9sm10823933wrc.39.2019.09.04.04.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 04:36:16 -0700 (PDT) From: Lee Jones To: alokc@codeaurora.org, agross@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, bjorn.andersson@linaro.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones Subject: [PATCH 1/2] i2c: qcom-geni: Provide an option to select FIFO processing Date: Wed, 4 Sep 2019 12:36:12 +0100 Message-Id: <20190904113613.14997-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones --- drivers/i2c/busses/i2c-qcom-geni.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.17.1 Reviewed-by: Vinod Koul diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index a89bfce5388e..dfdbce067827 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -353,13 +353,16 @@ static void geni_i2c_tx_fsm_rst(struct geni_i2c_dev *gi2c) static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, u32 m_param) { + struct device_node *np = gi2c->se.dev->of_node; dma_addr_t rx_dma; unsigned long time_left; - void *dma_buf; + void *dma_buf = NULL; struct geni_se *se = &gi2c->se; size_t len = msg->len; - dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); + if (!of_property_read_bool(np, "qcom,geni-se-fifo")) + dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); + if (dma_buf) geni_se_select_mode(se, GENI_SE_DMA); else @@ -392,13 +395,16 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, u32 m_param) { + struct device_node *np = gi2c->se.dev->of_node; dma_addr_t tx_dma; unsigned long time_left; - void *dma_buf; + void *dma_buf = NULL; struct geni_se *se = &gi2c->se; size_t len = msg->len; - dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); + if (!of_property_read_bool(np, "qcom,geni-se-fifo")) + dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); + if (dma_buf) geni_se_select_mode(se, GENI_SE_DMA); else From patchwork Wed Sep 4 11:36:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 172924 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1106168ily; Wed, 4 Sep 2019 04:36:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHNf2VZegX3iNqJAkek/zItgni1VOVoPsOls+b/uuhY7gKsm8NVtmOgoPMTW0iOvJNAtH7 X-Received: by 2002:a17:90b:f12:: with SMTP id br18mr4253618pjb.127.1567596981661; Wed, 04 Sep 2019 04:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567596981; cv=none; d=google.com; s=arc-20160816; b=gtHd0XJMASfdaWBPuZdPH2fuDvutIDKZL8xxM7sK+YZQL+SEegpojQp0JCCduWaE4w DGXe4RTcKU+UHcZudRzFSCFVch/64YJ9S8tGYKq0SiWvKEa9itKSGw6SBYNlevXCgvif Ka0KySGEiNbIJCIes/6JHlDA4p00sPM9EaOFR0bcCog2PXr351eg3j7iwih6LifYfoPj v92v/LxdD7aZS4BeR+e/qt+J76bv8UlUW9LBMcpdxw2IQQK7TXczMKR4CmIQbA+SiC+v I9wD4GuJ07RwDXj4xU3uppQvNcAq7nov4oNgIJgssQnBq+NLe5bnklbsyJUzFpZaaoKj r2Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Uuq1eCLagqB7It6aGbezur+IR8biDO9SazdI7cqdaFI=; b=CfirMLgsczxRDwpTinQIKscUvX8iUuYaXFhlQV9TgEpJYpVYpv1S2Fly+gwl0uLIQU DvBbwvgXX9FhJhN+NL9i/fDTQrHW8uF+VgfTnfQo1n3trjz25Eg8Do4HkwWQnQRhKD7T V5tgag3SYqFVT41XFp1XS1AwPv3WSMrI0XzbMnIyn7XEz5BQ4RRvoFoH8RdjD0bZNEVf WBa01ES3wTz1Ryn9e4+KIl86oX9B6i5FJq//zCxvUYGQL4WZKm6jahgShmtKj22Dochs 6AIySbyaGj7qo9OUEcKMdApqkwkz7N6GrdwmRlf5veTb/SYLNLE7Jn9+hgHnQjofWMAC 9TUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qp0yJe04; 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=pass (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 c137si17373436pga.80.2019.09.04.04.36.21; Wed, 04 Sep 2019 04:36:21 -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=pass header.i=@linaro.org header.s=google header.b=qp0yJe04; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726495AbfIDLgU (ORCPT + 16 others); Wed, 4 Sep 2019 07:36:20 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53273 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbfIDLgU (ORCPT ); Wed, 4 Sep 2019 07:36:20 -0400 Received: by mail-wm1-f68.google.com with SMTP id q19so2925977wmc.3 for ; Wed, 04 Sep 2019 04:36:18 -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:in-reply-to:references; bh=Uuq1eCLagqB7It6aGbezur+IR8biDO9SazdI7cqdaFI=; b=qp0yJe04jx2ivZeuIXUwlhAyXXeFSfk5tgqH6oCkHR05lDEik9mPR5v9927SPGcRcF Bqpd9uYWbP1lsr+hb7QvkpYLluhnrev870vk1hyz6CstDwPiqkr8mp4/e4g5uP5dShX8 xdt0ym7tbVmwYwx2pgRVRGsEZ8C1evHUk9FGitl/8RMxdTyfqj6zxtwcIzKPbnKHu2ay q7f/9kZ1lQ7dZpPPtuumZ9QoFlwEHWVriNgD+6IQtn2ystKcFOD1L8ahTB72/zQlOPjj vijaYPmPpyVFjezLg3cx8drAtt4pP5Fz+cYk5fH1mE2O8yX+nvUAM681Qx1ltYOUjSXv zQLg== 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; bh=Uuq1eCLagqB7It6aGbezur+IR8biDO9SazdI7cqdaFI=; b=NNmNRxKWfPiQd1jochSYKDDcWLsNnKKqMmksgKbH34XCasL42mOCXXlaelfz26AgJn Vlg7Wq4/mQbihtIw5csaTChpBHzAD+OqWKQisS6aGRAjvQtfokSWMrrydrmPIFQUyG2Z JIqP54aR8MABxJ0T6lqpkvGPKqBNCQvU6ac9HWUyL1wy4dBKouIKajZ153HEXsbByJ8Q mYc7VRQAznvGsCuhLnpL5bzY4uNjfWK5m0lbL+pljVwyMMMJvZlKtbf0I0zaNmj60KgY 16F3JZu9gEZu4R6cDVAQJMgaMMY7xVSMAd/e5NXjaYhmv6W5L2DMyWg3knWfnGOUcuwk k9/w== X-Gm-Message-State: APjAAAU7z9HcKfmp3pveUoTk+goQ5m9MUAheKiZxkMGLdW1dTgeAdDB9 f4OuZdLXhry5TBi4RTxwHGO8OQ== X-Received: by 2002:a7b:c8ca:: with SMTP id f10mr3812956wml.36.1567596978030; Wed, 04 Sep 2019 04:36:18 -0700 (PDT) Received: from localhost.localdomain ([95.147.198.36]) by smtp.gmail.com with ESMTPSA id d9sm10823933wrc.39.2019.09.04.04.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 04:36:17 -0700 (PDT) From: Lee Jones To: alokc@codeaurora.org, agross@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, bjorn.andersson@linaro.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones Subject: [PATCH 2/2] dt-bindings: soc: qcom: Provide option to select FIFO mode Date: Wed, 4 Sep 2019 12:36:13 +0100 Message-Id: <20190904113613.14997-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190904113613.14997-1-lee.jones@linaro.org> References: <20190904113613.14997-1-lee.jones@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Used when DMA is not available or the best option. Signed-off-by: Lee Jones --- Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt index dab7ca9f250c..b0e71c07e604 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt @@ -40,6 +40,7 @@ Required properties: Optional property: - clock-frequency: Desired I2C bus clock frequency in Hz. When missing default to 100000Hz. +- qcom,geni-se-fifo: Selects FIFO processing - as opposed to DMA. Child nodes should conform to I2C bus binding as described in i2c.txt.