PCI: dwc: Add accessors for write permission of DBI read-only registers
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Mon, 28 Aug 2017 10:52:59 +0000 (18:52 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 29 Aug 2017 21:19:48 +0000 (16:19 -0500)
commite44abfed6fcb750d24f4438dc9d5a02eebb5fcac
tree1342d713ecddc6bdc7bf40450e8c94d5bc27b3fa
parent4a2745d760facac895c107bed41e167e3806fced
PCI: dwc: Add accessors for write permission of DBI read-only registers

The read-only DBI registers can be written only when the "Write to RO
Registers Using DBI" (DBI_RO_WR_EN) field of MISC_CONTROL_1_OFF is set.

Add accessors to enable and disable write permission, and use them instead
of accessing MISC_CONTROL_1_OFF directly.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joao Pinto <jpinto@synopsys.com>
Acked-by: Roy Zang <tie-fei.zang@freescale.com>
drivers/pci/dwc/pci-layerscape.c
drivers/pci/dwc/pcie-designware.h