PCI: rockchip: Use u32 variable to access 32-bit registers
authorRick Wertenbroek <rick.wertenbroek@gmail.com>
Tue, 18 Apr 2023 07:46:56 +0000 (09:46 +0200)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Thu, 22 Jun 2023 07:36:51 +0000 (09:36 +0200)
commit8962b2cb39119cbda4fc69a1f83957824f102f81
treeaab524038575c0fd14c2c446311490f25c6ded18
parentdc73ed0f1b8bddd7f2bf70d123e68ffc99ad71ce
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
drivers/pci/controller/pcie-rockchip-ep.c
drivers/pci/controller/pcie-rockchip.h