sparc32: replace flip_dword() with swab32()
authorSam Ravnborg <sam@ravnborg.org>
Sat, 26 Apr 2014 07:57:35 +0000 (09:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 May 2014 05:30:21 +0000 (01:30 -0400)
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>
arch/sparc/kernel/leon_pci_grpci1.c
arch/sparc/kernel/leon_pci_grpci2.c
arch/sparc/kernel/pcic.c

index 97cba4d11f66a16c41800ea69041fe5ceaeb6b62..c8bf26edfa7cf578ce4ce4eac513697371abc8b7 100644 (file)
@@ -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);
        } else {
                /* Bus always little endian (unaffected by byte-swapping) */
-               *val = flip_dword(tmp);
+               *val = swab32(tmp);
        }
 
        return 0;
@@ -197,7 +197,7 @@ static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
 
        pci_conf = (unsigned int *) (priv->pci_conf |
                                                (devfn << 8) | (where & 0xfc));
-       LEON3_BYPASS_STORE_PA(pci_conf, flip_dword(val));
+       LEON3_BYPASS_STORE_PA(pci_conf, swab32(val));
 
        return 0;
 }
index 7ef024795b815dcd287b2234b9b105707ad42d6d..e433a4d69fe0921487985a698dcfecbbd16e4f92 100644 (file)
@@ -270,7 +270,7 @@ static int grpci2_cfg_r32(struct grpci2_priv *priv, unsigned int bus,
                *val = 0xffffffff;
        } else {
                /* Bus always little endian (unaffected by byte-swapping) */
-               *val = flip_dword(tmp);
+               *val = swab32(tmp);
        }
 
        return 0;
@@ -328,7 +328,7 @@ static int grpci2_cfg_w32(struct grpci2_priv *priv, unsigned int bus,
 
        pci_conf = (unsigned int *) (priv->pci_conf |
                                                (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
         * done instantaneously unless a DMA operation is ongoing...
index 09f4fdd8d8080fd45f8795a193b9b308c5d748cc..6996f32c64bf1dda3b3c073d96a4e01868404e46 100644 (file)
@@ -783,7 +783,7 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask)
 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) {
                /*