Commit 64407f6e authored by Carmeli Tamir's avatar Carmeli Tamir Committed by Greg Kroah-Hartman

staging: emxx_udc: Added missing __iomem modifier to handle p_regs

Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is
marked as __iomem, p_regs also should be market with __iomem.
Signed-off-by: default avatarCarmeli Tamir <carmeli.tamir@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3f9da94d
...@@ -60,21 +60,21 @@ static struct nbu2ss_udc udc_controller; ...@@ -60,21 +60,21 @@ static struct nbu2ss_udc udc_controller;
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* Read */ /* Read */
static inline u32 _nbu2ss_readl(void *address) static inline u32 _nbu2ss_readl(void __iomem *address)
{ {
return __raw_readl(address); return __raw_readl(address);
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* Write */ /* Write */
static inline void _nbu2ss_writel(void *address, u32 udata) static inline void _nbu2ss_writel(void __iomem *address, u32 udata)
{ {
__raw_writel(udata, address); __raw_writel(udata, address);
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* Set Bit */ /* Set Bit */
static inline void _nbu2ss_bitset(void *address, u32 udata) static inline void _nbu2ss_bitset(void __iomem *address, u32 udata)
{ {
u32 reg_dt = __raw_readl(address) | (udata); u32 reg_dt = __raw_readl(address) | (udata);
...@@ -83,7 +83,7 @@ static inline void _nbu2ss_bitset(void *address, u32 udata) ...@@ -83,7 +83,7 @@ static inline void _nbu2ss_bitset(void *address, u32 udata)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* Clear Bit */ /* Clear Bit */
static inline void _nbu2ss_bitclr(void *address, u32 udata) static inline void _nbu2ss_bitclr(void __iomem *address, u32 udata)
{ {
u32 reg_dt = __raw_readl(address) & ~(udata); u32 reg_dt = __raw_readl(address) & ~(udata);
...@@ -184,7 +184,7 @@ static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc) ...@@ -184,7 +184,7 @@ static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc)
u32 num, buf_type; u32 num, buf_type;
u32 data, last_ram_adr, use_ram_size; u32 data, last_ram_adr, use_ram_size;
struct ep_regs *p_ep_regs; struct ep_regs __iomem *p_ep_regs;
last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2; last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2;
use_ram_size = 0; use_ram_size = 0;
...@@ -377,7 +377,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) ...@@ -377,7 +377,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
{ {
u32 num; u32 num;
u32 data; u32 data;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (udc->vbus_active == 0) if (udc->vbus_active == 0)
return; /* VBUS OFF */ return; /* VBUS OFF */
...@@ -408,7 +408,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) ...@@ -408,7 +408,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
/* Abort DMA */ /* Abort DMA */
static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
{ {
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
_nbu2ss_bitclr(&preg->EP_DCR[ep->epnum - 1].EP_DCR1, DCR1_EPN_REQEN); _nbu2ss_bitclr(&preg->EP_DCR[ep->epnum - 1].EP_DCR1, DCR1_EPN_REQEN);
mdelay(DMA_DISABLE_TIME); /* DCR1_EPN_REQEN Clear */ mdelay(DMA_DISABLE_TIME); /* DCR1_EPN_REQEN Clear */
...@@ -426,7 +426,7 @@ static void _nbu2ss_ep_in_end( ...@@ -426,7 +426,7 @@ static void _nbu2ss_ep_in_end(
{ {
u32 data; u32 data;
u32 num; u32 num;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (length >= sizeof(u32)) if (length >= sizeof(u32))
return; return;
...@@ -817,7 +817,7 @@ static int _nbu2ss_out_dma( ...@@ -817,7 +817,7 @@ static int _nbu2ss_out_dma(
u32 burst = 1; u32 burst = 1;
u32 data; u32 data;
int result = -EINVAL; int result = -EINVAL;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag) if (req->dma_flag)
return 1; /* DMA is forwarded */ return 1; /* DMA is forwarded */
...@@ -880,7 +880,7 @@ static int _nbu2ss_epn_out_pio( ...@@ -880,7 +880,7 @@ static int _nbu2ss_epn_out_pio(
union usb_reg_access temp_32; union usb_reg_access temp_32;
union usb_reg_access *p_buf_32; union usb_reg_access *p_buf_32;
int result = 0; int result = 0;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag) if (req->dma_flag)
return 1; /* DMA is forwarded */ return 1; /* DMA is forwarded */
...@@ -964,7 +964,7 @@ static int _nbu2ss_epn_out_transfer( ...@@ -964,7 +964,7 @@ static int _nbu2ss_epn_out_transfer(
u32 num; u32 num;
u32 i_recv_length; u32 i_recv_length;
int result = 1; int result = 1;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (ep->epnum == 0) if (ep->epnum == 0)
return -EINVAL; return -EINVAL;
...@@ -1026,7 +1026,7 @@ static int _nbu2ss_in_dma( ...@@ -1026,7 +1026,7 @@ static int _nbu2ss_in_dma(
u32 i_write_length; u32 i_write_length;
u32 data; u32 data;
int result = -EINVAL; int result = -EINVAL;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag) if (req->dma_flag)
return 1; /* DMA is forwarded */ return 1; /* DMA is forwarded */
...@@ -1101,7 +1101,7 @@ static int _nbu2ss_epn_in_pio( ...@@ -1101,7 +1101,7 @@ static int _nbu2ss_epn_in_pio(
union usb_reg_access temp_32; union usb_reg_access temp_32;
union usb_reg_access *p_buf_32 = NULL; union usb_reg_access *p_buf_32 = NULL;
int result = 0; int result = 0;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag) if (req->dma_flag)
return 1; /* DMA is forwarded */ return 1; /* DMA is forwarded */
...@@ -1317,7 +1317,7 @@ static void _nbu2ss_set_endpoint_stall( ...@@ -1317,7 +1317,7 @@ static void _nbu2ss_set_endpoint_stall(
u8 num, epnum; u8 num, epnum;
u32 data; u32 data;
struct nbu2ss_ep *ep; struct nbu2ss_ep *ep;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if ((ep_adrs == 0) || (ep_adrs == 0x80)) { if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
if (bstall) { if (bstall) {
...@@ -1421,7 +1421,7 @@ static int _nbu2ss_get_ep_stall(struct nbu2ss_udc *udc, u8 ep_adrs) ...@@ -1421,7 +1421,7 @@ static int _nbu2ss_get_ep_stall(struct nbu2ss_udc *udc, u8 ep_adrs)
{ {
u8 epnum; u8 epnum;
u32 data = 0, bit_data; u32 data = 0, bit_data;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
epnum = ep_adrs & ~USB_ENDPOINT_DIR_MASK; epnum = ep_adrs & ~USB_ENDPOINT_DIR_MASK;
if (epnum == 0) { if (epnum == 0) {
...@@ -1516,7 +1516,7 @@ static void _nbu2ss_epn_set_stall( ...@@ -1516,7 +1516,7 @@ static void _nbu2ss_epn_set_stall(
u32 regdata; u32 regdata;
int limit_cnt = 0; int limit_cnt = 0;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (ep->direct == USB_DIR_IN) { if (ep->direct == USB_DIR_IN) {
for (limit_cnt = 0 for (limit_cnt = 0
...@@ -1924,7 +1924,7 @@ static inline void _nbu2ss_epn_in_int( ...@@ -1924,7 +1924,7 @@ static inline void _nbu2ss_epn_in_int(
int result = 0; int result = 0;
u32 status; u32 status;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag) if (req->dma_flag)
return; /* DMA is forwarded */ return; /* DMA is forwarded */
...@@ -2019,7 +2019,7 @@ static inline void _nbu2ss_epn_out_dma_int( ...@@ -2019,7 +2019,7 @@ static inline void _nbu2ss_epn_out_dma_int(
u32 num; u32 num;
u32 dmacnt, ep_dmacnt; u32 dmacnt, ep_dmacnt;
u32 mpkt; u32 mpkt;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
num = ep->epnum - 1; num = ep->epnum - 1;
...@@ -2195,7 +2195,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on) ...@@ -2195,7 +2195,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static void _nbu2ss_fifo_flush(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) static void _nbu2ss_fifo_flush(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
{ {
struct fc_regs *p = udc->p_regs; struct fc_regs __iomem *p = udc->p_regs;
if (udc->vbus_active == 0) if (udc->vbus_active == 0)
return; return;
...@@ -2413,7 +2413,7 @@ static irqreturn_t _nbu2ss_udc_irq(int irq, void *_udc) ...@@ -2413,7 +2413,7 @@ static irqreturn_t _nbu2ss_udc_irq(int irq, void *_udc)
u32 epnum, int_bit; u32 epnum, int_bit;
struct nbu2ss_udc *udc = (struct nbu2ss_udc *)_udc; struct nbu2ss_udc *udc = (struct nbu2ss_udc *)_udc;
struct fc_regs *preg = udc->p_regs; struct fc_regs __iomem *preg = udc->p_regs;
if (gpio_get_value(VBUS_VALUE) == 0) { if (gpio_get_value(VBUS_VALUE) == 0) {
_nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW); _nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW);
...@@ -2804,7 +2804,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep) ...@@ -2804,7 +2804,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
struct nbu2ss_ep *ep; struct nbu2ss_ep *ep;
struct nbu2ss_udc *udc; struct nbu2ss_udc *udc;
unsigned long flags; unsigned long flags;
struct fc_regs *preg; struct fc_regs __iomem *preg;
if (!_ep) { if (!_ep) {
pr_err("%s, bad param\n", __func__); pr_err("%s, bad param\n", __func__);
...@@ -3177,7 +3177,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev) ...@@ -3177,7 +3177,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
0, driver_name, udc); 0, driver_name, udc);
/* IO Memory */ /* IO Memory */
udc->p_regs = (struct fc_regs *)mmio_base; udc->p_regs = (struct fc_regs __iomem *)mmio_base;
/* USB Function Controller Interrupt */ /* USB Function Controller Interrupt */
if (status != 0) { if (status != 0) {
......
...@@ -582,7 +582,7 @@ struct nbu2ss_udc { ...@@ -582,7 +582,7 @@ struct nbu2ss_udc {
u32 curr_config; /* Current Configuration Number */ u32 curr_config; /* Current Configuration Number */
struct fc_regs *p_regs; struct fc_regs __iomem *p_regs;
}; };
/* USB register access structure */ /* USB register access structure */
......
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