drivers/soc/hisilicon/kunpeng_hccs.h
Source file repositories/reference/linux-study-clean/drivers/soc/hisilicon/kunpeng_hccs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/soc/hisilicon/kunpeng_hccs.h- Extension
.h- Size
- 5406 bytes
- Lines
- 234
- Domain
- Driver Families
- Bucket
- drivers/soc
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct hccs_type_name_mapstruct hccs_port_infostruct hccs_die_infostruct hccs_chip_infostruct hccs_mbox_client_infostruct hccs_descstruct hccs_verspecific_datastruct hccs_devstruct hccs_die_num_req_paramstruct hccs_die_info_req_paramstruct hccs_die_info_rsp_datastruct hccs_port_attrstruct hccs_die_comm_req_paramstruct hccs_port_comm_req_paramstruct hccs_inc_lane_req_paramstruct hccs_link_statusstruct hccs_req_headstruct hccs_rsp_headstruct hccs_fw_inner_headstruct hccs_rsp_descstruct hccs_req_descstruct hccs_descenum hccs_port_typeenum hccs_subcmd_type
Annotated Snippet
struct hccs_type_name_map {
u8 type;
char name[HCCS_NAME_MAX_LEN + 1];
};
/*
* This value cannot be 255, otherwise the loop of the multi-BD communication
* case cannot end.
*/
#define HCCS_DIE_MAX_PORT_ID 254
struct hccs_port_info {
u8 port_id;
u8 port_type;
u8 max_lane_num;
bool enable; /* if the port is enabled */
struct kobject kobj;
bool dir_created;
struct hccs_die_info *die; /* point to the die the port is located */
};
struct hccs_die_info {
u8 die_id;
u8 port_num;
u8 min_port_id;
u8 max_port_id;
struct hccs_port_info *ports;
struct kobject kobj;
bool dir_created;
struct hccs_chip_info *chip; /* point to the chip the die is located */
};
struct hccs_chip_info {
u8 chip_id;
u8 die_num;
struct hccs_die_info *dies;
struct kobject kobj;
struct hccs_dev *hdev;
};
struct hccs_mbox_client_info {
struct mbox_client client;
struct pcc_mbox_chan *pcc_chan;
u64 deadline_us;
struct completion done;
};
struct hccs_desc;
struct hccs_verspecific_data {
void (*rx_callback)(struct mbox_client *cl, void *mssg);
int (*wait_cmd_complete)(struct hccs_dev *hdev);
void (*fill_pcc_shared_mem)(struct hccs_dev *hdev,
u8 cmd, struct hccs_desc *desc,
void __iomem *comm_space,
u16 space_size);
u16 shared_mem_size;
bool has_txdone_irq;
};
#define HCCS_CAPS_HCCS_V2_PM BIT_ULL(0)
struct hccs_dev {
struct device *dev;
struct acpi_device *acpi_dev;
const struct hccs_verspecific_data *verspec_data;
/* device capabilities from firmware, like HCCS_CAPS_xxx. */
u64 caps;
u8 chip_num;
struct hccs_chip_info *chips;
u16 used_type_num;
struct hccs_type_name_map *type_name_maps;
u8 chan_id;
struct mutex lock;
struct hccs_mbox_client_info cl_info;
};
#define HCCS_SERDES_MODULE_CODE 0x32
enum hccs_subcmd_type {
HCCS_GET_CHIP_NUM = 0x1,
HCCS_GET_DIE_NUM,
HCCS_GET_DIE_INFO,
HCCS_GET_DIE_PORT_INFO,
HCCS_GET_DEV_CAP,
HCCS_GET_PORT_LINK_STATUS,
HCCS_GET_PORT_CRC_ERR_CNT,
HCCS_GET_DIE_PORTS_LANE_STA,
HCCS_GET_DIE_PORTS_LINK_STA,
HCCS_GET_DIE_PORTS_CRC_ERR_CNT,
HCCS_GET_PORT_IDLE_STATUS,
Annotation
- Detected declarations: `struct hccs_type_name_map`, `struct hccs_port_info`, `struct hccs_die_info`, `struct hccs_chip_info`, `struct hccs_mbox_client_info`, `struct hccs_desc`, `struct hccs_verspecific_data`, `struct hccs_dev`, `struct hccs_die_num_req_param`, `struct hccs_die_info_req_param`.
- Atlas domain: Driver Families / drivers/soc.
- Implementation status: source 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.