linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: alokc@codeaurora.org
To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-spi@vger.kernel.org, linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Mark Brown <broonie@kernel.org>
Cc: andy.gross@linaro.org, david.brown@linaro.org,
	georgi.djakov@linaro.org, dianders@chromium.org,
	swboyd@chromium.org, bjorn.andersson@linaro.org,
	linux-serial-owner@vger.kernel.org
Subject: Re: [PATCH 5/6] tty: serial: qcom_geni_serial: Add interconnect support
Date: Wed, 23 Jan 2019 12:23:30 +0530	[thread overview]
Message-ID: <ac8c76ee1940d61278c0dd390982228b@codeaurora.org> (raw)
In-Reply-To: <1548138816-1149-6-git-send-email-alokc@codeaurora.org>

+Mark Brown

On 2019-01-22 12:03, Alok Chauhan wrote:
> Get the interconnect paths for Uart based Serial Engine device
> and vote accordingly based on maximum supported Uart frequency.
> 
> Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
> ---
>  drivers/tty/serial/qcom_geni_serial.c | 27 ++++++++++++++++++++++++++-
>  1 file changed, 26 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c
> b/drivers/tty/serial/qcom_geni_serial.c
> index a72d6d9..e2ea499 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -19,6 +19,7 @@
>  #include <linux/slab.h>
>  #include <linux/tty.h>
>  #include <linux/tty_flip.h>
> +#include <linux/interconnect.h>
> 
>  /* UART specific GENI registers */
>  #define SE_UART_LOOPBACK_CFG		0x22c
> @@ -1348,6 +1349,22 @@ static int qcom_geni_serial_probe(struct
> platform_device *pdev)
>  		return ret;
>  	}
> 
> +	/* Set the bus quota to a reasonable value */
> +	port->se.avg_bw = console ? Bps_to_icc(1000) : Bps_to_icc(2500);
> +	port->se.peak_bw = Bps_to_icc(76800000);
> +	ret = geni_interconnect_init(&port->se);
> +	if (ret) {
> +		dev_err(&pdev->dev, "interconnect_init failed %d\n", ret);
> +		return ret;
> +	}
> +
> +	/*
> +	 * Vote for interconnect path early. This has to move as part of
> +	 * Runtime PM APIs when implemented for better control betwen
> +	 * console and non-console usecases
> +	 */
> +	geni_icc_update_bw(&port->se, true);
> +
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res)
>  		return -EINVAL;
> @@ -1385,8 +1402,15 @@ static int __maybe_unused
> qcom_geni_serial_sys_suspend(struct device *dev)
>  {
>  	struct qcom_geni_serial_port *port = dev_get_drvdata(dev);
>  	struct uart_port *uport = &port->uport;
> +	int ret;
> +
> +	ret = uart_suspend_port(uport->private_data, uport);
> +	if (ret)
> +		return ret;
> +
> +	geni_icc_update_bw(&port->se, false);
> 
> -	return uart_suspend_port(uport->private_data, uport);
> +	return 0;
>  }
> 
>  static int __maybe_unused qcom_geni_serial_sys_resume(struct device 
> *dev)
> @@ -1394,6 +1418,7 @@ static int __maybe_unused
> qcom_geni_serial_sys_resume(struct device *dev)
>  	struct qcom_geni_serial_port *port = dev_get_drvdata(dev);
>  	struct uart_port *uport = &port->uport;
> 
> +	geni_icc_update_bw(&port->se, true);
>  	return uart_resume_port(uport->private_data, uport);
>  }

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
Forum,a Linux Foundation Collaborative Project

  reply	other threads:[~2019-01-23  6:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22  6:33 [PATCH 0/6] Add interconnect support for GENI QUPs Alok Chauhan
2019-01-22  6:33 ` [PATCH 1/6] dt-bindings: soc: qcom: Add interconnect binding for GENI QUP Alok Chauhan
2019-01-23  6:48   ` alokc
2019-01-23 17:07   ` Bjorn Andersson
2019-01-23 18:41     ` Georgi Djakov
2019-02-23  0:26       ` Rob Herring
2019-02-25 17:39         ` Georgi Djakov
2019-01-23 18:35   ` Georgi Djakov
2019-01-30 22:29     ` alokc
2019-01-24  1:10   ` Evan Green
2019-01-30 22:27     ` alokc
2019-01-22  6:33 ` [PATCH 2/6] soc: qcom: Add wrapper to support for Interconnect path Alok Chauhan
2019-01-23  7:02   ` alokc
2019-01-23 18:14   ` Bjorn Andersson
2019-01-22  6:33 ` [PATCH 3/6] i2c: i2c-qcom-geni: Add interconnect support Alok Chauhan
2019-01-22  9:07   ` Wolfram Sang
2019-01-22  9:13   ` Peter Rosin
2019-01-23  6:51     ` alokc
2019-01-24  1:19   ` Evan Green
2019-01-22  6:33 ` [PATCH 4/6] spi: spi-geni-qcom: " Alok Chauhan
2019-01-22 20:29   ` Mark Brown
2019-01-23  7:15     ` alokc
2019-01-23 10:58       ` Mark Brown
2019-01-23 16:04   ` Mark Brown
2019-01-24  1:20   ` Evan Green
2019-01-22  6:33 ` [PATCH 5/6] tty: serial: qcom_geni_serial: " Alok Chauhan
2019-01-23  6:53   ` alokc [this message]
2019-01-22  6:33 ` [PATCH 6/6] arm64: dts: sdm845: Add interconnect for GENI QUP Alok Chauhan
2019-01-23  6:54   ` alokc
2019-01-23  6:45 ` [PATCH 0/6] Add interconnect support for GENI QUPs alokc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac8c76ee1940d61278c0dd390982228b@codeaurora.org \
    --to=alokc@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=georgi.djakov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial-owner@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).