summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/pcie-rockchip.h
diff options
context:
space:
mode:
authorRick Wertenbroek <rick.wertenbroek@gmail.com>2023-04-18 10:46:56 +0300
committerLorenzo Pieralisi <lpieralisi@kernel.org>2023-06-22 10:36:51 +0300
commit8962b2cb39119cbda4fc69a1f83957824f102f81 (patch)
treeaab524038575c0fd14c2c446311490f25c6ded18 /drivers/pci/controller/pcie-rockchip.h
parentdc73ed0f1b8bddd7f2bf70d123e68ffc99ad71ce (diff)
downloadlinux-8962b2cb39119cbda4fc69a1f83957824f102f81.tar.xz
PCI: rockchip: Use u32 variable to access 32-bit registers
Previously u16 variables were used to access 32-bit registers, this resulted in not all of the data being read from the registers. Also the left shift of more than 16-bits would result in moving data out of the variable. Use u32 variables to access 32-bit registers Link: https://lore.kernel.org/r/20230418074700.1083505-10-rick.wertenbroek@gmail.com Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller") Tested-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/pci/controller/pcie-rockchip.h')
-rw-r--r--drivers/pci/controller/pcie-rockchip.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/controller/pcie-rockchip.h b/drivers/pci/controller/pcie-rockchip.h
index bef6d7098a2f..501d859420b4 100644
--- a/drivers/pci/controller/pcie-rockchip.h
+++ b/drivers/pci/controller/pcie-rockchip.h
@@ -227,6 +227,7 @@
#define ROCKCHIP_PCIE_EP_CMD_STATUS 0x4
#define ROCKCHIP_PCIE_EP_CMD_STATUS_IS BIT(19)
#define ROCKCHIP_PCIE_EP_MSI_CTRL_REG 0x90
+#define ROCKCHIP_PCIE_EP_MSI_FLAGS_OFFSET 16
#define ROCKCHIP_PCIE_EP_MSI_CTRL_MMC_OFFSET 17
#define ROCKCHIP_PCIE_EP_MSI_CTRL_MMC_MASK GENMASK(19, 17)
#define ROCKCHIP_PCIE_EP_MSI_CTRL_MME_OFFSET 20