2021-06-21 20:09:20

by Marcin Wojtas

[permalink] [raw]
Subject: [net-next: PATCH v3 1/1] ACPI: SPCR: Add new 16550-compatible Serial Port Subtype

The Microsoft Debug Port Table 2 (DBG2) specification revision
May 31, 2017 adds support for 16550-compatible Serial Port
Subtype with parameters defined in Generic Address Structure (GAS) [1]

Add its support in SPCR parsing routine.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table

Signed-off-by: Marcin Wojtas <[email protected]>
---
include/acpi/actbl1.h | 1 +
drivers/acpi/spcr.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index ce59903c2695..f746012eba8d 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -498,6 +498,7 @@ struct acpi_dbg2_device {
#define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
#define ACPI_DBG2_ARM_DCC 0x000F
#define ACPI_DBG2_BCM2835 0x0010
+#define ACPI_DBG2_16550_WITH_GAS 0x0012

#define ACPI_DBG2_1394_STANDARD 0x0000

diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index 88460bacd5ae..25c2d0be953e 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -136,6 +136,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
break;
case ACPI_DBG2_16550_COMPATIBLE:
case ACPI_DBG2_16550_SUBSET:
+ case ACPI_DBG2_16550_WITH_GAS:
uart = "uart";
break;
default:
--
2.29.0


2021-07-14 12:28:53

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [net-next: PATCH v3 1/1] ACPI: SPCR: Add new 16550-compatible Serial Port Subtype

Sorry for the delay.

On Mon, Jun 21, 2021 at 10:05 PM Marcin Wojtas <[email protected]> wrote:
>
> The Microsoft Debug Port Table 2 (DBG2) specification revision
> May 31, 2017 adds support for 16550-compatible Serial Port
> Subtype with parameters defined in Generic Address Structure (GAS) [1]
>
> Add its support in SPCR parsing routine.
>
> [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table
>
> Signed-off-by: Marcin Wojtas <[email protected]>
> ---
> include/acpi/actbl1.h | 1 +
> drivers/acpi/spcr.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index ce59903c2695..f746012eba8d 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h

This is an ACPICA header, so the first part of the patch should go in
via the ACPICA upstream repository.

Can you please resend this as two patches to make it easier to process it?

> @@ -498,6 +498,7 @@ struct acpi_dbg2_device {
> #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
> #define ACPI_DBG2_ARM_DCC 0x000F
> #define ACPI_DBG2_BCM2835 0x0010
> +#define ACPI_DBG2_16550_WITH_GAS 0x0012
>
> #define ACPI_DBG2_1394_STANDARD 0x0000
>
> diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
> index 88460bacd5ae..25c2d0be953e 100644
> --- a/drivers/acpi/spcr.c
> +++ b/drivers/acpi/spcr.c
> @@ -136,6 +136,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
> break;
> case ACPI_DBG2_16550_COMPATIBLE:
> case ACPI_DBG2_16550_SUBSET:
> + case ACPI_DBG2_16550_WITH_GAS:
> uart = "uart";
> break;
> default:
> --
> 2.29.0
>

2021-07-14 19:20:08

by Marcin Wojtas

[permalink] [raw]
Subject: Re: [net-next: PATCH v3 1/1] ACPI: SPCR: Add new 16550-compatible Serial Port Subtype

Hi Rafael,


śr., 14 lip 2021 o 14:27 Rafael J. Wysocki <[email protected]> napisał(a):
>
> Sorry for the delay.
>
> On Mon, Jun 21, 2021 at 10:05 PM Marcin Wojtas <[email protected]> wrote:
> >
> > The Microsoft Debug Port Table 2 (DBG2) specification revision
> > May 31, 2017 adds support for 16550-compatible Serial Port
> > Subtype with parameters defined in Generic Address Structure (GAS) [1]
> >
> > Add its support in SPCR parsing routine.
> >
> > [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table
> >
> > Signed-off-by: Marcin Wojtas <[email protected]>
> > ---
> > include/acpi/actbl1.h | 1 +
> > drivers/acpi/spcr.c | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> > index ce59903c2695..f746012eba8d 100644
> > --- a/include/acpi/actbl1.h
> > +++ b/include/acpi/actbl1.h
>
> This is an ACPICA header, so the first part of the patch should go in
> via the ACPICA upstream repository.
>
> Can you please resend this as two patches to make it easier to process it?
>

I created a pull request to the ACPICA upstream with adding all the
missing DBG2 subtypes:
https://github.com/acpica/acpica/pull/705

Once that is accepted and lands, I will import the header update to
Linux along with the driver modification.

Best regards,
Marcin