From 6d2c05e644f5f57f257ee6a03475f5f7f7dd2e7b Mon Sep 17 00:00:00 2001 From: Juha Yrjola Date: Thu, 28 Sep 2006 18:20:59 +0300 Subject: [PATCH] omapfb: Enable DISPC and DSS autoidling Signed-off-by: Juha Yrjola --- drivers/video/omap/dispc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index ecc785d362c..048b8e26099 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -35,6 +35,9 @@ #define MODULE_NAME "dispc" +#define DSS_BASE 0x48050000 +#define DSS_SYSCONFIG 0x0010 + #define DISPC_BASE 0x48050400 /* DISPC common */ @@ -1111,6 +1114,18 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, enable_digit_clocks(0); } + /* Enable smart idle and autoidle */ + l = dispc_read_reg(DISPC_CONTROL); + l &= ~((3 << 12) | (3 << 3)); + l |= (2 << 12) | (2 << 3) | (1 << 0); + dispc_write_reg(DISPC_SYSCONFIG, l); + omap_writel(1 << 0, DSS_BASE + DSS_SYSCONFIG); + + /* Set functional clock autogating */ + l = dispc_read_reg(DISPC_CONFIG); + l |= 1 << 9; + dispc_write_reg(DISPC_CONFIG, l); + l = dispc_read_reg(DISPC_IRQSTATUS); dispc_write_reg(l, DISPC_IRQSTATUS); -- 2.41.1