Message ID | 1465835259-21449-11-git-send-email-fred.konrad@greensocs.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Jun 13, 2016 at 9:27 AM, <fred.konrad@greensocs.com> wrote: > From: KONRAD Frederic <fred.konrad@greensocs.com> > > This adds the zynqmp_crf to the zynqmp platform. > > Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> > --- > hw/arm/xlnx-zynqmp.c | 7 +++++++ > include/hw/arm/xlnx-zynqmp.h | 1 + > 2 files changed, 8 insertions(+) > > diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c > index 4d504da..a8b7669 100644 > --- a/hw/arm/xlnx-zynqmp.c > +++ b/hw/arm/xlnx-zynqmp.c > @@ -135,6 +135,11 @@ static void xlnx_zynqmp_init(Object *obj) > TYPE_XILINX_SPIPS); > qdev_set_parent_bus(DEVICE(&s->spi[i]), sysbus_get_default()); > } > + > + s->crf = object_new("xlnx.zynqmp_crf"); > + qdev_set_parent_bus(DEVICE(s->crf), sysbus_get_default()); > + object_property_add_child(obj, "xlnx.zynqmp_crf", OBJECT(s->crf), > + &error_abort); > } > > static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) > @@ -366,6 +371,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) > &error_abort); > g_free(bus_name); > } > + > + sysbus_mmio_map(SYS_BUS_DEVICE(s->crf), 0, 0xFD1A0000); Shouldn't this be realised? Also macro for the address. > } > > static Property xlnx_zynqmp_props[] = { > diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h > index 2332596..78fed6e 100644 > --- a/include/hw/arm/xlnx-zynqmp.h > +++ b/include/hw/arm/xlnx-zynqmp.h > @@ -81,6 +81,7 @@ typedef struct XlnxZynqMPState { > SysbusAHCIState sata; > SDHCIState sdhci[XLNX_ZYNQMP_NUM_SDHCI]; > XilinxSPIPS spi[XLNX_ZYNQMP_NUM_SPIS]; > + Object *crf; Can we follow the same way as the other devices? You'll need to split a header file out for the device then. Thanks, Alistair > > char *boot_cpu; > ARMCPU *boot_cpu_ptr; > -- > 2.5.5 > >
Le 02/07/2016 à 01:11, Alistair Francis a écrit : > On Mon, Jun 13, 2016 at 9:27 AM, <fred.konrad@greensocs.com> wrote: >> From: KONRAD Frederic <fred.konrad@greensocs.com> >> >> This adds the zynqmp_crf to the zynqmp platform. >> >> Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> >> --- >> hw/arm/xlnx-zynqmp.c | 7 +++++++ >> include/hw/arm/xlnx-zynqmp.h | 1 + >> 2 files changed, 8 insertions(+) >> >> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c >> index 4d504da..a8b7669 100644 >> --- a/hw/arm/xlnx-zynqmp.c >> +++ b/hw/arm/xlnx-zynqmp.c >> @@ -135,6 +135,11 @@ static void xlnx_zynqmp_init(Object *obj) >> TYPE_XILINX_SPIPS); >> qdev_set_parent_bus(DEVICE(&s->spi[i]), sysbus_get_default()); >> } >> + >> + s->crf = object_new("xlnx.zynqmp_crf"); >> + qdev_set_parent_bus(DEVICE(s->crf), sysbus_get_default()); >> + object_property_add_child(obj, "xlnx.zynqmp_crf", OBJECT(s->crf), >> + &error_abort); >> } >> >> static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) >> @@ -366,6 +371,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) >> &error_abort); >> g_free(bus_name); >> } >> + >> + sysbus_mmio_map(SYS_BUS_DEVICE(s->crf), 0, 0xFD1A0000); > Shouldn't this be realised? > > Also macro for the address. > >> } >> >> static Property xlnx_zynqmp_props[] = { >> diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h >> index 2332596..78fed6e 100644 >> --- a/include/hw/arm/xlnx-zynqmp.h >> +++ b/include/hw/arm/xlnx-zynqmp.h >> @@ -81,6 +81,7 @@ typedef struct XlnxZynqMPState { >> SysbusAHCIState sata; >> SDHCIState sdhci[XLNX_ZYNQMP_NUM_SDHCI]; >> XilinxSPIPS spi[XLNX_ZYNQMP_NUM_SPIS]; >> + Object *crf; > Can we follow the same way as the other devices? Yes I can do that. > > You'll need to split a header file out for the device then. > > Thanks, > > Alistair > >> char *boot_cpu; >> ARMCPU *boot_cpu_ptr; >> -- >> 2.5.5 >> >>
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 4d504da..a8b7669 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -135,6 +135,11 @@ static void xlnx_zynqmp_init(Object *obj) TYPE_XILINX_SPIPS); qdev_set_parent_bus(DEVICE(&s->spi[i]), sysbus_get_default()); } + + s->crf = object_new("xlnx.zynqmp_crf"); + qdev_set_parent_bus(DEVICE(s->crf), sysbus_get_default()); + object_property_add_child(obj, "xlnx.zynqmp_crf", OBJECT(s->crf), + &error_abort); } static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) @@ -366,6 +371,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) &error_abort); g_free(bus_name); } + + sysbus_mmio_map(SYS_BUS_DEVICE(s->crf), 0, 0xFD1A0000); } static Property xlnx_zynqmp_props[] = { diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h index 2332596..78fed6e 100644 --- a/include/hw/arm/xlnx-zynqmp.h +++ b/include/hw/arm/xlnx-zynqmp.h @@ -81,6 +81,7 @@ typedef struct XlnxZynqMPState { SysbusAHCIState sata; SDHCIState sdhci[XLNX_ZYNQMP_NUM_SDHCI]; XilinxSPIPS spi[XLNX_ZYNQMP_NUM_SPIS]; + Object *crf; char *boot_cpu; ARMCPU *boot_cpu_ptr;