~dannf/qemu-linaro/qemu-highbank-ppa

« back to all changes in this revision

Viewing changes to hw/debugcon.c

  • Committer: Steve Langasek
  • Date: 2012-03-15 21:13:19 UTC
  • mfrom: (0.1.15)
  • Revision ID: steve.langasek@canonical.com-20120315211319-f1j3ot1ihx30b2s9
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
    return 0;
88
88
}
89
89
 
 
90
static Property debugcon_isa_properties[] = {
 
91
    DEFINE_PROP_HEX32("iobase", ISADebugconState, iobase, 0xe9),
 
92
    DEFINE_PROP_CHR("chardev",  ISADebugconState, state.chr),
 
93
    DEFINE_PROP_HEX32("readback", ISADebugconState, state.readback, 0xe9),
 
94
    DEFINE_PROP_END_OF_LIST(),
 
95
};
 
96
 
90
97
static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)
91
98
{
 
99
    DeviceClass *dc = DEVICE_CLASS(klass);
92
100
    ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
93
101
    ic->init = debugcon_isa_initfn;
 
102
    dc->props = debugcon_isa_properties;
94
103
}
95
104
 
96
 
static DeviceInfo debugcon_isa_info = {
97
 
    .name  = "isa-debugcon",
98
 
    .size  = sizeof(ISADebugconState),
99
 
    .class_init = debugcon_isa_class_initfn,
100
 
    .props = (Property[]) {
101
 
        DEFINE_PROP_HEX32("iobase", ISADebugconState, iobase, 0xe9),
102
 
        DEFINE_PROP_CHR("chardev",  ISADebugconState, state.chr),
103
 
        DEFINE_PROP_HEX32("readback", ISADebugconState, state.readback, 0xe9),
104
 
        DEFINE_PROP_END_OF_LIST(),
105
 
    },
 
105
static TypeInfo debugcon_isa_info = {
 
106
    .name          = "isa-debugcon",
 
107
    .parent        = TYPE_ISA_DEVICE,
 
108
    .instance_size = sizeof(ISADebugconState),
 
109
    .class_init    = debugcon_isa_class_initfn,
106
110
};
107
111
 
108
 
static void debugcon_register_devices(void)
 
112
static void debugcon_register_types(void)
109
113
{
110
 
    isa_qdev_register(&debugcon_isa_info);
 
114
    type_register_static(&debugcon_isa_info);
111
115
}
112
116
 
113
 
device_init(debugcon_register_devices)
 
117
type_init(debugcon_register_types)