All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: Afzal Mohammed <afzal@ti.com>
Cc: tony@atomide.com, paul@pwsan.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v8 2/3] ARM: OMAP2+: gpmc: Adapt to HWMOD
Date: Wed, 5 Sep 2012 14:55:23 -0500	[thread overview]
Message-ID: <5047AE2B.30807@ti.com> (raw)
In-Reply-To: <c14607ff57fca419dc9d7e0beaea197e001f4e25.1346846464.git.afzal@ti.com>

Hi Afzal,

On 09/05/2012 07:37 AM, Afzal Mohammed wrote:
> Create API for platforms to adapt GPMC to HWMOD
> 
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>  arch/arm/mach-omap2/gpmc.c |   26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index dbc1ebc..c45f185 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -29,11 +29,14 @@
>  
>  #include <plat/gpmc.h>
>  #include <plat/sdrc.h>
> +#include <plat/omap_device.h>
>  
>  #include "soc.h"
>  
>  #include "common.h"
>  
> +#define	DEVICE_NAME		"omap-gpmc"
> +
>  /* GPMC register offsets */
>  #define GPMC_REVISION		0x00
>  #define GPMC_SYSCONFIG		0x10
> @@ -897,6 +900,29 @@ static int __init gpmc_init(void)
>  }
>  postcore_initcall(gpmc_init);
>  
> +static int __init omap_gpmc_init(void)
> +{
> +	struct omap_hwmod *oh;
> +	struct platform_device *pdev;
> +	char *oh_name = "gpmc";
> +
> +	oh = omap_hwmod_lookup(oh_name);
> +	if (!oh) {
> +		pr_err("Could not look up %s\n", oh_name);
> +		return -ENODEV;
> +	}
> +
> +	pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0);
> +	if (IS_ERR(pdev)) {
> +		WARN(1, "Can't build omap_device for %s:%s.\n",
> +						DEVICE_NAME, oh->name);
> +		return PTR_ERR(pdev);
> +	}
> +
> +	return 0;

Nit-pick, I see some devices writing the above as ...

	WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);

 	return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;

> +}
> +postcore_initcall(omap_gpmc_init);
> +
>  static irqreturn_t gpmc_handle_irq(int irq, void *dev)
>  {
>  	int i;
> 

Otherwise ...

Reviewed-by: Jon Hunter <jon-hunter@ti.com>

Cheers
Jon

WARNING: multiple messages have this Message-ID (diff)
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 2/3] ARM: OMAP2+: gpmc: Adapt to HWMOD
Date: Wed, 5 Sep 2012 14:55:23 -0500	[thread overview]
Message-ID: <5047AE2B.30807@ti.com> (raw)
In-Reply-To: <c14607ff57fca419dc9d7e0beaea197e001f4e25.1346846464.git.afzal@ti.com>

Hi Afzal,

On 09/05/2012 07:37 AM, Afzal Mohammed wrote:
> Create API for platforms to adapt GPMC to HWMOD
> 
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>  arch/arm/mach-omap2/gpmc.c |   26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index dbc1ebc..c45f185 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -29,11 +29,14 @@
>  
>  #include <plat/gpmc.h>
>  #include <plat/sdrc.h>
> +#include <plat/omap_device.h>
>  
>  #include "soc.h"
>  
>  #include "common.h"
>  
> +#define	DEVICE_NAME		"omap-gpmc"
> +
>  /* GPMC register offsets */
>  #define GPMC_REVISION		0x00
>  #define GPMC_SYSCONFIG		0x10
> @@ -897,6 +900,29 @@ static int __init gpmc_init(void)
>  }
>  postcore_initcall(gpmc_init);
>  
> +static int __init omap_gpmc_init(void)
> +{
> +	struct omap_hwmod *oh;
> +	struct platform_device *pdev;
> +	char *oh_name = "gpmc";
> +
> +	oh = omap_hwmod_lookup(oh_name);
> +	if (!oh) {
> +		pr_err("Could not look up %s\n", oh_name);
> +		return -ENODEV;
> +	}
> +
> +	pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0);
> +	if (IS_ERR(pdev)) {
> +		WARN(1, "Can't build omap_device for %s:%s.\n",
> +						DEVICE_NAME, oh->name);
> +		return PTR_ERR(pdev);
> +	}
> +
> +	return 0;

Nit-pick, I see some devices writing the above as ...

	WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);

 	return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;

> +}
> +postcore_initcall(omap_gpmc_init);
> +
>  static irqreturn_t gpmc_handle_irq(int irq, void *dev)
>  {
>  	int i;
> 

Otherwise ...

Reviewed-by: Jon Hunter <jon-hunter@ti.com>

Cheers
Jon

  reply	other threads:[~2012-09-05 19:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 12:36 [PATCH v8 0/3] GPMC driver conversion Afzal Mohammed
2012-09-05 12:36 ` Afzal Mohammed
2012-09-05 12:37 ` [PATCH v8 1/3] ARM: OMAP2/3: hwmod data: add gpmc Afzal Mohammed
2012-09-05 12:37   ` Afzal Mohammed
2012-09-05 19:47   ` Jon Hunter
2012-09-05 19:47     ` Jon Hunter
2012-09-05 19:47   ` Jon Hunter
2012-09-05 19:47     ` Jon Hunter
2012-09-05 23:27   ` Tony Lindgren
2012-09-05 23:27     ` Tony Lindgren
2012-09-05 12:37 ` [PATCH v8 2/3] ARM: OMAP2+: gpmc: Adapt to HWMOD Afzal Mohammed
2012-09-05 12:37   ` Afzal Mohammed
2012-09-05 19:55   ` Jon Hunter [this message]
2012-09-05 19:55     ` Jon Hunter
2012-09-11 10:16     ` Mohammed, Afzal
2012-09-11 10:16       ` Mohammed, Afzal
2012-09-05 12:37 ` [PATCH v8 3/3] ARM: OMAP2+: gpmc: minimal driver support Afzal Mohammed
2012-09-05 12:37   ` Afzal Mohammed
2012-09-05 20:41   ` Jon Hunter
2012-09-05 20:41     ` Jon Hunter
2012-09-07 22:10 ` [PATCH v8 0/3] GPMC driver conversion Tony Lindgren
2012-09-07 22:10   ` Tony Lindgren
2012-09-10  8:30   ` Florian Vaussard
2012-09-10  8:30     ` Florian Vaussard
2012-09-11 10:53   ` Mohammed, Afzal
2012-09-11 10:53     ` Mohammed, Afzal
2012-09-11 16:31     ` Tony Lindgren
2012-09-11 16:31       ` Tony Lindgren

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=5047AE2B.30807@ti.com \
    --to=jon-hunter@ti.com \
    --cc=afzal@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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 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.