STRUCT ZYNQMP_QSPI(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct zynqmp_qspi (9) β€” Kernel API Manual, but make it cute ✨

okay so bestie, we're deep in the kernel docs rn β€” this one's from the Kernel API Manual shelf, and it's literally the entire personality of the qspi driver in one struct πŸ¦‹


🌸 NAME 🌸

struct zynqmp_qspi β€” no cap, this is the struct that defines the qspi driver instance. it's giving "whole driver's whole life in one place" energy πŸ‘‘


✨ SYNOPSIS ✨

here's the whole thing, and yes you gotta keep every single field exactly as written, i don't make the rules (i do, but still):

struct zynqmp_qspi {
    struct spi_controller *ctlr;
    void __iomem *regs;
    struct clk *refclk;
    struct clk *pclk;
    int irq;
    struct device *dev;
    const void *txbuf;
    void *rxbuf;
    int bytes_to_transfer;
    int bytes_to_receive;
    u32 genfifocs;
    u32 genfifobus;
    u32 dma_rx_bytes;
    dma_addr_t dma_addr;
    u32 genfifoentry;
    enum mode_type mode;
    struct completion data_completion;
    struct mutex op_lock;
    u32 speed_hz;
    bool has_tapdelay;
 };

slay, now let's meet the members 🫢


πŸŽ€ Members πŸŽ€

  • ctlr β€” pointer to the spi controller information. yes queen, this is the controller hookup πŸ’–
  • regs β€” the virtual address of the QSPI controller registers. this is where the hardware lives in your address space 🏠
  • refclk β€” pointer to the peripheral clock ⏰
  • pclk β€” pointer to the APB clock ⏰✨
  • irq β€” the IRQ number. interrupts incoming, bestie πŸ”₯
  • dev β€” pointer to struct device 🧚
  • txbuf β€” pointer to the TX buffer πŸ“€
  • rxbuf β€” pointer to the RX buffer πŸ“₯
  • bytes_to_transfer β€” number of bytes left to transfer. ticking down like a countdown 😭
  • bytes_to_receive β€” number of bytes left to receive. same energy, other direction πŸ™ˆ
  • genfifocs β€” used for chip select 🎯
  • genfifobus β€” used to select the upper or lower bus πŸ›£οΈ
  • dma_rx_bytes β€” remaining bytes to receive by DMA mode. DMA said "i'll take it from here" πŸ’€
  • dma_addr β€” the DMA address after mapping the kernel buffer πŸ—ΊοΈ
  • genfifoentry β€” used for storing the genfifoentry instruction. literally in the name, iykyk ✨
  • mode β€” defines the mode in which QSPI is operating, type enum mode_type πŸŽ›οΈ
  • data_completion β€” completion structure. it's the "wait for it… wait for it…" girlie ⏳
  • op_lock β€” operational lock. one at a time, bestie, no cutting the line πŸ”’
  • speed_hz β€” current SPI bus clock speed in hz ⚑
  • has_tapdelay β€” used for tapdelay register available in qspi. a whole bool for the vibe check βœ…

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file, and then like… the entire extended friend group of functions, all here, all icons πŸ‘‘:

Kernel file ./drivers/spi/spi-zynqmp-gqspi.c struct


fr fr, if you're poking at this struct you're already deep in ./drivers/spi territory, so good luck and hydrate πŸ’§

and that's the page bestie β€” source path ./drivers/spi, dated October 2026 in the footer, struct zynqmp_qspi(9) the whole way through. mwah πŸ’‹ periodt. 🌈✨

πŸ“¦ where this page comes from