cxl/pci: Introduce cxl_decode_register_block()
authorIra Weiny <ira.weiny@intel.com>
Fri, 28 May 2021 00:49:18 +0000 (17:49 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 6 Jun 2021 00:24:04 +0000 (17:24 -0700)
commit07d62eac422c5c8aec6ec1dacdc27423334b2d17
treeb1e526307abb713754a080f27f5ff7119c5fe492
parent6630d31c912ed2dfbc035caf0f54709b50ce779e
cxl/pci: Introduce cxl_decode_register_block()

Each register block located in the DVSEC needs to be decoded from 2
words, 'register offset high' and 'register offset low'.

Create a function, cxl_decode_register_block() to perform this decode
and return the bar, offset, and register type of the register block.

Then use the values decoded in cxl_mem_map_regblock() instead of passing
the raw registers.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20210528004922.3980613-2-ira.weiny@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/pci.c