pl050.c (0a3c1e1bf883afa5cd9df102742f087030b49c80) | pl050.c (3d5e0995cef7722144e89f4623b7a513f92af068) |
---|---|
1/* 2 * Arm PrimeCell PL050 Keyboard / Mouse Interface 3 * 4 * Copyright (c) 2006-2007 CodeSourcery. 5 * Written by Paul Brook 6 * 7 * This code is licensed under the GPL. 8 */ --- 138 unchanged lines hidden (view full) --- 147 .read = pl050_read, 148 .write = pl050_write, 149 .endianness = DEVICE_NATIVE_ENDIAN, 150}; 151 152static void pl050_realize(DeviceState *dev, Error **errp) 153{ 154 PL050State *s = PL050(dev); | 1/* 2 * Arm PrimeCell PL050 Keyboard / Mouse Interface 3 * 4 * Copyright (c) 2006-2007 CodeSourcery. 5 * Written by Paul Brook 6 * 7 * This code is licensed under the GPL. 8 */ --- 138 unchanged lines hidden (view full) --- 147 .read = pl050_read, 148 .write = pl050_write, 149 .endianness = DEVICE_NATIVE_ENDIAN, 150}; 151 152static void pl050_realize(DeviceState *dev, Error **errp) 153{ 154 PL050State *s = PL050(dev); |
155 SysBusDevice *sbd = SYS_BUS_DEVICE(dev); | |
156 | 155 |
157 memory_region_init_io(&s->iomem, OBJECT(s), &pl050_ops, s, "pl050", 0x1000); 158 sysbus_init_mmio(sbd, &s->iomem); 159 sysbus_init_irq(sbd, &s->irq); | |
160 if (s->is_mouse) { 161 s->ps2dev = ps2_mouse_init(); 162 } else { 163 s->ps2dev = ps2_kbd_init(); 164 } 165 166 qdev_connect_gpio_out(DEVICE(s->ps2dev), PS2_DEVICE_IRQ, 167 qdev_get_gpio_in_named(dev, "ps2-input-irq", 0)); --- 24 unchanged lines hidden (view full) --- 192 .name = TYPE_PL050_MOUSE_DEVICE, 193 .parent = TYPE_PL050, 194 .instance_init = pl050_mouse_init, 195 .instance_size = sizeof(PL050MouseState), 196}; 197 198static void pl050_init(Object *obj) 199{ | 156 if (s->is_mouse) { 157 s->ps2dev = ps2_mouse_init(); 158 } else { 159 s->ps2dev = ps2_kbd_init(); 160 } 161 162 qdev_connect_gpio_out(DEVICE(s->ps2dev), PS2_DEVICE_IRQ, 163 qdev_get_gpio_in_named(dev, "ps2-input-irq", 0)); --- 24 unchanged lines hidden (view full) --- 188 .name = TYPE_PL050_MOUSE_DEVICE, 189 .parent = TYPE_PL050, 190 .instance_init = pl050_mouse_init, 191 .instance_size = sizeof(PL050MouseState), 192}; 193 194static void pl050_init(Object *obj) 195{ |
196 PL050State *s = PL050(obj); 197 SysBusDevice *sbd = SYS_BUS_DEVICE(obj); 198 199 memory_region_init_io(&s->iomem, obj, &pl050_ops, s, "pl050", 0x1000); 200 sysbus_init_mmio(sbd, &s->iomem); 201 sysbus_init_irq(sbd, &s->irq); 202 |
|
200 qdev_init_gpio_in_named(DEVICE(obj), pl050_set_irq, "ps2-input-irq", 1); 201} 202 203static void pl050_class_init(ObjectClass *oc, void *data) 204{ 205 DeviceClass *dc = DEVICE_CLASS(oc); 206 207 dc->realize = pl050_realize; --- 20 unchanged lines hidden --- | 203 qdev_init_gpio_in_named(DEVICE(obj), pl050_set_irq, "ps2-input-irq", 1); 204} 205 206static void pl050_class_init(ObjectClass *oc, void *data) 207{ 208 DeviceClass *dc = DEVICE_CLASS(oc); 209 210 dc->realize = pl050_realize; --- 20 unchanged lines hidden --- |