STRUCT MTK_PCIE_SOC(9)
π struct mtk_pcie_soc(9) β like, the whole vibe
okay bestie, gather round, because we're talking about struct mtk_pcie_soc from the Kernel API Manual, and honestly? she's a whole personality test for MediaTek PCIe hosts. the way this struct exists purely to differentiate between host generations? iconic. periodt. πΈ
β¨ NAME β¨
struct mtk_pcie_soc β differentiate between host generations
(yeah that's it, that's the job. she tells you which generation you're on, no cap π«Ά)
π SYNOPSIS π
struct mtk_pcie_soc {
unsigned int device_id;
struct pci_ops *ops;
int (*startup)(struct mtk_pcie_port *port);
int (*setup_irq)(struct mtk_pcie_port *port, struct device_node
*node);
enum mtk_pcie_quirks quirks;
};
like, look at her. five fields. clean lines. main character energy fr fr π
π¦ Members π¦
not me listing every single one because every single one MATTERS:
device_idβ the device ID which this host need to be fixed. lowkey the whole reason she's here π―opsβ pointer to configuration access functions. this is where the config-space touching happens, iykyk β¨startupβ pointer to controller setting functions. she gets the controller up and running πsetup_irqβ pointer to initialize IRQ functions. interrupts don't set themselves up, bestie πquirksβ PCIe device quirks. the β¨special little exceptionsβ¨, and yes,struct mtk_pcie_soc'squirksfield is of typeenum mtk_pcie_quirksβ say that five times fast π
ngl, this is a function-pointer kinda struct. every field is either an ID, a pointer, or an enum. no sneaky surprises. we love a predictable queen π
π 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_port(9)struct mtk_pcie(9)mtk_pcie_retrain(9)
and that's the whole page, mwah π this one lives over in ./drivers/pci/controller, dated October 2026, and it's page struct mtk_pcie_soc(9) of the Kernel API Manual β go off, you gorgeous function-pointer-filled struct πβ¨π¦
π¦ 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