2007-11-11 01:04:49 +01:00
|
|
|
/*
|
|
|
|
* Arm PrimeCell PL061 General Purpose IO with additional
|
|
|
|
* Luminary Micro Stellaris bits.
|
|
|
|
*
|
|
|
|
* Copyright (c) 2007 CodeSourcery.
|
|
|
|
* Written by Paul Brook
|
|
|
|
*
|
2011-06-26 04:21:35 +02:00
|
|
|
* This code is licensed under the GPL.
|
2007-11-11 01:04:49 +01:00
|
|
|
*/
|
|
|
|
|
2016-01-26 19:17:05 +01:00
|
|
|
#include "qemu/osdep.h"
|
2013-02-04 15:40:22 +01:00
|
|
|
#include "hw/sysbus.h"
|
2007-11-11 01:04:49 +01:00
|
|
|
|
|
|
|
//#define DEBUG_PL061 1
|
|
|
|
|
|
|
|
#ifdef DEBUG_PL061
|
2009-05-13 19:53:17 +02:00
|
|
|
#define DPRINTF(fmt, ...) \
|
|
|
|
do { printf("pl061: " fmt , ## __VA_ARGS__); } while (0)
|
|
|
|
#define BADF(fmt, ...) \
|
|
|
|
do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
2007-11-11 01:04:49 +01:00
|
|
|
#else
|
2009-05-13 19:53:17 +02:00
|
|
|
#define DPRINTF(fmt, ...) do {} while(0)
|
|
|
|
#define BADF(fmt, ...) \
|
|
|
|
do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__);} while (0)
|
2007-11-11 01:04:49 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static const uint8_t pl061_id[12] =
|
2011-02-21 21:57:51 +01:00
|
|
|
{ 0x00, 0x00, 0x00, 0x00, 0x61, 0x10, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 };
|
|
|
|
static const uint8_t pl061_id_luminary[12] =
|
2007-11-11 01:04:49 +01:00
|
|
|
{ 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x18, 0x01, 0x0d, 0xf0, 0x05, 0xb1 };
|
|
|
|
|
2013-07-26 17:31:46 +02:00
|
|
|
#define TYPE_PL061 "pl061"
|
|
|
|
#define PL061(obj) OBJECT_CHECK(PL061State, (obj), TYPE_PL061)
|
|
|
|
|
2013-07-26 17:21:21 +02:00
|
|
|
typedef struct PL061State {
|
2013-07-26 17:31:46 +02:00
|
|
|
SysBusDevice parent_obj;
|
|
|
|
|
2011-10-10 17:18:44 +02:00
|
|
|
MemoryRegion iomem;
|
2011-08-04 00:13:45 +02:00
|
|
|
uint32_t locked;
|
|
|
|
uint32_t data;
|
2014-09-12 15:06:48 +02:00
|
|
|
uint32_t old_out_data;
|
|
|
|
uint32_t old_in_data;
|
2011-08-04 00:13:45 +02:00
|
|
|
uint32_t dir;
|
|
|
|
uint32_t isense;
|
|
|
|
uint32_t ibe;
|
|
|
|
uint32_t iev;
|
|
|
|
uint32_t im;
|
|
|
|
uint32_t istate;
|
|
|
|
uint32_t afsel;
|
|
|
|
uint32_t dr2r;
|
|
|
|
uint32_t dr4r;
|
|
|
|
uint32_t dr8r;
|
|
|
|
uint32_t odr;
|
|
|
|
uint32_t pur;
|
|
|
|
uint32_t pdr;
|
|
|
|
uint32_t slr;
|
|
|
|
uint32_t den;
|
|
|
|
uint32_t cr;
|
2011-08-04 00:04:49 +02:00
|
|
|
uint32_t amsel;
|
2007-11-11 01:04:49 +01:00
|
|
|
qemu_irq irq;
|
|
|
|
qemu_irq out[8];
|
2011-02-21 21:57:51 +01:00
|
|
|
const unsigned char *id;
|
2016-02-18 17:56:20 +01:00
|
|
|
uint32_t rsvd_start; /* reserved area: [rsvd_start, 0xfcc] */
|
2013-07-26 17:21:21 +02:00
|
|
|
} PL061State;
|
2007-11-11 01:04:49 +01:00
|
|
|
|
2011-08-04 00:13:45 +02:00
|
|
|
static const VMStateDescription vmstate_pl061 = {
|
|
|
|
.name = "pl061",
|
2016-02-18 15:16:17 +01:00
|
|
|
.version_id = 4,
|
|
|
|
.minimum_version_id = 4,
|
2011-08-04 00:13:45 +02:00
|
|
|
.fields = (VMStateField[]) {
|
2013-07-26 17:21:21 +02:00
|
|
|
VMSTATE_UINT32(locked, PL061State),
|
|
|
|
VMSTATE_UINT32(data, PL061State),
|
2014-09-12 15:06:48 +02:00
|
|
|
VMSTATE_UINT32(old_out_data, PL061State),
|
|
|
|
VMSTATE_UINT32(old_in_data, PL061State),
|
2013-07-26 17:21:21 +02:00
|
|
|
VMSTATE_UINT32(dir, PL061State),
|
|
|
|
VMSTATE_UINT32(isense, PL061State),
|
|
|
|
VMSTATE_UINT32(ibe, PL061State),
|
|
|
|
VMSTATE_UINT32(iev, PL061State),
|
|
|
|
VMSTATE_UINT32(im, PL061State),
|
|
|
|
VMSTATE_UINT32(istate, PL061State),
|
|
|
|
VMSTATE_UINT32(afsel, PL061State),
|
|
|
|
VMSTATE_UINT32(dr2r, PL061State),
|
|
|
|
VMSTATE_UINT32(dr4r, PL061State),
|
|
|
|
VMSTATE_UINT32(dr8r, PL061State),
|
|
|
|
VMSTATE_UINT32(odr, PL061State),
|
|
|
|
VMSTATE_UINT32(pur, PL061State),
|
|
|
|
VMSTATE_UINT32(pdr, PL061State),
|
|
|
|
VMSTATE_UINT32(slr, PL061State),
|
|
|
|
VMSTATE_UINT32(den, PL061State),
|
|
|
|
VMSTATE_UINT32(cr, PL061State),
|
|
|
|
VMSTATE_UINT32_V(amsel, PL061State, 2),
|
2011-08-04 00:13:45 +02:00
|
|
|
VMSTATE_END_OF_LIST()
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-07-26 17:21:21 +02:00
|
|
|
static void pl061_update(PL061State *s)
|
2007-11-11 01:04:49 +01:00
|
|
|
{
|
|
|
|
uint8_t changed;
|
|
|
|
uint8_t mask;
|
2007-11-25 00:35:08 +01:00
|
|
|
uint8_t out;
|
2007-11-11 01:04:49 +01:00
|
|
|
int i;
|
|
|
|
|
2014-09-12 15:06:48 +02:00
|
|
|
DPRINTF("dir = %d, data = %d\n", s->dir, s->data);
|
|
|
|
|
2007-11-25 00:35:08 +01:00
|
|
|
/* Outputs float high. */
|
|
|
|
/* FIXME: This is board dependent. */
|
|
|
|
out = (s->data & s->dir) | ~s->dir;
|
2014-09-12 15:06:48 +02:00
|
|
|
changed = s->old_out_data ^ out;
|
|
|
|
if (changed) {
|
|
|
|
s->old_out_data = out;
|
|
|
|
for (i = 0; i < 8; i++) {
|
|
|
|
mask = 1 << i;
|
|
|
|
if (changed & mask) {
|
|
|
|
DPRINTF("Set output %d = %d\n", i, (out & mask) != 0);
|
|
|
|
qemu_set_irq(s->out[i], (out & mask) != 0);
|
|
|
|
}
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-12 15:06:48 +02:00
|
|
|
/* Inputs */
|
|
|
|
changed = (s->old_in_data ^ s->data) & ~s->dir;
|
|
|
|
if (changed) {
|
|
|
|
s->old_in_data = s->data;
|
|
|
|
for (i = 0; i < 8; i++) {
|
|
|
|
mask = 1 << i;
|
|
|
|
if (changed & mask) {
|
|
|
|
DPRINTF("Changed input %d = %d\n", i, (s->data & mask) != 0);
|
|
|
|
|
|
|
|
if (!(s->isense & mask)) {
|
|
|
|
/* Edge interrupt */
|
|
|
|
if (s->ibe & mask) {
|
|
|
|
/* Any edge triggers the interrupt */
|
|
|
|
s->istate |= mask;
|
|
|
|
} else {
|
|
|
|
/* Edge is selected by IEV */
|
|
|
|
s->istate |= ~(s->data ^ s->iev) & mask;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Level interrupt */
|
|
|
|
s->istate |= ~(s->data ^ s->iev) & s->isense;
|
|
|
|
|
|
|
|
DPRINTF("istate = %02X\n", s->istate);
|
|
|
|
|
|
|
|
qemu_set_irq(s->irq, (s->istate & s->im) != 0);
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
|
|
|
|
2012-10-23 12:30:10 +02:00
|
|
|
static uint64_t pl061_read(void *opaque, hwaddr offset,
|
2011-10-10 17:18:44 +02:00
|
|
|
unsigned size)
|
2007-11-11 01:04:49 +01:00
|
|
|
{
|
2013-07-26 17:21:21 +02:00
|
|
|
PL061State *s = (PL061State *)opaque;
|
2007-11-11 01:04:49 +01:00
|
|
|
|
|
|
|
if (offset < 0x400) {
|
|
|
|
return s->data & (offset >> 2);
|
|
|
|
}
|
2016-02-18 17:56:20 +01:00
|
|
|
if (offset >= s->rsvd_start && offset <= 0xfcc) {
|
|
|
|
goto err_out;
|
|
|
|
}
|
|
|
|
if (offset >= 0xfd0 && offset < 0x1000) {
|
|
|
|
return s->id[(offset - 0xfd0) >> 2];
|
|
|
|
}
|
2007-11-11 01:04:49 +01:00
|
|
|
switch (offset) {
|
|
|
|
case 0x400: /* Direction */
|
|
|
|
return s->dir;
|
|
|
|
case 0x404: /* Interrupt sense */
|
|
|
|
return s->isense;
|
|
|
|
case 0x408: /* Interrupt both edges */
|
|
|
|
return s->ibe;
|
2011-04-28 17:20:35 +02:00
|
|
|
case 0x40c: /* Interrupt event */
|
2007-11-11 01:04:49 +01:00
|
|
|
return s->iev;
|
|
|
|
case 0x410: /* Interrupt mask */
|
|
|
|
return s->im;
|
|
|
|
case 0x414: /* Raw interrupt status */
|
|
|
|
return s->istate;
|
|
|
|
case 0x418: /* Masked interrupt status */
|
2015-06-02 15:56:23 +02:00
|
|
|
return s->istate & s->im;
|
2007-11-11 01:04:49 +01:00
|
|
|
case 0x420: /* Alternate function select */
|
|
|
|
return s->afsel;
|
|
|
|
case 0x500: /* 2mA drive */
|
|
|
|
return s->dr2r;
|
|
|
|
case 0x504: /* 4mA drive */
|
|
|
|
return s->dr4r;
|
|
|
|
case 0x508: /* 8mA drive */
|
|
|
|
return s->dr8r;
|
|
|
|
case 0x50c: /* Open drain */
|
|
|
|
return s->odr;
|
|
|
|
case 0x510: /* Pull-up */
|
|
|
|
return s->pur;
|
|
|
|
case 0x514: /* Pull-down */
|
|
|
|
return s->pdr;
|
|
|
|
case 0x518: /* Slew rate control */
|
|
|
|
return s->slr;
|
|
|
|
case 0x51c: /* Digital enable */
|
|
|
|
return s->den;
|
|
|
|
case 0x520: /* Lock */
|
|
|
|
return s->locked;
|
|
|
|
case 0x524: /* Commit */
|
|
|
|
return s->cr;
|
2011-08-04 00:04:49 +02:00
|
|
|
case 0x528: /* Analog mode select */
|
|
|
|
return s->amsel;
|
2007-11-11 01:04:49 +01:00
|
|
|
default:
|
2016-02-18 17:56:20 +01:00
|
|
|
break;
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
2016-02-18 17:56:20 +01:00
|
|
|
err_out:
|
|
|
|
qemu_log_mask(LOG_GUEST_ERROR,
|
|
|
|
"pl061_read: Bad offset %x\n", (int)offset);
|
|
|
|
return 0;
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
|
|
|
|
2012-10-23 12:30:10 +02:00
|
|
|
static void pl061_write(void *opaque, hwaddr offset,
|
2011-10-10 17:18:44 +02:00
|
|
|
uint64_t value, unsigned size)
|
2007-11-11 01:04:49 +01:00
|
|
|
{
|
2013-07-26 17:21:21 +02:00
|
|
|
PL061State *s = (PL061State *)opaque;
|
2007-11-11 01:04:49 +01:00
|
|
|
uint8_t mask;
|
|
|
|
|
|
|
|
if (offset < 0x400) {
|
|
|
|
mask = (offset >> 2) & s->dir;
|
|
|
|
s->data = (s->data & ~mask) | (value & mask);
|
|
|
|
pl061_update(s);
|
|
|
|
return;
|
|
|
|
}
|
2016-02-18 17:56:20 +01:00
|
|
|
if (offset >= s->rsvd_start) {
|
|
|
|
goto err_out;
|
|
|
|
}
|
2007-11-11 01:04:49 +01:00
|
|
|
switch (offset) {
|
|
|
|
case 0x400: /* Direction */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->dir = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x404: /* Interrupt sense */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->isense = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x408: /* Interrupt both edges */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->ibe = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
2011-04-28 17:20:35 +02:00
|
|
|
case 0x40c: /* Interrupt event */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->iev = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x410: /* Interrupt mask */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->im = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x41c: /* Interrupt clear */
|
|
|
|
s->istate &= ~value;
|
|
|
|
break;
|
|
|
|
case 0x420: /* Alternate function select */
|
|
|
|
mask = s->cr;
|
|
|
|
s->afsel = (s->afsel & ~mask) | (value & mask);
|
|
|
|
break;
|
|
|
|
case 0x500: /* 2mA drive */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->dr2r = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x504: /* 4mA drive */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->dr4r = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x508: /* 8mA drive */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->dr8r = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x50c: /* Open drain */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->odr = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x510: /* Pull-up */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->pur = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x514: /* Pull-down */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->pdr = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x518: /* Slew rate control */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->slr = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x51c: /* Digital enable */
|
2011-08-04 00:13:45 +02:00
|
|
|
s->den = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
|
|
|
case 0x520: /* Lock */
|
|
|
|
s->locked = (value != 0xacce551);
|
|
|
|
break;
|
|
|
|
case 0x524: /* Commit */
|
|
|
|
if (!s->locked)
|
2011-08-04 00:13:45 +02:00
|
|
|
s->cr = value & 0xff;
|
2007-11-11 01:04:49 +01:00
|
|
|
break;
|
2011-08-04 00:04:49 +02:00
|
|
|
case 0x528:
|
|
|
|
s->amsel = value & 0xff;
|
|
|
|
break;
|
2007-11-11 01:04:49 +01:00
|
|
|
default:
|
2016-02-18 17:56:20 +01:00
|
|
|
goto err_out;
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
|
|
|
pl061_update(s);
|
2016-02-18 17:56:20 +01:00
|
|
|
return;
|
|
|
|
err_out:
|
|
|
|
qemu_log_mask(LOG_GUEST_ERROR,
|
|
|
|
"pl061_write: Bad offset %x\n", (int)offset);
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
|
|
|
|
2016-02-18 15:16:17 +01:00
|
|
|
static void pl061_reset(DeviceState *dev)
|
2007-11-11 01:04:49 +01:00
|
|
|
{
|
2016-02-18 15:16:17 +01:00
|
|
|
PL061State *s = PL061(dev);
|
|
|
|
|
|
|
|
/* reset values from PL061 TRM, Stellaris LM3S5P31 & LM3S8962 Data Sheet */
|
|
|
|
s->data = 0;
|
|
|
|
s->old_out_data = 0;
|
|
|
|
s->old_in_data = 0;
|
|
|
|
s->dir = 0;
|
|
|
|
s->isense = 0;
|
|
|
|
s->ibe = 0;
|
|
|
|
s->iev = 0;
|
|
|
|
s->im = 0;
|
|
|
|
s->istate = 0;
|
|
|
|
s->afsel = 0;
|
|
|
|
s->dr2r = 0xff;
|
|
|
|
s->dr4r = 0;
|
|
|
|
s->dr8r = 0;
|
|
|
|
s->odr = 0;
|
|
|
|
s->pur = 0;
|
|
|
|
s->pdr = 0;
|
|
|
|
s->slr = 0;
|
|
|
|
s->den = 0;
|
|
|
|
s->locked = 1;
|
|
|
|
s->cr = 0xff;
|
|
|
|
s->amsel = 0;
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
|
|
|
|
2007-11-18 02:44:38 +01:00
|
|
|
static void pl061_set_irq(void * opaque, int irq, int level)
|
2007-11-11 01:04:49 +01:00
|
|
|
{
|
2013-07-26 17:21:21 +02:00
|
|
|
PL061State *s = (PL061State *)opaque;
|
2007-11-11 01:04:49 +01:00
|
|
|
uint8_t mask;
|
|
|
|
|
|
|
|
mask = 1 << irq;
|
|
|
|
if ((s->dir & mask) == 0) {
|
|
|
|
s->data &= ~mask;
|
|
|
|
if (level)
|
|
|
|
s->data |= mask;
|
|
|
|
pl061_update(s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-10 17:18:44 +02:00
|
|
|
static const MemoryRegionOps pl061_ops = {
|
|
|
|
.read = pl061_read,
|
|
|
|
.write = pl061_write,
|
|
|
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
2007-11-11 01:04:49 +01:00
|
|
|
};
|
|
|
|
|
2013-07-26 17:31:46 +02:00
|
|
|
static int pl061_initfn(SysBusDevice *sbd)
|
2007-11-11 01:04:49 +01:00
|
|
|
{
|
2013-07-26 17:31:46 +02:00
|
|
|
DeviceState *dev = DEVICE(sbd);
|
|
|
|
PL061State *s = PL061(dev);
|
|
|
|
|
2013-06-07 03:25:08 +02:00
|
|
|
memory_region_init_io(&s->iomem, OBJECT(s), &pl061_ops, s, "pl061", 0x1000);
|
2013-07-26 17:31:46 +02:00
|
|
|
sysbus_init_mmio(sbd, &s->iomem);
|
|
|
|
sysbus_init_irq(sbd, &s->irq);
|
|
|
|
qdev_init_gpio_in(dev, pl061_set_irq, 8);
|
|
|
|
qdev_init_gpio_out(dev, s->out, 8);
|
2016-02-18 15:16:17 +01:00
|
|
|
|
2009-08-14 10:36:05 +02:00
|
|
|
return 0;
|
2007-11-11 01:04:49 +01:00
|
|
|
}
|
2009-06-03 16:16:49 +02:00
|
|
|
|
2013-07-26 17:31:46 +02:00
|
|
|
static void pl061_luminary_init(Object *obj)
|
2011-02-21 21:57:51 +01:00
|
|
|
{
|
2013-07-26 17:31:46 +02:00
|
|
|
PL061State *s = PL061(obj);
|
|
|
|
|
|
|
|
s->id = pl061_id_luminary;
|
2016-02-18 17:56:20 +01:00
|
|
|
s->rsvd_start = 0x52c;
|
2011-02-21 21:57:51 +01:00
|
|
|
}
|
|
|
|
|
2013-07-26 17:31:46 +02:00
|
|
|
static void pl061_init(Object *obj)
|
2011-02-21 21:57:51 +01:00
|
|
|
{
|
2013-07-26 17:31:46 +02:00
|
|
|
PL061State *s = PL061(obj);
|
|
|
|
|
|
|
|
s->id = pl061_id;
|
2016-02-18 17:56:20 +01:00
|
|
|
s->rsvd_start = 0x424;
|
2011-02-21 21:57:51 +01:00
|
|
|
}
|
|
|
|
|
2012-01-24 20:12:29 +01:00
|
|
|
static void pl061_class_init(ObjectClass *klass, void *data)
|
|
|
|
{
|
2011-12-08 04:34:16 +01:00
|
|
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
2012-01-24 20:12:29 +01:00
|
|
|
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
|
|
2013-07-26 17:31:46 +02:00
|
|
|
k->init = pl061_initfn;
|
2011-12-08 04:34:16 +01:00
|
|
|
dc->vmsd = &vmstate_pl061;
|
2016-02-18 15:16:17 +01:00
|
|
|
dc->reset = &pl061_reset;
|
2012-01-24 20:12:29 +01:00
|
|
|
}
|
|
|
|
|
2013-01-10 16:19:07 +01:00
|
|
|
static const TypeInfo pl061_info = {
|
2013-07-26 17:31:46 +02:00
|
|
|
.name = TYPE_PL061,
|
2011-12-08 04:34:16 +01:00
|
|
|
.parent = TYPE_SYS_BUS_DEVICE,
|
2013-07-26 17:21:21 +02:00
|
|
|
.instance_size = sizeof(PL061State),
|
2013-07-26 17:31:46 +02:00
|
|
|
.instance_init = pl061_init,
|
2011-12-08 04:34:16 +01:00
|
|
|
.class_init = pl061_class_init,
|
2011-08-04 00:13:45 +02:00
|
|
|
};
|
|
|
|
|
2013-01-10 16:19:07 +01:00
|
|
|
static const TypeInfo pl061_luminary_info = {
|
2011-12-08 04:34:16 +01:00
|
|
|
.name = "pl061_luminary",
|
2013-07-26 17:31:46 +02:00
|
|
|
.parent = TYPE_PL061,
|
|
|
|
.instance_init = pl061_luminary_init,
|
2011-08-04 00:13:45 +02:00
|
|
|
};
|
|
|
|
|
2012-02-09 15:20:55 +01:00
|
|
|
static void pl061_register_types(void)
|
2009-06-03 16:16:49 +02:00
|
|
|
{
|
2011-12-08 04:34:16 +01:00
|
|
|
type_register_static(&pl061_info);
|
|
|
|
type_register_static(&pl061_luminary_info);
|
2009-06-03 16:16:49 +02:00
|
|
|
}
|
|
|
|
|
2012-02-09 15:20:55 +01:00
|
|
|
type_init(pl061_register_types)
|