Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: rcar: Avoid defines prefixed with CONFIG

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>

authored by

Lukas Bulwahn and committed by
Lorenzo Pieralisi
727de4c0 fe15c26e

+3 -3
+2 -2
drivers/pci/controller/pcie-rcar-host.c
··· 219 219 220 220 /* Enable the configuration access */ 221 221 if (pci_is_root_bus(bus->parent)) 222 - rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR); 222 + rcar_pci_write_reg(pcie, PCIECCTLR_CCIE | TYPE0, PCIECCTLR); 223 223 else 224 - rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR); 224 + rcar_pci_write_reg(pcie, PCIECCTLR_CCIE | TYPE1, PCIECCTLR); 225 225 226 226 /* Check for errors */ 227 227 if (rcar_pci_read_reg(pcie, PCIEERRFR) & UNSUPPORTED_REQUEST)
+1 -1
drivers/pci/controller/pcie-rcar.h
··· 11 11 12 12 #define PCIECAR 0x000010 13 13 #define PCIECCTLR 0x000018 14 - #define CONFIG_SEND_ENABLE BIT(31) 14 + #define PCIECCTLR_CCIE BIT(31) 15 15 #define TYPE0 (0 << 8) 16 16 #define TYPE1 BIT(8) 17 17 #define PCIECDR 0x000020