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

sparc32: replace flip_dword() with swab32()

The latter is a generic implmentation.
flip_{,d}word() is sparc32 specific and will be dropped.
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 c46064b4
...@@ -144,7 +144,7 @@ static int grpci1_cfg_r32(struct grpci1_priv *priv, unsigned int bus, ...@@ -144,7 +144,7 @@ static int grpci1_cfg_r32(struct grpci1_priv *priv, unsigned int bus,
grpci1_cfg_w32(priv, TGT, 0, PCI_COMMAND, tmp); grpci1_cfg_w32(priv, TGT, 0, PCI_COMMAND, tmp);
} else { } else {
/* Bus always little endian (unaffected by byte-swapping) */ /* Bus always little endian (unaffected by byte-swapping) */
*val = flip_dword(tmp); *val = swab32(tmp);
} }
return 0; return 0;
...@@ -197,7 +197,7 @@ static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus, ...@@ -197,7 +197,7 @@ static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
pci_conf = (unsigned int *) (priv->pci_conf | pci_conf = (unsigned int *) (priv->pci_conf |
(devfn << 8) | (where & 0xfc)); (devfn << 8) | (where & 0xfc));
LEON3_BYPASS_STORE_PA(pci_conf, flip_dword(val)); LEON3_BYPASS_STORE_PA(pci_conf, swab32(val));
return 0; return 0;
} }
......
...@@ -270,7 +270,7 @@ static int grpci2_cfg_r32(struct grpci2_priv *priv, unsigned int bus, ...@@ -270,7 +270,7 @@ static int grpci2_cfg_r32(struct grpci2_priv *priv, unsigned int bus,
*val = 0xffffffff; *val = 0xffffffff;
} else { } else {
/* Bus always little endian (unaffected by byte-swapping) */ /* Bus always little endian (unaffected by byte-swapping) */
*val = flip_dword(tmp); *val = swab32(tmp);
} }
return 0; return 0;
...@@ -328,7 +328,7 @@ static int grpci2_cfg_w32(struct grpci2_priv *priv, unsigned int bus, ...@@ -328,7 +328,7 @@ static int grpci2_cfg_w32(struct grpci2_priv *priv, unsigned int bus,
pci_conf = (unsigned int *) (priv->pci_conf | pci_conf = (unsigned int *) (priv->pci_conf |
(devfn << 8) | (where & 0xfc)); (devfn << 8) | (where & 0xfc));
LEON3_BYPASS_STORE_PA(pci_conf, flip_dword(val)); LEON3_BYPASS_STORE_PA(pci_conf, swab32(val));
/* Wait until GRPCI2 signals that CFG access is done, it should be /* Wait until GRPCI2 signals that CFG access is done, it should be
* done instantaneously unless a DMA operation is ongoing... * done instantaneously unless a DMA operation is ongoing...
......
...@@ -783,7 +783,7 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask) ...@@ -783,7 +783,7 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask)
void pcic_nmi(unsigned int pend, struct pt_regs *regs) void pcic_nmi(unsigned int pend, struct pt_regs *regs)
{ {
pend = flip_dword(pend); pend = swab32(pend);
if (!pcic_speculative || (pend & PCI_SYS_INT_PENDING_PIO) == 0) { if (!pcic_speculative || (pend & PCI_SYS_INT_PENDING_PIO) == 0) {
/* /*
......
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