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

« back to all changes in this revision

Viewing changes to hw/arm11mpcore.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:
202
202
}
203
203
 
204
204
static Property mpcore_rirq_properties[] = {
 
205
    DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1),
 
206
    DEFINE_PROP_END_OF_LIST(),
 
207
};
 
208
 
 
209
static void mpcore_rirq_class_init(ObjectClass *klass, void *data)
 
210
{
 
211
    DeviceClass *dc = DEVICE_CLASS(klass);
 
212
    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
213
 
 
214
    k->init = realview_mpcore_init;
 
215
    dc->props = mpcore_rirq_properties;
 
216
}
 
217
 
 
218
static TypeInfo mpcore_rirq_info = {
 
219
    .name          = "realview_mpcore",
 
220
    .parent        = TYPE_SYS_BUS_DEVICE,
 
221
    .instance_size = sizeof(mpcore_rirq_state),
 
222
    .class_init    = mpcore_rirq_class_init,
 
223
};
 
224
 
 
225
static Property mpcore_priv_properties[] = {
205
226
    DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1),
206
227
    /* The ARM11 MPCORE TRM says the on-chip controller may have
207
228
     * anything from 0 to 224 external interrupt IRQ lines (with another
215
236
    DEFINE_PROP_END_OF_LIST(),
216
237
};
217
238
 
218
 
static void mpcore_rirq_class_init(ObjectClass *klass, void *data)
219
 
{
220
 
    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
221
 
 
222
 
    k->init = realview_mpcore_init;
223
 
}
224
 
 
225
 
static DeviceInfo mpcore_rirq_info = {
226
 
    .name = "realview_mpcore",
227
 
    .size = sizeof(mpcore_rirq_state),
228
 
    .props = mpcore_rirq_properties,
229
 
    .class_init = mpcore_rirq_class_init,
230
 
};
231
 
 
232
 
static Property mpcore_priv_properties[] = {
233
 
    DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1),
234
 
    DEFINE_PROP_END_OF_LIST(),
235
 
};
236
 
 
237
239
static void mpcore_priv_class_init(ObjectClass *klass, void *data)
238
240
{
 
241
    DeviceClass *dc = DEVICE_CLASS(klass);
239
242
    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
240
243
 
241
244
    k->init = mpcore_priv_init;
 
245
    dc->props = mpcore_priv_properties;
242
246
}
243
247
 
244
 
static DeviceInfo mpcore_priv_info = {
245
 
    .name = "arm11mpcore_priv",
246
 
    .size = sizeof(mpcore_priv_state),
247
 
    .props = mpcore_priv_properties,
248
 
    .class_init = mpcore_priv_class_init,
 
248
static TypeInfo mpcore_priv_info = {
 
249
    .name          = "arm11mpcore_priv",
 
250
    .parent        = TYPE_SYS_BUS_DEVICE,
 
251
    .instance_size = sizeof(mpcore_priv_state),
 
252
    .class_init    = mpcore_priv_class_init,
249
253
};
250
254
 
251
 
static void arm11mpcore_register_devices(void)
 
255
static void arm11mpcore_register_types(void)
252
256
{
253
 
    sysbus_register_withprop(&mpcore_rirq_info);
254
 
    sysbus_register_withprop(&mpcore_priv_info);
 
257
    type_register_static(&mpcore_rirq_info);
 
258
    type_register_static(&mpcore_priv_info);
255
259
}
256
260
 
257
 
device_init(arm11mpcore_register_devices)
 
261
type_init(arm11mpcore_register_types)