/*-------------------------------------------------------------------------*/
/* Read */
-static inline u32 _nbu2ss_readl(void *address)
+static inline u32 _nbu2ss_readl(void __iomem *address)
{
return __raw_readl(address);
}
/*-------------------------------------------------------------------------*/
/* Write */
-static inline void _nbu2ss_writel(void *address, u32 udata)
+static inline void _nbu2ss_writel(void __iomem *address, u32 udata)
{
__raw_writel(udata, address);
}
/*-------------------------------------------------------------------------*/
/* 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);
/*-------------------------------------------------------------------------*/
/* 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 num, buf_type;
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;
use_ram_size = 0;
{
u32 num;
u32 data;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (udc->vbus_active == 0)
return; /* VBUS OFF */
/* Abort DMA */
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);
mdelay(DMA_DISABLE_TIME); /* DCR1_EPN_REQEN Clear */
{
u32 data;
u32 num;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (length >= sizeof(u32))
return;
u32 burst = 1;
u32 data;
int result = -EINVAL;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag)
return 1; /* DMA is forwarded */
union usb_reg_access temp_32;
union usb_reg_access *p_buf_32;
int result = 0;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag)
return 1; /* DMA is forwarded */
u32 num;
u32 i_recv_length;
int result = 1;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (ep->epnum == 0)
return -EINVAL;
u32 i_write_length;
u32 data;
int result = -EINVAL;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag)
return 1; /* DMA is forwarded */
union usb_reg_access temp_32;
union usb_reg_access *p_buf_32 = NULL;
int result = 0;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag)
return 1; /* DMA is forwarded */
u8 num, epnum;
u32 data;
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 (bstall) {
{
u8 epnum;
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;
if (epnum == 0) {
u32 regdata;
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) {
for (limit_cnt = 0
int result = 0;
u32 status;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
if (req->dma_flag)
return; /* DMA is forwarded */
u32 num;
u32 dmacnt, ep_dmacnt;
u32 mpkt;
- struct fc_regs *preg = udc->p_regs;
+ struct fc_regs __iomem *preg = udc->p_regs;
num = ep->epnum - 1;
/*-------------------------------------------------------------------------*/
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)
return;
u32 epnum, int_bit;
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) {
_nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW);
struct nbu2ss_ep *ep;
struct nbu2ss_udc *udc;
unsigned long flags;
- struct fc_regs *preg;
+ struct fc_regs __iomem *preg;
if (!_ep) {
pr_err("%s, bad param\n", __func__);
0, driver_name, udc);
/* IO Memory */
- udc->p_regs = (struct fc_regs *)mmio_base;
+ udc->p_regs = (struct fc_regs __iomem *)mmio_base;
/* USB Function Controller Interrupt */
if (status != 0) {