public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabien Parent <fparent@baylibre.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/7] clk: mediatek: add support for SETCLR_INV and NO_SETCLR flags
Date: Sun, 24 Mar 2019 16:46:35 +0100	[thread overview]
Message-ID: <20190324154638.29800-5-fparent@baylibre.com> (raw)
In-Reply-To: <20190324154638.29800-1-fparent@baylibre.com>

Add the implementation for the CLK_GATE_SETCLR_INV and
CLK_GATE_NO_SETCLR flags.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Acked-by: Ryder Lee <ryder.lee@mediatek.com>
---

v3:
	* No changes

---
 drivers/clk/mediatek/clk-mtk.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 870b14ed8b..6c6b500d9b 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -390,6 +390,12 @@ static int mtk_clk_gate_enable(struct clk *clk)
 	case CLK_GATE_SETCLR:
 		writel(bit, priv->base + gate->regs->clr_ofs);
 		break;
+	case CLK_GATE_SETCLR_INV:
+		writel(bit, priv->base + gate->regs->set_ofs);
+		break;
+	case CLK_GATE_NO_SETCLR:
+		clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, 0);
+		break;
 	case CLK_GATE_NO_SETCLR_INV:
 		clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, bit);
 		break;
@@ -411,6 +417,12 @@ static int mtk_clk_gate_disable(struct clk *clk)
 	case CLK_GATE_SETCLR:
 		writel(bit, priv->base + gate->regs->set_ofs);
 		break;
+	case CLK_GATE_SETCLR_INV:
+		writel(bit, priv->base + gate->regs->clr_ofs);
+		break;
+	case CLK_GATE_NO_SETCLR:
+		clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, bit);
+		break;
 	case CLK_GATE_NO_SETCLR_INV:
 		clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, 0);
 		break;
-- 
2.20.1

  parent reply	other threads:[~2019-03-24 15:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 15:46 [U-Boot] [PATCH v3 0/7] Add support for MT8516 SoC Fabien Parent
2019-03-24 15:46 ` [U-Boot] [PATCH v3 1/7] mmc: mtk-sd: add source_cg clock support Fabien Parent
2019-04-24 13:29   ` [U-Boot] [U-Boot, v3, " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 2/7] mmc: mtk-sd: add support for MT8516 Fabien Parent
2019-04-24 13:30   ` [U-Boot] [U-Boot,v3,2/7] " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 3/7] mmc: mtk-sd: fix configuration option check Fabien Parent
2019-04-24 13:30   ` [U-Boot] [U-Boot, v3, " Tom Rini
2019-03-24 15:46 ` Fabien Parent [this message]
2019-04-24 13:30   ` [U-Boot] [U-Boot, v3, 4/7] clk: mediatek: add support for SETCLR_INV and NO_SETCLR flags Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 5/7] clk: mediatek: add driver for MT8516 Fabien Parent
2019-04-24 13:30   ` [U-Boot] [U-Boot,v3,5/7] " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 6/7] pinctrl: " Fabien Parent
2019-04-24 13:30   ` [U-Boot] [U-Boot,v3,6/7] " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 7/7] ARM: MediaTek: Add support for MT8516 SoC Fabien Parent
2019-04-24 13:30   ` [U-Boot] [U-Boot, v3, " Tom Rini

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=20190324154638.29800-5-fparent@baylibre.com \
    --to=fparent@baylibre.com \
    --cc=u-boot@lists.denx.de \
    /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