Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1be3770a authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Paul Mackerras
Browse files

[POWERPC] Make EMAC use generic DCR access methods



This patch makes the EMAC driver use the new DCR access methods. It
doesn't yet uses dcr_map() and thus still only work with real DCRs.
This will be fixed in a later patch

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 4c75a6f4
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/netdevice.h>
#include <linux/netdevice.h>


#include <asm/io.h>
#include <asm/io.h>
#include <asm/dcr.h>


/*
/*
 * These MAL "versions" probably aren't the real versions IBM uses for these 
 * These MAL "versions" probably aren't the real versions IBM uses for these 
@@ -191,6 +192,7 @@ struct mal_commac {


struct ibm_ocp_mal {
struct ibm_ocp_mal {
	int			dcrbase;
	int			dcrbase;
	dcr_host_t		dcrhost;


	struct list_head	poll_list;
	struct list_head	poll_list;
	struct net_device	poll_dev;
	struct net_device	poll_dev;
@@ -207,12 +209,12 @@ struct ibm_ocp_mal {


static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg)
static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg)
{
{
	return mfdcr(mal->dcrbase + reg);
	return dcr_read(mal->dcrhost, mal->dcrbase + reg);
}
}


static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val)
static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val)
{
{
	mtdcr(mal->dcrbase + reg, val);
	dcr_write(mal->dcrhost, mal->dcrbase + reg, val);
}
}


/* Register MAL devices */
/* Register MAL devices */