mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
hw/sd/sdhci: Set reset value of interrupt registers
The interrupt enable registers are not reset to 0 on Freescale eSDHC but some bits are enabled on reset. At least some U-Boot versions seem to expect this and not initialise these registers before expecting interrupts. Use existing vendor property for Freescale eSDHC and set the reset value of the interrupt registers to match Freescale documentation. Signed-off-by: BALATON Zoltan <[email protected]> Message-ID: <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
This commit is contained in:
1 parent
825b96dbce
commit
d060b2789f
3 files changed
+6
No files matched your search
@@ -1043,6 +1043,7 @@ void ppce500_init(MachineState *machine)
|
||||
dev = qdev_new(TYPE_SYSBUS_SDHCI);
|
||||
qdev_prop_set_uint8(dev, "sd-spec-version", 2);
|
||||
qdev_prop_set_uint8(dev, "endianness", DEVICE_BIG_ENDIAN);
|
||||
qdev_prop_set_uint8(dev, "vendor", SDHCI_VENDOR_FSL);
|
||||
s = SYS_BUS_DEVICE(dev);
|
||||
sysbus_realize_and_unref(s, &error_fatal);
|
||||
sysbus_connect_irq(s, 0, qdev_get_gpio_in(mpicdev, MPC85XX_ESDHC_IRQ));
|
||||
|
||||
@@ -307,6 +307,10 @@ static void sdhci_reset(SDHCIState *s)
|
||||
s->data_count = 0;
|
||||
s->stopped_state = sdhc_not_stopped;
|
||||
s->pending_insert_state = false;
|
||||
if (s->vendor == SDHCI_VENDOR_FSL) {
|
||||
s->norintstsen = 0x013f;
|
||||
s->errintstsen = 0x117f;
|
||||
}
|
||||
}
|
||||
|
||||
static void sdhci_poweron_reset(DeviceState *dev)
|
||||
|
||||
@@ -110,6 +110,7 @@ typedef struct SDHCIState SDHCIState;
|
||||
|
||||
#define SDHCI_VENDOR_NONE 0
|
||||
#define SDHCI_VENDOR_IMX 1
|
||||
#define SDHCI_VENDOR_FSL 2
|
||||
|
||||
/*
|
||||
* Controller does not provide transfer-complete interrupt when not
|
||||
|
||||
Reference in new issue
Block a user