aboutsummaryrefslogtreecommitdiff
path: root/hw/musicpal.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-16 19:04:14 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-16 19:04:14 +0000
commit3023f3329d87a6203d03a0e9ccb948772940da96 (patch)
tree2e1bea1fcce30aa15940275277f52022d7325341 /hw/musicpal.c
parent9f8df9c10f5112014cffef0bf546bf344eeefc32 (diff)
graphical_console_init change (Stefano Stabellini)
Patch 5/7 This patch changes the graphical_console_init function to return an allocated DisplayState instead of a QEMUConsole. This patch contains just the graphical_console_init change and few other modifications mainly in console.c and vl.c. It was necessary to move the display frontends (e.g. sdl and vnc) initialization after machine->init in vl.c. This patch does *not* include any required changes to any device, these changes come with the following patches. Patch 6/7 This patch changes the QEMUMachine init functions not to take a DisplayState as an argument because is not needed any more; In few places the graphic hardware initialization function was called only if DisplayState was not NULL, now they are always called. Apart from these cases, the rest are all mechanical substitutions. Patch 7/7 This patch updates the graphic device code to use the new graphical_console_init function. As for the previous patch, in few places graphical_console_init was called only if DisplayState was not NULL, now it is always called. Apart from these cases, the rest are all mechanical substitutions. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/musicpal.c')
-rw-r--r--hw/musicpal.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c
index fc4b470808..09eafb0ebd 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -752,7 +752,6 @@ typedef struct musicpal_lcd_state {
int page;
int page_off;
DisplayState *ds;
- QEMUConsole *console;
uint8_t video_ram[128*64/8];
} musicpal_lcd_state;
@@ -906,7 +905,7 @@ static CPUWriteMemoryFunc *musicpal_lcd_writefn[] = {
musicpal_lcd_write
};
-static void musicpal_lcd_init(DisplayState *ds, uint32_t base)
+static void musicpal_lcd_init(uint32_t base)
{
musicpal_lcd_state *s;
int iomemtype;
@@ -914,14 +913,13 @@ static void musicpal_lcd_init(DisplayState *ds, uint32_t base)
s = qemu_mallocz(sizeof(musicpal_lcd_state));
if (!s)
return;
- s->ds = ds;
iomemtype = cpu_register_io_memory(0, musicpal_lcd_readfn,
musicpal_lcd_writefn, s);
cpu_register_physical_memory(base, MP_LCD_SIZE, iomemtype);
- s->console = graphic_console_init(ds, lcd_refresh, lcd_invalidate,
- NULL, NULL, s);
- qemu_console_resize(s->console, 128*3, 64*3);
+ s->ds = graphic_console_init(lcd_refresh, lcd_invalidate,
+ NULL, NULL, s);
+ qemu_console_resize(s->ds, 128*3, 64*3);
}
/* PIC register offsets */
@@ -1404,7 +1402,7 @@ static struct arm_boot_info musicpal_binfo = {
};
static void musicpal_init(ram_addr_t ram_size, int vga_ram_size,
- const char *boot_device, DisplayState *ds,
+ const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
@@ -1470,7 +1468,7 @@ static void musicpal_init(ram_addr_t ram_size, int vga_ram_size,
}
mv88w8618_flashcfg_init(MP_FLASHCFG_BASE);
- musicpal_lcd_init(ds, MP_LCD_BASE);
+ musicpal_lcd_init(MP_LCD_BASE);
qemu_add_kbd_event_handler(musicpal_key_event, pic[MP_GPIO_IRQ]);