lkml.org 
[lkml]   [2024]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 01/10] ARM: orion5x: Rename PCI_CONF_{REG,FUNC}() out of the way
    Date
    Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:

    > orion5x defines PCI_CONF_REG() and PCI_CONF_FUNC() that are problematic
    > because PCI core is going to introduce defines with the same names.
    >
    > Add ORION5X prefix to those defines to avoid name conflicts.
    >
    > Note: as this is part of series that replaces the code in question
    > anyway, only bare minimum renaming is done and other similarly named
    > macros are not touched.
    >
    > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

    Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>

    As some other patches of the series depend on patches in the PCIe
    subsystem, the best approach would be to let you apply the series
    through the PCIe subsystem.

    Thanks,

    Gregory
    > ---
    > arch/arm/mach-orion5x/pci.c | 12 ++++++------
    > 1 file changed, 6 insertions(+), 6 deletions(-)
    >
    > diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
    > index 3313bc5a63ea..77ddab90f448 100644
    > --- a/arch/arm/mach-orion5x/pci.c
    > +++ b/arch/arm/mach-orion5x/pci.c
    > @@ -219,8 +219,8 @@ static int __init pcie_setup(struct pci_sys_data *sys)
    > /*
    > * PCI_CONF_ADDR bits
    > */
    > -#define PCI_CONF_REG(reg) ((reg) & 0xfc)
    > -#define PCI_CONF_FUNC(func) (((func) & 0x3) << 8)
    > +#define ORION5X_PCI_CONF_REG(reg) ((reg) & 0xfc)
    > +#define ORION5X_PCI_CONF_FUNC(func) (((func) & 0x3) << 8)
    > #define PCI_CONF_DEV(dev) (((dev) & 0x1f) << 11)
    > #define PCI_CONF_BUS(bus) (((bus) & 0xff) << 16)
    > #define PCI_CONF_ADDR_EN (1 << 31)
    > @@ -277,8 +277,8 @@ static int orion5x_pci_hw_rd_conf(int bus, int dev, u32 func,
    > spin_lock_irqsave(&orion5x_pci_lock, flags);
    >
    > writel(PCI_CONF_BUS(bus) |
    > - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
    > - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
    > + PCI_CONF_DEV(dev) | ORION5X_PCI_CONF_REG(where) |
    > + ORION5X_PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
    >
    > *val = readl(PCI_CONF_DATA);
    >
    > @@ -301,8 +301,8 @@ static int orion5x_pci_hw_wr_conf(int bus, int dev, u32 func,
    > spin_lock_irqsave(&orion5x_pci_lock, flags);
    >
    > writel(PCI_CONF_BUS(bus) |
    > - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
    > - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
    > + PCI_CONF_DEV(dev) | ORION5X_PCI_CONF_REG(where) |
    > + ORION5X_PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
    >
    > if (size == 4) {
    > __raw_writel(val, PCI_CONF_DATA);
    > --
    > 2.39.2

    \
     
     \ /
      Last update: 2024-05-27 18:16    [W:4.064 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site