mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 16:10:58 +00:00
drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer
omap_hsmmc driver directly typecasts fdt_addr_t to a pointer.
This is not strictly correct, as it gives a build warning when
fdt_addr_t is u64. So, use map_physmem for a proper typecasts.
This is inspired by commit 167efe01bc
("dm: ns16550: Use an address
instead of a pointer for the uart base")
drivers/mmc/omap_hsmmc.c: In function ‘omap_hsmmc_ofdata_to_platdata’:
drivers/mmc/omap_hsmmc.c:776:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
priv->base_addr = (struct hsmmc *)dev_get_addr(dev);
^
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
125d193c4f
commit
4bc5e19e12
1 changed files with 2 additions and 1 deletions
|
@ -773,7 +773,8 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
|
||||||
struct mmc_config *cfg;
|
struct mmc_config *cfg;
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
priv->base_addr = (struct hsmmc *)dev_get_addr(dev);
|
priv->base_addr = map_physmem(dev_get_addr(dev), sizeof(struct hsmmc *),
|
||||||
|
MAP_NOCACHE);
|
||||||
cfg = &priv->cfg;
|
cfg = &priv->cfg;
|
||||||
|
|
||||||
cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS;
|
cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS;
|
||||||
|
|
Loading…
Reference in a new issue