All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mpc85xx: Fix the offset of register address error
Date: Tue, 1 Oct 2013 08:42:43 -0700	[thread overview]
Message-ID: <524AED73.2040205@freescale.com> (raw)
In-Reply-To: <1379842421-13957-1-git-send-email-Yuantian.Tang@freescale.com>

On 09/22/2013 02:33 AM, Tang Yuantian wrote:
> From: Tang Yuantian <yuantian.tang@freescale.com>
> 
> The offset of register address within GPIO module is just
> CONFIG_SYS_MPC85xx_GPIO_ADDR, no reason to add 0xc00.
> 
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> ---
>  arch/powerpc/include/asm/mpc85xx_gpio.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h
> index 3d11884..87bb4a0 100644
> --- a/arch/powerpc/include/asm/mpc85xx_gpio.h
> +++ b/arch/powerpc/include/asm/mpc85xx_gpio.h
> @@ -20,7 +20,7 @@
>  static inline void mpc85xx_gpio_set(unsigned int mask,
>  		unsigned int dir, unsigned int val)
>  {
> -	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + 0xc00);
> +	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
>  
>  	/* First mask off the unwanted parts of "dir" and "val" */
>  	dir &= mask;
> @@ -56,7 +56,7 @@ static inline void mpc85xx_gpio_set_high(unsigned int gpios)
>  
>  static inline unsigned int mpc85xx_gpio_get(unsigned int mask)
>  {
> -	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + 0xc00);
> +	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
>  
>  	/* Read the requested values */
>  	return in_be32(&gpio->gpdat) & mask;
> 

Yuantian,

Please go through the base address again. I think some SoCs do use 0xc00
offset from 0xF000, for eample P1020, P1023, MPC8572. I only spot
checked several.

York

  reply	other threads:[~2013-10-01 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22  9:33 [U-Boot] [PATCH] mpc85xx: Fix the offset of register address error Tang Yuantian
2013-10-01 15:42 ` York Sun [this message]
2013-10-08  3:28   ` Tang Yuantian-B29983
2013-10-08 16:46     ` York Sun
2013-10-08 16:52     ` York Sun
2013-10-09  1:39       ` Tang Yuantian-B29983

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=524AED73.2040205@freescale.com \
    --to=yorksun@freescale.com \
    --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.