From patchwork Fri Apr 1 10:13:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1612140 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=OzPH3pSC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KVGHD35jcz9sGC for ; Fri, 1 Apr 2022 21:14:16 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8507838B5; Fri, 1 Apr 2022 12:14:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="OzPH3pSC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2770A8429F; Fri, 1 Apr 2022 12:14:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9E96A84286 for ; Fri, 1 Apr 2022 12:13:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x32f.google.com with SMTP id f6-20020a1c3806000000b0038e4a0fc5easo1170456wma.3 for ; Fri, 01 Apr 2022 03:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q1bUevxgG9JZMDkxw6HV2NLUTQu0jBt7yhFJrqRJeGk=; b=OzPH3pSCFEmcWGsQvfdjfGH2P/dm8j0Wbh68qhtqJuhv9+kqrczwJhiLj5QjvCgtZ9 bKvcZumVtKSOmZyTXG85eVRoq6RVHW2UZFvmMO884RlcsskBjOz+ifIR9OuLz7X49gdl TtIRGahLF7cGAifroJlp9jcwq1OyR9ly3NNNW6BOIpvEd4IgdYhZnVPNX9gNqaYaa1FP AJysbwLOH/A3DxDXN94LiEBA7zlKZE3LjhB1dUA7y2FVSxL2RAnjsM6CEiWW6PBdXTi/ 6VwFz+SzcuAAonfK7HYF0MioEcVx7fgn4nDSpK1Dh2WQomU31n2l12alDr9xF2vjb8/H fZ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Q1bUevxgG9JZMDkxw6HV2NLUTQu0jBt7yhFJrqRJeGk=; b=WaxM1lPRLFzyv9ABpu//Am+qQcI2Vd+jJnZi34eboGP77ygs2FeEd2nX1Vn/YGBCzM bFr4JoeqHVeAUjfvhXzgaTj3RvnEnTtmXrsoxZ7XqZTexAdy8cLSf6pWpWXWS3Jm03L3 ZrYnMr1lYYxMp2lxQNvDbiq33sZ5rLHL+A7Qgo4/h3fzm3BKxqx3u9H+qJIktwGPtgRm YEwXnBJe0rvM1PJCOUWwa5VSE92hV6rtKUjToEpmHtYBVt4HElEbGbNcG03nvLpQvKSM cgXVsmC/L7ArZUO9WTxoNowzWC6Nx+LQw10t4mZD2cGZmPB1WEi/d2TpXkSDqjSVLBau fxxw== X-Gm-Message-State: AOAM533zp0QwwRXVNI3Ft5cgZZL8QpcU5y6lXa0CMmx79H4nqn1Xo0Gy XUl+GR57uC0HWyJgO2AGX1nln74Ckq+bDA== X-Google-Smtp-Source: ABdhPJwLz4Hq1NiwbwNuJA7/RpTrWy6F/6uUHpsr6NyAn4x21sm5UxhB0cQ9L0FSm0COjnocQ5RGeQ== X-Received: by 2002:a7b:c5d5:0:b0:37b:fda9:a5e2 with SMTP id n21-20020a7bc5d5000000b0037bfda9a5e2mr8006444wmk.62.1648808025938; Fri, 01 Apr 2022 03:13:45 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id p14-20020a05600c1d8e00b0038dbb5ecc8asm1547073wms.2.2022.04.01.03.13.45 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 03:13:45 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Simon Glass Subject: [PATCH] dm: Use explicit numbers for all enum values Date: Fri, 1 Apr 2022 12:13:44 +0200 Message-Id: <2f8e786bf3a7dcd0518e5374d7b56c559b23c784.1648808022.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Based on discussion at https://lore.kernel.org/r/20200318125003.GA2727094@kroah.com we got recommendation to use explicit values for all enum values. The patch is following this recommendation. The same change was also done by commit 31431dd466e7 ("firmware: xilinx: Use explicit values for all enum values"). Signed-off-by: Michal Simek --- I was doing some debug and got uclass ID but without values it is hard to find out which uclass it is. --- include/dm/uclass-id.h | 240 ++++++++++++++++++++--------------------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 0e26e1d13824..30d120879a4e 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -13,129 +13,129 @@ enum uclass_id { /* These are used internally by driver model */ UCLASS_ROOT = 0, - UCLASS_DEMO, - UCLASS_TEST, - UCLASS_TEST_FDT, - UCLASS_TEST_FDT_MANUAL, - UCLASS_TEST_BUS, - UCLASS_TEST_PROBE, - UCLASS_TEST_DUMMY, - UCLASS_TEST_DEVRES, - UCLASS_TEST_ACPI, - UCLASS_SPI_EMUL, /* sandbox SPI device emulator */ - UCLASS_I2C_EMUL, /* sandbox I2C device emulator */ - UCLASS_I2C_EMUL_PARENT, /* parent for I2C device emulators */ - UCLASS_PCI_EMUL, /* sandbox PCI device emulator */ - UCLASS_PCI_EMUL_PARENT, /* parent for PCI device emulators */ - UCLASS_USB_EMUL, /* sandbox USB bus device emulator */ - UCLASS_AXI_EMUL, /* sandbox AXI bus device emulator */ + UCLASS_DEMO = 1, + UCLASS_TEST = 2, + UCLASS_TEST_FDT = 3, + UCLASS_TEST_FDT_MANUAL = 4, + UCLASS_TEST_BUS = 5, + UCLASS_TEST_PROBE = 6, + UCLASS_TEST_DUMMY = 7, + UCLASS_TEST_DEVRES = 8, + UCLASS_TEST_ACPI = 10, + UCLASS_SPI_EMUL = 11, /* sandbox SPI device emulator */ + UCLASS_I2C_EMUL = 12, /* sandbox I2C device emulator */ + UCLASS_I2C_EMUL_PARENT = 12, /* parent for I2C device emulators */ + UCLASS_PCI_EMUL = 13, /* sandbox PCI device emulator */ + UCLASS_PCI_EMUL_PARENT = 14, /* parent for PCI device emulators */ + UCLASS_USB_EMUL = 15, /* sandbox USB bus device emulator */ + UCLASS_AXI_EMUL = 16, /* sandbox AXI bus device emulator */ /* U-Boot uclasses start here - in alphabetical order */ - UCLASS_ACPI_PMC, /* (x86) Power-management controller (PMC) */ - UCLASS_ADC, /* Analog-to-digital converter */ - UCLASS_AHCI, /* SATA disk controller */ - UCLASS_AUDIO_CODEC, /* Audio codec with control and data path */ - UCLASS_AXI, /* AXI bus */ - UCLASS_BLK, /* Block device */ - UCLASS_BOOTCOUNT, /* Bootcount backing store */ - UCLASS_BUTTON, /* Button */ - UCLASS_CACHE, /* Cache controller */ - UCLASS_CLK, /* Clock source, e.g. used by peripherals */ - UCLASS_CPU, /* CPU, typically part of an SoC */ - UCLASS_CROS_EC, /* Chrome OS EC */ - UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */ - UCLASS_DSI_HOST, /* Display Serial Interface host */ - UCLASS_DMA, /* Direct Memory Access */ - UCLASS_DSA, /* Distributed (Ethernet) Switch Architecture */ - UCLASS_ECDSA, /* Elliptic curve cryptographic device */ - UCLASS_EFI_LOADER, /* Devices created by UEFI applications */ - UCLASS_EFI_MEDIA, /* Devices provided by UEFI firmware */ - UCLASS_ETH, /* Ethernet device */ - UCLASS_ETH_PHY, /* Ethernet PHY device */ - UCLASS_FIRMWARE, /* Firmware */ - UCLASS_FS_FIRMWARE_LOADER, /* Generic loader */ - UCLASS_GPIO, /* Bank of general-purpose I/O pins */ - UCLASS_HASH, /* Hash device */ - UCLASS_HWSPINLOCK, /* Hardware semaphores */ - UCLASS_I2C, /* I2C bus */ - UCLASS_I2C_EEPROM, /* I2C EEPROM device */ - UCLASS_I2C_GENERIC, /* Generic I2C device */ - UCLASS_I2C_MUX, /* I2C multiplexer */ - UCLASS_I2S, /* I2S bus */ - UCLASS_IDE, /* IDE device */ - UCLASS_IOMMU, /* IOMMU */ - UCLASS_IRQ, /* Interrupt controller */ - UCLASS_KEYBOARD, /* Keyboard input device */ - UCLASS_LED, /* Light-emitting diode (LED) */ - UCLASS_LPC, /* x86 'low pin count' interface */ - UCLASS_MAILBOX, /* Mailbox controller */ - UCLASS_MASS_STORAGE, /* Mass storage device */ - UCLASS_MDIO, /* MDIO bus */ - UCLASS_MDIO_MUX, /* MDIO MUX/switch */ - UCLASS_MISC, /* Miscellaneous device */ - UCLASS_MMC, /* SD / MMC card or chip */ - UCLASS_MOD_EXP, /* RSA Mod Exp device */ - UCLASS_MTD, /* Memory Technology Device (MTD) device */ - UCLASS_MUX, /* Multiplexer device */ - UCLASS_NOP, /* No-op devices */ - UCLASS_NORTHBRIDGE, /* Intel Northbridge / SDRAM controller */ - UCLASS_NVME, /* NVM Express device */ - UCLASS_P2SB, /* (x86) Primary-to-Sideband Bus */ - UCLASS_PANEL, /* Display panel, such as an LCD */ - UCLASS_PANEL_BACKLIGHT, /* Backlight controller for panel */ - UCLASS_PCH, /* x86 platform controller hub */ - UCLASS_PCI, /* PCI bus */ - UCLASS_PCI_EP, /* PCI endpoint device */ - UCLASS_PCI_GENERIC, /* Generic PCI bus device */ - UCLASS_PHY, /* Physical Layer (PHY) device */ - UCLASS_PINCONFIG, /* Pin configuration node device */ - UCLASS_PINCTRL, /* Pinctrl (pin muxing/configuration) device */ - UCLASS_PMIC, /* PMIC I/O device */ - UCLASS_POWER_DOMAIN, /* (SoC) Power domains */ - UCLASS_PWM, /* Pulse-width modulator */ - UCLASS_PWRSEQ, /* Power sequence device */ - UCLASS_QFW, /* QEMU firmware config device */ - UCLASS_RAM, /* RAM controller */ - UCLASS_REBOOT_MODE, /* Reboot mode */ - UCLASS_REGULATOR, /* Regulator device */ - UCLASS_REMOTEPROC, /* Remote Processor device */ - UCLASS_RESET, /* Reset controller device */ - UCLASS_RNG, /* Random Number Generator */ - UCLASS_RTC, /* Real time clock device */ - UCLASS_SCMI_AGENT, /* Interface with an SCMI server */ - UCLASS_SCSI, /* SCSI device */ - UCLASS_SERIAL, /* Serial UART */ - UCLASS_SIMPLE_BUS, /* Bus with child devices */ - UCLASS_SMEM, /* Shared memory interface */ - UCLASS_SOC, /* SOC Device */ - UCLASS_SOUND, /* Playing simple sounds */ - UCLASS_SPI, /* SPI bus */ - UCLASS_SPI_FLASH, /* SPI flash */ - UCLASS_SPI_GENERIC, /* Generic SPI flash target */ - UCLASS_SPMI, /* System Power Management Interface bus */ - UCLASS_SYSCON, /* System configuration device */ - UCLASS_SYSINFO, /* Device information from hardware */ - UCLASS_SYSRESET, /* System reset device */ - UCLASS_TEE, /* Trusted Execution Environment device */ - UCLASS_THERMAL, /* Thermal sensor */ - UCLASS_TIMER, /* Timer device */ - UCLASS_TPM, /* Trusted Platform Module TIS interface */ - UCLASS_UFS, /* Universal Flash Storage */ - UCLASS_USB, /* USB bus */ - UCLASS_USB_DEV_GENERIC, /* USB generic device */ - UCLASS_USB_HUB, /* USB hub */ - UCLASS_USB_GADGET_GENERIC, /* USB generic device */ - UCLASS_VIDEO, /* Video or LCD device */ - UCLASS_VIDEO_BRIDGE, /* Video bridge, e.g. DisplayPort to LVDS */ - UCLASS_VIDEO_CONSOLE, /* Text console driver for video device */ - UCLASS_VIDEO_OSD, /* On-screen display */ - UCLASS_VIRTIO, /* VirtIO transport device */ - UCLASS_W1, /* Dallas 1-Wire bus */ - UCLASS_W1_EEPROM, /* one-wire EEPROMs */ - UCLASS_WDT, /* Watchdog Timer driver */ - UCLASS_PVBLOCK, /* Xen virtual block device */ + UCLASS_ACPI_PMC = 17, /* (x86) Power-management controller (PMC) */ + UCLASS_ADC = 18, /* Analog-to-digital converter */ + UCLASS_AHCI = 19, /* SATA disk controller */ + UCLASS_AUDIO_CODEC = 20,/* Audio codec with control and data path */ + UCLASS_AXI = 21, /* AXI bus */ + UCLASS_BLK = 22, /* Block device */ + UCLASS_BOOTCOUNT = 23, /* Bootcount backing store */ + UCLASS_BUTTON = 24, /* Button */ + UCLASS_CACHE = 25, /* Cache controller */ + UCLASS_CLK = 26, /* Clock source, e.g. used by peripherals */ + UCLASS_CPU = 27, /* CPU, typically part of an SoC */ + UCLASS_CROS_EC = 28, /* Chrome OS EC */ + UCLASS_DISPLAY = 29, /* Display (e.g. DisplayPort, HDMI) */ + UCLASS_DSI_HOST = 30, /* Display Serial Interface host */ + UCLASS_DMA = 31, /* Direct Memory Access */ + UCLASS_DSA = 32, /* Distributed (Ethernet) Switch Architecture */ + UCLASS_ECDSA = 33, /* Elliptic curve cryptographic device */ + UCLASS_EFI_LOADER = 34, /* Devices created by UEFI applications */ + UCLASS_EFI_MEDIA = 35, /* Devices provided by UEFI firmware */ + UCLASS_ETH = 36, /* Ethernet device */ + UCLASS_ETH_PHY = 37, /* Ethernet PHY device */ + UCLASS_FIRMWARE = 38, /* Firmware */ + UCLASS_FS_FIRMWARE_LOADER = 39, /* Generic loader */ + UCLASS_GPIO = 40, /* Bank of general-purpose I/O pins */ + UCLASS_HASH = 41, /* Hash device */ + UCLASS_HWSPINLOCK = 42, /* Hardware semaphores */ + UCLASS_I2C = 43, /* I2C bus */ + UCLASS_I2C_EEPROM = 44, /* I2C EEPROM device */ + UCLASS_I2C_GENERIC = 45, /* Generic I2C device */ + UCLASS_I2C_MUX = 46, /* I2C multiplexer */ + UCLASS_I2S = 47, /* I2S bus */ + UCLASS_IDE = 48, /* IDE device */ + UCLASS_IOMMU = 49, /* IOMMU */ + UCLASS_IRQ = 49, /* Interrupt controller */ + UCLASS_KEYBOARD = 50, /* Keyboard input device */ + UCLASS_LED = 51, /* Light-emitting diode (LED) */ + UCLASS_LPC = 52, /* x86 'low pin count' interface */ + UCLASS_MAILBOX = 53, /* Mailbox controller */ + UCLASS_MASS_STORAGE = 54, /* Mass storage device */ + UCLASS_MDIO = 55, /* MDIO bus */ + UCLASS_MDIO_MUX = 56, /* MDIO MUX/switch */ + UCLASS_MISC = 57, /* Miscellaneous device */ + UCLASS_MMC = 58, /* SD / MMC card or chip */ + UCLASS_MOD_EXP = 59, /* RSA Mod Exp device */ + UCLASS_MTD = 60, /* Memory Technology Device (MTD) device */ + UCLASS_MUX = 61, /* Multiplexer device */ + UCLASS_NOP = 62, /* No-op devices */ + UCLASS_NORTHBRIDGE = 63, /* Intel Northbridge / SDRAM controller */ + UCLASS_NVME = 64, /* NVM Express device */ + UCLASS_P2SB = 65, /* (x86) Primary-to-Sideband Bus */ + UCLASS_PANEL = 66, /* Display panel, such as an LCD */ + UCLASS_PANEL_BACKLIGHT = 67, /* Backlight controller for panel */ + UCLASS_PCH = 68, /* x86 platform controller hub */ + UCLASS_PCI = 69, /* PCI bus */ + UCLASS_PCI_EP = 70, /* PCI endpoint device */ + UCLASS_PCI_GENERIC = 71,/* Generic PCI bus device */ + UCLASS_PHY = 72, /* Physical Layer (PHY) device */ + UCLASS_PINCONFIG = 73, /* Pin configuration node device */ + UCLASS_PINCTRL = 74, /* Pinctrl (pin muxing/configuration) device */ + UCLASS_PMIC = 75, /* PMIC I/O device */ + UCLASS_POWER_DOMAIN = 76, /* (SoC) Power domains */ + UCLASS_PWM = 77, /* Pulse-width modulator */ + UCLASS_PWRSEQ = 78, /* Power sequence device */ + UCLASS_QFW = 79, /* QEMU firmware config device */ + UCLASS_RAM = 80, /* RAM controller */ + UCLASS_REBOOT_MODE = 81,/* Reboot mode */ + UCLASS_REGULATOR = 82, /* Regulator device */ + UCLASS_REMOTEPROC = 83, /* Remote Processor device */ + UCLASS_RESET = 84, /* Reset controller device */ + UCLASS_RNG = 85, /* Random Number Generator */ + UCLASS_RTC = 86, /* Real time clock device */ + UCLASS_SCMI_AGENT = 87, /* Interface with an SCMI server */ + UCLASS_SCSI = 88, /* SCSI device */ + UCLASS_SERIAL = 89, /* Serial UART */ + UCLASS_SIMPLE_BUS = 90, /* Bus with child devices */ + UCLASS_SMEM = 91, /* Shared memory interface */ + UCLASS_SOC = 92, /* SOC Device */ + UCLASS_SOUND = 93, /* Playing simple sounds */ + UCLASS_SPI = 94, /* SPI bus */ + UCLASS_SPI_FLASH = 95, /* SPI flash */ + UCLASS_SPI_GENERIC = 96, /* Generic SPI flash target */ + UCLASS_SPMI = 97, /* System Power Management Interface bus */ + UCLASS_SYSCON = 98, /* System configuration device */ + UCLASS_SYSINFO = 99, /* Device information from hardware */ + UCLASS_SYSRESET = 100, /* System reset device */ + UCLASS_TEE = 101, /* Trusted Execution Environment device */ + UCLASS_THERMAL = 102, /* Thermal sensor */ + UCLASS_TIMER = 103, /* Timer device */ + UCLASS_TPM = 104, /* Trusted Platform Module TIS interface */ + UCLASS_UFS = 105, /* Universal Flash Storage */ + UCLASS_USB = 106, /* USB bus */ + UCLASS_USB_DEV_GENERIC = 107, /* USB generic device */ + UCLASS_USB_HUB = 108, /* USB hub */ + UCLASS_USB_GADGET_GENERIC = 109, /* USB generic device */ + UCLASS_VIDEO = 110, /* Video or LCD device */ + UCLASS_VIDEO_BRIDGE = 111, /* Video bridge, e.g. DisplayPort to LVDS */ + UCLASS_VIDEO_CONSOLE = 112, /* Text console driver for video device */ + UCLASS_VIDEO_OSD = 113, /* On-screen display */ + UCLASS_VIRTIO = 114, /* VirtIO transport device */ + UCLASS_W1 = 115, /* Dallas 1-Wire bus */ + UCLASS_W1_EEPROM = 116, /* one-wire EEPROMs */ + UCLASS_WDT = 117, /* Watchdog Timer driver */ + UCLASS_PVBLOCK = 118, /* Xen virtual block device */ - UCLASS_COUNT, + UCLASS_COUNT = 119, UCLASS_INVALID = -1, };