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 v7] Add generic ULPI layer
Date: Wed, 07 Dec 2011 14:59:52 +0200	[thread overview]
Message-ID: <4EDF6348.3090504@compulab.co.il> (raw)
In-Reply-To: <201112070049.51097.marek.vasut@gmail.com>

Hi Marek,

On 12/07/11 01:49, Marek Vasut wrote:
>> Although it is a single patch, I felt that a cover letter will
>> definetly not hurt here, also the patch version history is so big, so
>> I decided to move it here.
>>
>> The ULPI (UTMI Low Pin (count) Interface) PHYs are widely used on
>> variety of boards. This requires a generic architecture independant
>> implementation which can be reused and will eliminate the need for
>> direct write of arbitrary values to the ULPI transciever.
>> Although, the generic implementation can be reused on any architecture,
>> the access to ULPI PHY must be done in a platform specific way.
>> The platform specific way is in majority of case called a viewport.
>> Also, the ULPI specification defines a hybrid aproach for managing the
>> ULPI PHY. That is, the PHY must be managed through both the PHY registers
>> and control lines.
>>
>> The proposed patch provides a partial implementation of the ULPI
>> specification, which should be enough for boot loader use cases,
>> and a viewport implementation for Chipidea/ARC based controllers,
>> which, AFAIK, are used on imx and tegra SoCs.
>>
>> It is based on the Wolfgang's master branch (4 Dec 2012),
>> compile tested and checkpatch clean.
>>
>> What is still missing, IMO:
>> 	- documentation for the CONFIG_* macros (I can add it in a separate 
> patch)
>> 	- a way to make most of the initialization in one ulpi_init() call
>> 	- viewport extension to be able to implement resume,
>> 	  reset and disabling the serial mode
>>
>> The change log:
>> Changes for v2:
>> 	- make code EHCI-independent
>> 	- use udelay() in waiting loop
>> 	- mark static functions as static
>> 	- naming changes
>> Changes for v3:
>> 	- merge with patch ulpi: add generic ULPI support header file
>> 	- rewrite ULPI interface in more functionality-oriented way
>> Changes for v4:
>> 	- add error-checking
>> 	- add waiting for completion into ulpi_reset() function
>> Changes for v5:
>> 	- CodingStyle changes
>> 	- add comments
>> 	- simplify implemenation of the ULPI interface functions
>> Changes for v6:
>> 	- cleanup function ulpi_drive_vbus()
>> Changes for v7:
>> 	- ulpi-viewport.c:
>> 		- reorder bit definitions
>> 		- split ulpi_request() to two functions
>> 		- reuse ulpi_wakeup() from ulpi_request()
>> 		  to remove duplicated calls from ulpi_{read|write}()
>> 		- inline ulpi_*_mask as it is simple and used only once
>> 	- ulpi.c:
>> 		- move several defines into c file
>> 		- rework all the functions to propagate error values
>> 		- move function description comments into ulpi.h
>> 		  along with declarations
>> 		- check arguments validity (as suggested by Simon)
>> 		- fix cases when using the *_set register,
>> 		  bits cannot be cleared
>> 		- shorten several arguments names (e.g. ulpi_set_vbus())
>> 		- add ability to disable VBUS
>> 		- clean up ulpi_set_pd()
>> 		- add ability to enter the serial mode
>> 		- add verbosity in error cases
>> 		- remove ulpi_resume() as it were wrong and
>> 		  must be implemented in a viewport specific way
>> 		- rework ulpi_reset() as it must be implemented in a
>> 		  viewport specific way, but provide kind of generic
>> 		  implementation which should work in most of the cases
>> 	- ulpi.h:
>> 		- add default timeout value
>> 		- remove unused defines
>> 		- move several defines inside c files
>> 		- add description for each function
>> 		- move the API declaration to the top of the header file
>>
>> Jana Rapava (1):
>>   USB: Add generic ULPI layer and a viewport
>>
>>  Makefile                         |    1 +
>>  drivers/usb/ulpi/Makefile        |   44 ++++++
>>  drivers/usb/ulpi/ulpi-viewport.c |  118 +++++++++++++++
>>  drivers/usb/ulpi/ulpi.c          |  227 +++++++++++++++++++++++++++++
>>  include/usb/ulpi.h               |  298
>> ++++++++++++++++++++++++++++++++++++++ 5 files changed, 688 insertions(+),
>> 0 deletions(-)
>>  create mode 100644 drivers/usb/ulpi/Makefile
>>  create mode 100644 drivers/usb/ulpi/ulpi-viewport.c
>>  create mode 100644 drivers/usb/ulpi/ulpi.c
>>  create mode 100644 include/usb/ulpi.h
> 
> Igor, please add Cc annotations to this patch too.

Well, I indeed forgot this, but I've send a forward of this email
to everybody supposed to be in Cc. Adding Cc once again...


-- 
Regards,
Igor.

  reply	other threads:[~2011-12-07 12:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05  9:06 [U-Boot] [PATCH v7] Add generic ULPI layer Igor Grinberg
2011-12-05  9:07 ` [U-Boot] [PATCH v7] USB: Add generic ULPI layer and a viewport Igor Grinberg
2011-12-06 23:49   ` Marek Vasut
2011-12-07  1:42   ` Simon Glass
2011-12-07 13:38     ` Igor Grinberg
2011-12-07 17:27       ` Marek Vasut
2011-12-07 18:16         ` Igor Grinberg
2011-12-07 18:36           ` Marek Vasut
2011-12-07 19:12             ` Igor Grinberg
2011-12-06 23:49 ` [U-Boot] [PATCH v7] Add generic ULPI layer Marek Vasut
2011-12-07 12:59   ` Igor Grinberg [this message]
2011-12-07 13:43     ` Igor Grinberg
2011-12-07 17:28       ` Marek Vasut

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=4EDF6348.3090504@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