All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Cleanup PMC405 board support
Date: Tue, 17 Feb 2009 15:19:28 +0100	[thread overview]
Message-ID: <200902171519.28995.sr@denx.de> (raw)
In-Reply-To: <200902152226.55468.matthias.fuchs@esd.eu>

On Sunday 15 February 2009, Matthias Fuchs wrote:
> This patch fixes coding style for PMC405 board support.
> Also some unneeded features/code is removed.

Please find some comments below.

> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
> ---
>  board/esd/pmc405/pmc405.c |   95 ++++-----------
>  include/configs/PMC405.h  |  285
> ++++++++++++++++++++++----------------------- 2 files changed, 165
> insertions(+), 215 deletions(-)
>
> diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c
> index 975b6d6..dd58d01 100644
> --- a/board/esd/pmc405/pmc405.c
> +++ b/board/esd/pmc405/pmc405.c
> @@ -40,7 +40,6 @@ const unsigned char fpgadata[] =
>  };
>  int filesize = sizeof(fpgadata);
>
> -
>  int board_early_init_f (void)
>  {
>  	/*
> @@ -55,23 +54,23 @@ int board_early_init_f (void)
>  	 * IRQ 30 (EXT IRQ 5) PCI INTA; active low; level sensitive
>  	 * IRQ 31 (EXT IRQ 6) COMPACT FLASH; active high; level sensitive
>  	 */
> -	mtdcr(uicsr, 0xFFFFFFFF);       /* clear all ints */
> -	mtdcr(uicer, 0x00000000);       /* disable all ints */
> -	mtdcr(uiccr, 0x00000000);       /* set all to be non-critical*/
> -	mtdcr(uicpr, 0xFFFFFF81);       /* set int polarities */
> -	mtdcr(uictr, 0x10000000);       /* set int trigger levels */
> -	mtdcr(uicvcr, 0x00000001);      /* set vect base=0,INT0 highest
> priority*/ -	mtdcr(uicsr, 0xFFFFFFFF);       /* clear all ints */
> +	mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */
> +	mtdcr(uicer, 0x00000000); /* disable all ints */
> +	mtdcr(uiccr, 0x00000000); /* set all to be non-critical*/
> +	mtdcr(uicpr, 0xFFFFFF81); /* set int polarities */
> +	mtdcr(uictr, 0x10000000); /* set int trigger levels */
> +	mtdcr(uicvcr, 0x00000001); /* set vect base=0, INT0 highest priority */
> +	mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */
>
>  	/*
> -	 * EBC Configuration Register: set ready timeout to 512 ebc-clks -> ca.
> 15 us +	 * EBC Configuration Register:
> +	 * set ready timeout to 512 ebc-clks -> ca. 15 us
>  	 */
>  	mtebc (epcr, 0xa8400000);
>
>  	/*
>  	 * Setup GPIO pins
>  	 */
> -
>  	mtdcr(cntrl0, mfdcr(cntrl0) | ((CONFIG_SYS_FPGA_INIT | \
>  					CONFIG_SYS_FPGA_DONE | \
>  					CONFIG_SYS_XEREADY | \
> @@ -85,26 +84,26 @@ int board_early_init_f (void)
>  	}
>
>  	out32(GPIO0_OR, 0);
> -	out32(GPIO0_TCR, CONFIG_SYS_FPGA_PRG | CONFIG_SYS_FPGA_CLK |
> CONFIG_SYS_FPGA_DATA | CONFIG_SYS_XEREADY); /* setup for output */ +	/*
> setup for output */
> +	out32(GPIO0_TCR, CONFIG_SYS_FPGA_PRG | CONFIG_SYS_FPGA_CLK | \
> +	      CONFIG_SYS_FPGA_DATA | CONFIG_SYS_XEREADY);

I suggest to switch to using the out_be32()/in_be32() accessor functions 
instead. I am aware that many other 4xx boards still use the "wrong" accessor 
functions for initial GPIO configuration. I'll try to change this soon.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2009-02-17 14:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 21:26 [U-Boot] [PATCH] ppc4xx: Cleanup PMC405 board support Matthias Fuchs
2009-02-17 14:19 ` Stefan Roese [this message]
2009-02-17 14:54   ` Matthias Fuchs
2009-02-17 15:05     ` Stefan Roese
2009-02-18  6:46     ` Matthias Fuchs
2009-02-18 13:02       ` Stefan Roese
2009-02-18 13:04 ` Stefan Roese
2009-02-18 13:11   ` Stefan Roese

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=200902171519.28995.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.