[PATCH 1/2] sandbox: video: Replace PCI_CLASS_* macros by one from pci_ids.h

Stefan Roese sr at denx.de
Fri Feb 18 15:19:43 CET 2022


On 2/18/22 13:16, Pali Rohár wrote:
> Replace old macros PCI_CLASS_CODE_COMM and PCI_CLASS_SUB_CODE_COMM_SERIAL
> by new macros defined in pci_ids.h. Old macros would be deleted in followup
> commit.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   arch/sandbox/include/asm/test.h | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
> index 0d83f4dc1bcb..015e96d53f87 100644
> --- a/arch/sandbox/include/asm/test.h
> +++ b/arch/sandbox/include/asm/test.h
> @@ -9,6 +9,7 @@
>   #define __ASM_TEST_H
>   
>   #include <video.h>
> +#include <pci_ids.h>
>   
>   /* The sandbox driver always permits an I2C device with this address */
>   #define SANDBOX_I2C_TEST_ADDR		0x59
> @@ -17,8 +18,8 @@
>   #define SANDBOX_PCI_SWAP_CASE_EMUL_ID	0x5678
>   #define SANDBOX_PCI_PMC_EMUL_ID		0x5677
>   #define SANDBOX_PCI_P2SB_EMUL_ID	0x5676
> -#define SANDBOX_PCI_CLASS_CODE		PCI_CLASS_CODE_COMM
> -#define SANDBOX_PCI_CLASS_SUB_CODE	PCI_CLASS_SUB_CODE_COMM_SERIAL
> +#define SANDBOX_PCI_CLASS_CODE		(PCI_CLASS_COMMUNICATION_SERIAL >> 8)
> +#define SANDBOX_PCI_CLASS_SUB_CODE	(PCI_CLASS_COMMUNICATION_SERIAL & 0xff)
>   
>   #define PCI_CAP_ID_PM_OFFSET		0x50
>   #define PCI_CAP_ID_EXP_OFFSET		0x60

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list