]> Git Repo - qemu.git/blob - hw/collie.c
Merge remote-tracking branch 'kraxel/usb.29' into staging
[qemu.git] / hw / collie.c
1 /*
2  * SA-1110-based Sharp Zaurus SL-5500 platform.
3  *
4  * Copyright (C) 2011 Dmitry Eremin-Solenikov
5  *
6  * This code is licensed under GNU GPL v2.
7  */
8 #include "hw.h"
9 #include "sysbus.h"
10 #include "boards.h"
11 #include "devices.h"
12 #include "strongarm.h"
13 #include "arm-misc.h"
14 #include "flash.h"
15 #include "blockdev.h"
16 #include "exec-memory.h"
17
18 static struct arm_boot_info collie_binfo = {
19     .loader_start = SA_SDCS0,
20     .ram_size = 0x20000000,
21 };
22
23 static void collie_init(ram_addr_t ram_size,
24                 const char *boot_device,
25                 const char *kernel_filename, const char *kernel_cmdline,
26                 const char *initrd_filename, const char *cpu_model)
27 {
28     StrongARMState *s;
29     DriveInfo *dinfo;
30     MemoryRegion *sysmem = get_system_memory();
31
32     if (!cpu_model) {
33         cpu_model = "sa1110";
34     }
35
36     s = sa1110_init(sysmem, collie_binfo.ram_size, cpu_model);
37
38     dinfo = drive_get(IF_PFLASH, 0, 0);
39     pflash_cfi01_register(SA_CS0, NULL, "collie.fl1", 0x02000000,
40                     dinfo ? dinfo->bdrv : NULL, (64 * 1024),
41                     512, 4, 0x00, 0x00, 0x00, 0x00, 0);
42
43     dinfo = drive_get(IF_PFLASH, 0, 1);
44     pflash_cfi01_register(SA_CS1, NULL, "collie.fl2", 0x02000000,
45                     dinfo ? dinfo->bdrv : NULL, (64 * 1024),
46                     512, 4, 0x00, 0x00, 0x00, 0x00, 0);
47
48     sysbus_create_simple("scoop", 0x40800000, NULL);
49
50     collie_binfo.kernel_filename = kernel_filename;
51     collie_binfo.kernel_cmdline = kernel_cmdline;
52     collie_binfo.initrd_filename = initrd_filename;
53     collie_binfo.board_id = 0x208;
54     arm_load_kernel(s->env, &collie_binfo);
55 }
56
57 static QEMUMachine collie_machine = {
58     .name = "collie",
59     .desc = "Collie PDA (SA-1110)",
60     .init = collie_init,
61 };
62
63 static void collie_machine_init(void)
64 {
65     qemu_register_machine(&collie_machine);
66 }
67
68 machine_init(collie_machine_init)
This page took 0.029104 seconds and 4 git commands to generate.