include/linux/fsl/mc.h
Source file repositories/reference/linux-study-clean/include/linux/fsl/mc.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/fsl/mc.h- Extension
.h- Size
- 20388 bytes
- Lines
- 676
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/mod_devicetable.hlinux/interrupt.huapi/linux/fsl_mc.h
Detected Declarations
struct irq_domainstruct msi_domain_infostruct fsl_mc_devicestruct fsl_mc_iostruct fsl_mc_driverstruct fsl_mc_resourcestruct fsl_mc_device_irqstruct fsl_mc_obj_descstruct fsl_mc_devicestruct mc_cmd_headerstruct mc_rsp_createstruct mc_rsp_api_verstruct fsl_mc_iostruct fsl_mc_versionstruct dpbp_attrstruct dpcon_attrstruct dpcon_notification_cfgenum fsl_mc_pool_typeenum mc_cmd_statusfunction mc_encode_cmd_headerfunction mc_cmd_hdr_read_tokenfunction mc_cmd_read_object_idfunction mc_cmd_read_api_versionfunction is_fsl_mc_bus_dprcfunction is_fsl_mc_bus_dpnifunction is_fsl_mc_bus_dpiofunction is_fsl_mc_bus_dpswfunction is_fsl_mc_bus_dpdmuxfunction is_fsl_mc_bus_dpbpfunction is_fsl_mc_bus_dpconfunction is_fsl_mc_bus_dpmcpfunction is_fsl_mc_bus_dpmacfunction is_fsl_mc_bus_dprtcfunction is_fsl_mc_bus_dpsecifunction is_fsl_mc_bus_dpdceifunction is_fsl_mc_bus_dpaiopfunction is_fsl_mc_bus_dpcifunction is_fsl_mc_bus_dpdmai
Annotated Snippet
struct device_driver driver;
const struct fsl_mc_device_id *match_id_table;
int (*probe)(struct fsl_mc_device *dev);
void (*remove)(struct fsl_mc_device *dev);
void (*shutdown)(struct fsl_mc_device *dev);
int (*suspend)(struct fsl_mc_device *dev, pm_message_t state);
int (*resume)(struct fsl_mc_device *dev);
bool driver_managed_dma;
};
#define to_fsl_mc_driver(_drv) \
container_of_const(_drv, struct fsl_mc_driver, driver)
/**
* enum fsl_mc_pool_type - Types of allocatable MC bus resources
*
* Entries in these enum are used as indices in the array of resource
* pools of an fsl_mc_bus object.
*/
enum fsl_mc_pool_type {
FSL_MC_POOL_DPMCP = 0x0, /* corresponds to "dpmcp" in the MC */
FSL_MC_POOL_DPBP, /* corresponds to "dpbp" in the MC */
FSL_MC_POOL_DPCON, /* corresponds to "dpcon" in the MC */
FSL_MC_POOL_IRQ,
/*
* NOTE: New resource pool types must be added before this entry
*/
FSL_MC_NUM_POOL_TYPES
};
/**
* struct fsl_mc_resource - MC generic resource
* @type: type of resource
* @id: unique MC resource Id within the resources of the same type
* @data: pointer to resource-specific data if the resource is currently
* allocated, or NULL if the resource is not currently allocated.
* @parent_pool: pointer to the parent resource pool from which this
* resource is allocated from.
* @node: Node in the free list of the corresponding resource pool
*
* NOTE: This structure is to be embedded as a field of specific
* MC resource structures.
*/
struct fsl_mc_resource {
enum fsl_mc_pool_type type;
s32 id;
void *data;
struct fsl_mc_resource_pool *parent_pool;
struct list_head node;
};
/**
* struct fsl_mc_device_irq - MC object device message-based interrupt
* @virq: Linux virtual interrupt number
* @mc_dev: MC object device that owns this interrupt
* @dev_irq_index: device-relative IRQ index
* @resource: MC generic resource associated with the interrupt
*/
struct fsl_mc_device_irq {
unsigned int virq;
struct fsl_mc_device *mc_dev;
u8 dev_irq_index;
struct fsl_mc_resource resource;
};
#define to_fsl_mc_irq(_mc_resource) \
container_of(_mc_resource, struct fsl_mc_device_irq, resource)
/* Opened state - Indicates that an object is open by at least one owner */
#define FSL_MC_OBJ_STATE_OPEN 0x00000001
/* Plugged state - Indicates that the object is plugged */
#define FSL_MC_OBJ_STATE_PLUGGED 0x00000002
/**
* Shareability flag - Object flag indicating no memory shareability.
* the object generates memory accesses that are non coherent with other
* masters;
* user is responsible for proper memory handling through IOMMU configuration.
*/
#define FSL_MC_OBJ_FLAG_NO_MEM_SHAREABILITY 0x0001
/**
* struct fsl_mc_obj_desc - Object descriptor
* @type: Type of object: NULL terminated string
* @id: ID of logical object resource
* @vendor: Object vendor identifier
* @ver_major: Major version number
* @ver_minor: Minor version number
* @irq_count: Number of interrupts supported by the object
Annotation
- Immediate include surface: `linux/device.h`, `linux/mod_devicetable.h`, `linux/interrupt.h`, `uapi/linux/fsl_mc.h`.
- Detected declarations: `struct irq_domain`, `struct msi_domain_info`, `struct fsl_mc_device`, `struct fsl_mc_io`, `struct fsl_mc_driver`, `struct fsl_mc_resource`, `struct fsl_mc_device_irq`, `struct fsl_mc_obj_desc`, `struct fsl_mc_device`, `struct mc_cmd_header`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.