Commit 092c78f2 authored by Hugo Camboulive's avatar Hugo Camboulive Committed by Greg Kroah-Hartman

staging: most: add __iomem for io_base and registers

This removes a few Sparse warnings.
Signed-off-by: default avatarHugo Camboulive <hugo.camboulive@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7f2b70f
...@@ -84,7 +84,7 @@ static inline bool dim_on_error(u8 error_id, const char *error_message) ...@@ -84,7 +84,7 @@ static inline bool dim_on_error(u8 error_id, const char *error_message)
struct lld_global_vars_t { struct lld_global_vars_t {
bool dim_is_initialized; bool dim_is_initialized;
bool mcm_is_initialized; bool mcm_is_initialized;
struct dim2_regs *dim2; /* DIM2 core base address */ struct dim2_regs __iomem *dim2; /* DIM2 core base address */
u32 dbr_map[DBR_MAP_SIZE]; u32 dbr_map[DBR_MAP_SIZE];
}; };
...@@ -650,7 +650,7 @@ static bool channel_detach_buffers(struct dim_channel *ch, u16 buffers_number) ...@@ -650,7 +650,7 @@ static bool channel_detach_buffers(struct dim_channel *ch, u16 buffers_number)
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* API */ /* API */
u8 dim_startup(void *dim_base_address, u32 mlb_clock) u8 dim_startup(struct dim2_regs __iomem *dim_base_address, u32 mlb_clock)
{ {
g.dim_is_initialized = false; g.dim_is_initialized = false;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#define _DIM2_HAL_H #define _DIM2_HAL_H
#include <linux/types.h> #include <linux/types.h>
#include "dim2_reg.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -65,7 +66,7 @@ struct dim_channel { ...@@ -65,7 +66,7 @@ struct dim_channel {
u16 done_sw_buffers_number; /*< Done software buffers number. */ u16 done_sw_buffers_number; /*< Done software buffers number. */
}; };
u8 dim_startup(void *dim_base_address, u32 mlb_clock); u8 dim_startup(struct dim2_regs __iomem *dim_base_address, u32 mlb_clock);
void dim_shutdown(void); void dim_shutdown(void);
...@@ -103,9 +104,9 @@ bool dim_enqueue_buffer(struct dim_channel *ch, u32 buffer_addr, ...@@ -103,9 +104,9 @@ bool dim_enqueue_buffer(struct dim_channel *ch, u32 buffer_addr,
bool dim_detach_buffers(struct dim_channel *ch, u16 buffers_number); bool dim_detach_buffers(struct dim_channel *ch, u16 buffers_number);
u32 dimcb_io_read(u32 *ptr32); u32 dimcb_io_read(u32 __iomem *ptr32);
void dimcb_io_write(u32 *ptr32, u32 value); void dimcb_io_write(u32 __iomem *ptr32, u32 value);
void dimcb_on_error(u8 error_id, const char *error_message); void dimcb_on_error(u8 error_id, const char *error_message);
......
...@@ -99,7 +99,7 @@ struct dim2_hdm { ...@@ -99,7 +99,7 @@ struct dim2_hdm {
struct most_channel_capability capabilities[DMA_CHANNELS]; struct most_channel_capability capabilities[DMA_CHANNELS];
struct most_interface most_iface; struct most_interface most_iface;
char name[16 + sizeof "dim2-"]; char name[16 + sizeof "dim2-"];
void *io_base; void __iomem *io_base;
unsigned int irq_ahb0; unsigned int irq_ahb0;
int clk_speed; int clk_speed;
struct task_struct *netinfo_task; struct task_struct *netinfo_task;
...@@ -138,7 +138,7 @@ bool dim2_sysfs_get_state_cb(void) ...@@ -138,7 +138,7 @@ bool dim2_sysfs_get_state_cb(void)
* dimcb_io_read - callback from HAL to read an I/O register * dimcb_io_read - callback from HAL to read an I/O register
* @ptr32: register address * @ptr32: register address
*/ */
u32 dimcb_io_read(u32 *ptr32) u32 dimcb_io_read(u32 __iomem *ptr32)
{ {
return readl(ptr32); return readl(ptr32);
} }
...@@ -148,7 +148,7 @@ u32 dimcb_io_read(u32 *ptr32) ...@@ -148,7 +148,7 @@ u32 dimcb_io_read(u32 *ptr32)
* @ptr32: register address * @ptr32: register address
* @value: value to write * @value: value to write
*/ */
void dimcb_io_write(u32 *ptr32, u32 value) void dimcb_io_write(u32 __iomem *ptr32, u32 value)
{ {
writel(value, ptr32); writel(value, ptr32);
} }
......
...@@ -18,7 +18,7 @@ struct device; ...@@ -18,7 +18,7 @@ struct device;
/* platform dependent data for dim2 interface */ /* platform dependent data for dim2 interface */
struct dim2_platform_data { struct dim2_platform_data {
int (*init)(struct dim2_platform_data *pd, void *io_base, int (*init)(struct dim2_platform_data *pd, void __iomem *io_base,
int clk_speed); int clk_speed);
void (*destroy)(struct dim2_platform_data *pd); void (*destroy)(struct dim2_platform_data *pd);
void *priv; void *priv;
......
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