STRUCT MTK_PCIE_SOC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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's quirks field is of type enum 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:


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