All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 0/5] Add wait_for_bit()
@ 2016-01-23 10:54 Mateusz Kulikowski
  2016-01-23 10:54 ` [U-Boot] [PATCH v4 1/5] lib: Add wait_for_bit Mateusz Kulikowski
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Mateusz Kulikowski @ 2016-01-23 10:54 UTC (permalink / raw)
  To: u-boot


Changes in v4:
- Rename timeout -> timeout_ms - foolproof code is good :)
- Re-compiled it for affected platforms (just to be sure)

I did not do remaining improvements - they look like good ideas
and will do them in future as separate series.
Possibly migrating more of u-boot code to it on the way.

Changes in V3:
- wait_for_bit code is moved to header and
  converted to static inline function.
  Previous version added ~7byte of rodata to
  all boards (even not using wait_for_bit).

Changes in V2:
- wait_bit.o is always compiled in
- Removed CONFIG_LIB_WAIT_BIT from configs/Kconfigs
- Constified arguments to wait_bit
- Removed check for CONFIG_... in drivers
- Added tested-by to ohci-lp32xx
@Sylvain Lemieux: I didn't changed driver logic with v2,
so allowed myself to add your tested-by directly.

Tested on:
 - USB driver on Dragonboard (not yet in mainline)
 - Infinite sleep (if timeout/interruption works)
Build tested on single board for each driver/commit:
- hikey
- zynq_microzed
- platinum

(Old) notes from V1:

This series add generic function to poll register waiting for
one or more bits to change.

Very similar function was used in several drivers:
- dwc2
- ohci-lp32xx
- ehci-mx6
- zynq_gem

First patch adds function, following patches update drivers and
board config files / defconfigs.

This series was compile-tested with buildman for ~50 boards
(most or even all boards affected by change)

Code was also run-tested on ehci-msm driver (not yet in mainline)

There is single difference in behavior: ohci-lp32xx driver will
not print "Timeout..." message with debug disabled.
I think it's not a big issue as this driver seems unused, but
if it's an issue - please drop that patch.


Mateusz Kulikowski (5):
  lib: Add wait_for_bit
  usb: dwc2: Use shared wait_for_bit
  usb: ohci-lpc32xx: Use shared wait_for_bit
  usb: ehci-mx6: Use shared wait_for_bit
  net: zynq_gem: Use shared wait_for_bit

 drivers/net/zynq_gem.c          | 35 ++------------------
 drivers/usb/host/dwc2.c         | 41 ++++++++----------------
 drivers/usb/host/ehci-mx6.c     | 32 +++----------------
 drivers/usb/host/ohci-lpc32xx.c | 34 ++++----------------
 include/wait_bit.h              | 71 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 97 insertions(+), 116 deletions(-)
 create mode 100644 include/wait_bit.h

-- 
2.5.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-01-25 21:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 10:54 [U-Boot] [PATCH v4 0/5] Add wait_for_bit() Mateusz Kulikowski
2016-01-23 10:54 ` [U-Boot] [PATCH v4 1/5] lib: Add wait_for_bit Mateusz Kulikowski
2016-01-24 22:20   ` Tom Rini
2016-01-25 21:29   ` [U-Boot] [U-Boot,v4,1/5] " Tom Rini
2016-01-23 10:54 ` [U-Boot] [PATCH v4 2/5] usb: dwc2: Use shared wait_for_bit Mateusz Kulikowski
2016-01-25 21:29   ` [U-Boot] [U-Boot,v4,2/5] " Tom Rini
2016-01-23 10:54 ` [U-Boot] [PATCH v4 3/5] usb: ohci-lpc32xx: " Mateusz Kulikowski
2016-01-25 21:29   ` [U-Boot] [U-Boot, v4, " Tom Rini
2016-01-23 10:54 ` [U-Boot] [PATCH v4 4/5] usb: ehci-mx6: " Mateusz Kulikowski
2016-01-25 21:29   ` [U-Boot] [U-Boot, v4, " Tom Rini
2016-01-23 10:54 ` [U-Boot] [PATCH v4 5/5] net: zynq_gem: " Mateusz Kulikowski
2016-01-25 21:29   ` [U-Boot] [U-Boot, v4, " Tom Rini

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.