linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: Venkatesh Rao <rpranesh@yahoo.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: ZMII Code Panics on 440GP Ebony
Date: 24 May 2002 09:40:53 -0700	[thread overview]
Message-ID: <52y9e9ebxm.fsf@topspin.com> (raw)
In-Reply-To: <20020524155815.98552.qmail@web21402.mail.yahoo.com>


>>>>> "Venkatesh" == Venkatesh Rao <rpranesh@yahoo.com> writes:

    Venkatesh> Hi, I am using a Rev B board and when i compiled the
    Venkatesh> latest kernel (pulled yesterday after Matt's
    Venkatesh> Checkin)and booted my ebony board, i got a panic in
    Venkatesh> ZMII. I am including a portion of the bootup log.

Yes, the linux_2_4_devel tree I pulled yesterday was not in a
consistent state for my 440GP Ebony board.  The problem is that the
Ebony setup code has not been updated for the new OCP handling code
yet.  To fix it, you need to edit arch/ppc/platforms/ebony.c and
delete the lines:

	/* FIXME: Remove after OCP code is updated */
	ebony_ocp_fixup_addrs(EMAC_ADDR[0], EMAC_ADDR[1], ZMII_ADDR[0]);

Then edit arch/ppc/platforms/ibm440gp.c -- change the initialization
of core_ocp[] so the EMAC and ZMII lines read:

	{EMAC, EBONY_EMAC0_ADDR, OCP_IRQ_NA},
	{EMAC, EBONY_EMAC1_ADDR, OCP_IRQ_NA},
	{ZMII, EBONY_ZMII_ADDR, OCP_IRQ_NA},

I'm including a patch at the end of this email.  Perhaps someone who
can check in to the tree and who can confirm that I've understood how
this is intended to work can get this into the linux_2_4_devel tree.

In addition, it seems to me that the EBONY_{ZMII,EMAC0,EMAC1}_{ADDR
constants should be renamed to PPC440GP_xxx constants since they are
not Ebony specific but rather apply to all IBM 440GP designs.  As
further cleanup, one can probably remove the EMAC_ADDR and ZMII_ADDR
variables.

I would be happy to help with this cleanup; however, I don't want to
step on anyone's work in progress.  However, if anyone would like
patches to do some of this cleanup I could put some together fairly
quickly.

Best,
Roland

diff -aur ebony.old/arch/ppc/platforms/ebony.c ebony/arch/ppc/platforms/ebony.c
--- ebony.old/arch/ppc/platforms/ebony.c	Fri May 24 09:23:40 2002
+++ ebony/arch/ppc/platforms/ebony.c	Fri May 24 09:13:29 2002
@@ -215,30 +215,6 @@
 TODC_ALLOC();
 #endif /* CONFIG_PPC_RTC */

-/*
- * FIXME: Remove after the OCP drivers start using
- * ioremap_native(get_ocp_paddr(...), ...)
- */
-void
-ebony_ocp_fixup_addrs(struct emac_regs *emac0_addr, struct emac_regs *emac1_addr,
-		struct zmii_regs *zmii_addr)
-{
-	int i;
-	int emac_count = 0;
-
-	for (i = 0; core_ocp[i].type != OCP_NULL_TYPE; i++) {
-		if (core_ocp[i].type == EMAC) {
-			core_ocp[i].paddr = emac_count++ ?
-				emac1_addr : emac0_addr;
-		}
-		else if (core_ocp[i].type == ZMII) {
-			core_ocp[i].paddr = zmii_addr;
-		}
-	}
-
-	return;
-}
-
 static void __init
 ebony_setup_arch(void)
 {
@@ -269,9 +245,6 @@
 	/* Setup ZMII access */
 	ZMII_ADDR[0] = (struct zmii_regs *)
 		ioremap64(EBONY_ZMII_ADDR, EBONY_ZMII_SIZE);
-
-	/* FIXME: Remove after OCP code is updated */
-	ebony_ocp_fixup_addrs(EMAC_ADDR[0], EMAC_ADDR[1], ZMII_ADDR[0]);

 	/* init to some ~sane value until calibrate_delay() runs */
         loops_per_jiffy = 50000000/HZ;
diff -aur ebony.old/arch/ppc/platforms/ibm440gp.c ebony/arch/ppc/platforms/ibm440gp.c
--- ebony.old/arch/ppc/platforms/ibm440gp.c	Fri May 24 09:23:05 2002
+++ ebony/arch/ppc/platforms/ibm440gp.c	Thu May 23 14:44:35 2002
@@ -68,9 +68,9 @@
 	{PCI, PCI0_BASE, OCP_IRQ_NA},
 	{OPB, OPB0_BASE, OCP_IRQ_NA},
 #endif
-	{EMAC, 0, OCP_IRQ_NA},
-	{EMAC, 0, OCP_IRQ_NA},
-	{ZMII, 0, OCP_IRQ_NA},
+	{EMAC, EBONY_EMAC0_ADDR, OCP_IRQ_NA},
+	{EMAC, EBONY_EMAC1_ADDR, OCP_IRQ_NA},
+	{ZMII, EBONY_ZMII_ADDR, OCP_IRQ_NA},
 	{OCP_NULL_TYPE, 0x0, OCP_IRQ_NA},

 };

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-05-24 16:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-24 15:58 ZMII Code Panics on 440GP Ebony Venkatesh Rao
2002-05-24 16:40 ` Roland Dreier [this message]
2002-05-24 19:20   ` Matt Porter
2002-05-24 19:17     ` Roland Dreier
2002-05-24 20:47       ` Matt Porter
2002-05-28 22:04         ` Ebony crash fix & 440GP cleanup step one Roland Dreier
2002-05-29 22:45           ` Matt Porter
2002-05-30 23:00             ` Roland Dreier
2002-06-04  0:44             ` A few more PPC440GP/Ebony cleanups Roland Dreier

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=52y9e9ebxm.fsf@topspin.com \
    --to=roland@topspin.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=rpranesh@yahoo.com \
    /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).