PCI: dwc: Fix ATU identification for designware version >= 4.80
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 25 Mar 2019 09:39:32 +0000 (15:09 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 15 Apr 2019 12:24:01 +0000 (13:24 +0100)
commit2aadcb0cd39198833fabe1c45084f78686e71a6c
treeb9a1211d8069ca99ba7df56d1eb1e1a6ded0f65d
parenta9f4c2d2f99ec85ebc734a5bfb21a2cf93c169ad
PCI: dwc: Fix ATU identification for designware version >= 4.80

Synopsys designware version >= 4.80 uses a separate register space
for programming ATU. The current code identifies if there exists a
separate register space by accessing the register address of ATUs
in designware version < 4.80. Accessing this address results in
abort in the case of K2G.

Fix it here by adding "version" member to struct dw_pcie. This should be
set by platform specific drivers and designware core will use it to
identify if the platform has a separate ATU space. For platforms which
have not populated the version member, the old method of identification
will still be used.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/dwc/pcie-designware.c
drivers/pci/controller/dwc/pcie-designware.h