public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 6/7] usb: ulpi: Extend the existing ulpi framework.
Date: Mon, 06 Feb 2012 10:55:49 +0200	[thread overview]
Message-ID: <4F2F9595.9070302@compulab.co.il> (raw)
In-Reply-To: <1328276312-30153-7-git-send-email-govindraj.raja@ti.com>

Hi Govindraj,

I was about to ask Tom to reorder the patches while applying, but
there are still several things to fix.
I'm also fine with fixing these by a follow up patch (after merging this).

There are several comments, you missed to fix from previous version [1].
Please, fix those.

[1] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/123832

On 02/03/12 15:38, Govindraj.R wrote:
> From: "Govindraj.R" <govindraj.raja@ti.com>
> 
> Extend the existing ulpi viewport framework
> to pass the port number information for any ulpi
> ops. Fix the usage of ulpi api's accordingly.
> 
> Tested-by: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>

After fixing the pointed issues:

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
>  board/efikamx/efikamx-usb.c      |   24 ++++++++++------
>  drivers/usb/ulpi/ulpi-viewport.c |   30 ++++++++++----------
>  drivers/usb/ulpi/ulpi.c          |   54 +++++++++++++++++++------------------
>  include/usb/ulpi.h               |   36 +++++++++++++++++--------
>  4 files changed, 82 insertions(+), 62 deletions(-)

[...]

> diff --git a/drivers/usb/ulpi/ulpi-viewport.c b/drivers/usb/ulpi/ulpi-viewport.c
> index 490fb0e..6f03f08 100644
> --- a/drivers/usb/ulpi/ulpi-viewport.c
> +++ b/drivers/usb/ulpi/ulpi-viewport.c

[...]

> -int ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value)
> +int ulpi_write(struct ulpi_viewport *ulpi_vp, u8 *reg, u32 value)
>  {
>  	u32 val = ULPI_RWRUN | ULPI_RWCTRL | ((u32)reg << 16) | (value & 0xff);

You should utilize the port_num variable here, right?
something like:
val |= (ulpi_vp->port_num & 0x7) << 24;

>  
> -	return ulpi_request(ulpi_viewport, val);
> +	return ulpi_request(ulpi_vp, val);
>  }
>  
> -u32 ulpi_read(u32 ulpi_viewport, u8 *reg)
> +u32 ulpi_read(struct ulpi_viewport *ulpi_vp, u8 *reg)
>  {
>  	int err;
>  	u32 val = ULPI_RWRUN | ((u32)reg << 16);

same here

>  
> -	err = ulpi_request(ulpi_viewport, val);
> +	err = ulpi_request(ulpi_vp, val);
>  	if (err)
>  		return err;
>  
> -	return (readl(ulpi_viewport) >> 8) & 0xff;
> +	return (readl(ulpi_vp->viewport_addr) >> 8) & 0xff;
>  }

[...]

> diff --git a/include/usb/ulpi.h b/include/usb/ulpi.h
> index 802f077..a036bab 100644
> --- a/include/usb/ulpi.h
> +++ b/include/usb/ulpi.h
> @@ -28,12 +28,23 @@
>  #endif
>  
>  /*
> + * ulpi view port address and
> + * Port_number that can be passed.
> + * Any additional data to be passed can
> + * be extended from this structure
> + */
> +struct ulpi_viewport {
> +	u32 viewport_addr;
> +	u8 port_num;
> +};

haven't we aggreed, that this will be:
u32 port_num;
?

> +
> +/*
>   * Initialize the ULPI transciever and check the interface integrity.
> - * @ulpi_viewport -  the address of the ULPI viewport register.
> + * @ulpi_viewport -  structure containing ULPI viewport data

This is ulpi_vp now.

[...]


-- 
Regards,
Igor.

  reply	other threads:[~2012-02-06  8:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 13:38 [U-Boot] [PATCH v3 0/7] Clean up ehci-omap and extend support for omap3/4 socs Govindraj.R
2012-02-03 13:38 ` [U-Boot] [PATCH v3 1/7] ehci-omap: driver for EHCI host on OMAP3 Govindraj.R
2012-02-03 13:38 ` [U-Boot] [PATCH v3 2/7] ehci-omap: Clean up added ehci-omap.c Govindraj.R
2012-02-06 11:26   ` Igor Grinberg
2012-02-03 13:38 ` [U-Boot] [PATCH v3 3/7] OMAP3+: Clock: Adding ehci clock enabling Govindraj.R
2012-02-06 11:42   ` Igor Grinberg
2012-02-06 11:57     ` Govindraj
2012-02-06 12:17       ` Igor Grinberg
2012-02-03 13:38 ` [U-Boot] [PATCH v3 4/7] OMAP4: clock-common: Move the usb dppl configuration to new func Govindraj.R
2012-02-03 13:38 ` [U-Boot] [PATCH v3 5/7] OMAP3+: ehci-omap: enable usb host ports for beagle/panda Govindraj.R
2012-02-06 12:03   ` Igor Grinberg
2012-02-03 13:38 ` [U-Boot] [PATCH v3 6/7] usb: ulpi: Extend the existing ulpi framework Govindraj.R
2012-02-06  8:55   ` Igor Grinberg [this message]
2012-02-06  9:38     ` Govindraj
2012-02-06 10:03       ` Igor Grinberg
2012-02-08 17:42   ` SUBHASHINI MANNE
2012-02-09  6:32     ` Govindraj
2012-02-03 13:38 ` [U-Boot] [PATCH v3 7/7] usb: ulpi: Add omap-ulpi-view port support Govindraj.R
2012-02-06  9:10   ` Igor Grinberg
2012-02-03 15:25 ` [U-Boot] [PATCH v3 0/7] Clean up ehci-omap and extend support for omap3/4 socs Tom Rini

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=4F2F9595.9070302@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /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