qemu/include/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
..
allwinner-sdhost.h hw/sd: Fix sun4i allwinner-sdhost for U-Boot 2022-11-21 11:45:12 +00:00
aspeed_sdhci.h Fix SPDX-License-Identifier typos 2021-02-20 12:36:19 +01:00
bcm2835_sdhost.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cadence_sdhci.h hw/sd: Add Cadence SDHCI emulation 2020-09-09 15:54:18 -07:00
npcm7xx_sdhci.h hw/sd: add nuvoton MMC 2021-11-02 14:14:55 -04:00
sd.h hw/sd: Introduce receive_ready() callback 2021-02-20 00:17:09 +01:00
sdcard_legacy.h hw/sd: Rename read/write_data() as read/write_byte() 2020-08-21 16:35:35 +02:00
sdhci.h hw/sd/sdhci: Support big endian SD host controller interfaces 2022-12-21 14:17:55 -03:00