linux/drivers/cxl
Ira Weiny 30af97296f cxl/pci: Map registers based on capabilities
The information required to map registers based on capabilities is
contained within the bars themselves.  This means the bar must be mapped
to read the information needed and then unmapped to map the individual
parts of the BAR based on capabilities.

Change cxl_setup_device_regs() to return a new cxl_register_map, change
the name to cxl_probe_device_regs().  Allocate and place
cxl_register_maps on a list while processing all of the specified
register blocks.

After probing all the register blocks go back and map smaller registers
blocks based on their capabilities and dispose of the cxl_register_maps.

NOTE: pci_iomap() is not managed automatically via pcim_enable_device()
so be careful to call pci_iounmap() correctly.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20210604005036.4187184-1-ira.weiny@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2021-06-05 17:37:16 -07:00
..
core.c cxl/pci: Map registers based on capabilities 2021-06-05 17:37:16 -07:00
cxl.h cxl/pci: Map registers based on capabilities 2021-06-05 17:37:16 -07:00
Kconfig cxl: Rename mem to pci 2021-05-26 11:19:05 -07:00
Makefile cxl: Rename mem to pci 2021-05-26 11:19:05 -07:00
mem.h cxl/mem: Get rid of @cxlm.base 2021-05-26 11:20:18 -07:00
pci.c cxl/pci: Map registers based on capabilities 2021-06-05 17:37:16 -07:00
pci.h cxl/mem: Find device capabilities 2021-02-16 20:36:38 -08:00