PCI: rcar: Avoid defines prefixed with CONFIG
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Fri, 13 Jan 2023 08:45:16 +0000 (09:45 +0100)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Fri, 10 Mar 2023 12:34:27 +0000 (13:34 +0100)
Defines prefixed with "CONFIG" should be limited to proper Kconfig options,
that are introduced in a Kconfig file.

In the R-car driver the bitmask to configure the SEND_ENABLE mode is named
CONFIG_SEND_ENABLE.

Rename this local definition to a more suitable name, containing the
register bitfield name defined in the R-Car Gen3 rev. 2.30 user
manual.

No functional change.

Link: https://lore.kernel.org/r/20230113084516.31888-1-lukas.bulwahn@gmail.com
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
[lpieralisi@kernel.org: Changed define naming and commit log]
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pci/controller/pcie-rcar-host.c
drivers/pci/controller/pcie-rcar.h

index e4faf90..e80e56b 100644 (file)
@@ -219,9 +219,9 @@ static int rcar_pcie_config_access(struct rcar_pcie_host *host,
 
        /* Enable the configuration access */
        if (pci_is_root_bus(bus->parent))
-               rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR);
+               rcar_pci_write_reg(pcie, PCIECCTLR_CCIE | TYPE0, PCIECCTLR);
        else
-               rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR);
+               rcar_pci_write_reg(pcie, PCIECCTLR_CCIE | TYPE1, PCIECCTLR);
 
        /* Check for errors */
        if (rcar_pci_read_reg(pcie, PCIEERRFR) & UNSUPPORTED_REQUEST)
index 9bb125d..6799f81 100644 (file)
@@ -11,7 +11,7 @@
 
 #define PCIECAR                        0x000010
 #define PCIECCTLR              0x000018
-#define  CONFIG_SEND_ENABLE    BIT(31)
+#define  PCIECCTLR_CCIE                BIT(31)
 #define  TYPE0                 (0 << 8)
 #define  TYPE1                 BIT(8)
 #define PCIECDR                        0x000020