aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-clps711x/p720t.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 /arch/arm/mach-clps711x/p720t.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 'arch/arm/mach-clps711x/p720t.c')
-rw-r--r--arch/arm/mach-clps711x/p720t.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index a58a0585e3e7..34c8ee9ebb5e 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -37,10 +37,27 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38#include <mach/syspld.h> 38#include <mach/syspld.h>
39 39
40#include <video/platform_lcd.h>
41
40#include "common.h" 42#include "common.h"
41 43
42#define GPIO_USERLED CLPS711X_GPIO(3, 0) 44#define GPIO_USERLED CLPS711X_GPIO(3, 0)
43 45
46static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power)
47{
48 if (power) {
49 PLD_LCDEN = PLD_LCDEN_EN;
50 PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON;
51 } else {
52 PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON);
53 PLD_LCDEN = 0;
54 }
55}
56
57static struct plat_lcd_data p720t_lcd_power_pdata = {
58 .set_power = p720t_lcd_power_set,
59};
60
44/* 61/*
45 * Map the P720T system PLD. It occupies two address spaces: 62 * Map the P720T system PLD. It occupies two address spaces:
46 * 0x10000000 and 0x10400000. We map both regions as one. 63 * 0x10000000 and 0x10400000. We map both regions as one.
@@ -121,6 +138,9 @@ static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = {
121 138
122static void __init p720t_init(void) 139static void __init p720t_init(void)
123{ 140{
141 platform_device_register_data(&platform_bus, "platform-lcd", 0,
142 &p720t_lcd_power_pdata,
143 sizeof(p720t_lcd_power_pdata));
124 platform_device_register_simple("video-clps711x", 0, NULL, 0); 144 platform_device_register_simple("video-clps711x", 0, NULL, 0);
125} 145}
126 146