diff options
Diffstat (limited to 'arch/sparc/kernel/leon_pci_grpci2.c')
-rw-r--r-- | arch/sparc/kernel/leon_pci_grpci2.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c index 24d6a4446349..e433a4d69fe0 100644 --- a/arch/sparc/kernel/leon_pci_grpci2.c +++ b/arch/sparc/kernel/leon_pci_grpci2.c | |||
@@ -191,7 +191,7 @@ struct grpci2_cap_first { | |||
191 | 191 | ||
192 | struct grpci2_priv { | 192 | struct grpci2_priv { |
193 | struct leon_pci_info info; /* must be on top of this structure */ | 193 | struct leon_pci_info info; /* must be on top of this structure */ |
194 | struct grpci2_regs *regs; | 194 | struct grpci2_regs __iomem *regs; |
195 | char irq; | 195 | char irq; |
196 | char irq_mode; /* IRQ Mode from CAPSTS REG */ | 196 | char irq_mode; /* IRQ Mode from CAPSTS REG */ |
197 | char bt_enabled; | 197 | char bt_enabled; |
@@ -215,10 +215,10 @@ struct grpci2_priv { | |||
215 | struct grpci2_barcfg tgtbars[6]; | 215 | struct grpci2_barcfg tgtbars[6]; |
216 | }; | 216 | }; |
217 | 217 | ||
218 | DEFINE_SPINLOCK(grpci2_dev_lock); | 218 | static DEFINE_SPINLOCK(grpci2_dev_lock); |
219 | struct grpci2_priv *grpci2priv; | 219 | static struct grpci2_priv *grpci2priv; |
220 | 220 | ||
221 | int grpci2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 221 | static int grpci2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
222 | { | 222 | { |
223 | struct grpci2_priv *priv = dev->bus->sysdata; | 223 | struct grpci2_priv *priv = dev->bus->sysdata; |
224 | int irq_group; | 224 | int irq_group; |
@@ -270,7 +270,7 @@ static int grpci2_cfg_r32(struct grpci2_priv *priv, unsigned int bus, | |||
270 | *val = 0xffffffff; | 270 | *val = 0xffffffff; |
271 | } else { | 271 | } else { |
272 | /* Bus always little endian (unaffected by byte-swapping) */ | 272 | /* Bus always little endian (unaffected by byte-swapping) */ |
273 | *val = flip_dword(tmp); | 273 | *val = swab32(tmp); |
274 | } | 274 | } |
275 | 275 | ||
276 | return 0; | 276 | return 0; |
@@ -328,7 +328,7 @@ static int grpci2_cfg_w32(struct grpci2_priv *priv, unsigned int bus, | |||
328 | 328 | ||
329 | pci_conf = (unsigned int *) (priv->pci_conf | | 329 | pci_conf = (unsigned int *) (priv->pci_conf | |
330 | (devfn << 8) | (where & 0xfc)); | 330 | (devfn << 8) | (where & 0xfc)); |
331 | LEON3_BYPASS_STORE_PA(pci_conf, flip_dword(val)); | 331 | LEON3_BYPASS_STORE_PA(pci_conf, swab32(val)); |
332 | 332 | ||
333 | /* Wait until GRPCI2 signals that CFG access is done, it should be | 333 | /* Wait until GRPCI2 signals that CFG access is done, it should be |
334 | * done instantaneously unless a DMA operation is ongoing... | 334 | * done instantaneously unless a DMA operation is ongoing... |
@@ -561,10 +561,10 @@ out: | |||
561 | return virq; | 561 | return virq; |
562 | } | 562 | } |
563 | 563 | ||
564 | void grpci2_hw_init(struct grpci2_priv *priv) | 564 | static void grpci2_hw_init(struct grpci2_priv *priv) |
565 | { | 565 | { |
566 | u32 ahbadr, pciadr, bar_sz, capptr, io_map, data; | 566 | u32 ahbadr, pciadr, bar_sz, capptr, io_map, data; |
567 | struct grpci2_regs *regs = priv->regs; | 567 | struct grpci2_regs __iomem *regs = priv->regs; |
568 | int i; | 568 | int i; |
569 | struct grpci2_barcfg *barcfg = priv->tgtbars; | 569 | struct grpci2_barcfg *barcfg = priv->tgtbars; |
570 | 570 | ||
@@ -655,7 +655,7 @@ static irqreturn_t grpci2_jump_interrupt(int irq, void *arg) | |||
655 | static irqreturn_t grpci2_err_interrupt(int irq, void *arg) | 655 | static irqreturn_t grpci2_err_interrupt(int irq, void *arg) |
656 | { | 656 | { |
657 | struct grpci2_priv *priv = arg; | 657 | struct grpci2_priv *priv = arg; |
658 | struct grpci2_regs *regs = priv->regs; | 658 | struct grpci2_regs __iomem *regs = priv->regs; |
659 | unsigned int status; | 659 | unsigned int status; |
660 | 660 | ||
661 | status = REGLOAD(regs->sts_cap); | 661 | status = REGLOAD(regs->sts_cap); |
@@ -682,7 +682,7 @@ static irqreturn_t grpci2_err_interrupt(int irq, void *arg) | |||
682 | 682 | ||
683 | static int grpci2_of_probe(struct platform_device *ofdev) | 683 | static int grpci2_of_probe(struct platform_device *ofdev) |
684 | { | 684 | { |
685 | struct grpci2_regs *regs; | 685 | struct grpci2_regs __iomem *regs; |
686 | struct grpci2_priv *priv; | 686 | struct grpci2_priv *priv; |
687 | int err, i, len; | 687 | int err, i, len; |
688 | const int *tmp; | 688 | const int *tmp; |
@@ -878,7 +878,7 @@ err4: | |||
878 | release_resource(&priv->info.mem_space); | 878 | release_resource(&priv->info.mem_space); |
879 | err3: | 879 | err3: |
880 | err = -ENOMEM; | 880 | err = -ENOMEM; |
881 | iounmap((void *)priv->pci_io_va); | 881 | iounmap((void __iomem *)priv->pci_io_va); |
882 | err2: | 882 | err2: |
883 | kfree(priv); | 883 | kfree(priv); |
884 | err1: | 884 | err1: |