diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-04-26 03:57:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-02 01:30:21 -0400 |
commit | 01c6505d602f47d93209f82bd652329d0e17eeb0 (patch) | |
tree | b204d12bd2b91922993dc20dc01e8a2b0beda2d3 | |
parent | c46064b4e8fecc469ec2fa606ad0cccf4d2e49c0 (diff) |
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: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/kernel/leon_pci_grpci1.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_pci_grpci2.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pcic.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c index 97cba4d11f66..c8bf26edfa7c 100644 --- a/arch/sparc/kernel/leon_pci_grpci1.c +++ b/arch/sparc/kernel/leon_pci_grpci1.c | |||
@@ -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 | } |
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c index 7ef024795b81..e433a4d69fe0 100644 --- a/arch/sparc/kernel/leon_pci_grpci2.c +++ b/arch/sparc/kernel/leon_pci_grpci2.c | |||
@@ -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... |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 09f4fdd8d808..6996f32c64bf 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -783,7 +783,7 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask) | |||
783 | void pcic_nmi(unsigned int pend, struct pt_regs *regs) | 783 | void pcic_nmi(unsigned int pend, struct pt_regs *regs) |
784 | { | 784 | { |
785 | 785 | ||
786 | pend = flip_dword(pend); | 786 | pend = swab32(pend); |
787 | 787 | ||
788 | if (!pcic_speculative || (pend & PCI_SYS_INT_PENDING_PIO) == 0) { | 788 | if (!pcic_speculative || (pend & PCI_SYS_INT_PENDING_PIO) == 0) { |
789 | /* | 789 | /* |