aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/clps711xfb.c
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-11-17 08:57:18 -0500
committerOlof Johansson <olof@lixom.net>2012-11-21 12:57:44 -0500
commit87c37b51ade7d1296ab99ed8f237637bed7779c7 (patch)
tree615582ab943b3f0c2e587668d09e7d38d6e0289c /drivers/video/clps711xfb.c
parent90383e0ac2ae3df283f2b56997040f71f6d1df08 (diff)
ARM: clps711x: Moving power management of framebuffer driver to the board
This patch moves the power management for clps711x-framebuffer driver to the board code. To control we use "platform-lcd" driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/video/clps711xfb.c')
-rw-r--r--drivers/video/clps711xfb.c44
1 files changed, 6 insertions, 38 deletions
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
index 2ccbb9b2a255..1902551f6e45 100644
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -167,35 +167,16 @@ static int clps7111fb_blank(int blank, struct fb_info *info)
167 /* Turn off the LCD backlight. */ 167 /* Turn off the LCD backlight. */
168 clps_writeb(clps_readb(PDDR) & ~EDB_PD3_LCDBL, PDDR); 168 clps_writeb(clps_readb(PDDR) & ~EDB_PD3_LCDBL, PDDR);
169 169
170 /* Power off the LCD DC-DC converter. */ 170 /* Disable LCD controller. */
171 clps_writeb(clps_readb(PDDR) & ~EDB_PD1_LCD_DC_DC_EN, PDDR);
172
173 /* Delay for a little while (half a second). */
174 udelay(100);
175
176 /* Power off the LCD panel. */
177 clps_writeb(clps_readb(PDDR) & ~EDB_PD2_LCDEN, PDDR);
178
179 /* Power off the LCD controller. */
180 clps_writel(clps_readl(SYSCON1) & ~SYSCON1_LCDEN, 171 clps_writel(clps_readl(SYSCON1) & ~SYSCON1_LCDEN,
181 SYSCON1); 172 SYSCON1);
182 } 173 }
183 } else { 174 } else {
184 if (machine_is_edb7211()) { 175 if (machine_is_edb7211()) {
185 /* Power up the LCD controller. */ 176 /* Enable LCD controller. */
186 clps_writel(clps_readl(SYSCON1) | SYSCON1_LCDEN, 177 clps_writel(clps_readl(SYSCON1) | SYSCON1_LCDEN,
187 SYSCON1); 178 SYSCON1);
188 179
189 /* Power up the LCD panel. */
190 clps_writeb(clps_readb(PDDR) | EDB_PD2_LCDEN, PDDR);
191
192 /* Delay for a little while. */
193 udelay(100);
194
195 /* Power up the LCD DC-DC converter. */
196 clps_writeb(clps_readb(PDDR) | EDB_PD1_LCD_DC_DC_EN,
197 PDDR);
198
199 /* Turn on the LCD backlight. */ 180 /* Turn on the LCD backlight. */
200 clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR); 181 clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR);
201 } 182 }
@@ -386,21 +367,10 @@ static int __devinit clps711x_fb_probe(struct platform_device *pdev)
386 /* 367 /*
387 * Power up the LCD 368 * Power up the LCD
388 */ 369 */
389 if (machine_is_p720t()) { 370 if (machine_is_p720t())
390 PLD_LCDEN = PLD_LCDEN_EN; 371 PLD_PWR |= PLD_S3_ON;
391 PLD_PWR |= (PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON);
392 }
393 372
394 if (machine_is_edb7211()) { 373 if (machine_is_edb7211()) {
395 /* Power up the LCD panel. */
396 clps_writeb(clps_readb(PDDR) | EDB_PD2_LCDEN, PDDR);
397
398 /* Delay for a little while. */
399 udelay(100);
400
401 /* Power up the LCD DC-DC converter. */
402 clps_writeb(clps_readb(PDDR) | EDB_PD1_LCD_DC_DC_EN, PDDR);
403
404 /* Turn on the LCD backlight. */ 374 /* Turn on the LCD backlight. */
405 clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR); 375 clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR);
406 } 376 }
@@ -418,10 +388,8 @@ static int __devexit clps711x_fb_remove(struct platform_device *pdev)
418 /* 388 /*
419 * Power down the LCD 389 * Power down the LCD
420 */ 390 */
421 if (machine_is_p720t()) { 391 if (machine_is_p720t())
422 PLD_LCDEN = 0; 392 PLD_PWR &= ~PLD_S3_ON;
423 PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON);
424 }
425 393
426 return 0; 394 return 0;
427} 395}