Author: gonzo
Date: Wed Oct 19 02:39:24 2016
New Revision: 307601
URL: https://svnweb.freebsd.org/changeset/base/307601

Log:
  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

Modified:
  stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c  Wed Oct 19 02:24:57 
2016        (r307600)
+++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c  Wed Oct 19 02:39:24 
2016        (r307601)
@@ -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 
            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
            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, 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to