cxl/regs: Remove early capability checks in Component Register setup
authorRobert Richter <rrichter@amd.com>
Thu, 22 Jun 2023 20:55:07 +0000 (15:55 -0500)
committerDan Williams <dan.j.williams@intel.com>
Sun, 25 Jun 2023 18:51:36 +0000 (11:51 -0700)
commitf1d0525effc4fffe821905671ea24c30a4bfa393
tree476d2207ce182887cae01e8cb94cedd95b7efd1a
parentd8bffff2016f7aef1c1dbe01125720475507b6f2
cxl/regs: Remove early capability checks in Component Register setup

When probing the Component Registers in function cxl_probe_regs()
there are also checks for the existence of the HDM and RAS
capabilities. The checks may fail for components that do not implement
the HDM capability causing the Component Registers setup to fail too.

Remove the checks for a generalized use of cxl_probe_regs() and check
them directly before mapping the RAS or HDM capabilities. This allows
it to setup other Component Registers esp. of an RCH Downstream Port,
which will be implemented in a follow-on patch.

Signed-off-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230622205523.85375-12-terry.bowman@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/regs.c
drivers/cxl/pci.c
drivers/cxl/port.c