linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH 8/27] powerpc: Make EMAC use generic DCR access methods
Date: Mon, 06 Nov 2006 18:05:43 +1100	[thread overview]
Message-ID: <20061106070659.5C53B67D0E@ozlabs.org> (raw)
In-Reply-To: <1162796738.274582.277491064706.qpush@grosgo>

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: Benjamin Herrenschmidt <benh@kernel.crashing.org>

 drivers/net/ibm_emac/ibm_emac_mal.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 */

  parent reply	other threads:[~2006-11-06  7:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06  7:05 [PATCH 0/27] My current serie of patches for 2.6.20 for review Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 1/27] ibmveth: Remove ibmveth "liobn" field Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 3/27] Driver core: add notification of bus events Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 2/27] Call platform_notify_remove later Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 4/27] arch provides generic iomap missing accessors Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 5/27] powerpc: Make pci_read_irq_line the default Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 6/27] powerpc: Remove ppc_md.pci_map_irq & ppc_swizzle for ARCH=powerpc Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 7/27] powerpc: Generic DCR infrastructure Benjamin Herrenschmidt
2006-11-06  7:05 ` Benjamin Herrenschmidt [this message]
2006-11-06  7:05 ` [PATCH 9/27] powerpc: Support for DCR based MPIC Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 10/27] powerpc: Improve MPIC driver auto-configuration from DT Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 11/27] powerpc: Native cell support for MPIC in southbridge Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 12/27] powerpc: Souped-up of_platform_device support Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 13/27] powerpc: Hook of_platform_bus_probe with cell Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 14/27] powerpc: Refactor 64 bits DMA operations Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 15/27] powerpc: PCI use new bus device notifier Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 16/27] powerpc: Add DMA ops support for of_plaform_device to Cell Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 18/27] powerpc: Resolve the BUID fir RTAS PCI config space accesses Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 17/27] powerpc: Resolve the parent address of a PCI bus range Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 19/27] powerpc: Add "parent" struct device for PCI host bridges Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 20/27] powerpc: Generic OF platform driver " Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 22/27] s2io ppc64 fix for readq/writeq Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 21/27] powerpc: Cell fixup DMA offset for new southbridge Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 23/27] powerpc: Allow hooking of PCI MMIO & PIO accessors on 64 bits Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 24/27] powerpc: Cell "Spider" MMIO workarounds Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 26/27] powerpc: Merge 32 and 64 bits asm-powerpc/io.h Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 25/27] powerpc: remove ioremap64 and fixup_bigphys_addr Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 27/27] powerpc: EMAC of_platform_device support for Cell using Axon Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061106070659.5C53B67D0E@ozlabs.org \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).