Re: [PATCH] serial: 8250_pci: Add Intel Broadwell ports

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

 



On Fri, 2016-01-29 at 16:49 +0200, Mika Westerberg wrote:
> Some recent (early 2015) macbooks have Intel Broadwell where LPSS
> UARTs are
> PCI enumerated instead of ACPI. The LPSS UART block is pretty much
> same as
> used on Intel Baytrail so we can reuse the existing Baytrail setup
> code.
> 
> Add both Broadwell LPSS UART ports to the list of supported devices.
> 
> Signed-off-by: Leif Liddy <leif.liddy@xxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

> ---
>  drivers/tty/serial/8250/8250_pci.c | 29
> +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/tty/serial/8250/8250_pci.c
> b/drivers/tty/serial/8250/8250_pci.c
> index cac1900f0529..f36c9b08a434 100644
> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -1379,6 +1379,9 @@ ce4100_serial_setup(struct serial_private
> *priv,
>  #define PCI_DEVICE_ID_INTEL_BSW_UART1	0x228a
>  #define PCI_DEVICE_ID_INTEL_BSW_UART2	0x228c
>  
> +#define PCI_DEVICE_ID_INTEL_BDW_UART1	0x9ce3
> +#define PCI_DEVICE_ID_INTEL_BDW_UART2	0x9ce4
> +
>  #define BYT_PRV_CLK			0x800
>  #define BYT_PRV_CLK_EN			(1 << 0)
>  #define BYT_PRV_CLK_M_VAL_SHIFT		1
> @@ -1461,11 +1464,13 @@ byt_serial_setup(struct serial_private *priv,
>  	switch (pdev->device) {
>  	case PCI_DEVICE_ID_INTEL_BYT_UART1:
>  	case PCI_DEVICE_ID_INTEL_BSW_UART1:
> +	case PCI_DEVICE_ID_INTEL_BDW_UART1:
>  		rx_param->src_id = 3;
>  		tx_param->dst_id = 2;
>  		break;
>  	case PCI_DEVICE_ID_INTEL_BYT_UART2:
>  	case PCI_DEVICE_ID_INTEL_BSW_UART2:
> +	case PCI_DEVICE_ID_INTEL_BDW_UART2:
>  		rx_param->src_id = 5;
>  		tx_param->dst_id = 4;
>  		break;
> @@ -2062,6 +2067,20 @@ static struct pci_serial_quirk
> pci_serial_quirks[] __refdata = {
>  		.subdevice	= PCI_ANY_ID,
>  		.setup		= byt_serial_setup,
>  	},
> +	{
> +		.vendor		= PCI_VENDOR_ID_INTEL,
> +		.device		=
> PCI_DEVICE_ID_INTEL_BDW_UART1,
> +		.subvendor	= PCI_ANY_ID,
> +		.subdevice	= PCI_ANY_ID,
> +		.setup		= byt_serial_setup,
> +	},
> +	{
> +		.vendor		= PCI_VENDOR_ID_INTEL,
> +		.device		=
> PCI_DEVICE_ID_INTEL_BDW_UART2,
> +		.subvendor	= PCI_ANY_ID,
> +		.subdevice	= PCI_ANY_ID,
> +		.setup		= byt_serial_setup,
> +	},
>  	/*
>  	 * ITE
>  	 */
> @@ -5501,6 +5520,16 @@ static struct pci_device_id serial_pci_tbl[] =
> {
>  		PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
>  		pbn_byt },
>  
> +	/* Intel Broadwell */
> +	{	PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BDW_UART1,
> +		PCI_ANY_ID,  PCI_ANY_ID,
> +		PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
> +		pbn_byt },
> +	{	PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BDW_UART2,
> +		PCI_ANY_ID,  PCI_ANY_ID,
> +		PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
> +		pbn_byt },
> +
>  	/*
>  	 * Intel Quark x1000
>  	 */

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy

--
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