Commit baa29837 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by Mauro Carvalho Chehab

[media] media: davinci: vpbe: fix build warning

Warnings were generated because of the following commit changed data type for
address pointer
195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
add  __iomem annotation to fix following warnings
drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’:
drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing
 argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default]
arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile
 void *’ but argument is of type ‘long unsigned int’
This patch stores the ioremap_nocache() returned address in a
void __iomem * instead of a unsigned long and passes the same to
readl/writel functions which fixes the above warnings.
Signed-off-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: default avatarManjunath Hadli <manjunath.hadli@ti.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8c5dff90
...@@ -62,7 +62,7 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) ...@@ -62,7 +62,7 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset)
{ {
struct osd_state *osd = sd; struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset; void __iomem *addr = osd->osd_base + offset;
u32 val = readl(addr) | mask; u32 val = readl(addr) | mask;
writel(val, addr); writel(val, addr);
...@@ -74,7 +74,7 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) ...@@ -74,7 +74,7 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset)
{ {
struct osd_state *osd = sd; struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset; void __iomem *addr = osd->osd_base + offset;
u32 val = readl(addr) & ~mask; u32 val = readl(addr) & ~mask;
writel(val, addr); writel(val, addr);
...@@ -87,7 +87,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, ...@@ -87,7 +87,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val,
{ {
struct osd_state *osd = sd; struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset; void __iomem *addr = osd->osd_base + offset;
u32 new_val = (readl(addr) & ~mask) | (val & mask); u32 new_val = (readl(addr) & ~mask) | (val & mask);
writel(new_val, addr); writel(new_val, addr);
...@@ -1559,8 +1559,7 @@ static int osd_probe(struct platform_device *pdev) ...@@ -1559,8 +1559,7 @@ static int osd_probe(struct platform_device *pdev)
ret = -ENODEV; ret = -ENODEV;
goto free_mem; goto free_mem;
} }
osd->osd_base = (unsigned long)ioremap_nocache(res->start, osd->osd_base = ioremap_nocache(res->start, osd->osd_size);
osd->osd_size);
if (!osd->osd_base) { if (!osd->osd_base) {
dev_err(osd->dev, "Unable to map the OSD region\n"); dev_err(osd->dev, "Unable to map the OSD region\n");
ret = -ENODEV; ret = -ENODEV;
......
...@@ -357,7 +357,7 @@ struct osd_state { ...@@ -357,7 +357,7 @@ struct osd_state {
spinlock_t lock; spinlock_t lock;
struct device *dev; struct device *dev;
dma_addr_t osd_base_phys; dma_addr_t osd_base_phys;
unsigned long osd_base; void __iomem *osd_base;
unsigned long osd_size; unsigned long osd_size;
/* 1-->the isr will toggle the VID0 ping-pong buffer */ /* 1-->the isr will toggle the VID0 ping-pong buffer */
int pingpong; int pingpong;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment