dmaengine: ioat: use PCI core macros for PCIe Capability
PATCH 1/1 dmaengine: ioat: use PCI core macros for PCIe Capability
From: Bjorn Helgaas <[email protected]>
The PCIe Capability is defined by the PCIe spec, so use the PCI_EXP_DEVCTL macros defined by the PCI core instead of defining copies in IOAT. This makes it easier to find all uses of the PCIe Device Control register. No functional change intended.
--- drivers/dma/ioat/init.c | 6 +++--- drivers/dma/ioat/registers.h | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-)
drivers/dma/ioat/init.c +3 -3
@@ -1191,13 +1191,13 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca) ioat_dma->dca =ioat_dca_init (pdev, ioat_dma->reg_base);/* disable relaxed ordering */ - err =pcie_capability_read_word (pdev,IOAT_DEVCTRL_OFFSET , &val16); + err =pcie_capability_read_word (pdev,PCI_EXP_DEVCTL , &val16);if (err)return pcibios_err_to_errno (err);/* clear relaxed ordering enable */ - val16 &= ~IOAT_DEVCTRL_ROE ; - err =pcie_capability_write_word (pdev,IOAT_DEVCTRL_OFFSET , val16); + val16 &= ~PCI_EXP_DEVCTL_RELAX_EN ; + err =pcie_capability_write_word (pdev,PCI_EXP_DEVCTL , val16);if (err)return pcibios_err_to_errno (err);
drivers/dma/ioat/registers.h +0 -7
@@ -14,13 +14,6 @@#define IOAT_PCI_CHANERR_INT_OFFSET 0x180#define IOAT_PCI_CHANERRMASK_INT_OFFSET 0x184 -/* PCIe config registers */ - -/* EXPCAPID + N */ -#define IOAT_DEVCTRL_OFFSET 0x8 -/* relaxed ordering enable */ -#define IOAT_DEVCTRL_ROE 0x10 -/* MMIO Device Registers */ #define IOAT_CHANCNT_OFFSET 0x00/* 8-bit */
Signature · 1 line
2.25.1
Quoted 8 lines · Bjorn Helgaas
From: Bjorn Helgaas <[email protected]>
The PCIe Capability is defined by the PCIe spec, so use the
PCI_EXP_DEVCTLmacros defined by the PCI core instead of defining copies in IOAT. This makes it easier to find all uses of the PCIe Device Control register. No functional change intended.Signed-off-by Bjorn Helgaas <[email protected]>
Quoted 44 lines
--- drivers/dma/ioat/init.c | 6 +++--- drivers/dma/ioat/registers.h | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-)drivers/dma/ioat/init.c +3
-3@@ -1191,13 +1191,13 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca) ioat_dma->dca =ioat_dca_init (pdev, ioat_dma->reg_base);/* disable relaxed ordering */ - err =pcie_capability_read_word (pdev,IOAT_DEVCTRL_OFFSET , &val16); + err =pcie_capability_read_word (pdev,PCI_EXP_DEVCTL , &val16);if (err)return pcibios_err_to_errno (err);/* clear relaxed ordering enable */ - val16 &= ~IOAT_DEVCTRL_ROE ; - err =pcie_capability_write_word (pdev,IOAT_DEVCTRL_OFFSET , val16); + val16 &= ~PCI_EXP_DEVCTL_RELAX_EN ; + err =pcie_capability_write_word (pdev,PCI_EXP_DEVCTL , val16);if (err)return pcibios_err_to_errno (err);drivers/dma/ioat/registers.h +0
-7@@ -14,13 +14,6 @@#define IOAT_PCI_CHANERR_INT_OFFSET 0x180#define IOAT_PCI_CHANERRMASK_INT_OFFSET 0x184 -/* PCIe config registers */ - -/* EXPCAPID + N */ -#define IOAT_DEVCTRL_OFFSET 0x8 -/* relaxed ordering enable */ -#define IOAT_DEVCTRL_ROE 0x10 -/* MMIO Device Registers */ #define IOAT_CHANCNT_OFFSET 0x00/* 8-bit */
Quoted 6 lines · Bjorn Helgaas
From: Bjorn Helgaas <[email protected]>
The PCIe Capability is defined by the PCIe spec, so use the
PCI_EXP_DEVCTLmacros defined by the PCI core instead of defining copies in IOAT. This makes it easier to find all uses of the PCIe Device Control register. No functional change intended.
Applied, thanks
Signature · 1 line
~Vinod