linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: <tony@atomide.com>, <linux@arm.linux.org.uk>, <b-cousson@ti.com>,
	<arnd@arndb.de>, <olof@lixom.net>, <rdunlap@xenotime.net>,
	<balbi@ti.com>, <linux-omap@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
Date: Fri, 26 Oct 2012 09:50:12 +0300	[thread overview]
Message-ID: <20121026065012.GC22206@arwen.pp.htv.fi> (raw)
In-Reply-To: <1349675983-23803-4-git-send-email-kishon@ti.com>

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

Hi,

On Mon, Oct 08, 2012 at 11:29:43AM +0530, Kishon Vijay Abraham I wrote:
> Platfrom device for ocp2scp is created using omap_device_build in
> devices file. This is used for both omap4(musb) and omap5(dwc3).
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  arch/arm/mach-omap2/devices.c |   76 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 76 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index c8c2117..ac2bfce 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -19,6 +19,7 @@
>  #include <linux/of.h>
>  #include <linux/pinctrl/machine.h>
>  #include <linux/platform_data/omap4-keypad.h>
> +#include <linux/platform_data/omap_ocp2scp.h>
>  
>  #include <asm/mach-types.h>
>  #include <asm/mach/map.h>
> @@ -613,6 +614,80 @@ static void omap_init_vout(void)
>  static inline void omap_init_vout(void) {}
>  #endif
>  
> +#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE)
> +static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
> +{
> +	int cnt	= 0;
> +
> +	while (ocp2scp_dev->drv_name != NULL) {
> +		cnt++;
> +		ocp2scp_dev++;
> +	}
> +
> +	return cnt;
> +}
> +
> +static void omap_init_ocp2scp(void)
> +{
> +	struct omap_hwmod	*oh;
> +	struct platform_device	*pdev;
> +	int			bus_id = -1, dev_cnt = 0, i;
> +	struct omap_ocp2scp_dev	*ocp2scp_dev;
> +	const char		*oh_name, *name;
> +	struct omap_ocp2scp_platform_data *pdata;
> +
> +	oh_name = "ocp2scp_usb_phy";
> +	name	= "omap-ocp2scp";

how about adding checks here to return early case we're not running on
OMAP4 or OMAP5 ??

-- 
balbi

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

  reply	other threads:[~2012-10-26  6:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08  5:59 [PATCH v2 0/3] ocp2scp: add non-dt support Kishon Vijay Abraham I
2012-10-08  5:59 ` [PATCH v2 1/3] drivers: bus: ocp2scp: add pdata support Kishon Vijay Abraham I
2012-10-16 16:50   ` Tony Lindgren
2012-10-25  0:48     ` Tony Lindgren
2012-10-25  6:17       ` Felipe Balbi
2012-10-25 17:44         ` Tony Lindgren
2012-10-26  6:47           ` Felipe Balbi
2012-10-26 17:16             ` Tony Lindgren
2012-10-26 19:59               ` Felipe Balbi
2012-10-27 12:27                 ` kishon
2012-10-29  6:10                   ` Felipe Balbi
2012-10-29  6:23                     ` kishon
2012-10-26  6:48   ` Felipe Balbi
2012-10-08  5:59 ` [PATCH v2 2/3] ARM: OMAP4: add _dev_attr_ to ocp2scp for representing usb_phy Kishon Vijay Abraham I
2012-10-11  0:44   ` Tony Lindgren
2012-10-16 16:49     ` Tony Lindgren
2012-10-08  5:59 ` [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp Kishon Vijay Abraham I
2012-10-26  6:50   ` Felipe Balbi [this message]
2012-10-26  7:47     ` Arnd Bergmann
2012-10-26 17:21       ` Tony Lindgren
2012-10-26 19:59         ` Felipe Balbi
2012-10-26 20:16           ` Tony Lindgren
2012-10-27 12:29             ` kishon

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=20121026065012.GC22206@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=arnd@arndb.de \
    --cc=b-cousson@ti.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=rdunlap@xenotime.net \
    --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).