STRUCT MTK_PCIE_PORT(9)
πΈ NAME πΈ
okay so bestie, this is the struct mtk_pcie_port page from the Kernel API Manual β it's literally just "PCIe port information" β¨ like that's the whole vibe, one single port, all its clocks and IRQs and everything, wrapped up in one struct π
β¨ SYNOPSIS β¨
here's the whole thing, character for character, no cap:
struct mtk_pcie_port {
void __iomem *base;
phys_addr_t phys_base;
struct list_head list;
struct mtk_pcie *pcie;
struct reset_control *reset;
struct clk *sys_ck;
struct clk *ahb_ck;
struct clk *axi_ck;
struct clk *aux_ck;
struct clk *obff_ck;
struct clk *pipe_ck;
struct phy *phy;
u32 slot;
int irq;
struct irq_domain *irq_domain;
struct irq_domain *inner_domain;
struct mutex lock;
unsigned long msi_irq_in_use[BITS_TO_LONGS( MTK_MSI_IRQS_NUM)];
};
π Members π
okay let's go through these one by one, grab a snack π
baseβ IO mapped register base. where the registers actually live in memory, mapped in πΊοΈphys_baseβ Physical address of the I/O register base region. the real, physical address, not the mapped-in one, iykyklistβ port list. it's alist_head, so this port is chained up with the others πpcieβ pointer to PCIe host info. it points back at the biggermtk_pciesituation πresetβ pointer to port reset control. this one's the reset handle for the port πsys_ckβ pointer to transaction/data link layer clock. the transaction / data link layer clock β°ahb_ckβ pointer to AHB slave interface operating clock for CSR access and RC initiated MMIO access. so it's the AHB slave interface operating clock, and it covers CSR access and RC-initiated MMIO access, both π«Άaxi_ckβ pointer to application layer MMIO channel operating clock. the application layer MMIO channel clock πaux_ckβ pointer to pe2_mac_bridge and pe2_mac_core operating clock when pcie_mac_ck/pcie_pipe_ck is turned off. ok so this one is thepe2_mac_bridgeandpe2_mac_coreoperating clock, and specifically for whenpcie_mac_ck/pcie_pipe_ckis turned off πobff_ckβ pointer to OBFF functional block operating clock. yep, the OBFF functional block's clock β¨pipe_ckβ pointer to LTSSM and PHY/MAC layer operating clock. the LTSSM and PHY/MAC layer clock, she does a lot πphyβ pointer to PHY control block. points at the PHY control block π§slotβ port slot. it's au32, it's the port's slot number π’irqβ GIC irq. anint, and it's the GIC irq π¨irq_domainβ legacy INTx IRQ domain. legacy INTx, periodt πinner_domainβ inner IRQ domain. the inner one πlockβ protect the msi_irq_in_use bitmap. it's astruct mutex, and its whole job is guarding that bitmap πmsi_irq_in_useβ bit map for assigned MSI IRQ. typedunsigned long msi_irq_in_use[BITS_TO_LONGS( MTK_MSI_IRQS_NUM)]β one bit per MSI IRQ, tracking what's assigned π
π SEE ALSO π
go read these next, bestie, they're all in Kernel file ./drivers/pci/controller/pcie-mediatek.c:
enum mtk_pcie_quirks(9)struct mtk_pcie_soc(9)struct mtk_pcie(9)mtk_pcie_retrain(9)
and that's the whole page, no notes π
this cutie lives in ./drivers/pci/controller, dated October 2026, and it's struct mtk_pcie_port(9) all day long β go read the source and slay π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms