public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: <gerg@snapgear.com>
To: linux-m68k@vger.kernel.org, uclinux-dev@uclinux.org
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: [PATCH 4/5] m68knommu: make 528x CPU reset register addressing consistent
Date: Tue, 28 Feb 2012 13:58:21 +1000	[thread overview]
Message-ID: <1330401502-26250-4-git-send-email-gerg@snapgear.com> (raw)
In-Reply-To: <1330401502-26250-1-git-send-email-gerg@snapgear.com>

From: Greg Ungerer <gerg@uclinux.org>

If we make all MCF_RCR (CPU reset register) addressing consistent across all
ColdFire CPU family members that use it then we will be able to remove the
duplicated copies of the code that use it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
 arch/m68k/include/asm/m528xsim.h |    4 ++--
 arch/m68k/platform/528x/config.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/include/asm/m528xsim.h b/arch/m68k/include/asm/m528xsim.h
index e4581a4..569476f 100644
--- a/arch/m68k/include/asm/m528xsim.h
+++ b/arch/m68k/include/asm/m528xsim.h
@@ -272,8 +272,8 @@
 /*
  *  Reset Control Unit (relative to IPSBAR).
  */
-#define	MCF_RCR			0x110000
-#define	MCF_RSR			0x110001
+#define	MCF_RCR			(MCF_IPSBAR + 0x110000)
+#define	MCF_RSR			(MCF_IPSBAR + 0x110001)
 
 #define	MCF_RCR_SWRESET		0x80		/* Software reset bit */
 #define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */
diff --git a/arch/m68k/platform/528x/config.c b/arch/m68k/platform/528x/config.c
index 038d13f..957b5c0 100644
--- a/arch/m68k/platform/528x/config.c
+++ b/arch/m68k/platform/528x/config.c
@@ -63,7 +63,7 @@ static void __init m528x_fec_init(void)
 static void m528x_cpu_reset(void)
 {
 	local_irq_disable();
-	__raw_writeb(MCF_RCR_SWRESET, MCF_IPSBAR + MCF_RCR);
+	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
 }
 
 /***************************************************************************/
-- 
1.7.0.4

  parent reply	other threads:[~2012-02-28  3:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  3:58 [PATCH 1/5] m68knommu: factor some common ColdFire cpu reset code gerg
2012-02-28  3:58 ` [PATCH 2/5] m68knommu: make 523x CPU reset register addressing consistent gerg
2012-02-28  3:58 ` [PATCH 3/5] m68knommu: make 527x " gerg
2012-02-28  3:58 ` gerg [this message]
2012-02-28  3:58 ` [PATCH 5/5] m68knommu: factor more common ColdFire cpu reset code gerg

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=1330401502-26250-4-git-send-email-gerg@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=gerg@uclinux.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=uclinux-dev@uclinux.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