aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-10-15 05:34:36 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-15 14:29:49 -0400
commit83f34df4e7c8794a5a81ede663fe184f4201308a (patch)
treec109c113ee02c5d656cd1b211ba2bc67d5dfd270 /arch/powerpc/sysdev/mpic.c
parent0f18e719dc0d36ad91fe94b0b3dd08fdcdd2faa2 (diff)
Add dcr_host_t.base in dcr_read()/dcr_write()
Now that all users of dcr_read()/dcr_write() add the dcr_host_t.base, we can save them the trouble and do it in dcr_read()/dcr_write(). As some background to why we just went through all this jiggery-pokery, benh sayeth: Initially the goal of the dcr_read/dcr_write routines was to operate like mfdcr/mtdcr which take absolute DCR numbers. The reason is that on 4xx hardware, indirect DCR access is a pain (goes through a table of instructions) and it's useful to have the compiler resolve an absolute DCR inline. We decided that wasn't worth the API bastardisation since most places where absolute DCR values are used are low level 4xx-only code which may as well continue using mfdcr/mtdcr, while the new API is designed for device "instances" that can exist on 4xx and Axon type platforms and may be located at variable DCR offsets. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 893e65439e85..e47938899a92 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -156,7 +156,7 @@ static inline u32 _mpic_read(enum mpic_reg_type type,
156 switch(type) { 156 switch(type) {
157#ifdef CONFIG_PPC_DCR 157#ifdef CONFIG_PPC_DCR
158 case mpic_access_dcr: 158 case mpic_access_dcr:
159 return dcr_read(rb->dhost, rb->dhost.base + reg); 159 return dcr_read(rb->dhost, reg);
160#endif 160#endif
161 case mpic_access_mmio_be: 161 case mpic_access_mmio_be:
162 return in_be32(rb->base + (reg >> 2)); 162 return in_be32(rb->base + (reg >> 2));
@@ -173,7 +173,7 @@ static inline void _mpic_write(enum mpic_reg_type type,
173 switch(type) { 173 switch(type) {
174#ifdef CONFIG_PPC_DCR 174#ifdef CONFIG_PPC_DCR
175 case mpic_access_dcr: 175 case mpic_access_dcr:
176 return dcr_write(rb->dhost, rb->dhost.base + reg, value); 176 return dcr_write(rb->dhost, reg, value);
177#endif 177#endif
178 case mpic_access_mmio_be: 178 case mpic_access_mmio_be:
179 return out_be32(rb->base + (reg >> 2), value); 179 return out_be32(rb->base + (reg >> 2), value);