@@ -46,14 +46,14 @@ static inline u32 osd_read(struct osd_state *sd, u32 offset)
{
struct osd_state *osd = sd;
- return readl(osd->osd_base + offset);
+ return readl(IOMEM(osd->osd_base + offset));
}
static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset)
{
struct osd_state *osd = sd;
- writel(val, osd->osd_base + offset);
+ writel(val, IOMEM(osd->osd_base + offset));
return val;
}
@@ -63,9 +63,9 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset)
struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset;
- u32 val = readl(addr) | mask;
+ u32 val = readl(IOMEM(addr)) | mask;
- writel(val, addr);
+ writel(val, IOMEM(addr));
return val;
}
@@ -75,9 +75,9 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset)
struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset;
- u32 val = readl(addr) & ~mask;
+ u32 val = readl(IOMEM(addr)) & ~mask;
- writel(val, addr);
+ writel(val, IOMEM(addr));
return val;
}
@@ -88,9 +88,9 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val,
struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset;
- u32 new_val = (readl(addr) & ~mask) | (val & mask);
+ u32 new_val = (readl(IOMEM(addr)) & ~mask) | (val & mask);
- writel(new_val, addr);
+ writel(new_val, IOMEM(addr));
return new_val;
}