linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the arm-soc tree with the gpio tree
@ 2012-03-01  5:40 Stephen Rothwell
  2012-03-01 12:28 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2012-03-01  5:40 UTC (permalink / raw)
  To: Olof Johansson, Arnd Bergmann, linux-arm-kernel
  Cc: linux-next, linux-kernel, Tony Lindgren, Tarun Kanti DebBarma,
	Grant Likely

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Hi all,

Today's linux-next merge of the arm-soc tree got conflicts in
arch/arm/mach-omap1/gpio16xx.c between commit ab985f0f7c2c ("gpio/omap:
cleanup omap_gpio_mod_init function") from the gpio tree and commit
63325ff235de ("ARM: OMAP1: Move 16xx GPIO system clock to platform init
code") from the arm-soc tree.

OK, I can't decide which is correct here - the former adds this code
inside the loop (even though it seems to not depend on anything in the
loop) and the latter adds it before.  I have used the former (but am
happy to be corrected).  And both commits remove the code in
drivers/gpio/gpio-omap.c.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the arm-soc tree with the gpio tree
  2012-03-01  5:40 linux-next: manual merge of the arm-soc tree with the gpio tree Stephen Rothwell
@ 2012-03-01 12:28 ` Arnd Bergmann
  2012-03-01 20:15   ` Tony Lindgren
  2012-03-02  7:48   ` Grant Likely
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2012-03-01 12:28 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Olof Johansson, linux-arm-kernel, linux-next, linux-kernel,
	Tony Lindgren, Tarun Kanti DebBarma, Grant Likely

On Thursday 01 March 2012, Stephen Rothwell wrote:
> Today's linux-next merge of the arm-soc tree got conflicts in
> arch/arm/mach-omap1/gpio16xx.c between commit ab985f0f7c2c ("gpio/omap:
> cleanup omap_gpio_mod_init function") from the gpio tree and commit
> 63325ff235de ("ARM: OMAP1: Move 16xx GPIO system clock to platform init
> code") from the arm-soc tree.
> 
> OK, I can't decide which is correct here - the former adds this code
> inside the loop (even though it seems to not depend on anything in the
> loop) and the latter adds it before.  I have used the former (but am
> happy to be corrected).  And both commits remove the code in
> drivers/gpio/gpio-omap.c.

Right, having the code outside of the loop seems correct to me, too.

Grant, I would suggest that I resolve this by merging the the
omap/gpio/runtime-pm-cleanup branch (f86bcc3) that is in your
tree into the arm-soc tree as a dependency for the omap1 stuff,
with the resolution below.

	Arnd

--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@@ -218,17 -225,34 +225,34 @@@ static int __init omap16xx_gpio_init(vo
  	if (!cpu_is_omap16xx())
  		return -EINVAL;
  
 +	/*
 +	 * Enable system clock for GPIO module.
 +	 * The CAM_CLK_CTRL *is* really the right place.
 +	 */
 +	omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
 +					ULPD_CAM_CLK_CTRL);
 +
- 	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++)
- 		platform_device_register(omap16xx_gpio_dev[i]);
+ 	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) {
+ 		pdev = omap16xx_gpio_dev[i];
+ 		pdata = pdev->dev.platform_data;
+ 
+ 		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ 		if (unlikely(!res)) {
+ 			dev_err(&pdev->dev, "Invalid mem resource.\n");
+ 			return -ENODEV;
+ 		}
  
- 	gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev);
+ 		base = ioremap(res->start, resource_size(res));
+ 		if (unlikely(!base)) {
+ 			dev_err(&pdev->dev, "ioremap failed.\n");
+ 			return -ENOMEM;
+ 		}
+ 
+ 		__raw_writel(SYSCONFIG_WORD, base + OMAP1610_GPIO_SYSCONFIG);
+ 		iounmap(base);
+ 
 -		/*
 -		 * Enable system clock for GPIO module.
 -		 * The CAM_CLK_CTRL *is* really the right place.
 -		 */
 -		omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
 -					ULPD_CAM_CLK_CTRL);
 -
+ 		platform_device_register(omap16xx_gpio_dev[i]);
+ 	}
  
  	return 0;
  }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the arm-soc tree with the gpio tree
  2012-03-01 12:28 ` Arnd Bergmann
@ 2012-03-01 20:15   ` Tony Lindgren
  2012-03-02  7:48   ` Grant Likely
  1 sibling, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2012-03-01 20:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Rothwell, Olof Johansson, linux-arm-kernel, linux-next,
	linux-kernel, Tarun Kanti DebBarma, Grant Likely

* Arnd Bergmann <arnd@arndb.de> [120301 03:57]:
> On Thursday 01 March 2012, Stephen Rothwell wrote:
> > Today's linux-next merge of the arm-soc tree got conflicts in
> > arch/arm/mach-omap1/gpio16xx.c between commit ab985f0f7c2c ("gpio/omap:
> > cleanup omap_gpio_mod_init function") from the gpio tree and commit
> > 63325ff235de ("ARM: OMAP1: Move 16xx GPIO system clock to platform init
> > code") from the arm-soc tree.
> > 
> > OK, I can't decide which is correct here - the former adds this code
> > inside the loop (even though it seems to not depend on anything in the
> > loop) and the latter adds it before.  I have used the former (but am
> > happy to be corrected).  And both commits remove the code in
> > drivers/gpio/gpio-omap.c.
> 
> Right, having the code outside of the loop seems correct to me, too.
> 
> Grant, I would suggest that I resolve this by merging the the
> omap/gpio/runtime-pm-cleanup branch (f86bcc3) that is in your
> tree into the arm-soc tree as a dependency for the omap1 stuff,
> with the resolution below.

For gpio16xx.c the resolution is to use the version from ab985f0f7c2c,
so below looks good to me.

Regards,

Tony


> --- a/arch/arm/mach-omap1/gpio16xx.c
> +++ b/arch/arm/mach-omap1/gpio16xx.c
> @@@ -218,17 -225,34 +225,34 @@@ static int __init omap16xx_gpio_init(vo
>   	if (!cpu_is_omap16xx())
>   		return -EINVAL;
>   
>  +	/*
>  +	 * Enable system clock for GPIO module.
>  +	 * The CAM_CLK_CTRL *is* really the right place.
>  +	 */
>  +	omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
>  +					ULPD_CAM_CLK_CTRL);
>  +
> - 	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++)
> - 		platform_device_register(omap16xx_gpio_dev[i]);
> + 	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) {
> + 		pdev = omap16xx_gpio_dev[i];
> + 		pdata = pdev->dev.platform_data;
> + 
> + 		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + 		if (unlikely(!res)) {
> + 			dev_err(&pdev->dev, "Invalid mem resource.\n");
> + 			return -ENODEV;
> + 		}
>   
> - 	gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev);
> + 		base = ioremap(res->start, resource_size(res));
> + 		if (unlikely(!base)) {
> + 			dev_err(&pdev->dev, "ioremap failed.\n");
> + 			return -ENOMEM;
> + 		}
> + 
> + 		__raw_writel(SYSCONFIG_WORD, base + OMAP1610_GPIO_SYSCONFIG);
> + 		iounmap(base);
> + 
>  -		/*
>  -		 * Enable system clock for GPIO module.
>  -		 * The CAM_CLK_CTRL *is* really the right place.
>  -		 */
>  -		omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
>  -					ULPD_CAM_CLK_CTRL);
>  -
> + 		platform_device_register(omap16xx_gpio_dev[i]);
> + 	}
>   
>   	return 0;
>   }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the arm-soc tree with the gpio tree
  2012-03-01 12:28 ` Arnd Bergmann
  2012-03-01 20:15   ` Tony Lindgren
@ 2012-03-02  7:48   ` Grant Likely
  1 sibling, 0 replies; 5+ messages in thread
From: Grant Likely @ 2012-03-02  7:48 UTC (permalink / raw)
  To: Arnd Bergmann, Stephen Rothwell
  Cc: Olof Johansson, linux-arm-kernel, linux-next, linux-kernel,
	Tony Lindgren, Tarun Kanti DebBarma

On Thu, 1 Mar 2012 12:28:33 +0000, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 01 March 2012, Stephen Rothwell wrote:
> > Today's linux-next merge of the arm-soc tree got conflicts in
> > arch/arm/mach-omap1/gpio16xx.c between commit ab985f0f7c2c ("gpio/omap:
> > cleanup omap_gpio_mod_init function") from the gpio tree and commit
> > 63325ff235de ("ARM: OMAP1: Move 16xx GPIO system clock to platform init
> > code") from the arm-soc tree.
> > 
> > OK, I can't decide which is correct here - the former adds this code
> > inside the loop (even though it seems to not depend on anything in the
> > loop) and the latter adds it before.  I have used the former (but am
> > happy to be corrected).  And both commits remove the code in
> > drivers/gpio/gpio-omap.c.
> 
> Right, having the code outside of the loop seems correct to me, too.
> 
> Grant, I would suggest that I resolve this by merging the the
> omap/gpio/runtime-pm-cleanup branch (f86bcc3) that is in your
> tree into the arm-soc tree as a dependency for the omap1 stuff,
> with the resolution below.

Okay by me.

g.

> 
> 	Arnd
> 
> --- a/arch/arm/mach-omap1/gpio16xx.c
> +++ b/arch/arm/mach-omap1/gpio16xx.c
> @@@ -218,17 -225,34 +225,34 @@@ static int __init omap16xx_gpio_init(vo
>   	if (!cpu_is_omap16xx())
>   		return -EINVAL;
>   
>  +	/*
>  +	 * Enable system clock for GPIO module.
>  +	 * The CAM_CLK_CTRL *is* really the right place.
>  +	 */
>  +	omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
>  +					ULPD_CAM_CLK_CTRL);
>  +
> - 	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++)
> - 		platform_device_register(omap16xx_gpio_dev[i]);
> + 	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) {
> + 		pdev = omap16xx_gpio_dev[i];
> + 		pdata = pdev->dev.platform_data;
> + 
> + 		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + 		if (unlikely(!res)) {
> + 			dev_err(&pdev->dev, "Invalid mem resource.\n");
> + 			return -ENODEV;
> + 		}
>   
> - 	gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev);
> + 		base = ioremap(res->start, resource_size(res));
> + 		if (unlikely(!base)) {
> + 			dev_err(&pdev->dev, "ioremap failed.\n");
> + 			return -ENOMEM;
> + 		}
> + 
> + 		__raw_writel(SYSCONFIG_WORD, base + OMAP1610_GPIO_SYSCONFIG);
> + 		iounmap(base);
> + 
>  -		/*
>  -		 * Enable system clock for GPIO module.
>  -		 * The CAM_CLK_CTRL *is* really the right place.
>  -		 */
>  -		omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04,
>  -					ULPD_CAM_CLK_CTRL);
>  -
> + 		platform_device_register(omap16xx_gpio_dev[i]);
> + 	}
>   
>   	return 0;
>   }

-- 
email sent from notmuch.vim plugin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* linux-next: manual merge of the arm-soc tree with the gpio tree
@ 2012-05-21  7:09 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2012-05-21  7:09 UTC (permalink / raw)
  To: Olof Johansson, Arnd Bergmann, linux-arm-kernel
  Cc: linux-next, linux-kernel, Shawn Guo, Grant Likely

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

Hi all,

Today's linux-next merge of the arm-soc tree got a conflict in
drivers/gpio/gpio-mxs.c between commit 3e11f7b840b4 ("gpio/generic:
initialize basic_mmio_gpio shadow variables properly") from the gpio tree
and commit 164387d2b4ae ("gpio/mxs: get rid of the use of cpu_is_xxx")
from the arm-soc tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/gpio/gpio-mxs.c
index b413650,429228b..0000000
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@@ -242,11 -283,11 +283,11 @@@ static int __devinit mxs_gpio_probe(str
  	irq_set_handler_data(port->irq, port);
  
  	err = bgpio_init(&port->bgc, &pdev->dev, 4,
- 			 port->base + PINCTRL_DIN(port->id),
- 			 port->base + PINCTRL_DOUT(port->id), NULL,
- 			 port->base + PINCTRL_DOE(port->id), NULL, 0);
+ 			 port->base + PINCTRL_DIN(port),
+ 			 port->base + PINCTRL_DOUT(port), NULL,
 -			 port->base + PINCTRL_DOE(port), NULL, false);
++			 port->base + PINCTRL_DOE(port), NULL, 0);
  	if (err)
- 		goto out_iounmap;
+ 		return err;
  
  	port->bgc.gc.to_irq = mxs_gpio_to_irq;
  	port->bgc.gc.base = port->id * 32;

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-21  7:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01  5:40 linux-next: manual merge of the arm-soc tree with the gpio tree Stephen Rothwell
2012-03-01 12:28 ` Arnd Bergmann
2012-03-01 20:15   ` Tony Lindgren
2012-03-02  7:48   ` Grant Likely
2012-05-21  7:09 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).