aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_emac
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 /drivers/net/ibm_emac
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 'drivers/net/ibm_emac')
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h
index aa76d3f0dfce..b8adbe6d4b01 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.h
+++ b/drivers/net/ibm_emac/ibm_emac_mal.h
@@ -208,12 +208,12 @@ struct ibm_ocp_mal {
208 208
209static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg) 209static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg)
210{ 210{
211 return dcr_read(mal->dcrhost, mal->dcrhost.base + reg); 211 return dcr_read(mal->dcrhost, reg);
212} 212}
213 213
214static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val) 214static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val)
215{ 215{
216 dcr_write(mal->dcrhost, mal->dcrhost.base + reg, val); 216 dcr_write(mal->dcrhost, reg, val);
217} 217}
218 218
219/* Register MAL devices */ 219/* Register MAL devices */