xref: /openbmc/qemu/hw/arm/aspeed_ast2600.c (revision fc59d2d8)
1 /*
2  * ASPEED SoC 2600 family
3  *
4  * Copyright (c) 2016-2019, IBM Corporation.
5  *
6  * This code is licensed under the GPL version 2 or later.  See
7  * the COPYING file in the top-level directory.
8  */
9 
10 #include "qemu/osdep.h"
11 #include "qapi/error.h"
12 #include "cpu.h"
13 #include "exec/address-spaces.h"
14 #include "hw/misc/unimp.h"
15 #include "hw/arm/aspeed_soc.h"
16 #include "hw/char/serial.h"
17 #include "qemu/log.h"
18 #include "qemu/module.h"
19 #include "qemu/error-report.h"
20 #include "hw/i2c/aspeed_i2c.h"
21 #include "net/net.h"
22 #include "sysemu/sysemu.h"
23 
24 #define ASPEED_SOC_IOMEM_SIZE       0x00200000
25 
26 static const hwaddr aspeed_soc_ast2600_memmap[] = {
27     [ASPEED_SRAM]      = 0x10000000,
28     /* 0x16000000     0x17FFFFFF : AHB BUS do LPC Bus bridge */
29     [ASPEED_IOMEM]     = 0x1E600000,
30     [ASPEED_PWM]       = 0x1E610000,
31     [ASPEED_FMC]       = 0x1E620000,
32     [ASPEED_SPI1]      = 0x1E630000,
33     [ASPEED_SPI2]      = 0x1E641000,
34     [ASPEED_MII1]      = 0x1E650000,
35     [ASPEED_MII2]      = 0x1E650008,
36     [ASPEED_MII3]      = 0x1E650010,
37     [ASPEED_MII4]      = 0x1E650018,
38     [ASPEED_ETH1]      = 0x1E660000,
39     [ASPEED_ETH3]      = 0x1E670000,
40     [ASPEED_ETH2]      = 0x1E680000,
41     [ASPEED_ETH4]      = 0x1E690000,
42     [ASPEED_VIC]       = 0x1E6C0000,
43     [ASPEED_SDMC]      = 0x1E6E0000,
44     [ASPEED_SCU]       = 0x1E6E2000,
45     [ASPEED_XDMA]      = 0x1E6E7000,
46     [ASPEED_ADC]       = 0x1E6E9000,
47     [ASPEED_VIDEO]     = 0x1E700000,
48     [ASPEED_SDHCI]     = 0x1E740000,
49     [ASPEED_GPIO]      = 0x1E780000,
50     [ASPEED_GPIO_1_8V] = 0x1E780800,
51     [ASPEED_RTC]       = 0x1E781000,
52     [ASPEED_TIMER1]    = 0x1E782000,
53     [ASPEED_WDT]       = 0x1E785000,
54     [ASPEED_LPC]       = 0x1E789000,
55     [ASPEED_IBT]       = 0x1E789140,
56     [ASPEED_I2C]       = 0x1E78A000,
57     [ASPEED_UART1]     = 0x1E783000,
58     [ASPEED_UART5]     = 0x1E784000,
59     [ASPEED_VUART]     = 0x1E787000,
60     [ASPEED_SDRAM]     = 0x80000000,
61 };
62 
63 #define ASPEED_A7MPCORE_ADDR 0x40460000
64 
65 #define ASPEED_SOC_AST2600_MAX_IRQ 128
66 
67 static const int aspeed_soc_ast2600_irqmap[] = {
68     [ASPEED_UART1]     = 47,
69     [ASPEED_UART2]     = 48,
70     [ASPEED_UART3]     = 49,
71     [ASPEED_UART4]     = 50,
72     [ASPEED_UART5]     = 8,
73     [ASPEED_VUART]     = 8,
74     [ASPEED_FMC]       = 39,
75     [ASPEED_SDMC]      = 0,
76     [ASPEED_SCU]       = 12,
77     [ASPEED_ADC]       = 78,
78     [ASPEED_XDMA]      = 6,
79     [ASPEED_SDHCI]     = 43,
80     [ASPEED_GPIO]      = 40,
81     [ASPEED_GPIO_1_8V] = 11,
82     [ASPEED_RTC]       = 13,
83     [ASPEED_TIMER1]    = 16,
84     [ASPEED_TIMER2]    = 17,
85     [ASPEED_TIMER3]    = 18,
86     [ASPEED_TIMER4]    = 19,
87     [ASPEED_TIMER5]    = 20,
88     [ASPEED_TIMER6]    = 21,
89     [ASPEED_TIMER7]    = 22,
90     [ASPEED_TIMER8]    = 23,
91     [ASPEED_WDT]       = 24,
92     [ASPEED_PWM]       = 44,
93     [ASPEED_LPC]       = 35,
94     [ASPEED_IBT]       = 35,    /* LPC */
95     [ASPEED_I2C]       = 110,   /* 110 -> 125 */
96     [ASPEED_ETH1]      = 2,
97     [ASPEED_ETH2]      = 3,
98     [ASPEED_ETH3]      = 32,
99     [ASPEED_ETH4]      = 33,
100 
101 };
102 
103 static qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int ctrl)
104 {
105     AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
106 
107     return qdev_get_gpio_in(DEVICE(&s->a7mpcore), sc->irqmap[ctrl]);
108 }
109 
110 static void aspeed_soc_ast2600_init(Object *obj)
111 {
112     AspeedSoCState *s = ASPEED_SOC(obj);
113     AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
114     int i;
115     char socname[8];
116     char typename[64];
117 
118     if (sscanf(sc->name, "%7s", socname) != 1) {
119         g_assert_not_reached();
120     }
121 
122     for (i = 0; i < sc->num_cpus; i++) {
123         object_initialize_child(obj, "cpu[*]", OBJECT(&s->cpu[i]),
124                                 sizeof(s->cpu[i]), sc->cpu_type,
125                                 &error_abort, NULL);
126     }
127 
128     snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname);
129     sysbus_init_child_obj(obj, "scu", OBJECT(&s->scu), sizeof(s->scu),
130                           typename);
131     qdev_prop_set_uint32(DEVICE(&s->scu), "silicon-rev",
132                          sc->silicon_rev);
133     object_property_add_alias(obj, "hw-strap1", OBJECT(&s->scu),
134                               "hw-strap1", &error_abort);
135     object_property_add_alias(obj, "hw-strap2", OBJECT(&s->scu),
136                               "hw-strap2", &error_abort);
137     object_property_add_alias(obj, "hw-prot-key", OBJECT(&s->scu),
138                               "hw-prot-key", &error_abort);
139 
140     sysbus_init_child_obj(obj, "a7mpcore", &s->a7mpcore,
141                           sizeof(s->a7mpcore), TYPE_A15MPCORE_PRIV);
142 
143     sysbus_init_child_obj(obj, "rtc", OBJECT(&s->rtc), sizeof(s->rtc),
144                           TYPE_ASPEED_RTC);
145 
146     snprintf(typename, sizeof(typename), "aspeed.timer-%s", socname);
147     sysbus_init_child_obj(obj, "timerctrl", OBJECT(&s->timerctrl),
148                           sizeof(s->timerctrl), typename);
149 
150     snprintf(typename, sizeof(typename), "aspeed.i2c-%s", socname);
151     sysbus_init_child_obj(obj, "i2c", OBJECT(&s->i2c), sizeof(s->i2c),
152                           typename);
153 
154     snprintf(typename, sizeof(typename), "aspeed.fmc-%s", socname);
155     sysbus_init_child_obj(obj, "fmc", OBJECT(&s->fmc), sizeof(s->fmc),
156                           typename);
157     object_property_add_alias(obj, "num-cs", OBJECT(&s->fmc), "num-cs",
158                               &error_abort);
159 
160     for (i = 0; i < sc->spis_num; i++) {
161         snprintf(typename, sizeof(typename), "aspeed.spi%d-%s", i + 1, socname);
162         sysbus_init_child_obj(obj, "spi[*]", OBJECT(&s->spi[i]),
163                               sizeof(s->spi[i]), typename);
164     }
165 
166     snprintf(typename, sizeof(typename), "aspeed.sdmc-%s", socname);
167     sysbus_init_child_obj(obj, "sdmc", OBJECT(&s->sdmc), sizeof(s->sdmc),
168                           typename);
169     object_property_add_alias(obj, "ram-size", OBJECT(&s->sdmc),
170                               "ram-size", &error_abort);
171     object_property_add_alias(obj, "max-ram-size", OBJECT(&s->sdmc),
172                               "max-ram-size", &error_abort);
173 
174     for (i = 0; i < sc->wdts_num; i++) {
175         snprintf(typename, sizeof(typename), "aspeed.wdt-%s", socname);
176         sysbus_init_child_obj(obj, "wdt[*]", OBJECT(&s->wdt[i]),
177                               sizeof(s->wdt[i]), typename);
178     }
179 
180     for (i = 0; i < sc->macs_num; i++) {
181         sysbus_init_child_obj(obj, "ftgmac100[*]", OBJECT(&s->ftgmac100[i]),
182                               sizeof(s->ftgmac100[i]), TYPE_FTGMAC100);
183 
184         sysbus_init_child_obj(obj, "mii[*]", &s->mii[i], sizeof(s->mii[i]),
185                               TYPE_ASPEED_MII);
186     }
187 
188     sysbus_init_child_obj(obj, "xdma", OBJECT(&s->xdma), sizeof(s->xdma),
189                           TYPE_ASPEED_XDMA);
190 
191     snprintf(typename, sizeof(typename), "aspeed.gpio-%s", socname);
192     sysbus_init_child_obj(obj, "gpio", OBJECT(&s->gpio), sizeof(s->gpio),
193                           typename);
194 
195     snprintf(typename, sizeof(typename), "aspeed.gpio-%s-1_8v", socname);
196     sysbus_init_child_obj(obj, "gpio_1_8v", OBJECT(&s->gpio_1_8v),
197                           sizeof(s->gpio_1_8v), typename);
198 
199     sysbus_init_child_obj(obj, "sdc", OBJECT(&s->sdhci), sizeof(s->sdhci),
200                           TYPE_ASPEED_SDHCI);
201 
202     /* Init sd card slot class here so that they're under the correct parent */
203     for (i = 0; i < ASPEED_SDHCI_NUM_SLOTS; ++i) {
204         sysbus_init_child_obj(obj, "sdhci[*]", OBJECT(&s->sdhci.slots[i]),
205                               sizeof(s->sdhci.slots[i]), TYPE_SYSBUS_SDHCI);
206     }
207 }
208 
209 /*
210  * ASPEED ast2600 has 0xf as cluster ID
211  *
212  * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388e/CIHEBGFG.html
213  */
214 static uint64_t aspeed_calc_affinity(int cpu)
215 {
216     return (0xf << ARM_AFF1_SHIFT) | cpu;
217 }
218 
219 static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
220 {
221     int i;
222     AspeedSoCState *s = ASPEED_SOC(dev);
223     AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
224     Error *err = NULL, *local_err = NULL;
225     qemu_irq irq;
226 
227     /* IO space */
228     create_unimplemented_device("aspeed_soc.io", sc->memmap[ASPEED_IOMEM],
229                                 ASPEED_SOC_IOMEM_SIZE);
230 
231     /* Video engine stub */
232     create_unimplemented_device("aspeed.video", sc->memmap[ASPEED_VIDEO],
233                                 0x1000);
234 
235     if (s->num_cpus > sc->num_cpus) {
236         warn_report("%s: invalid number of CPUs %d, using default %d",
237                     sc->name, s->num_cpus, sc->num_cpus);
238         s->num_cpus = sc->num_cpus;
239     }
240 
241     /* CPU */
242     for (i = 0; i < s->num_cpus; i++) {
243         object_property_set_int(OBJECT(&s->cpu[i]), QEMU_PSCI_CONDUIT_SMC,
244                                 "psci-conduit", &error_abort);
245         if (s->num_cpus > 1) {
246             object_property_set_int(OBJECT(&s->cpu[i]),
247                                     ASPEED_A7MPCORE_ADDR,
248                                     "reset-cbar", &error_abort);
249         }
250         object_property_set_int(OBJECT(&s->cpu[i]), aspeed_calc_affinity(i),
251                                 "mp-affinity", &error_abort);
252 
253         /*
254          * TODO: the secondary CPUs are started and a boot helper
255          * is needed when using -kernel
256          */
257 
258         object_property_set_bool(OBJECT(&s->cpu[i]), true, "realized", &err);
259         if (err) {
260             error_propagate(errp, err);
261             return;
262         }
263     }
264 
265     /* A7MPCORE */
266     object_property_set_int(OBJECT(&s->a7mpcore), s->num_cpus, "num-cpu",
267                             &error_abort);
268     object_property_set_int(OBJECT(&s->a7mpcore),
269                             ASPEED_SOC_AST2600_MAX_IRQ + GIC_INTERNAL,
270                             "num-irq", &error_abort);
271 
272     object_property_set_bool(OBJECT(&s->a7mpcore), true, "realized",
273                              &error_abort);
274     sysbus_mmio_map(SYS_BUS_DEVICE(&s->a7mpcore), 0, ASPEED_A7MPCORE_ADDR);
275 
276     for (i = 0; i < s->num_cpus; i++) {
277         SysBusDevice *sbd = SYS_BUS_DEVICE(&s->a7mpcore);
278         DeviceState  *d   = DEVICE(qemu_get_cpu(i));
279 
280         irq = qdev_get_gpio_in(d, ARM_CPU_IRQ);
281         sysbus_connect_irq(sbd, i, irq);
282         irq = qdev_get_gpio_in(d, ARM_CPU_FIQ);
283         sysbus_connect_irq(sbd, i + s->num_cpus, irq);
284         irq = qdev_get_gpio_in(d, ARM_CPU_VIRQ);
285         sysbus_connect_irq(sbd, i + 2 * s->num_cpus, irq);
286         irq = qdev_get_gpio_in(d, ARM_CPU_VFIQ);
287         sysbus_connect_irq(sbd, i + 3 * s->num_cpus, irq);
288     }
289 
290     /* SRAM */
291     memory_region_init_ram(&s->sram, OBJECT(dev), "aspeed.sram",
292                            sc->sram_size, &err);
293     if (err) {
294         error_propagate(errp, err);
295         return;
296     }
297     memory_region_add_subregion(get_system_memory(),
298                                 sc->memmap[ASPEED_SRAM], &s->sram);
299 
300     /* SCU */
301     object_property_set_bool(OBJECT(&s->scu), true, "realized", &err);
302     if (err) {
303         error_propagate(errp, err);
304         return;
305     }
306     sysbus_mmio_map(SYS_BUS_DEVICE(&s->scu), 0, sc->memmap[ASPEED_SCU]);
307 
308     /* RTC */
309     object_property_set_bool(OBJECT(&s->rtc), true, "realized", &err);
310     if (err) {
311         error_propagate(errp, err);
312         return;
313     }
314     sysbus_mmio_map(SYS_BUS_DEVICE(&s->rtc), 0, sc->memmap[ASPEED_RTC]);
315     sysbus_connect_irq(SYS_BUS_DEVICE(&s->rtc), 0,
316                        aspeed_soc_get_irq(s, ASPEED_RTC));
317 
318     /* Timer */
319     object_property_set_link(OBJECT(&s->timerctrl),
320                              OBJECT(&s->scu), "scu", &error_abort);
321     object_property_set_bool(OBJECT(&s->timerctrl), true, "realized", &err);
322     if (err) {
323         error_propagate(errp, err);
324         return;
325     }
326     sysbus_mmio_map(SYS_BUS_DEVICE(&s->timerctrl), 0,
327                     sc->memmap[ASPEED_TIMER1]);
328     for (i = 0; i < ASPEED_TIMER_NR_TIMERS; i++) {
329         qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_TIMER1 + i);
330         sysbus_connect_irq(SYS_BUS_DEVICE(&s->timerctrl), i, irq);
331     }
332 
333     /* UART - attach an 8250 to the IO space as our UART5 */
334     if (serial_hd(0)) {
335         qemu_irq uart5 = aspeed_soc_get_irq(s, ASPEED_UART5);
336         serial_mm_init(get_system_memory(), sc->memmap[ASPEED_UART5], 2,
337                        uart5, 38400, serial_hd(0), DEVICE_LITTLE_ENDIAN);
338     }
339 
340     /* I2C */
341     object_property_set_link(OBJECT(&s->i2c), OBJECT(s->dram_mr), "dram", &err);
342     if (err) {
343         error_propagate(errp, err);
344         return;
345     }
346     object_property_set_bool(OBJECT(&s->i2c), true, "realized", &err);
347     if (err) {
348         error_propagate(errp, err);
349         return;
350     }
351     sysbus_mmio_map(SYS_BUS_DEVICE(&s->i2c), 0, sc->memmap[ASPEED_I2C]);
352     for (i = 0; i < ASPEED_I2C_GET_CLASS(&s->i2c)->num_busses; i++) {
353         qemu_irq irq = qdev_get_gpio_in(DEVICE(&s->a7mpcore),
354                                         sc->irqmap[ASPEED_I2C] + i);
355         /*
356          * The AST2600 SoC has one IRQ per I2C bus. Skip the common
357          * IRQ (AST2400 and AST2500) and connect all bussses.
358          */
359         sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c), i + 1, irq);
360     }
361 
362     /* FMC, The number of CS is set at the board level */
363     object_property_set_link(OBJECT(&s->fmc), OBJECT(s->dram_mr), "dram", &err);
364     if (err) {
365         error_propagate(errp, err);
366         return;
367     }
368     object_property_set_int(OBJECT(&s->fmc), sc->memmap[ASPEED_SDRAM],
369                             "sdram-base", &err);
370     if (err) {
371         error_propagate(errp, err);
372         return;
373     }
374     object_property_set_bool(OBJECT(&s->fmc), true, "realized", &err);
375     if (err) {
376         error_propagate(errp, err);
377         return;
378     }
379     sysbus_mmio_map(SYS_BUS_DEVICE(&s->fmc), 0, sc->memmap[ASPEED_FMC]);
380     sysbus_mmio_map(SYS_BUS_DEVICE(&s->fmc), 1,
381                     s->fmc.ctrl->flash_window_base);
382     sysbus_connect_irq(SYS_BUS_DEVICE(&s->fmc), 0,
383                        aspeed_soc_get_irq(s, ASPEED_FMC));
384 
385     /* SPI */
386     for (i = 0; i < sc->spis_num; i++) {
387         object_property_set_int(OBJECT(&s->spi[i]), 1, "num-cs", &err);
388         object_property_set_bool(OBJECT(&s->spi[i]), true, "realized",
389                                  &local_err);
390         error_propagate(&err, local_err);
391         if (err) {
392             error_propagate(errp, err);
393             return;
394         }
395         sysbus_mmio_map(SYS_BUS_DEVICE(&s->spi[i]), 0,
396                         sc->memmap[ASPEED_SPI1 + i]);
397         sysbus_mmio_map(SYS_BUS_DEVICE(&s->spi[i]), 1,
398                         s->spi[i].ctrl->flash_window_base);
399     }
400 
401     /* SDMC - SDRAM Memory Controller */
402     object_property_set_bool(OBJECT(&s->sdmc), true, "realized", &err);
403     if (err) {
404         error_propagate(errp, err);
405         return;
406     }
407     sysbus_mmio_map(SYS_BUS_DEVICE(&s->sdmc), 0, sc->memmap[ASPEED_SDMC]);
408 
409     /* Watch dog */
410     for (i = 0; i < sc->wdts_num; i++) {
411         AspeedWDTClass *awc = ASPEED_WDT_GET_CLASS(&s->wdt[i]);
412 
413         object_property_set_link(OBJECT(&s->wdt[i]),
414                                  OBJECT(&s->scu), "scu", &error_abort);
415         object_property_set_bool(OBJECT(&s->wdt[i]), true, "realized", &err);
416         if (err) {
417             error_propagate(errp, err);
418             return;
419         }
420         sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0,
421                         sc->memmap[ASPEED_WDT] + i * awc->offset);
422     }
423 
424     /* Net */
425     for (i = 0; i < nb_nics && i < sc->macs_num; i++) {
426         qdev_set_nic_properties(DEVICE(&s->ftgmac100[i]), &nd_table[i]);
427         object_property_set_bool(OBJECT(&s->ftgmac100[i]), true, "aspeed",
428                                  &err);
429         object_property_set_bool(OBJECT(&s->ftgmac100[i]), true, "realized",
430                                  &local_err);
431         error_propagate(&err, local_err);
432         if (err) {
433             error_propagate(errp, err);
434            return;
435         }
436         sysbus_mmio_map(SYS_BUS_DEVICE(&s->ftgmac100[i]), 0,
437                         sc->memmap[ASPEED_ETH1 + i]);
438         sysbus_connect_irq(SYS_BUS_DEVICE(&s->ftgmac100[i]), 0,
439                            aspeed_soc_get_irq(s, ASPEED_ETH1 + i));
440 
441         object_property_set_link(OBJECT(&s->mii[i]), OBJECT(&s->ftgmac100[i]),
442                                  "nic", &error_abort);
443         object_property_set_bool(OBJECT(&s->mii[i]), true, "realized",
444                                  &err);
445         if (err) {
446             error_propagate(errp, err);
447             return;
448         }
449 
450         sysbus_mmio_map(SYS_BUS_DEVICE(&s->mii[i]), 0,
451                         sc->memmap[ASPEED_MII1 + i]);
452     }
453 
454     /* XDMA */
455     object_property_set_bool(OBJECT(&s->xdma), true, "realized", &err);
456     if (err) {
457         error_propagate(errp, err);
458         return;
459     }
460     sysbus_mmio_map(SYS_BUS_DEVICE(&s->xdma), 0,
461                     sc->memmap[ASPEED_XDMA]);
462     sysbus_connect_irq(SYS_BUS_DEVICE(&s->xdma), 0,
463                        aspeed_soc_get_irq(s, ASPEED_XDMA));
464 
465     /* GPIO */
466     object_property_set_bool(OBJECT(&s->gpio), true, "realized", &err);
467     if (err) {
468         error_propagate(errp, err);
469         return;
470     }
471     sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, sc->memmap[ASPEED_GPIO]);
472     sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio), 0,
473                        aspeed_soc_get_irq(s, ASPEED_GPIO));
474 
475     object_property_set_bool(OBJECT(&s->gpio_1_8v), true, "realized", &err);
476     if (err) {
477         error_propagate(errp, err);
478         return;
479     }
480     sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio_1_8v), 0,
481                     sc->memmap[ASPEED_GPIO_1_8V]);
482     sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio_1_8v), 0,
483                        aspeed_soc_get_irq(s, ASPEED_GPIO_1_8V));
484 
485     /* SDHCI */
486     object_property_set_bool(OBJECT(&s->sdhci), true, "realized", &err);
487     if (err) {
488         error_propagate(errp, err);
489         return;
490     }
491     sysbus_mmio_map(SYS_BUS_DEVICE(&s->sdhci), 0,
492                     sc->memmap[ASPEED_SDHCI]);
493     sysbus_connect_irq(SYS_BUS_DEVICE(&s->sdhci), 0,
494                        aspeed_soc_get_irq(s, ASPEED_SDHCI));
495 }
496 
497 static void aspeed_soc_ast2600_class_init(ObjectClass *oc, void *data)
498 {
499     DeviceClass *dc = DEVICE_CLASS(oc);
500     AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
501 
502     dc->realize      = aspeed_soc_ast2600_realize;
503 
504     sc->name         = "ast2600-a0";
505     sc->cpu_type     = ARM_CPU_TYPE_NAME("cortex-a7");
506     sc->silicon_rev  = AST2600_A0_SILICON_REV;
507     sc->sram_size    = 0x10000;
508     sc->spis_num     = 2;
509     sc->wdts_num     = 4;
510     sc->macs_num     = 4;
511     sc->irqmap       = aspeed_soc_ast2600_irqmap;
512     sc->memmap       = aspeed_soc_ast2600_memmap;
513     sc->num_cpus     = 2;
514 }
515 
516 static const TypeInfo aspeed_soc_ast2600_type_info = {
517     .name           = "ast2600-a0",
518     .parent         = TYPE_ASPEED_SOC,
519     .instance_size  = sizeof(AspeedSoCState),
520     .instance_init  = aspeed_soc_ast2600_init,
521     .class_init     = aspeed_soc_ast2600_class_init,
522     .class_size     = sizeof(AspeedSoCClass),
523 };
524 
525 static void aspeed_soc_register_types(void)
526 {
527     type_register_static(&aspeed_soc_ast2600_type_info);
528 };
529 
530 type_init(aspeed_soc_register_types)
531