public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/5] Add wait_for_bit()
@ 2015-12-27 17:28 Mateusz Kulikowski
  2015-12-27 17:28 ` [U-Boot] [PATCH v3 1/5] lib: Add wait_for_bit Mateusz Kulikowski
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Mateusz Kulikowski @ 2015-12-27 17:28 UTC (permalink / raw)
  To: u-boot


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] 19+ messages in thread

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

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-27 17:28 [U-Boot] [PATCH v3 0/5] Add wait_for_bit() Mateusz Kulikowski
2015-12-27 17:28 ` [U-Boot] [PATCH v3 1/5] lib: Add wait_for_bit Mateusz Kulikowski
2015-12-31 13:07   ` Mateusz Kulikowski
2016-01-14 20:08   ` Tom Rini
2016-01-20  4:34   ` Simon Glass
2016-01-20 21:03     ` Mateusz Kulikowski
2016-01-21  2:45       ` Simon Glass
2016-01-21 19:11       ` Tom Rini
2015-12-27 17:28 ` [U-Boot] [PATCH v3 2/5] usb: dwc2: Use shared wait_for_bit Mateusz Kulikowski
2015-12-27 22:17   ` Stefan Bruens
2015-12-31 11:31     ` Mateusz Kulikowski
2016-01-14 20:08   ` Tom Rini
2015-12-27 17:28 ` [U-Boot] [PATCH v3 3/5] usb: ohci-lpc32xx: " Mateusz Kulikowski
2016-01-14 20:08   ` Tom Rini
2015-12-27 17:28 ` [U-Boot] [PATCH v3 4/5] usb: ehci-mx6: " Mateusz Kulikowski
2016-01-14 20:08   ` Tom Rini
2015-12-27 17:28 ` [U-Boot] [PATCH v3 5/5] net: zynq_gem: " Mateusz Kulikowski
2016-01-14 20:08   ` Tom Rini
2016-01-15 21:31     ` Moritz Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox