> Von: Bernhard Messerklinger <bernhard.messerklin...@br-automation.com>
> An: u-boot@lists.denx.de
> Kopie: hannes.schmel...@br-automation.com, Bernhard Messerklinger 
> <bernhard.messerklin...@br-automation.com>, Bin Meng 
<bmeng...@gmail.com>, 
> Simon Glass <s...@chromium.org>, Jaehoon Chung <jh80.ch...@samsung.com>
> Datum: 15.02.2018 09:09
> Betreff: [PATCH] x86: mmc: Fix mapping of BAR memory
> 
> Use dm_pci_map_bar function for BAR mapping. This has the advantage
> of clearing BAR flags and and only accepting mapped memory.
> 
> Signed-off-by: Bernhard Messerklinger 
<bernhard.messerklin...@br-automation.com>
> ---
> 
>  drivers/mmc/pci_mmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c
> index 05c0044a7a..616af5afbf 100644
> --- a/drivers/mmc/pci_mmc.c
> +++ b/drivers/mmc/pci_mmc.c
> @@ -29,11 +29,10 @@ static int pci_mmc_probe(struct udevice *dev)
>     struct pci_mmc_plat *plat = dev_get_platdata(dev);
>     struct pci_mmc_priv *priv = dev_get_priv(dev);
>     struct sdhci_host *host = &priv->host;
> -   u32 ioaddr;
>     int ret;
> 
> -   dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &ioaddr);
> -   host->ioaddr = map_sysmem(ioaddr, 0);
> +   host->ioaddr = (void *)dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0,
> +                      PCI_REGION_MEM);
>     host->name = dev->name;
>     ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);
>     if (ret)
> -- 
> 2.16.1
> 

Reviewed-by: Hannes Schmelzer <hannes.schmel...@br-automation.com>


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to