[U-Boot] [RESEND PATCH v10 00/10] usb: Extend ehci and ohci generic driver

Marek Vasut marex at denx.de
Tue Jul 18 10:03:34 UTC 2017


On 07/18/2017 11:57 AM, patrice.chotard at st.com wrote:
> From: Patrice Chotard <patrice.chotard at st.com>
> 
> This series improves generic ehci and ohci drivers by addition of :
> 	_ error path during probe (clocks, resets and phy release)
> 	_ .remove callback
> 	_ add generic PHY framework for both generic ehci and ohci drivers
> 	_ add RESET and CLOCK framework for generic ohci driver
> 
> To implement these features, some new methods are needed in reset, clock and
> in dm/core framework:
> 	_ add reset_request() and reset_assert_all() methods in RESET framework
> 	_ add clk_count() and clk_disable_all() methods in CLOCK framework
> 	_ add ofnode_count_phandle_with_args() and dev_count_phandle_with_args() in dm/core
> 
> v10:	__ add dev_count_phandle_with_args() requested by Simon Glass
> 	_ fix some mirno remarks
> 
> v9:	_ rename reset_assert_all() in reset_release_all() as this function not 
> 	  only assert all resets but also free all of them
> 	_ rename clk_disable_all() in clk_release_all() as this function not 
> 	  only disable all clocks but also free all of them
> 	_ add a check in reset_release_all()/clk_disable_all() to verify if reset/clock 
> 	  has been previously requested before asserting/disabling and freeing it.
> 
> v8:	_ rework error path by propagating the initial error code until the end of probe()
> 	_ replace devm_kmalloc() with devm_kcalloc()
> 	_ fix cosmetics remarks
> 
> v7:	_ replace clk_count() and reset_count() methods by
> 	  ofnode_count_phandle_with_args() in patches 3, 4 and 5	
> 
> v6:	_ replace clk_get_by_index() by dev_read_phandle_with_args() in
> 	  clk_count() in patch 4
> 	_  add Reviewed-by Simon Glass for patch 2 and 5
> 
> v5:	_ rebase on top of dm/master requested by Simon Glass in order to use
> 	  livetree update
> 	_ replace fdtdec_parse_phandle_with_args() by dev_read_phandle_with_args() in patch 2
> 
> v4:	_ add clk_disable_all() and reset_assert_all() methods into CLOCK and
> 	  RESET framework as suggested by Simon Glass and Marek Vasut
> 	_ add reset_count() and clk_count() methods which returns respectively the 
> 	  number of resets and clocks declared into "resets" and "clocks" DT properties.
> 	  This allows to allocate the right amount of memory to keep resets and clocks
> 	  reference
> 	_ update the memory allocation for deasserted resets and enabled
> 	  clocks reference list. Replace lists by arrays.
> 	
> v3:	_ keep enabled clocks and deasserted resets reference in list in order to 
> 	  disable clock or assert resets in error path or in .remove callback
> 	_ add missing commit message
> 	_ use struct generic_ehci * instead of struct udevice * as parameter for
> 	  ehci_release_resets() and ehci_release_clocks()
> 	_ test return value on generic_phy_get_by_index() and
> 	  generic_phy_init()
> 	_ split previous patch 5 in 3 independant patch for CLOCK, RESET and PHY support
> 
> v2:	_ add needed reset_request() in RESET framework
> 	_ add error path in ehci/ohci-generic to disable clocks and to assert
> 	resets
> 	_ add .remove callback with clocks, resets and phy release
> 	_ split the replacement of printf() by error() in an independant patch
> 
> Patrice Chotard (10):
>   reset: add reset_request()
>   reset: add reset_release_all()
>   clk: add clk_release_all()
>   dm: core: add ofnode_count_phandle_with_args()
>   usb: host: ehci-generic: replace printf() by error()
>   usb: host: ehci-generic: add error path and .remove callback
>   usb: host: ehci-generic: add generic PHY support
>   usb: host: ohci-generic: add CLOCK support
>   usb: host: ohci-generic: add RESET support
>   usb: host: ohci-generic: add generic PHY support
> 
>  drivers/clk/clk-uclass.c        |  26 +++++++
>  drivers/core/of_access.c        |   7 ++
>  drivers/core/ofnode.c           |  12 ++++
>  drivers/reset/reset-uclass.c    |  34 ++++++++++
>  drivers/usb/host/ehci-generic.c | 147 +++++++++++++++++++++++++++++++++-------
>  drivers/usb/host/ohci-generic.c | 122 ++++++++++++++++++++++++++++++++-
>  include/clk.h                   |  14 ++++
>  include/dm/of_access.h          |  18 +++++
>  include/dm/ofnode.h             |  17 +++++
>  include/dm/read.h               |  25 +++++++
>  include/reset.h                 |  27 ++++++++
>  11 files changed, 424 insertions(+), 25 deletions(-)
> 
Applied, thanks.

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list