Statistics
| Branch: | Revision:

root / hw / ppc / mpc8544ds.c @ cba933b2

History | View | Annotate | Download (1.4 kB)

1 e6eaabeb Scott Wood
/*
2 e6eaabeb Scott Wood
 * Support for the PPC e500-based mpc8544ds board
3 e6eaabeb Scott Wood
 *
4 e6eaabeb Scott Wood
 * Copyright 2012 Freescale Semiconductor, Inc.
5 e6eaabeb Scott Wood
 *
6 e6eaabeb Scott Wood
 * This is free software; you can redistribute it and/or modify
7 e6eaabeb Scott Wood
 * it under the terms of  the GNU General  Public License as published by
8 e6eaabeb Scott Wood
 * the Free Software Foundation;  either version 2 of the  License, or
9 e6eaabeb Scott Wood
 * (at your option) any later version.
10 e6eaabeb Scott Wood
 */
11 e6eaabeb Scott Wood
12 e6eaabeb Scott Wood
#include "config.h"
13 e6eaabeb Scott Wood
#include "qemu-common.h"
14 e6eaabeb Scott Wood
#include "e500.h"
15 7948b4b0 Paolo Bonzini
#include "hw/boards.h"
16 9c17d615 Paolo Bonzini
#include "sysemu/device_tree.h"
17 0d09e41a Paolo Bonzini
#include "hw/ppc/openpic.h"
18 e6eaabeb Scott Wood
19 e6eaabeb Scott Wood
static void mpc8544ds_fixup_devtree(PPCE500Params *params, void *fdt)
20 e6eaabeb Scott Wood
{
21 e6eaabeb Scott Wood
    const char model[] = "MPC8544DS";
22 e6eaabeb Scott Wood
    const char compatible[] = "MPC8544DS\0MPC85xxDS";
23 e6eaabeb Scott Wood
24 5a4348d1 Peter Crosthwaite
    qemu_fdt_setprop(fdt, "/", "model", model, sizeof(model));
25 5a4348d1 Peter Crosthwaite
    qemu_fdt_setprop(fdt, "/", "compatible", compatible,
26 5a4348d1 Peter Crosthwaite
                     sizeof(compatible));
27 e6eaabeb Scott Wood
}
28 e6eaabeb Scott Wood
29 5f072e1f Eduardo Habkost
static void mpc8544ds_init(QEMUMachineInitArgs *args)
30 e6eaabeb Scott Wood
{
31 e6eaabeb Scott Wood
    PPCE500Params params = {
32 492ec48d Alexander Graf
        .pci_first_slot = 0x11,
33 492ec48d Alexander Graf
        .pci_nr_slots = 2,
34 e6eaabeb Scott Wood
        .fixup_devtree = mpc8544ds_fixup_devtree,
35 f5fba9d2 Scott Wood
        .mpic_version = OPENPIC_MODEL_FSL_MPIC_20,
36 e6eaabeb Scott Wood
    };
37 e6eaabeb Scott Wood
38 92238367 Markus Armbruster
    ppce500_init(args, &params);
39 e6eaabeb Scott Wood
}
40 e6eaabeb Scott Wood
41 e6eaabeb Scott Wood
42 e6eaabeb Scott Wood
static QEMUMachine ppce500_machine = {
43 e6eaabeb Scott Wood
    .name = "mpc8544ds",
44 e6eaabeb Scott Wood
    .desc = "mpc8544ds",
45 e6eaabeb Scott Wood
    .init = mpc8544ds_init,
46 e6eaabeb Scott Wood
    .max_cpus = 15,
47 e6eaabeb Scott Wood
};
48 e6eaabeb Scott Wood
49 e6eaabeb Scott Wood
static void ppce500_machine_init(void)
50 e6eaabeb Scott Wood
{
51 e6eaabeb Scott Wood
    qemu_register_machine(&ppce500_machine);
52 e6eaabeb Scott Wood
}
53 e6eaabeb Scott Wood
54 e6eaabeb Scott Wood
machine_init(ppce500_machine_init);