Commit d65f0cd3 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller

sparc32: fix sparse warnings in leon_pci_grpci1.c

Fix following warnings:
leon_pci_grpci1.c:104:5: warning: symbol 'grpci1_map_irq' was not declared. Should it be static?
leon_pci_grpci1.c:420:6: warning: symbol 'grpci1_hw_init' was not declared. Should it be static?
+ a lot of these:
leon_pci_grpci1.c:693:18: warning: incorrect type in argument 1 (different address spaces)

Added missing static to definitions.
Added __iomem annotations
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6b5f02f3
...@@ -80,7 +80,7 @@ struct grpci1_regs { ...@@ -80,7 +80,7 @@ struct grpci1_regs {
struct grpci1_priv { struct grpci1_priv {
struct leon_pci_info info; /* must be on top of this structure */ struct leon_pci_info info; /* must be on top of this structure */
struct grpci1_regs *regs; /* GRPCI register map */ struct grpci1_regs __iomem *regs; /* GRPCI register map */
struct device *dev; struct device *dev;
int pci_err_mask; /* STATUS register error mask */ int pci_err_mask; /* STATUS register error mask */
int irq; /* LEON irqctrl GRPCI IRQ */ int irq; /* LEON irqctrl GRPCI IRQ */
...@@ -101,7 +101,7 @@ static struct grpci1_priv *grpci1priv; ...@@ -101,7 +101,7 @@ static struct grpci1_priv *grpci1priv;
static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus, static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
unsigned int devfn, int where, u32 val); unsigned int devfn, int where, u32 val);
int grpci1_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) static int grpci1_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct grpci1_priv *priv = dev->bus->sysdata; struct grpci1_priv *priv = dev->bus->sysdata;
int irq_group; int irq_group;
...@@ -417,10 +417,10 @@ static unsigned int grpci1_build_device_irq(unsigned int irq) ...@@ -417,10 +417,10 @@ static unsigned int grpci1_build_device_irq(unsigned int irq)
* BAR1: peripheral DMA to host's memory (size at least 256MByte) * BAR1: peripheral DMA to host's memory (size at least 256MByte)
* BAR2..BAR5: not implemented in hardware * BAR2..BAR5: not implemented in hardware
*/ */
void grpci1_hw_init(struct grpci1_priv *priv) static void grpci1_hw_init(struct grpci1_priv *priv)
{ {
u32 ahbadr, bar_sz, data, pciadr; u32 ahbadr, bar_sz, data, pciadr;
struct grpci1_regs *regs = priv->regs; struct grpci1_regs __iomem *regs = priv->regs;
/* set 1:1 mapping between AHB -> PCI memory space */ /* set 1:1 mapping between AHB -> PCI memory space */
REGSTORE(regs->cfg_stat, priv->pci_area & 0xf0000000); REGSTORE(regs->cfg_stat, priv->pci_area & 0xf0000000);
...@@ -509,7 +509,7 @@ static irqreturn_t grpci1_err_interrupt(int irq, void *arg) ...@@ -509,7 +509,7 @@ static irqreturn_t grpci1_err_interrupt(int irq, void *arg)
static int grpci1_of_probe(struct platform_device *ofdev) static int grpci1_of_probe(struct platform_device *ofdev)
{ {
struct grpci1_regs *regs; struct grpci1_regs __iomem *regs;
struct grpci1_priv *priv; struct grpci1_priv *priv;
int err, len; int err, len;
const int *tmp; const int *tmp;
...@@ -690,7 +690,7 @@ static int grpci1_of_probe(struct platform_device *ofdev) ...@@ -690,7 +690,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
err2: err2:
release_resource(&priv->info.mem_space); release_resource(&priv->info.mem_space);
err1: err1:
iounmap((void *)priv->pci_io_va); iounmap((void __iomem *)priv->pci_io_va);
grpci1priv = NULL; grpci1priv = NULL;
return err; return err;
} }
......
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