diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-04-16 12:41:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-06-20 08:49:57 +0200 |
commit | dd72e0c1b47b72a8619116ec4028c85779484a2d (patch) | |
tree | 5900097ccc3e45d31f8d4a11e4f0d3b607118b9e /drivers/video | |
parent | b0011214007e801c3bcf67e83a49b6862ef03d71 (diff) | |
download | barebox-dd72e0c1b47b72a8619116ec4028c85779484a2d.tar.gz barebox-dd72e0c1b47b72a8619116ec4028c85779484a2d.tar.xz |
video: stm: switch to clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/stm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/stm.c b/drivers/video/stm.c index 606e39a253..d5212f8a12 100644 --- a/drivers/video/stm.c +++ b/drivers/video/stm.c @@ -24,8 +24,9 @@ #include <errno.h> #include <xfuncs.h> #include <io.h> +#include <linux/clk.h> +#include <linux/err.h> #include <mach/imx-regs.h> -#include <mach/clock.h> #include <mach/fb.h> #define HW_LCDIF_CTRL 0x00 @@ -144,6 +145,7 @@ struct imxfb_info { struct fb_info info; struct device_d *hw_dev; struct imx_fb_platformdata *pdata; + struct clk *clk; }; /* the RGB565 true colour mode */ @@ -327,7 +329,7 @@ static int stmfb_activate_var(struct fb_info *fb_info) /** @todo ensure HCLK is active at this point of time! */ - size = imx_set_lcdifclk(PICOS2KHZ(mode->pixclock) * 1000); + size = clk_set_rate(fbi->clk, PICOS2KHZ(mode->pixclock) * 1000); if (size == 0) { dev_dbg(fbi->hw_dev, "Unable to set a valid pixel clock\n"); return -EINVAL; @@ -490,6 +492,9 @@ static int stmfb_probe(struct device_d *hw_dev) fbi.hw_dev = hw_dev; fbi.base = dev_request_mem_region(hw_dev, 0); fbi.pdata = pdata; + fbi.clk = clk_get(hw_dev, NULL); + if (IS_ERR(fbi.clk)) + return PTR_ERR(fbi.clk); /* add runtime video info */ fbi.info.mode_list = pdata->mode_list; |