mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
cxl: Support Type2 cxl regs mapping
Export cxl core functions for a Type2 driver being able to discover and map the device registers. Signed-off-by: Alejandro Lucero <alucerop@amd.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Ben Cheatham <benjamin.cheatham@amd.com> Acked-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://patch.msgid.link/20260629183727.51502-2-alejandro.lucero-palau@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
parent
dc59e4fea9
commit
2c599da823
|
|
@ -6,6 +6,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pci-doe.h>
|
||||
#include <cxl/pci.h>
|
||||
#include <linux/aer.h>
|
||||
#include <cxlpci.h>
|
||||
#include <cxlmem.h>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/idr.h>
|
||||
#include <linux/node.h>
|
||||
#include <cxl/einj.h>
|
||||
#include <cxl/pci.h>
|
||||
#include <cxlmem.h>
|
||||
#include <cxlpci.h>
|
||||
#include <cxl.h>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/pci.h>
|
||||
#include <cxl/pci.h>
|
||||
#include <cxlmem.h>
|
||||
#include <cxlpci.h>
|
||||
#include <pmu.h>
|
||||
|
|
|
|||
|
|
@ -13,16 +13,6 @@
|
|||
*/
|
||||
#define CXL_PCI_DEFAULT_MAX_VECTORS 16
|
||||
|
||||
/* Register Block Identifier (RBI) */
|
||||
enum cxl_regloc_type {
|
||||
CXL_REGLOC_RBI_EMPTY = 0,
|
||||
CXL_REGLOC_RBI_COMPONENT,
|
||||
CXL_REGLOC_RBI_VIRT,
|
||||
CXL_REGLOC_RBI_MEMDEV,
|
||||
CXL_REGLOC_RBI_PMU,
|
||||
CXL_REGLOC_RBI_TYPES
|
||||
};
|
||||
|
||||
/*
|
||||
* Table Access DOE, CDAT Read Entry Response
|
||||
*
|
||||
|
|
@ -112,6 +102,4 @@ static inline void devm_cxl_port_ras_setup(struct cxl_port *port)
|
|||
}
|
||||
#endif
|
||||
|
||||
int cxl_pci_setup_regs(struct pci_dev *pdev, enum cxl_regloc_type type,
|
||||
struct cxl_register_map *map);
|
||||
#endif /* __CXL_PCI_H__ */
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/aer.h>
|
||||
#include <linux/io.h>
|
||||
#include <cxl/pci.h>
|
||||
#include <cxl/mailbox.h>
|
||||
#include "cxlmem.h"
|
||||
#include "cxlpci.h"
|
||||
|
|
|
|||
22
include/cxl/pci.h
Normal file
22
include/cxl/pci.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright(c) 2020 Intel Corporation. All rights reserved. */
|
||||
|
||||
#ifndef __CXL_CXL_PCI_H__
|
||||
#define __CXL_CXL_PCI_H__
|
||||
|
||||
/* Register Block Identifier (RBI) */
|
||||
enum cxl_regloc_type {
|
||||
CXL_REGLOC_RBI_EMPTY = 0,
|
||||
CXL_REGLOC_RBI_COMPONENT,
|
||||
CXL_REGLOC_RBI_VIRT,
|
||||
CXL_REGLOC_RBI_MEMDEV,
|
||||
CXL_REGLOC_RBI_PMU,
|
||||
CXL_REGLOC_RBI_TYPES
|
||||
};
|
||||
|
||||
struct cxl_register_map;
|
||||
struct pci_dev;
|
||||
|
||||
int cxl_pci_setup_regs(struct pci_dev *pdev, enum cxl_regloc_type type,
|
||||
struct cxl_register_map *map);
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user