aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index 4679c5230413..39020c1fa13d 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -35,17 +35,17 @@
35 35
36#define CONFIG_OFFSET_VALID(off) ((off) < 4096) 36#define CONFIG_OFFSET_VALID(off) ((off) < 4096)
37 37
38static unsigned long pa_pxp_cfg_addr(struct pci_controller *hose, 38static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose,
39 u8 bus, u8 devfn, int offset) 39 u8 bus, u8 devfn, int offset)
40{ 40{
41 return ((unsigned long)hose->cfg_data) + PA_PXP_CFA(bus, devfn, offset); 41 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset);
42} 42}
43 43
44static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, 44static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
45 int offset, int len, u32 *val) 45 int offset, int len, u32 *val)
46{ 46{
47 struct pci_controller *hose; 47 struct pci_controller *hose;
48 unsigned long addr; 48 void volatile __iomem *addr;
49 49
50 hose = pci_bus_to_host(bus); 50 hose = pci_bus_to_host(bus);
51 if (!hose) 51 if (!hose)
@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
62 */ 62 */
63 switch (len) { 63 switch (len) {
64 case 1: 64 case 1:
65 *val = in_8((u8 *)addr); 65 *val = in_8(addr);
66 break; 66 break;
67 case 2: 67 case 2:
68 *val = in_le16((u16 *)addr); 68 *val = in_le16(addr);
69 break; 69 break;
70 default: 70 default:
71 *val = in_le32((u32 *)addr); 71 *val = in_le32(addr);
72 break; 72 break;
73 } 73 }
74 74
@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
79 int offset, int len, u32 val) 79 int offset, int len, u32 val)
80{ 80{
81 struct pci_controller *hose; 81 struct pci_controller *hose;
82 unsigned long addr; 82 void volatile __iomem *addr;
83 83
84 hose = pci_bus_to_host(bus); 84 hose = pci_bus_to_host(bus);
85 if (!hose) 85 if (!hose)
@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
96 */ 96 */
97 switch (len) { 97 switch (len) {
98 case 1: 98 case 1:
99 out_8((u8 *)addr, val); 99 out_8(addr, val);
100 (void) in_8((u8 *)addr); 100 (void) in_8(addr);
101 break; 101 break;
102 case 2: 102 case 2:
103 out_le16((u16 *)addr, val); 103 out_le16(addr, val);
104 (void) in_le16((u16 *)addr); 104 (void) in_le16(addr);
105 break; 105 break;
106 default: 106 default:
107 out_le32((u32 *)addr, val); 107 out_le32(addr, val);
108 (void) in_le32((u32 *)addr); 108 (void) in_le32(addr);
109 break; 109 break;
110 } 110 }
111 return PCIBIOS_SUCCESSFUL; 111 return PCIBIOS_SUCCESSFUL;