Re: [PATCH] SPCR: check bit width for the 16550 UART

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 5, 2016 at 5:05 AM, Aleksey Makarov
<aleksey.makarov@xxxxxxxxxx> wrote:
> Check the 'Register Bit Width' field of the ACPI Generic Address
> Structure that specifies the address of the UART registers to
> decide if the driver should use "mmio32" access instead of "mmio".
>
> If the driver is other than 16550 the access with is defined
> by the Interface Type field of the SPCR table.
>
> For discussion:
>
> https://lkml.kernel.org/r/7fa523de-3fbb-1566-f521-927143f73d1e@xxxxxxxxxx

Tested on X-Gene 1 and X-Gene 2 platforms.

Tested-by: Duc Dang <dhdang@xxxxxxx>
>
> Signed-off-by: Aleksey Makarov <aleksey.makarov@xxxxxxxxxx>
> Signed-off-by: Graeme Gregory <graeme.gregory@xxxxxxxxxx>
> Reported-by: Heyi Guo <heyi.guo@xxxxxxxxxx>
> ---
>  drivers/acpi/spcr.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
> index e8d7bc7..6c6710b 100644
> --- a/drivers/acpi/spcr.c
> +++ b/drivers/acpi/spcr.c
> @@ -70,6 +70,10 @@ int __init parse_spcr(bool earlycon)
>                 break;
>         case ACPI_DBG2_16550_COMPATIBLE:
>         case ACPI_DBG2_16550_SUBSET:
> +               if (table->serial_port.space_id ==
> +                       ACPI_ADR_SPACE_SYSTEM_MEMORY &&
> +                   table->serial_port.bit_width == 32)
> +                       iotype = "mmio32";
>                 uart = "uart";
>                 break;
>         default:
> --
> 2.10.2
>
Thanks,
Duc Dang.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux