diff mbox

acpi: spcr: add missing debug port types (LP: #1578433)

Message ID 1462437621-21870-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King May 5, 2016, 8:40 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The SPCR has debug port types as specified by the
Serial Port Subtypes in Table 3 of the DBG2 Specification
http://go.microsoft.com/fwlink/p/?LinkId=234837 - we are
missing types 0x0d..0x10, so add them.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/spcr/spcr.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Comments

Alex Hung May 11, 2016, 2:44 a.m. UTC | #1
On 2016-05-05 04:40 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The SPCR has debug port types as specified by the
> Serial Port Subtypes in Table 3 of the DBG2 Specification
> http://go.microsoft.com/fwlink/p/?LinkId=234837 - we are
> missing types 0x0d..0x10, so add them.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/spcr/spcr.c | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/spcr/spcr.c b/src/acpi/spcr/spcr.c
> index 970abf9..4b81b9a 100644
> --- a/src/acpi/spcr/spcr.c
> +++ b/src/acpi/spcr/spcr.c
> @@ -59,7 +59,10 @@ static int spcr_test1(fwts_framework *fw)
>   	bool pci = true;
>   	bool passed = true;
>
> -	/* Assuming revision 2 */
> +	/*
> +	 * Assuming revision 2, full list from
> +	 * http://go.microsoft.com/fwlink/p/?LinkId=234837)
> +	 */
>   	switch (spcr->interface_type) {
>   	case 0x00:
>   		str = "16550 compatible";
> @@ -75,6 +78,18 @@ static int spcr_test1(fwts_framework *fw)
>   		str = "Reserved (Do not Use)";
>   		reserved = true;
>   		break;
> +	case 0x0d:
> +		str = "(deprecated) ARM SBSA";
> +		break;
> +	case 0x0e:
> +		str = "ARM SBSA Generic UART";
> +		break;
> +	case 0x0f:
> +		str = "ARM DCC";
> +		break;
> +	case 0x10:
> +		str = "BCM2835";
> +		break;
>   	default:
>   		str = "Reserved";
>   		reserved = true;
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu May 11, 2016, 7 a.m. UTC | #2
On 2016年05月05日 16:40, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The SPCR has debug port types as specified by the
> Serial Port Subtypes in Table 3 of the DBG2 Specification
> http://go.microsoft.com/fwlink/p/?LinkId=234837 - we are
> missing types 0x0d..0x10, so add them.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/spcr/spcr.c | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/spcr/spcr.c b/src/acpi/spcr/spcr.c
> index 970abf9..4b81b9a 100644
> --- a/src/acpi/spcr/spcr.c
> +++ b/src/acpi/spcr/spcr.c
> @@ -59,7 +59,10 @@ static int spcr_test1(fwts_framework *fw)
>   	bool pci = true;
>   	bool passed = true;
>
> -	/* Assuming revision 2 */
> +	/*
> +	 * Assuming revision 2, full list from
> +	 * http://go.microsoft.com/fwlink/p/?LinkId=234837)
> +	 */
>   	switch (spcr->interface_type) {
>   	case 0x00:
>   		str = "16550 compatible";
> @@ -75,6 +78,18 @@ static int spcr_test1(fwts_framework *fw)
>   		str = "Reserved (Do not Use)";
>   		reserved = true;
>   		break;
> +	case 0x0d:
> +		str = "(deprecated) ARM SBSA";
> +		break;
> +	case 0x0e:
> +		str = "ARM SBSA Generic UART";
> +		break;
> +	case 0x0f:
> +		str = "ARM DCC";
> +		break;
> +	case 0x10:
> +		str = "BCM2835";
> +		break;
>   	default:
>   		str = "Reserved";
>   		reserved = true;
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/spcr/spcr.c b/src/acpi/spcr/spcr.c
index 970abf9..4b81b9a 100644
--- a/src/acpi/spcr/spcr.c
+++ b/src/acpi/spcr/spcr.c
@@ -59,7 +59,10 @@  static int spcr_test1(fwts_framework *fw)
 	bool pci = true;
 	bool passed = true;
 
-	/* Assuming revision 2 */
+	/*
+	 * Assuming revision 2, full list from
+	 * http://go.microsoft.com/fwlink/p/?LinkId=234837)
+	 */
 	switch (spcr->interface_type) {
 	case 0x00:
 		str = "16550 compatible";
@@ -75,6 +78,18 @@  static int spcr_test1(fwts_framework *fw)
 		str = "Reserved (Do not Use)";
 		reserved = true;
 		break;
+	case 0x0d:
+		str = "(deprecated) ARM SBSA";
+		break;
+	case 0x0e:
+		str = "ARM SBSA Generic UART";
+		break;
+	case 0x0f:
+		str = "ARM DCC";
+		break;
+	case 0x10:
+		str = "BCM2835";
+		break;
 	default:
 		str = "Reserved";
 		reserved = true;