* [PATCH] powerpc: make MAL use the new DCR methods
@ 2006-10-11 5:45 Benjamin Herrenschmidt
2006-10-11 17:47 ` Eugene Surovegin
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2006-10-11 5:45 UTC (permalink / raw)
To: Eugene Surovegin; +Cc: linuxppc-dev list
This is a test patch to validate the new DCR method code for the
"native" case. It will ultimately be the first of a pile porting the
EMAC driver to ARCH=powerpc and non-native DCRs.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-cell/drivers/net/ibm_emac/ibm_emac_mal.h
===================================================================
--- linux-cell.orig/drivers/net/ibm_emac/ibm_emac_mal.h 2006-10-11 13:01:59.000000000 +1000
+++ linux-cell/drivers/net/ibm_emac/ibm_emac_mal.h 2006-10-11 14:35:28.000000000 +1000
@@ -24,6 +24,7 @@
#include <linux/netdevice.h>
#include <asm/io.h>
+#include <asm/dcr.h>
/*
* These MAL "versions" probably aren't the real versions IBM uses for these
@@ -191,6 +192,7 @@ struct mal_commac {
struct ibm_ocp_mal {
int dcrbase;
+ dcr_host_t dcrhost;
struct list_head poll_list;
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)
{
- 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)
{
- mtdcr(mal->dcrbase + reg, val);
+ dcr_write(mal->dcrhost, mal->dcrbase + reg, val);
}
/* Register MAL devices */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: make MAL use the new DCR methods
2006-10-11 5:45 [PATCH] powerpc: make MAL use the new DCR methods Benjamin Herrenschmidt
@ 2006-10-11 17:47 ` Eugene Surovegin
0 siblings, 0 replies; 2+ messages in thread
From: Eugene Surovegin @ 2006-10-11 17:47 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
On Wed, Oct 11, 2006 at 03:45:39PM +1000, Benjamin Herrenschmidt wrote:
> This is a test patch to validate the new DCR method code for the
> "native" case. It will ultimately be the first of a pile porting the
> EMAC driver to ARCH=powerpc and non-native DCRs.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> Index: linux-cell/drivers/net/ibm_emac/ibm_emac_mal.h
> ===================================================================
> --- linux-cell.orig/drivers/net/ibm_emac/ibm_emac_mal.h 2006-10-11 13:01:59.000000000 +1000
> +++ linux-cell/drivers/net/ibm_emac/ibm_emac_mal.h 2006-10-11 14:35:28.000000000 +1000
> @@ -24,6 +24,7 @@
> #include <linux/netdevice.h>
>
> #include <asm/io.h>
> +#include <asm/dcr.h>
>
> /*
> * These MAL "versions" probably aren't the real versions IBM uses for these
> @@ -191,6 +192,7 @@ struct mal_commac {
>
> struct ibm_ocp_mal {
> int dcrbase;
> + dcr_host_t dcrhost;
>
> struct list_head poll_list;
> 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)
> {
> - 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)
> {
> - mtdcr(mal->dcrbase + reg, val);
> + dcr_write(mal->dcrhost, mal->dcrbase + reg, val);
> }
>
> /* Register MAL devices */
>
>
Looks fine to me.
Acked-by: Eugene Surovegin <ebs@ebshome.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-11 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-11 5:45 [PATCH] powerpc: make MAL use the new DCR methods Benjamin Herrenschmidt
2006-10-11 17:47 ` Eugene Surovegin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).