diff options
Diffstat (limited to 'arch/arm/mach-ixp4xx/common-pci.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/common-pci.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 2131832ee6ba..f72a3a893c47 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -54,7 +54,7 @@ unsigned long ixp4xx_pci_reg_base = 0; | |||
54 | * these transactions are atomic or we will end up | 54 | * these transactions are atomic or we will end up |
55 | * with corrupt data on the bus or in a driver. | 55 | * with corrupt data on the bus or in a driver. |
56 | */ | 56 | */ |
57 | static DEFINE_SPINLOCK(ixp4xx_pci_lock); | 57 | static DEFINE_RAW_SPINLOCK(ixp4xx_pci_lock); |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Read from PCI config space | 60 | * Read from PCI config space |
@@ -62,10 +62,10 @@ static DEFINE_SPINLOCK(ixp4xx_pci_lock); | |||
62 | static void crp_read(u32 ad_cbe, u32 *data) | 62 | static void crp_read(u32 ad_cbe, u32 *data) |
63 | { | 63 | { |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 65 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
66 | *PCI_CRP_AD_CBE = ad_cbe; | 66 | *PCI_CRP_AD_CBE = ad_cbe; |
67 | *data = *PCI_CRP_RDATA; | 67 | *data = *PCI_CRP_RDATA; |
68 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 68 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -74,10 +74,10 @@ static void crp_read(u32 ad_cbe, u32 *data) | |||
74 | static void crp_write(u32 ad_cbe, u32 data) | 74 | static void crp_write(u32 ad_cbe, u32 data) |
75 | { | 75 | { |
76 | unsigned long flags; | 76 | unsigned long flags; |
77 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 77 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; | 78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; |
79 | *PCI_CRP_WDATA = data; | 79 | *PCI_CRP_WDATA = data; |
80 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 80 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int check_master_abort(void) | 83 | static inline int check_master_abort(void) |
@@ -101,7 +101,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
101 | int retval = 0; | 101 | int retval = 0; |
102 | int i; | 102 | int i; |
103 | 103 | ||
104 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 104 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
105 | 105 | ||
106 | *PCI_NP_AD = addr; | 106 | *PCI_NP_AD = addr; |
107 | 107 | ||
@@ -118,7 +118,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
118 | if(check_master_abort()) | 118 | if(check_master_abort()) |
119 | retval = 1; | 119 | retval = 1; |
120 | 120 | ||
121 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 121 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
122 | return retval; | 122 | return retval; |
123 | } | 123 | } |
124 | 124 | ||
@@ -127,7 +127,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int retval = 0; | 128 | int retval = 0; |
129 | 129 | ||
130 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 130 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
131 | 131 | ||
132 | *PCI_NP_AD = addr; | 132 | *PCI_NP_AD = addr; |
133 | 133 | ||
@@ -140,7 +140,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
140 | if(check_master_abort()) | 140 | if(check_master_abort()) |
141 | retval = 1; | 141 | retval = 1; |
142 | 142 | ||
143 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 143 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
144 | return retval; | 144 | return retval; |
145 | } | 145 | } |
146 | 146 | ||
@@ -149,7 +149,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
149 | unsigned long flags; | 149 | unsigned long flags; |
150 | int retval = 0; | 150 | int retval = 0; |
151 | 151 | ||
152 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 152 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
153 | 153 | ||
154 | *PCI_NP_AD = addr; | 154 | *PCI_NP_AD = addr; |
155 | 155 | ||
@@ -162,7 +162,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
162 | if(check_master_abort()) | 162 | if(check_master_abort()) |
163 | retval = 1; | 163 | retval = 1; |
164 | 164 | ||
165 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 165 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
166 | return retval; | 166 | return retval; |
167 | } | 167 | } |
168 | 168 | ||
@@ -397,7 +397,8 @@ void __init ixp4xx_pci_preinit(void) | |||
397 | local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET); | 397 | local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET); |
398 | local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M); | 398 | local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M); |
399 | local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M); | 399 | local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M); |
400 | local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + SZ_48M); | 400 | local_write_config(PCI_BASE_ADDRESS_3, 4, |
401 | PHYS_OFFSET + SZ_32M + SZ_16M); | ||
401 | 402 | ||
402 | /* | 403 | /* |
403 | * Enable CSR window at 64 MiB to allow PCI masters | 404 | * Enable CSR window at 64 MiB to allow PCI masters |