linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <dwg@au1.ibm.com>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [patch 04/10] 4xx bootwrapper reworks
Date: Mon, 6 Aug 2007 14:38:55 +1000	[thread overview]
Message-ID: <20070806043855.GF6103@localhost.localdomain> (raw)
In-Reply-To: <20070803161710.676644000@linux.vnet.ibm.com>

On Fri, Aug 03, 2007 at 11:09:04AM -0500, Josh Boyer wrote:
> Make the fixup_memsize function common for all of 4xx as several chips share
> the same SDRAM controller.  Also add functions to reset 40x chips and quiesce
> the ethernet.
> 
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> 
> ---
>  arch/powerpc/boot/44x.h   |    4 ----
>  arch/powerpc/boot/4xx.c   |   36 +++++++++++++++++++++++++++++++-----
>  arch/powerpc/boot/4xx.h   |   20 ++++++++++++++++++++
>  arch/powerpc/boot/dcr.h   |    2 ++
>  arch/powerpc/boot/ebony.c |    3 ++-
>  5 files changed, 55 insertions(+), 10 deletions(-)
> 
> --- linux-2.6.orig/arch/powerpc/boot/44x.h
> +++ linux-2.6/arch/powerpc/boot/44x.h
> @@ -10,10 +10,6 @@
>  #ifndef _PPC_BOOT_44X_H_
>  #define _PPC_BOOT_44X_H_
>  
> -void ibm44x_fixup_memsize(void);
> -void ibm4xx_fixup_ebc_ranges(const char *ebc);
> -
> -void ibm44x_dbcr_reset(void);
>  void ebony_init(void *mac0, void *mac1);
>  
>  #endif /* _PPC_BOOT_44X_H_ */
> --- linux-2.6.orig/arch/powerpc/boot/4xx.c
> +++ linux-2.6/arch/powerpc/boot/4xx.c
> @@ -21,8 +21,8 @@
>  #include "reg.h"
>  #include "dcr.h"
>  
> -/* Read the 44x memory controller to get size of system memory. */
> -void ibm44x_fixup_memsize(void)
> +/* Read the 4xx SDRAM controller to get size of system memory. */
> +void ibm4xx_fixup_memsize(void)
>  {
>  	int i;
>  	unsigned long memsize, bank_config;
> @@ -39,22 +39,48 @@ void ibm44x_fixup_memsize(void)
>  	dt_fixup_memory(0, memsize);
>  }
>  
> -#define SPRN_DBCR0		0x134
> -#define   DBCR0_RST_SYSTEM	0x30000000
> +#define DBCR0_RST_SYSTEM 0x30000000

Rather than just removing these defines and using hardcoded values,
I'd prefer to see separate SPRN_DBCR0_40X and SPRN_DBCR0_44X defines.

[snip]
> +#define EMAC_RESET 0x20000000
> +#define MAL_RESET 0x80000000

I think the MAL_RESET definition should go in the same place as the
DCR number definition.

> +void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
> +{

As I think I said before, I'm not really happy with this being
hardcoded assuming exactly 2 ethernets.

> +	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
> +	if (emac0)
> +		*emac0 = EMAC_RESET;
> +	if (emac1)
> +		*emac1 = EMAC_RESET;
> +
> +	mtdcr(DCRN_MAL0_CFG, MAL_RESET);
> +}
[snip]

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2007-08-06  4:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 16:09 [patch 00/10] 4xx patch series for 2.6.24 Josh Boyer
2007-08-03 16:09 ` [patch 01/10] Rename 4xx paths to 40x Josh Boyer
2007-08-03 16:09 ` [patch 02/10] 4xx Kconfig cleanup Josh Boyer
2007-08-04  7:45   ` David Gibson
2007-08-06 12:31     ` Josh Boyer
2007-08-07  3:06       ` David Gibson
2007-08-03 16:09 ` [patch 03/10] Rename 44x bootwrapper Josh Boyer
2007-08-06  4:36   ` David Gibson
2007-08-03 16:09 ` [patch 04/10] 4xx bootwrapper reworks Josh Boyer
2007-08-06  4:38   ` David Gibson [this message]
2007-08-06 12:36     ` Josh Boyer
2007-08-07  3:05       ` David Gibson
2007-08-07 13:10         ` Josh Boyer
2007-08-08  1:19           ` David Gibson
2007-08-03 16:09 ` [patch 05/10] 40x MMU Josh Boyer
2007-08-06  4:34   ` David Gibson
2007-08-03 16:09 ` [patch 06/10] 40x decrementer fixes Josh Boyer
2007-08-03 16:47   ` Sergei Shtylyov
2007-08-03 17:10     ` Sergei Shtylyov
2007-08-03 17:25       ` Josh Boyer
2007-08-03 17:30         ` Sergei Shtylyov
2007-08-03 17:30           ` Josh Boyer
2007-08-03 17:35             ` Sergei Shtylyov
2007-08-04  2:28       ` Benjamin Herrenschmidt
2007-08-05 14:12         ` Sergei Shtylyov
2007-08-03 17:15     ` Josh Boyer
2007-08-03 17:25       ` Sergei Shtylyov
2007-08-04  2:28     ` Benjamin Herrenschmidt
2007-08-05 14:19       ` Sergei Shtylyov
2007-08-03 16:09 ` [patch 07/10] Fix 40x build Josh Boyer
2007-08-06  4:39   ` David Gibson
2007-08-03 16:09 ` [patch 08/10] Bamboo DTS Josh Boyer
2007-08-06  4:53   ` David Gibson
2007-08-06 18:01     ` Jon Loeliger
2007-08-06 18:05       ` Josh Boyer
2007-08-07 13:11     ` Josh Boyer
2007-08-03 16:09 ` [patch 09/10] Bamboo board support Josh Boyer
2007-08-06  4:55   ` David Gibson
2007-08-03 16:09 ` [patch 10/10] Bamboo zImage wrapper Josh Boyer
2007-08-06  5:00   ` David Gibson
2007-08-06 12:39     ` Josh Boyer
2007-08-07  3:04       ` David Gibson
2007-08-07  3:04   ` David Gibson

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=20070806043855.GF6103@localhost.localdomain \
    --to=dwg@au1.ibm.com \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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).