aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_emac
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 16:30:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 16:30:35 -0400
commit43d39ae0cf8f891c35e8316948229c7cbffa3994 (patch)
treec8af6999a9327c8b9bbc7384efe8f52f851ff3d8 /drivers/net/ibm_emac
parent63bd8c48e04bbbc9cee3d752857914609d8d406f (diff)
parent84284d3c1d6372bc9ab496607661d230d9c45de4 (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (35 commits) xen-netfront: rearrange netfront structure to separate tx and rx netdev: convert non-obvious instances to use ARRAY_SIZE() ucc_geth: Fix build break introduced by commit 09f75cd7bf13720738e6a196cc0107ce9a5bd5a0 gianfar: Fix regression caused by new napi interface gianfar: Cleanup compile warning caused by 0795af57 gianfar: Fix compile regression caused by bea3348e add new prom.h for AU1x00 update AU1000 get_ethernet_addr() MIPSsim: General cleanup Jazzsonic: Fix warning about unused variable. Remove msic_dcr_read() in axon_msi.c Use dcr_host_t.base in dcr_unmap() Add dcr_host_t.base in dcr_read()/dcr_write() Use dcr_host_t.base in ibm_emac_mal Update ibm_newemac to use dcr_host_t.base tehuti: possible leak in bdx_probe TC35815: Fix build SAA9730: Fix build AR7 ethernet myri10ge: update driver version to 1.3.2-1.287 ...
Diffstat (limited to 'drivers/net/ibm_emac')
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.c5
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c
index 4e49e8c4f871..dcd8826fc749 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.c
+++ b/drivers/net/ibm_emac/ibm_emac_mal.c
@@ -413,7 +413,10 @@ static int __init mal_probe(struct ocp_device *ocpdev)
413 ocpdev->def->index); 413 ocpdev->def->index);
414 return -ENOMEM; 414 return -ENOMEM;
415 } 415 }
416 mal->dcrbase = maldata->dcr_base; 416
417 /* XXX This only works for native dcr for now */
418 mal->dcrhost = dcr_map(NULL, maldata->dcr_base, 0);
419
417 mal->def = ocpdev->def; 420 mal->def = ocpdev->def;
418 421
419 INIT_LIST_HEAD(&mal->poll_list); 422 INIT_LIST_HEAD(&mal->poll_list);
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h
index 8f54d621994d..b8adbe6d4b01 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.h
+++ b/drivers/net/ibm_emac/ibm_emac_mal.h
@@ -191,7 +191,6 @@ struct mal_commac {
191}; 191};
192 192
193struct ibm_ocp_mal { 193struct ibm_ocp_mal {
194 int dcrbase;
195 dcr_host_t dcrhost; 194 dcr_host_t dcrhost;
196 195
197 struct list_head poll_list; 196 struct list_head poll_list;
@@ -209,12 +208,12 @@ struct ibm_ocp_mal {
209 208
210static 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)
211{ 210{
212 return dcr_read(mal->dcrhost, mal->dcrbase + reg); 211 return dcr_read(mal->dcrhost, reg);
213} 212}
214 213
215static 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)
216{ 215{
217 dcr_write(mal->dcrhost, mal->dcrbase + reg, val); 216 dcr_write(mal->dcrhost, reg, val);
218} 217}
219 218
220/* Register MAL devices */ 219/* Register MAL devices */