Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a247baee authored by Stephen Boyd's avatar Stephen Boyd
Browse files

dwc3-msm: Add __iomem markings where needed



Sparse currently fails on this file with a "too many warnings"
message because these I/O read/write APIs don't have the proper
markings. Add them to silence sparse and catch future problems.

Change-Id: I9179dfe7dd0581e2b265fc9a7dad7b91fe013273
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent ffd90498
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ static inline bool is_valid_usb_speed(struct dwc3 *dwc, int speed)
 *
 * @return u32
 */
static inline u32 dwc3_msm_read_reg(void *base, u32 offset)
static inline u32 dwc3_msm_read_reg(void __iomem *base, u32 offset)
{
	u32 val = ioread32(base + offset);
	return val;
@@ -293,11 +293,11 @@ static inline u32 dwc3_msm_read_reg(void *base, u32 offset)
 *
 * @return u32
 */
static inline u32 dwc3_msm_read_reg_field(void *base,
static inline u32 dwc3_msm_read_reg_field(void __iomem *base,
					  u32 offset,
					  const u32 mask)
{
	u32 shift = find_first_bit((void *)&mask, 32);
	u32 shift = ffs(mask);
	u32 val = ioread32(base + offset);

	val &= mask;		/* clear other bits */
@@ -314,7 +314,7 @@ static inline u32 dwc3_msm_read_reg_field(void *base,
 * @val - value to write.
 *
 */
static inline void dwc3_msm_write_reg(void *base, u32 offset, u32 val)
static inline void dwc3_msm_write_reg(void __iomem *base, u32 offset, u32 val)
{
	iowrite32(val, base + offset);
}
@@ -328,7 +328,7 @@ static inline void dwc3_msm_write_reg(void *base, u32 offset, u32 val)
 * @val - value to write.
 *
 */
static inline void dwc3_msm_write_reg_field(void *base, u32 offset,
static inline void dwc3_msm_write_reg_field(void __iomem *base, u32 offset,
					    const u32 mask, u32 val)
{
	u32 shift = find_first_bit((void *)&mask, 32);
@@ -348,7 +348,7 @@ static inline void dwc3_msm_write_reg_field(void *base, u32 offset,
 * @val - value to write.
 *
 */
static inline void dwc3_msm_write_readback(void *base, u32 offset,
static inline void dwc3_msm_write_readback(void __iomem *base, u32 offset,
					    const u32 mask, u32 val)
{
	u32 write_val, tmp = ioread32(base + offset);