linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Arnd Bergmann <arnd@arndb.de>, Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Olof Johansson <olof@lixom.net>,
	linux-arm-kernel@lists.infradead.org, linux-next@vger.kernel.org,
	linux-kernel@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	Tarun Kanti DebBarma <tarun.kanti@ti.com>
Subject: Re: linux-next: manual merge of the arm-soc tree with the gpio tree
Date: Fri, 02 Mar 2012 00:48:43 -0700	[thread overview]
Message-ID: <20120302074843.2E45A3E2DAC@localhost> (raw)
In-Reply-To: <201203011228.33983.arnd@arndb.de>

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

  parent reply	other threads:[~2012-03-02  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-21  7:09 Stephen Rothwell

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=20120302074843.2E45A3E2DAC@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sfr@canb.auug.org.au \
    --cc=tarun.kanti@ti.com \
    --cc=tony@atomide.com \
    /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;
as well as URLs for NNTP newsgroup(s).