maru_board : moved the initialized position for brightness/overlay
authorjinhyung.jo <jinhyung.jo@samsung.com>
Mon, 22 Jul 2013 06:55:19 +0000 (15:55 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Mon, 22 Jul 2013 06:55:19 +0000 (15:55 +0900)
Moved the init code to maru_board.
Now, the brightness & overlay devices can be used both on the maru_vga and the VIGS.

Change-Id: I80a8d00906928c6796a045bcc5a3c3a882f82ad8
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
hw/i386/pc.c
tizen/src/hw/maru_board.c

index e84c38dbdf49630f49eae1623c832c79b0da1858..86f6d688a215edae8a68fa6c8ff54113397d68d3 100644 (file)
@@ -57,8 +57,6 @@
 #include "hw/boards.h"
 
 #ifdef CONFIG_MARU
-#include "../../tizen/src/hw/maru_overlay.h"
-#include "../../tizen/src/hw/maru_brightness.h"
 #include "../../tizen/src/maru_err_table.h"
 #endif
 /* debug PC/ISA interrupts */
@@ -1106,12 +1104,6 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
     if (pci_bus) {
         PCIDevice *pcidev = pci_vga_init(pci_bus);
         dev = pcidev ? &pcidev->qdev : NULL;
-#ifdef CONFIG_MARU
-        if (maru_vga_enabled) {
-            pci_maru_overlay_init(pci_bus);
-            pci_maru_brightness_init(pci_bus);
-        }
-#endif
     } else if (isa_bus) {
         ISADevice *isadev = isa_vga_init(isa_bus);
         dev = isadev ? &isadev->qdev : NULL;
index d5feb2f491a0282ff24db56d6240d12b4f58bedf..7728a703768ffc94b013463f52821477d58385a5 100644 (file)
 #include "maru_common.h"
 #include "guest_debug.h"
 #include "maru_pm.h"
+#include "maru_brightness.h"
+#include "maru_overlay.h"
 #if defined(__linux__)
 #include <X11/Xlib.h>
 #endif
 #include "vigs_device.h"
-#include "../tizen/src/hw/maru_brightness.h"
 extern int enable_yagl;
 extern const char *yagl_backend;
 extern int enable_vigs;
@@ -286,13 +287,14 @@ static void maru_x86_machine_init(MemoryRegion *system_memory,
         pvpanic_init(isa_bus);
     }
 
-    // maru specialized device init...
+    /* maru specialized device init */
     if (pci_enabled) {
-        codec_init(pci_bus);        
+        codec_init(pci_bus);
+        pci_maru_overlay_init(pci_bus);
+        pci_maru_brightness_init(pci_bus);
     }
 
     if (enable_vigs) {
-        pci_maru_brightness_init(pci_bus);
         PCIDevice *pci_dev = pci_create(pci_bus, -1, "vigs");
         qdev_prop_set_ptr(&pci_dev->qdev, "display", display);
         qdev_init_nofail(&pci_dev->qdev);