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

Re: [Xen-devel] [PATCH v1 3/4] serial: Use #defines for PCI vendor and models



On 05/03/14 17:25, Konrad Rzeszutek Wilk wrote:
> Instead of having hard-coded values.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
>  xen/drivers/char/ns16550.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> index 06580c8..6fbf358 100644
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -131,17 +131,21 @@ static struct ns16550_config_quirk __initdata 
> uart_quirk[] = {
>          .max_bars = 1, /* It can do more, but we would need more custom 
> code.*/
>      }
>  };
> +
> +#define PCI_VENDOR_ID_BROADCOM           0x14e4
> +#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
> +#define PCI_VENDOR_ID_OXSEMI             0x1415

We probably want a single unified header file containing PCI IDs
(certainly vendor).  Currently, arch/x86/x86_64/mmconfig.h contains
defines for Intel, AMD and Nvidia, and AMD is redefined in defined in
arch/x86/oprofile/op_model_athlon.c.

~Andrew

>  static struct ns16550_config_mmio __initdata uart_config[] =
>  {
>      /* Broadcom TruManage device */
>      {
> -        .vendor_id = 0x14e4,
> -        .dev_id = 0x160a,
> +        .vendor_id = PCI_VENDOR_ID_BROADCOM,
> +        .dev_id = PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
>          .quirk = quirk_trumanage,
>      },
>      /* OXPCIe952 1 Native UART  */
>      {
> -        .vendor_id = 0x1415,
> +        .vendor_id = PCI_VENDOR_ID_OXSEMI,
>          .dev_id = 0xc138,
>          .quirk = quirk_oxford,
>      }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.