* [U-Boot] [PATCH] drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer
@ 2016-04-04 9:52 Mugunthan V N
2016-04-08 19:45 ` Tom Rini
2016-04-21 11:20 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Mugunthan V N @ 2016-04-04 9:52 UTC (permalink / raw)
To: u-boot
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 167efe01bc5a9 ("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>
---
drivers/mmc/omap_hsmmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index d191736..85a832b 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -773,7 +773,8 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
struct mmc_config *cfg;
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->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS;
--
2.8.0.rc3.9.g44915db
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer
2016-04-04 9:52 [U-Boot] [PATCH] drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer Mugunthan V N
@ 2016-04-08 19:45 ` Tom Rini
2016-04-21 11:20 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-04-08 19:45 UTC (permalink / raw)
To: u-boot
On Mon, Apr 04, 2016 at 03:22:49PM +0530, Mugunthan V N wrote:
> 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 167efe01bc5a9 ("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>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160408/e162815d/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer
2016-04-04 9:52 [U-Boot] [PATCH] drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer Mugunthan V N
2016-04-08 19:45 ` Tom Rini
@ 2016-04-21 11:20 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-04-21 11:20 UTC (permalink / raw)
To: u-boot
On Mon, Apr 04, 2016 at 03:22:49PM +0530, Mugunthan V N wrote:
> 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 167efe01bc5a9 ("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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/e8bc9f40/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-21 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04 9:52 [U-Boot] [PATCH] drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer Mugunthan V N
2016-04-08 19:45 ` Tom Rini
2016-04-21 11:20 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox