From: Juha Yrjola Date: Thu, 28 Sep 2006 15:20:59 +0000 (+0300) Subject: omapfb: Enable DISPC and DSS autoidling X-Git-Tag: v2.6.18-omap1~31 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6d2c05e644f5f57f257ee6a03475f5f7f7dd2e7b;p=linux-2.6-omap-h63xx.git omapfb: Enable DISPC and DSS autoidling Signed-off-by: Juha Yrjola --- 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);