Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips <linux-mips@linux-mips.org>, ralf@linux-mips.org
Subject: Re: [PATCH 2/5] rb532: use physical addresses for gpio and device controller registers
Date: Sat, 23 Aug 2008 01:42:35 +0400	[thread overview]
Message-ID: <48AF32CB.2020108@ru.mvista.com> (raw)
In-Reply-To: <200808221701.03810.florian@openwrt.org>

Hello.

Florian Fainelli wrote:

> This patch fixes the misuse of virtual addresses for the GPIO and third
> device controller which would lead to problems while accessing ioremap'd
> registers.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
> index 00a1c78..0628d8d 100644
> --- a/arch/mips/rb532/gpio.c
> +++ b/arch/mips/rb532/gpio.c
> @@ -47,8 +47,8 @@ struct mpmc_device dev3;
>  static struct resource rb532_gpio_reg0_res[] = {
>  	{
>  		.name 	= "gpio_reg0",
> -		.start 	= (u32)(IDT434_REG_BASE + GPIOBASE),
> -		.end 	= (u32)(IDT434_REG_BASE + GPIOBASE + sizeof(struct rb532_gpio_reg)),
> +		.start 	= REGBASE + GPIOBASE,
> +		.end 	= REGBASE + GPIOBASE + sizeof(struct rb532_gpio_reg) -1,
>  		.flags 	= IORESOURCE_MEM,
>  	}
>  };
> @@ -56,8 +56,8 @@ static struct resource rb532_gpio_reg0_res[] = {
>  static struct resource rb532_dev3_ctl_res[] = {
>  	{
>  		.name	= "dev3_ctl",
> -		.start	= (u32)(IDT434_REG_BASE + DEV3BASE),
> -		.end	= (u32)(IDT434_REG_BASE + DEV3BASE + sizeof(struct dev_reg)),
> +		.start	= REGBASE + DEV3BASE,
> +		.end	= REGBASE + DEV3BASE + sizeof(struct dev_reg) -1,
>   

  Hm, your spacing is inconsistent. Why no space after -?

WBR, Sergei

      reply	other threads:[~2008-08-22 21:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22 15:01 [PATCH 2/5] rb532: use physical addresses for gpio and device controller registers Florian Fainelli
2008-08-22 21:42 ` Sergei Shtylyov [this message]

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=48AF32CB.2020108@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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