All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] MFD: rdc321x: change resources flags to IORESOURCE_IO
Date: Mon, 17 May 2010 00:14:29 +0200	[thread overview]
Message-ID: <20100516221428.GC3236@sortiz.org> (raw)
In-Reply-To: <201005152258.28538.florian@openwrt.org>

Hi Florian,

On Sat, May 15, 2010 at 10:58:27PM +0200, Florian Fainelli wrote:
> The rdc321x southbridge PCI device has no MEM PCI resources that we could
> pass to mfd_add_devices. Since 33254dd5, mfd_add_device checks for the
> mem_base argument that we set to NULL. Changing the resources passed to
> our MFD cells from IORESOURCE_MEM to IORESOURCE_IO fixes that. Since we use
> those resources as offsets to the PCI configuration space base address of
> the southbridge device this is also more adequate.
Patch applied, many thanks.

Cheers,
Samuel.


> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/drivers/gpio/rdc321x-gpio.c b/drivers/gpio/rdc321x-gpio.c
> index e344907..22f31dc 100644
> --- a/drivers/gpio/rdc321x-gpio.c
> +++ b/drivers/gpio/rdc321x-gpio.c
> @@ -147,7 +147,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	}
>  
> -	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio-reg1");
> +	r = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpio-reg1");
>  	if (!r) {
>  		dev_err(&pdev->dev, "failed to get gpio-reg1 resource\n");
>  		err = -ENODEV;
> @@ -159,7 +159,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
>  	rdc321x_gpio_dev->reg1_ctrl_base = r->start;
>  	rdc321x_gpio_dev->reg1_data_base = r->start + 0x4;
>  
> -	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio-reg2");
> +	r = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpio-reg2");
>  	if (!r) {
>  		dev_err(&pdev->dev, "failed to get gpio-reg2 resource\n");
>  		err = -ENODEV;
> diff --git a/drivers/mfd/rdc321x-southbridge.c b/drivers/mfd/rdc321x-southbridge.c
> index 256dd56..5092297 100644
> --- a/drivers/mfd/rdc321x-southbridge.c
> +++ b/drivers/mfd/rdc321x-southbridge.c
> @@ -34,7 +34,7 @@ static struct resource rdc321x_wdt_resource[] = {
>  		.name	= "wdt-reg",
>  		.start	= RDC321X_WDT_CTRL,
>  		.end	= RDC321X_WDT_CTRL + 0x3,
> -		.flags	= IORESOURCE_MEM,
> +		.flags	= IORESOURCE_IO,
>  	}
>  };
>  
> @@ -47,12 +47,12 @@ static struct resource rdc321x_gpio_resources[] = {
>  		.name	= "gpio-reg1",
>  		.start	= RDC321X_GPIO_CTRL_REG1,
>  		.end	= RDC321X_GPIO_CTRL_REG1 + 0x7,
> -		.flags	= IORESOURCE_MEM,
> +		.flags	= IORESOURCE_IO,
>  	}, {
>  		.name	= "gpio-reg2",
>  		.start	= RDC321X_GPIO_CTRL_REG2,
>  		.end	= RDC321X_GPIO_CTRL_REG2 + 0x7,
> -		.flags	= IORESOURCE_MEM,
> +		.flags	= IORESOURCE_IO,
>  	}
>  };
>  
> diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c
> index 4733a99..428f8a1 100644
> --- a/drivers/watchdog/rdc321x_wdt.c
> +++ b/drivers/watchdog/rdc321x_wdt.c
> @@ -237,7 +237,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
>  
> -	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wdt-reg");
> +	r = platform_get_resource_byname(pdev, IORESOURCE_IO, "wdt-reg");
>  	if (!r) {
>  		dev_err(&pdev->dev, "failed to get wdt-reg resource\n");
>  		return -ENODEV;

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

      reply	other threads:[~2010-05-16 22:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 20:58 [PATCH v2] MFD: rdc321x: change resources flags to IORESOURCE_IO Florian Fainelli
2010-05-16 22:14 ` Samuel Ortiz [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=20100516221428.GC3236@sortiz.org \
    --to=sameo@linux.intel.com \
    --cc=florian@openwrt.org \
    --cc=linux-kernel@vger.kernel.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 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.