ppc4xx: Rename ppc405-plb to ppc4xx-plb

This device is shared between different 4xx socs.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <5b13ebfd12a71a28035bed5a915cbeee81cf21d1.1660746880.git.balaton@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
BALATON Zoltan 2022-08-17 17:08:31 +02:00 committed by Daniel Henrique Barboza
parent 2d54aaf121
commit 052c779b4c
5 changed files with 12 additions and 12 deletions

View File

@ -232,7 +232,7 @@ struct Ppc405SoCState {
Ppc405EbcState ebc;
Ppc405OpbaState opba;
Ppc405PobState pob;
Ppc405PlbState plb;
Ppc4xxPlbState plb;
Ppc4xxMalState mal;
};

View File

@ -1286,7 +1286,7 @@ static void ppc405_soc_instance_init(Object *obj)
object_initialize_child(obj, "pob", &s->pob, TYPE_PPC405_POB);
object_initialize_child(obj, "plb", &s->plb, TYPE_PPC405_PLB);
object_initialize_child(obj, "plb", &s->plb, TYPE_PPC4xx_PLB);
object_initialize_child(obj, "mal", &s->mal, TYPE_PPC4xx_MAL);
}

View File

@ -671,7 +671,7 @@ enum {
static uint32_t dcr_read_plb(void *opaque, int dcrn)
{
Ppc405PlbState *plb = opaque;
Ppc4xxPlbState *plb = opaque;
uint32_t ret;
switch (dcrn) {
@ -695,7 +695,7 @@ static uint32_t dcr_read_plb(void *opaque, int dcrn)
static void dcr_write_plb(void *opaque, int dcrn, uint32_t val)
{
Ppc405PlbState *plb = opaque;
Ppc4xxPlbState *plb = opaque;
switch (dcrn) {
case PLB0_ACR:
@ -717,7 +717,7 @@ static void dcr_write_plb(void *opaque, int dcrn, uint32_t val)
static void ppc405_plb_reset(DeviceState *dev)
{
Ppc405PlbState *plb = PPC405_PLB(dev);
Ppc4xxPlbState *plb = PPC4xx_PLB(dev);
plb->acr = 0x00000000;
plb->bear = 0x00000000;
@ -726,7 +726,7 @@ static void ppc405_plb_reset(DeviceState *dev)
static void ppc405_plb_realize(DeviceState *dev, Error **errp)
{
Ppc405PlbState *plb = PPC405_PLB(dev);
Ppc4xxPlbState *plb = PPC4xx_PLB(dev);
Ppc4xxDcrDeviceState *dcr = PPC4xx_DCR_DEVICE(dev);
ppc4xx_dcr_register(dcr, PLB3A0_ACR, plb, &dcr_read_plb, &dcr_write_plb);
@ -784,9 +784,9 @@ static const TypeInfo ppc4xx_types[] = {
.instance_finalize = ppc4xx_mal_finalize,
.class_init = ppc4xx_mal_class_init,
}, {
.name = TYPE_PPC405_PLB,
.name = TYPE_PPC4xx_PLB,
.parent = TYPE_PPC4xx_DCR_DEVICE,
.instance_size = sizeof(Ppc405PlbState),
.instance_size = sizeof(Ppc4xxPlbState),
.class_init = ppc405_plb_class_init,
}, {
.name = TYPE_PPC4xx_DCR_DEVICE,

View File

@ -308,7 +308,7 @@ static void sam460ex_init(MachineState *machine)
ppc_dcr_init(env, NULL, NULL);
/* PLB arbitrer */
dev = qdev_new(TYPE_PPC405_PLB);
dev = qdev_new(TYPE_PPC4xx_PLB);
ppc4xx_dcr_realize(PPC4xx_DCR_DEVICE(dev), cpu, &error_fatal);
object_unref(OBJECT(dev));

View File

@ -84,9 +84,9 @@ struct Ppc4xxMalState {
};
/* Peripheral local bus arbitrer */
#define TYPE_PPC405_PLB "ppc405-plb"
OBJECT_DECLARE_SIMPLE_TYPE(Ppc405PlbState, PPC405_PLB);
struct Ppc405PlbState {
#define TYPE_PPC4xx_PLB "ppc4xx-plb"
OBJECT_DECLARE_SIMPLE_TYPE(Ppc4xxPlbState, PPC4xx_PLB);
struct Ppc4xxPlbState {
Ppc4xxDcrDeviceState parent_obj;
uint32_t acr;