cxl/port: Reuse 'struct cxl_hdm' context for hdm init
authorDan Williams <dan.j.williams@intel.com>
Wed, 18 May 2022 23:35:17 +0000 (16:35 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 19 May 2022 15:50:42 +0000 (08:50 -0700)
commitfcfbc93cc33ec601f00f113eca6fc484b930532d
tree34f9211524cad8a5a060d257612d9126e2bf9c22
parent5e5f4ad52f33c125af9b91d4c3b7cad59c13772e
cxl/port: Reuse 'struct cxl_hdm' context for hdm init

The port driver maps component registers for port operations. Reuse that
mapping for HDM Decoder Capability setup / enable. Move
devm_cxl_setup_hdm() before cxl_hdm_decode_init() and plumb @cxlhdm
through the hdm init helpers.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165291691712.1426646.14336397551571515480.stgit@dwillia2-xfh
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/pci.c
drivers/cxl/cxlpci.h
drivers/cxl/port.c
tools/testing/cxl/test/mock.c