usb: early: add support for early printk through USB3 debug port
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest5 patches 31 repliesIn review
- v7 posting 2/25 patches 10 repliesSuperseded
- v6 posting 2/24 patches 2 repliesSuperseded
Earlier versions · 10
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 posting 2/2 | 4 patches | 37 replies | Superseded | |
| v4 posting 2/2 | 4 patches | 12 replies | Superseded | |
| v2 posting 2/2 | 4 patches | 9 replies | Superseded | |
| v7 posting 1/2 | 10 patches | 13 replies | Superseded | |
| v6 posting 1/2 | 12 patches | 3 replies | Superseded | |
| v5 posting 1/2 | 12 patches | 0 replies | Superseded | |
| v4 posting 1/2 | 12 patches | 2 replies | Superseded | |
| v3 | 12 patches | 12 replies | Superseded | |
| v2 posting 1/2 | 12 patches | 1 reply | Superseded | |
| v1 | 12 patches | 16 replies | Superseded |
Changes in v8 from the cover letter
- refine the Kconfig help text.
- cleanup the unnecessary USB_EARLY_PRINTK bool.
- refine comments and trace messages in the driver.
- update usb3-debug-port.rst after internal reivew.
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | x86: add simple udelay calibrationarch/ | +22 | 18 replies | |
| 2/5 | usb: early: add driver for xhci debug capabilityarch/ drivers/ drivers/ +3 more | +1279 | 9 replies | |
| 3/5 | x86: add support for earlyprintk via USB3 debug portDocumentation/ arch/ arch/ | +10 | 0 replies | |
| 4/5 | usb: serial: add dbc debug device support to usb_debugdrivers/ | +25 | 0 replies | |
| 5/5 | usb: doc: add document for USB3 debug port usageDocumentation/ | +100 | 0 replies |
Reviews trailers per patch
1 of 5 patches has a Reviewed-by or Acked-by.
| Patch | Johan Hovold |
|---|---|
| 1/5 | |
| 2/5 | |
| 3/5 | |
| 4/5 | A-b |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 0/5] usb: early: add support for early printk through USB3 debug port
xHCI debug capability (DbC) is an optional but standalone functionality provided by an xHCI host controller. With DbC hardware initialized, the system will present a debug device through the USB3 debug port (normally the first USB3 port). The debug device is fully compliant with the USB framework and provides the equivalent of a very high performance (USB3) full-duplex serial link between the debug host and target. The DbC functionality is independent of xHCI host.
This patch set adds support for early printk functionality through a USB3 debug port by 1) initializing and enabling the DbC hardware during early boot; 2) registering a boot console to the system so that early printk messages can go through the USB3 debug port. It also includes some lines of changes in usb_debug driver so that it can be bound when a USB3 debug device is enumerated.
---
Change log:
v7->v8:
- refine the Kconfig help text.
- cleanup the unnecessary USB_EARLY_PRINTK bool.
- refine comments and trace messages in the driver.
- update usb3-debug-port.rst after internal reivew.
v6->v7:
- add a new patch "[PATCH 1/5] x86: add simple udelay calibration" to make udelay() work for early drivers.
- [PATCH 2/5] usb: dbc: early driver for xhci debug capability
- add a kernel thread to handle error cases, such as cable unplugging.
- Fixed several code styles pointed out by Ingo.
v5->v6:
- rebase the patches on top of the latest 4.10-rc4
- run successfully in a 32-bit kernel
- [PATCH 1/4]
- remove ugly linebreaks to make code more readable
- rename config names to make them consistency
- move sleep-able ioremap() out of the lock area
- rename reserved fields of register structures
- make the vertical tabulation of struct fields consistent
- [PATCH 2/4]
- remove "#ifdef" in the generic code by creating proper wrappers in header file
- [PATCH 3/4]
- refine the title and commit message
- [PATCH 4/4]
- fix several typos and grammar errors in the document
v4->v5:
- add raw_spin_lock to make xdbc_bulk_write() reentrant.
v3->v4:
- Rename the document with .dst suffix.
- Add the list of hardware that has been succesfuly tested on in the document.
v2->v3:
- Removed spinlock usage.
- Removed work queue usage.
- Refined the user guide document.
v1->v2:
- Refactor the duplicate code in xdbc_early_start() and xdbc_handle_external_reset().
- Free resources when hardware not used any more.
- Refine the user guide document.
Lu Baolu (5):
x86: add simple udelay calibration
usb: early: add driver for xhci debug capability
x86: add support for earlyprintk via USB3 debug port
usb: serial: add dbc debug device support to usb_debug
usb: doc: add document for USB3 debug port usage
Documentation/admin-guide/kernel-parameters.txt | 1 + Documentation/usb/usb3-debug-port.rst | 100 +++ arch/x86/Kconfig.debug | 23 + arch/x86/kernel/early_printk.c | 5 + arch/x86/kernel/setup.c | 26 + drivers/usb/Makefile | 2 +- drivers/usb/early/Makefile | 1 + drivers/usb/early/xhci-dbc.c | 1014 +++++++++++++++++++++++ drivers/usb/early/xhci-dbc.h | 211 +++++ drivers/usb/serial/usb_debug.c | 28 +- include/linux/usb/xhci-dbgp.h | 29 + 11 files changed, 1436 insertions(+), 4 deletions(-) create mode 100644 Documentation/usb/usb3-debug-port.rst create mode 100644 drivers/usb/early/xhci-dbc.c create mode 100644 drivers/usb/early/xhci-dbc.h create mode 100644 include/linux/usb/xhci-dbgp.h
Signature · 1 line
2.1.4