aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/leon_pci_grpci1.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/leon_pci_grpci1.c')
-rw-r--r--arch/sparc/kernel/leon_pci_grpci1.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c
index 6df26e37f879..c8bf26edfa7c 100644
--- a/arch/sparc/kernel/leon_pci_grpci1.c
+++ b/arch/sparc/kernel/leon_pci_grpci1.c
@@ -80,7 +80,7 @@ struct grpci1_regs {
80 80
81struct grpci1_priv { 81struct grpci1_priv {
82 struct leon_pci_info info; /* must be on top of this structure */ 82 struct leon_pci_info info; /* must be on top of this structure */
83 struct grpci1_regs *regs; /* GRPCI register map */ 83 struct grpci1_regs __iomem *regs; /* GRPCI register map */
84 struct device *dev; 84 struct device *dev;
85 int pci_err_mask; /* STATUS register error mask */ 85 int pci_err_mask; /* STATUS register error mask */
86 int irq; /* LEON irqctrl GRPCI IRQ */ 86 int irq; /* LEON irqctrl GRPCI IRQ */
@@ -101,7 +101,7 @@ static struct grpci1_priv *grpci1priv;
101static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus, 101static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
102 unsigned int devfn, int where, u32 val); 102 unsigned int devfn, int where, u32 val);
103 103
104int grpci1_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 104static int grpci1_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
105{ 105{
106 struct grpci1_priv *priv = dev->bus->sysdata; 106 struct grpci1_priv *priv = dev->bus->sysdata;
107 int irq_group; 107 int irq_group;
@@ -144,7 +144,7 @@ static int grpci1_cfg_r32(struct grpci1_priv *priv, unsigned int bus,
144 grpci1_cfg_w32(priv, TGT, 0, PCI_COMMAND, tmp); 144 grpci1_cfg_w32(priv, TGT, 0, PCI_COMMAND, tmp);
145 } else { 145 } else {
146 /* Bus always little endian (unaffected by byte-swapping) */ 146 /* Bus always little endian (unaffected by byte-swapping) */
147 *val = flip_dword(tmp); 147 *val = swab32(tmp);
148 } 148 }
149 149
150 return 0; 150 return 0;
@@ -197,7 +197,7 @@ static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
197 197
198 pci_conf = (unsigned int *) (priv->pci_conf | 198 pci_conf = (unsigned int *) (priv->pci_conf |
199 (devfn << 8) | (where & 0xfc)); 199 (devfn << 8) | (where & 0xfc));
200 LEON3_BYPASS_STORE_PA(pci_conf, flip_dword(val)); 200 LEON3_BYPASS_STORE_PA(pci_conf, swab32(val));
201 201
202 return 0; 202 return 0;
203} 203}
@@ -417,10 +417,10 @@ out:
417 * BAR1: peripheral DMA to host's memory (size at least 256MByte) 417 * BAR1: peripheral DMA to host's memory (size at least 256MByte)
418 * BAR2..BAR5: not implemented in hardware 418 * BAR2..BAR5: not implemented in hardware
419 */ 419 */
420void grpci1_hw_init(struct grpci1_priv *priv) 420static void grpci1_hw_init(struct grpci1_priv *priv)
421{ 421{
422 u32 ahbadr, bar_sz, data, pciadr; 422 u32 ahbadr, bar_sz, data, pciadr;
423 struct grpci1_regs *regs = priv->regs; 423 struct grpci1_regs __iomem *regs = priv->regs;
424 424
425 /* set 1:1 mapping between AHB -> PCI memory space */ 425 /* set 1:1 mapping between AHB -> PCI memory space */
426 REGSTORE(regs->cfg_stat, priv->pci_area & 0xf0000000); 426 REGSTORE(regs->cfg_stat, priv->pci_area & 0xf0000000);
@@ -509,7 +509,7 @@ static irqreturn_t grpci1_err_interrupt(int irq, void *arg)
509 509
510static int grpci1_of_probe(struct platform_device *ofdev) 510static int grpci1_of_probe(struct platform_device *ofdev)
511{ 511{
512 struct grpci1_regs *regs; 512 struct grpci1_regs __iomem *regs;
513 struct grpci1_priv *priv; 513 struct grpci1_priv *priv;
514 int err, len; 514 int err, len;
515 const int *tmp; 515 const int *tmp;
@@ -690,7 +690,7 @@ err3:
690err2: 690err2:
691 release_resource(&priv->info.mem_space); 691 release_resource(&priv->info.mem_space);
692err1: 692err1:
693 iounmap((void *)priv->pci_io_va); 693 iounmap((void __iomem *)priv->pci_io_va);
694 grpci1priv = NULL; 694 grpci1priv = NULL;
695 return err; 695 return err;
696} 696}