~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to hw/ppc/e500.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
827
827
        env = &cpu->env;
828
828
        cs = CPU(cpu);
829
829
 
 
830
        if (env->mmu_model != POWERPC_MMU_BOOKE206) {
 
831
            fprintf(stderr, "MMU model %i not supported by this machine.\n",
 
832
                env->mmu_model);
 
833
            exit(1);
 
834
        }
 
835
 
830
836
        if (!firstenv) {
831
837
            firstenv = env;
832
838
        }
1049
1055
    boot_info->dt_size = dt_size;
1050
1056
}
1051
1057
 
1052
 
static int e500_ccsr_initfn(SysBusDevice *dev)
 
1058
static void e500_ccsr_initfn(Object *obj)
1053
1059
{
1054
 
    PPCE500CCSRState *ccsr;
1055
 
 
1056
 
    ccsr = CCSR(dev);
1057
 
    memory_region_init(&ccsr->ccsr_space, OBJECT(ccsr), "e500-ccsr",
 
1060
    PPCE500CCSRState *ccsr = CCSR(obj);
 
1061
    memory_region_init(&ccsr->ccsr_space, obj, "e500-ccsr",
1058
1062
                       MPC8544_CCSRBAR_SIZE);
1059
 
    return 0;
1060
 
}
1061
 
 
1062
 
static void e500_ccsr_class_init(ObjectClass *klass, void *data)
1063
 
{
1064
 
    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
1065
 
    k->init = e500_ccsr_initfn;
1066
1063
}
1067
1064
 
1068
1065
static const TypeInfo e500_ccsr_info = {
1069
1066
    .name          = TYPE_CCSR,
1070
1067
    .parent        = TYPE_SYS_BUS_DEVICE,
1071
1068
    .instance_size = sizeof(PPCE500CCSRState),
1072
 
    .class_init    = e500_ccsr_class_init,
 
1069
    .instance_init = e500_ccsr_initfn,
1073
1070
};
1074
1071
 
1075
1072
static void e500_register_types(void)