linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] MXS: Make clk_disable return integer
Date: Tue, 15 May 2012 10:23:32 +0200	[thread overview]
Message-ID: <1337070219-3630-2-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1337070219-3630-1-git-send-email-marex@denx.de>

This allows subsequent USB clock patch to interchange enable() and disable()
calls without adding unnecessary switching cruft.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chen Peter-B29397 <B29397@freescale.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Li Frank-B20596 <B20596@freescale.com>
Cc: Linux USB <linux-usb@vger.kernel.org>
Cc: Liu JunJie-B08287 <B08287@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Shi Make-B15407 <B15407@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Subodh Nijsure <snijsure@grid-net.com>
Cc: Wolfgang Denk <wd@denx.de>
---
 arch/arm/mach-mxs/clock-mx28.c         |    7 +++++--
 arch/arm/mach-mxs/include/mach/clock.h |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index cea29c9..43116ba 100644
--- a/arch/arm/mach-mxs/clock-mx28.c
+++ b/arch/arm/mach-mxs/clock-mx28.c
@@ -86,7 +86,7 @@ static int _raw_clk_enable(struct clk *clk)
 	return 0;
 }
 
-static void _raw_clk_disable(struct clk *clk)
+static int _raw_clk_disable(struct clk *clk)
 {
 	u32 reg;
 
@@ -95,6 +95,8 @@ static void _raw_clk_disable(struct clk *clk)
 		reg |= 1 << clk->enable_shift;
 		__raw_writel(reg, clk->enable_reg);
 	}
+
+	return 0;
 }
 
 /*
@@ -149,7 +151,7 @@ _CLK_ENABLE_PLL(pll1_clk, PLL1, EN_USB_CLKS)
 _CLK_ENABLE_PLL(pll2_clk, PLL2, CLKGATE)
 
 #define _CLK_DISABLE_PLL(name, r, g)					\
-static void name##_disable(struct clk *clk)				\
+static int name##_disable(struct clk *clk)				\
 {									\
 	__raw_writel(BM_CLKCTRL_##r##CTRL0_POWER,			\
 		     CLKCTRL_BASE_ADDR + HW_CLKCTRL_##r##CTRL0_CLR);	\
@@ -161,6 +163,7 @@ static void name##_disable(struct clk *clk)				\
 		__raw_writel(BM_CLKCTRL_##r##CTRL0_##g,			\
 			CLKCTRL_BASE_ADDR + HW_CLKCTRL_##r##CTRL0_CLR);	\
 									\
+	return 0;							\
 }
 
 _CLK_DISABLE_PLL(pll0_clk, PLL0, EN_USB_CLKS)
diff --git a/arch/arm/mach-mxs/include/mach/clock.h b/arch/arm/mach-mxs/include/mach/clock.h
index 592c9ab..21d1fad 100644
--- a/arch/arm/mach-mxs/include/mach/clock.h
+++ b/arch/arm/mach-mxs/include/mach/clock.h
@@ -50,7 +50,7 @@ struct clk {
 	int (*enable) (struct clk *);
 	/* Function ptr to disable the clock. Leave blank if clock can not
 	   be gated. */
-	void (*disable) (struct clk *);
+	int (*disable) (struct clk *);
 	/* Function ptr to set the parent clock of the clock. */
 	int (*set_parent) (struct clk *, struct clk *);
 };
-- 
1.7.10

  reply	other threads:[~2012-05-15  8:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15  8:23 [RFC PATCH 0/8 V8] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-05-15  8:23 ` Marek Vasut [this message]
2012-05-16  0:55   ` [PATCH 1/8] MXS: Make clk_disable return integer Richard Zhao
2012-05-16  1:01     ` Marek Vasut
2012-05-15  8:23 ` [PATCH 2/8] MXS: Add USB EHCI and USB PHY clock handling Marek Vasut
2012-05-16  0:56   ` Richard Zhao
2012-05-15  8:23 ` [PATCH 3/8] MXS: Fixup i.MX233 USB base address name Marek Vasut
2012-05-16  0:58   ` Richard Zhao
2012-05-16  1:02     ` Marek Vasut
2012-05-15  8:23 ` [PATCH 4/8] MXS: Add data shared between imx-otg and EHCI driver Marek Vasut
2012-05-16  1:00   ` Richard Zhao
2012-05-15  8:23 ` [PATCH 5/8] MXS: Add USB PHY driver Marek Vasut
2012-05-16  3:33   ` Richard Zhao
2012-05-16  4:30     ` Marek Vasut
2012-05-16  5:06       ` Richard Zhao
2012-05-16  7:18         ` Richard Zhao
2012-05-16 13:36           ` Marek Vasut
2012-05-16 13:35         ` Marek Vasut
2012-05-16 10:35   ` Peter Chen
2012-05-16 13:37     ` Marek Vasut
2012-05-15  8:23 ` [PATCH 6/8] CI13xxx: Add i.MX233/i.MX28 binding code Marek Vasut
2012-05-16  8:36   ` Felipe Balbi
2012-05-16 13:41     ` Marek Vasut
2012-05-18 11:34       ` Felipe Balbi
2012-05-15  8:23 ` [PATCH 7/8] MXS: Add platform registration hooks for USB EHCI Marek Vasut
2012-05-15  8:23 ` [PATCH 8/8] MXS: Enable USB on M28EVK Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2012-04-17 10:15 [RFC PATCH 0/8] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-04-17 10:15 ` [PATCH 1/8] MXS: Make clk_disable return integer Marek Vasut

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=1337070219-3630-2-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --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).