hw/arm/xilinx_zynqmp: fix the capabilities/spec version to match the datasheet
checking Xilinx datasheet "UG1085" (v1.7) Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-Id: <20180208164818.7961-27-f4bug@amsat.org>
This commit is contained in:
parent
7f072603e5
commit
b630d3d42a
@ -53,6 +53,8 @@
|
||||
#define IPI_ADDR 0xFF300000
|
||||
#define IPI_IRQ 64
|
||||
|
||||
#define SDHCI_CAPABILITIES 0x280737ec6481 /* Datasheet: UG1085 (v1.7) */
|
||||
|
||||
static const uint64_t gem_addr[XLNX_ZYNQMP_NUM_GEMS] = {
|
||||
0xFF0B0000, 0xFF0C0000, 0xFF0D0000, 0xFF0E0000,
|
||||
};
|
||||
@ -387,22 +389,27 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->sata), 0, gic_spi[SATA_INTR]);
|
||||
|
||||
for (i = 0; i < XLNX_ZYNQMP_NUM_SDHCI; i++) {
|
||||
char *bus_name;
|
||||
char *bus_name = g_strdup_printf("sd-bus%d", i);
|
||||
SysBusDevice *sbd = SYS_BUS_DEVICE(&s->sdhci[i]);
|
||||
Object *sdhci = OBJECT(&s->sdhci[i]);
|
||||
|
||||
object_property_set_bool(OBJECT(&s->sdhci[i]), true,
|
||||
"realized", &err);
|
||||
/* Compatible with:
|
||||
* - SD Host Controller Specification Version 3.00
|
||||
* - SDIO Specification Version 3.0
|
||||
* - eMMC Specification Version 4.51
|
||||
*/
|
||||
object_property_set_uint(sdhci, 3, "sd-spec-version", &err);
|
||||
object_property_set_uint(sdhci, SDHCI_CAPABILITIES, "capareg", &err);
|
||||
object_property_set_bool(sdhci, true, "realized", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->sdhci[i]), 0,
|
||||
sdhci_addr[i]);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->sdhci[i]), 0,
|
||||
gic_spi[sdhci_intr[i]]);
|
||||
sysbus_mmio_map(sbd, 0, sdhci_addr[i]);
|
||||
sysbus_connect_irq(sbd, 0, gic_spi[sdhci_intr[i]]);
|
||||
|
||||
/* Alias controller SD bus to the SoC itself */
|
||||
bus_name = g_strdup_printf("sd-bus%d", i);
|
||||
object_property_add_alias(OBJECT(s), bus_name,
|
||||
OBJECT(&s->sdhci[i]), "sd-bus",
|
||||
object_property_add_alias(OBJECT(s), bus_name, sdhci, "sd-bus",
|
||||
&error_abort);
|
||||
g_free(bus_name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user