linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bhuvanchandra.dv@toradex.com (Bhuvanchandra DV)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/9] clk: imx: vf610: Disable automatic clock gating for lpuart in LPSTOP mode
Date: Tue, 28 Jun 2016 11:02:28 +0530	[thread overview]
Message-ID: <20160628053235.5114-3-bhuvanchandra.dv@toradex.com> (raw)
In-Reply-To: <20160628053235.5114-1-bhuvanchandra.dv@toradex.com>

From: Stefan Agner <stefan@agner.ch>

In order to allow wake support in STOP sleep mode, clocks are needed. Use
imx_clk_gate2_cgr to disable automatic clock gating in low power mode STOP.
This allows to enable wake by UART using:
echo enabled > /sys/class/tty/ttyLP0/power/wakeup

However, if wake is not enabled, the driver should disable the clocks explicitly
to save power.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 drivers/clk/imx/clk-vf610.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
index 3a1f244..0476353 100644
--- a/drivers/clk/imx/clk-vf610.c
+++ b/drivers/clk/imx/clk-vf610.c
@@ -315,12 +315,12 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 
 	clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(7));
 
-	clk[VF610_CLK_UART0] = imx_clk_gate2("uart0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(7));
-	clk[VF610_CLK_UART1] = imx_clk_gate2("uart1", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(8));
-	clk[VF610_CLK_UART2] = imx_clk_gate2("uart2", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(9));
-	clk[VF610_CLK_UART3] = imx_clk_gate2("uart3", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(10));
-	clk[VF610_CLK_UART4] = imx_clk_gate2("uart4", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(9));
-	clk[VF610_CLK_UART5] = imx_clk_gate2("uart5", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(10));
+	clk[VF610_CLK_UART0] = imx_clk_gate2_cgr("uart0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(7), 0x2);
+	clk[VF610_CLK_UART1] = imx_clk_gate2_cgr("uart1", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(8), 0x2);
+	clk[VF610_CLK_UART2] = imx_clk_gate2_cgr("uart2", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(9), 0x2);
+	clk[VF610_CLK_UART3] = imx_clk_gate2_cgr("uart3", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(10), 0x2);
+	clk[VF610_CLK_UART4] = imx_clk_gate2_cgr("uart4", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(9), 0x2);
+	clk[VF610_CLK_UART5] = imx_clk_gate2_cgr("uart5", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(10), 0x2);
 
 	clk[VF610_CLK_I2C0] = imx_clk_gate2("i2c0", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(6));
 	clk[VF610_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(7));
-- 
2.9.0

  parent reply	other threads:[~2016-06-28  5:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  5:32 [PATCH v2 0/9] Improve Rx/Tx DMA implementation Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 1/9] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty Bhuvanchandra DV
2016-06-28  5:32 ` Bhuvanchandra DV [this message]
2016-07-08 18:40   ` [PATCH v2 2/9] clk: imx: vf610: Disable automatic clock gating for lpuart in LPSTOP mode Michael Turquette
2016-06-28  5:32 ` [PATCH v2 3/9] tty: serial: fsl_lpuart: support suspend/resume Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 4/9] tty: serial: fsl_lpuart: fix clearing of receive flag Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 5/9] tty: serial: fsl_lpuart: Fix broken 8m/s1 support Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 6/9] tty: serial: fsl-lpuart: Use cyclic DMA for Rx Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 7/9] tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 8/9] tty: serial: fsl-lpuart: Update suspend/resume for DMA mode Bhuvanchandra DV
2016-06-28  5:32 ` [PATCH v2 9/9] tty: serial: fsl_lpuart: Add support for RS-485 Bhuvanchandra DV
2016-07-04  6:24 ` [PATCH v2 0/9] Improve Rx/Tx DMA implementation Bhuvanchandra DV

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=20160628053235.5114-3-bhuvanchandra.dv@toradex.com \
    --to=bhuvanchandra.dv@toradex.com \
    --cc=linux-arm-kernel@lists.infradead.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).