qemu-e2k/hw/sd
Philippe Mathieu-Daudé c0a55a0c9d hw/sd/sdhci: Support big endian SD host controller interfaces
Some SDHCI IP can be synthetized in various endianness:
https://github.com/u-boot/u-boot/blob/v2021.04/doc/README.fsl-esdhc

 - CONFIG_SYS_FSL_ESDHC_BE

   ESDHC IP is in big-endian mode. Accessing ESDHC registers can be
   determined by ESDHC IP's endian mode or processor's endian mode.

Our current implementation is little-endian. In order to support
big endianness:

- Rename current MemoryRegionOps as sdhci_mmio_le_ops ('le')
- Add an 'endianness' property to SDHCIState (default little endian)
- Set the 'io_ops' field in realize() after checking the property
- Add the sdhci_mmio_be_ops (big-endian) MemoryRegionOps.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20221101222934.52444-3-philmd@linaro.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2022-12-21 14:17:55 -03:00
..
Kconfig hw/sd: Add Cadence SDHCI emulation 2020-09-09 15:54:18 -07:00
allwinner-sdhost.c hw/sd: Fix sun4i allwinner-sdhost for U-Boot 2022-11-21 11:45:12 +00:00
aspeed_sdhci.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
bcm2835_sdhost.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
cadence_sdhci.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
core.c hw/sd: Introduce receive_ready() callback 2021-02-20 00:17:09 +01:00
meson.build hw/sd: add nuvoton MMC 2021-11-02 14:14:55 -04:00
npcm7xx_sdhci.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
omap_mmc.c hw/sd/omap_mmc: Use device_cold_reset() instead of device_legacy_reset() 2021-05-10 17:21:53 +01:00
pl181.c qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
pxa2xx_mmci.c qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
sd.c block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
sdhci-internal.h hw/sd/sdhci: Support big endian SD host controller interfaces 2022-12-21 14:17:55 -03:00
sdhci-pci.c sd: Use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
sdhci.c hw/sd/sdhci: Support big endian SD host controller interfaces 2022-12-21 14:17:55 -03:00
sdmmc-internal.c sdcard: Display command name when tracing CMD/ACMD 2018-03-09 17:09:44 +00:00
sdmmc-internal.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
ssi-sd.c hw/sd/ssi-sd: Do not create SD card within controller's realize 2021-12-15 08:38:16 +01:00
trace-events speed/sdhci: Add trace events 2021-10-22 09:52:17 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00