diff options
author | Pawel Laszczak <pawell@cadence.com> | 2020-12-15 11:27:09 +0100 |
---|---|---|
committer | Peter Chen <peter.chen@kernel.org> | 2021-01-14 09:01:33 +0800 |
commit | 6500f30b1642288f5564a508752bc20a44219e8d (patch) | |
tree | b45196f85e293980d2b22c9febec30f91a3daadc /drivers/usb/cdns3/drd.c | |
parent | 826a9584d14a7561f44eac86fe7d3c75c6bd2ad9 (diff) |
usb: cdns3: Adds missing __iomem markers
Patch adds missing __iomem markers in core.h file
and makes some changes in drd.c file related with
these markers.
The lack of __iomem has reported by sparse checker
on parsic architecture.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/drd.c')
-rw-r--r-- | drivers/usb/cdns3/drd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c index 605a413db727..fa5318ade3e1 100644 --- a/drivers/usb/cdns3/drd.c +++ b/drivers/usb/cdns3/drd.c @@ -27,7 +27,7 @@ */ static int cdns_set_mode(struct cdns *cdns, enum usb_dr_mode mode) { - u32 __iomem *override_reg; + void __iomem *override_reg; u32 reg; switch (mode) { @@ -406,7 +406,7 @@ int cdns_drd_init(struct cdns *cdns) cdns->otg_v1_regs = NULL; cdns->otg_cdnsp_regs = NULL; cdns->otg_regs = regs; - cdns->otg_irq_regs = (struct cdns_otg_irq_regs *) + cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *) &cdns->otg_v0_regs->ien; writel(1, &cdns->otg_v0_regs->simulate); dev_dbg(cdns->dev, "DRD version v0 (%08x)\n", @@ -416,14 +416,14 @@ int cdns_drd_init(struct cdns *cdns) cdns->otg_v1_regs = regs; cdns->otg_cdnsp_regs = regs; - cdns->otg_regs = (void *)&cdns->otg_v1_regs->cmd; + cdns->otg_regs = (void __iomem *)&cdns->otg_v1_regs->cmd; - if (cdns->otg_cdnsp_regs->did == OTG_CDNSP_DID) { - cdns->otg_irq_regs = (struct cdns_otg_irq_regs *) + if (readl(&cdns->otg_cdnsp_regs->did) == OTG_CDNSP_DID) { + cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *) &cdns->otg_cdnsp_regs->ien; cdns->version = CDNSP_CONTROLLER_V2; } else { - cdns->otg_irq_regs = (struct cdns_otg_irq_regs *) + cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *) &cdns->otg_v1_regs->ien; writel(1, &cdns->otg_v1_regs->simulate); cdns->version = CDNS3_CONTROLLER_V1; |