phonepad:update lcdc modify from sdk
authorlw <lw@rock-chips.com>
Tue, 4 Sep 2012 03:55:44 +0000 (11:55 +0800)
committerlw <lw@rock-chips.com>
Tue, 4 Sep 2012 03:55:44 +0000 (11:55 +0800)
arch/arm/mach-rk30/board-rk30-phonepad.c

index d86c6475bda76d6a9014652599318669320357a5..873dd80419234ff796d54f4d248e9487dec7ff31 100755 (executable)
@@ -1280,6 +1280,61 @@ static struct platform_device device_fb = {
 };
 #endif
 
+#if defined(CONFIG_LCDC0_RK30)
+static struct resource resource_lcdc0[] = {
+       [0] = {
+               .name  = "lcdc0 reg",
+               .start = RK30_LCDC0_PHYS,
+               .end   = RK30_LCDC0_PHYS + RK30_LCDC0_SIZE - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       
+       [1] = {
+               .name  = "lcdc0 irq",
+               .start = IRQ_LCDC0,
+               .end   = IRQ_LCDC0,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device device_lcdc0 = {
+       .name             = "rk30-lcdc",
+       .id               = 0,
+       .num_resources    = ARRAY_SIZE(resource_lcdc0),
+       .resource         = resource_lcdc0,
+       .dev            = {
+               .platform_data = &lcdc0_screen_info,
+       },
+};
+#endif
+#if defined(CONFIG_LCDC1_RK30) 
+extern struct rk29fb_info lcdc1_screen_info;
+static struct resource resource_lcdc1[] = {
+       [0] = {
+               .name  = "lcdc1 reg",
+               .start = RK30_LCDC1_PHYS,
+               .end   = RK30_LCDC1_PHYS + RK30_LCDC1_SIZE - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .name  = "lcdc1 irq",
+               .start = IRQ_LCDC1,
+               .end   = IRQ_LCDC1,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device device_lcdc1 = {
+       .name             = "rk30-lcdc",
+       .id               = 1,
+       .num_resources    = ARRAY_SIZE(resource_lcdc1),
+       .resource         = resource_lcdc1,
+       .dev            = {
+               .platform_data = &lcdc1_screen_info,
+       },
+};
+#endif
+
 #ifdef CONFIG_ANDROID_TIMED_GPIO
 static struct timed_gpio timed_gpios[] = {
        {
@@ -1711,12 +1766,20 @@ static struct platform_device device_rfkill_rk = {
 #endif
 
 static struct platform_device *devices[] __initdata = {
-#ifdef CONFIG_BACKLIGHT_RK29_BL
-       &rk29_device_backlight,
-#endif
 #ifdef CONFIG_FB_ROCKCHIP
        &device_fb,
 #endif
+#if defined(CONFIG_LCDC0_RK30)
+       &device_lcdc0,
+#endif
+#if defined(CONFIG_LCDC1_RK30)
+       &device_lcdc1,
+#endif
+
+#ifdef CONFIG_BACKLIGHT_RK29_BL
+       &rk29_device_backlight,
+#endif
+
 #ifdef CONFIG_ION
        &device_ion,
 #endif
@@ -2221,10 +2284,12 @@ static void __init rk30_reserve(void)
 #ifdef CONFIG_FB_ROCKCHIP
        resource_fb[0].start = board_mem_reserve_add("fb0", RK30_FB0_MEM_SIZE);
        resource_fb[0].end = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
+       #if 0
        resource_fb[1].start = board_mem_reserve_add("ipp buf", RK30_FB0_MEM_SIZE);
        resource_fb[1].end = resource_fb[1].start + RK30_FB0_MEM_SIZE - 1;
        resource_fb[2].start = board_mem_reserve_add("fb2", RK30_FB0_MEM_SIZE);
        resource_fb[2].end = resource_fb[2].start + RK30_FB0_MEM_SIZE - 1;
+       #endif
 #endif
 #ifdef CONFIG_VIDEO_RK29
        rk30_camera_request_reserve_mem();