All of lore.kernel.org
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] digsy MTC: Add SPI support.
Date: Mon, 08 Jun 2009 17:57:20 +0200	[thread overview]
Message-ID: <m2k53m67mn.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1243416179-64368-2-git-send-email-gjb@semihalf.com> (Grzegorz Bernacki's message of "Wed, 27 May 2009 11:22:58 +0200")

Hi Grzegorz,

> Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
> ---
>  board/digsy_mtc/digsy_mtc.c |   14 ++++++++++++++
>  include/configs/digsy_mtc.h |    7 +++++++
>  2 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/board/digsy_mtc/digsy_mtc.c b/board/digsy_mtc/digsy_mtc.c
> index 83d5864..36bbbc5 100644
> --- a/board/digsy_mtc/digsy_mtc.c
> +++ b/board/digsy_mtc/digsy_mtc.c
> @@ -186,6 +186,10 @@ int checkboard(void)
>  
>  int board_early_init_r(void)
>  {
> +#ifdef CONFIG_MPC52XX_SPI
> +	struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio*)MPC5XXX_GPIO;
> +	struct mpc5xxx_gpt *gpt = (struct mpc5xxx_gpt*)MPC5XXX_GPT;
> +#endif
>  	/*
>  	 * Now, when we are in RAM, enable flash write access for detection
>  	 * process.  Note that CS_BOOT cannot be cleared when executing in
> @@ -202,6 +206,16 @@ int board_early_init_r(void)
>  	/* Low level USB init, required for proper kernel operation */
>  	usb_cpu_init();
>  #endif
> +#ifdef CONFIG_MPC52XX_SPI
> +	/* SPI on Tmr2/3/4/5 pins */
> +	gpio->port_config |= 0x20000000;
> +
> +	/* GPT 6 Output Enable */
> +	gpt[6].emsr = 0x00000034 ;
> +	/* GPT 7 Output Enable */
> +	gpt[7].emsr = 0x00000034 ;
> +#endif

You want to use accessor macros here.

Cheers
  Detlev

-- 
The latest code  looks a bit similar to the old  [linux] big-reader-locks  hack
(which got dropped for good many eons ago and with which i deny any involvement
with, such as having authored it. [oh, did i say that out loud? crap.]), imple-
mented cleanly and properly.     -- Ingo Molnar <20090428124033.GA1655@elte.hu>
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

  reply	other threads:[~2009-06-08 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  9:22 [U-Boot] [PATCH 1/3] mpc52xx: Add SPI driver Grzegorz Bernacki
2009-05-27  9:22 ` [U-Boot] [PATCH 2/3] digsy MTC: Add SPI support Grzegorz Bernacki
2009-06-08 15:57   ` Detlev Zundel [this message]
2009-05-27  9:22 ` [U-Boot] [PATCH 3/3] digsy MTC: Add 'mtc' command Grzegorz Bernacki
2009-06-08 16:06   ` Detlev Zundel
2009-06-08 15:58 ` [U-Boot] [PATCH 1/3] mpc52xx: Add SPI driver Detlev Zundel

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=m2k53m67mn.fsf@ohwell.denx.de \
    --to=dzu@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.