diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-20 18:38:09 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-21 08:47:55 -0500 |
commit | f80f9ec9a63bb2200d614feb658a77b78f9a4bba (patch) | |
tree | 59e22e0a617e392a65431b82256fb443aa6ad850 /hw/stellaris.c | |
parent | f92f8afebe038a4eae9ad90a140c9529f94919a6 (diff) |
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/stellaris.c')
-rw-r--r-- | hw/stellaris.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/stellaris.c b/hw/stellaris.c index a50800ff99..e7f3604f78 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -1396,18 +1396,26 @@ static void lm3s6965evb_init(ram_addr_t ram_size, stellaris_init(kernel_filename, cpu_model, &stellaris_boards[1]); } -QEMUMachine lm3s811evb_machine = { +static QEMUMachine lm3s811evb_machine = { .name = "lm3s811evb", .desc = "Stellaris LM3S811EVB", .init = lm3s811evb_init, }; -QEMUMachine lm3s6965evb_machine = { +static QEMUMachine lm3s6965evb_machine = { .name = "lm3s6965evb", .desc = "Stellaris LM3S6965EVB", .init = lm3s6965evb_init, }; +static void stellaris_machine_init(void) +{ + qemu_register_machine(&lm3s811evb_machine); + qemu_register_machine(&lm3s6965evb_machine); +} + +machine_init(stellaris_machine_init); + static SSISlaveInfo stellaris_ssi_bus_info = { .init = stellaris_ssi_bus_init, .transfer = stellaris_ssi_bus_transfer |