Bug 251053 - [patch] Add support of UART_DEV_DBGPORT to uart_bus_fdt.c
Summary: [patch] Add support of UART_DEV_DBGPORT to uart_bus_fdt.c
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
Keywords: patch
Depends on:
Reported: 2020-11-11 16:34 UTC by Dmitry Salychev
Modified: 2020-12-02 22:46 UTC (History)
1 user (show)

See Also:

Changes to sys/dev/uart to support UART_DEV_DBGPORT in uart_bus_fdt.c (2.96 KB, patch)
2020-11-11 16:34 UTC, Dmitry Salychev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Salychev 2020-11-11 16:34:30 UTC
Created attachment 219562 [details]
Changes to sys/dev/uart to support UART_DEV_DBGPORT in uart_bus_fdt.c

NOTE: This patch is a re-worked copy of another one attached to
the review D5986 [1].

Support of UART_DEV_DBGPORT in addition to UART_DEV_CONSOLE added to
uart_bus_fdt.c where "hw.fdt.debug" can override the FDT settings.
The following properties are looked at in /chosen for the debug node:

I tested it on BeagleBone Black, but I also have BeagleBone (white)
and RPi2 model B to check this patch if necessary.

[1] https://reviews.freebsd.org/D5986
Comment 1 Dmitry Salychev 2020-11-30 15:19:39 UTC
Review: https://reviews.freebsd.org/D27422
Comment 2 commit-hook freebsd_committer 2020-12-02 21:02:36 UTC
A commit references this bug:

Author: mhorne
Date: Wed Dec  2 21:01:53 UTC 2020
New revision: 368284
URL: https://svnweb.freebsd.org/changeset/base/368284

  uart: allow UART_DEV_DBGPORT for fdt consoles

  Allow fdt devices to be used as debug ports for gdb(4).

  A debug console can be specified with the "freebsd,debug-path" property
  in the device tree's /chosen node, or using the environment variable

  The device should be specified by its name in the device tree, for
  example hw.fdt.dbgport="serial2".

  PR:		251053
  Submitted by:	Dmitry Salychev <dsl@mcusim.org>
  Submitted by:   stevek (original patch, D5986)
  Reviewed by:	andrew, mhorne
  Differential Revision:	https://reviews.freebsd.org/D27422