From: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>,
Mike Turquette <mturquette@linaro.org>
Cc: linux-kernel@vger.kernel.org, Manuel Lauss <manuel.lauss@gmail.com>
Subject: [RFC PATCH v2 09/11] MIPS: Alchemy: au1200fb: use clk framework
Date: Thu, 3 Jul 2014 15:22:40 +0200 [thread overview]
Message-ID: <1404393762-858019-10-git-send-email-manuel.lauss@gmail.com> (raw)
In-Reply-To: <1404393762-858019-1-git-send-email-manuel.lauss@gmail.com>
minimal patch to replace direct clock register hackery with clock
framework calls.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
---
v2: initial version, new
drivers/video/fbdev/au1200fb.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c
index 230cfa8..3c8cf71 100644
--- a/drivers/video/fbdev/au1200fb.c
+++ b/drivers/video/fbdev/au1200fb.c
@@ -30,6 +30,7 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <linux/clk.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
@@ -829,11 +830,19 @@ static void au1200_setpanel(struct panel_settings *newpanel,
*/
if (!(panel->mode_clkcontrol & LCD_CLKCONTROL_EXT))
{
- uint32 sys_clksrc;
- AU1X_WRSYS(panel->mode_auxpll, AU1000_SYS_AUXPLL);
- sys_clksrc = AU1X_RDSYS(AU1000_SYS_CLKSRC) & ~0x0000001f;
- sys_clksrc |= panel->mode_toyclksrc;
- AU1X_WRSYS(sys_clksrc, AU1000_SYS_CLKSRC);
+ struct clk *a, *c = clk_get(NULL, "lcd_intclk");
+
+ if (!IS_ERR(c)) {
+ if ((panel->mode_toyclksrc & 7) == 4) {
+ a = clk_get(NULL, ALCHEMY_AUXPLL_CLK);
+ if (!IS_ERR(a)) {
+ clk_set_parent(c, a);
+ clk_put(a);
+ }
+ }
+ clk_prepare_enable(c);
+ clk_put(c);
+ }
}
/*
--
2.0.0
next prev parent reply other threads:[~2014-07-03 13:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 13:22 [RFC PATCH v2 00/11] MIPS: Alchemy: clock framework support Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 01/11] MIPS: Alchemy: au1000 header file cleanup Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 02/11] MIPS: Alchemy: clock framework integration of onchip clocks Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 03/11] MIPS: Alchemy: platform: use clk framework for uarts Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 04/11] MIPS: Alchemy: usb: use clk framework Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 05/11] MIPS: Alchemy: pci: use clk framework to enable PCI clock Manuel Lauss
2014-07-03 13:50 ` Sergei Shtylyov
2014-07-03 17:19 ` Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 06/11] MIPS: Alchemy: db1200: use clk framework Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 07/11] MIPS: Alchemy: irda: " Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 08/11] MIPS: Alchemy: au1100fb: " Manuel Lauss
2014-07-03 13:22 ` Manuel Lauss [this message]
2014-07-03 13:22 ` [RFC PATCH v2 10/11] MIPS: Alchemy: au1xmmc: " Manuel Lauss
2014-07-03 13:22 ` [RFC PATCH v2 11/11] MIPS: Alchemy: remove old clock support Manuel Lauss
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=1404393762-858019-10-git-send-email-manuel.lauss@gmail.com \
--to=manuel.lauss@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mturquette@linaro.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
all inboxes | Powered by JetHome®