diff options
author | gonzo <gonzo@FreeBSD.org> | 2016-10-19 02:39:24 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2016-10-19 02:39:24 +0000 |
commit | 955a4414db9a95678b9bc42036673425b84a146b (patch) | |
tree | 4c3f024f622f75a42cd0e2061c58da24ceaf6480 /sys | |
parent | bd2fd5bbbee46d4c716f84ad9e2a5a6fb56c085f (diff) | |
download | FreeBSD-src-955a4414db9a95678b9bc42036673425b84a146b.zip FreeBSD-src-955a4414db9a95678b9bc42036673425b84a146b.tar.gz |
MFC r307239:
Fix BCM283x(Raspberry Pi) SDHCI driver for ARM64 build
- Revert BUS_SPACE_PHYSADDR back to rman_get_start. BUS_SPACE_PHYSADDR was
introduced in 2013 as temporary wrapper until proper solution appears.
It's ARM only and since we need this file for ARM64 build and no proper
API has been introduced - just revert the change and make sure it's
going to appear when people grep for BUS_SPACE_PHYSADDR in sources.
- Fix printf format for size_t variables
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2835_sdhci.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c index 54b103c..b74fefd 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c @@ -246,8 +246,9 @@ bcm_sdhci_attach(device_t dev) goto fail; } - sc->sc_sdhci_buffer_phys = BUS_SPACE_PHYSADDR(sc->sc_mem_res, - SDHCI_BUFFER); + /* FIXME: Fix along with other BUS_SPACE_PHYSADDR instances */ + sc->sc_sdhci_buffer_phys = rman_get_start(sc->sc_mem_res) + + SDHCI_BUFFER; bus_generic_probe(dev); bus_generic_attach(dev); @@ -552,7 +553,7 @@ bcm_sdhci_read_dma(device_t dev, struct sdhci_slot *slot) slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, - ("%s: len = %d, not word-aligned", __func__, left)); + ("%s: len = %zu, not word-aligned", __func__, left)); if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + slot->offset, left, @@ -581,7 +582,7 @@ bcm_sdhci_write_dma(device_t dev, struct sdhci_slot *slot) slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, - ("%s: len = %d, not word-aligned", __func__, left)); + ("%s: len = %zu, not word-aligned", __func__, left)); if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + slot->offset, left, |