STRUCT AMD_SPI(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct amd_spi(9) β€” like, the whole vibe

okay bestie, welcome to the Kernel API Manual, section 9, and today's main character is struct amd_spi πŸŽ€ β€” the SPI driver instance. yes, that one. it's giving "small struct, big responsibilities" and honestly? we're obsessed.


✨ NAME ✨

struct amd_spi β€” the SPI driver instance, fr fr πŸ¦‹


🌸 SYNOPSIS 🌸

struct amd_spi {
    void __iomem *io_remap_addr;
    dma_addr_t phy_dma_buf;
    void *dma_virt_addr;
    enum amd_spi_versions version;
    unsigned int speed_hz;
 };

no cap, that's the entire struct. five fields. five little besties. let's meet them πŸ’–


πŸ‘‘ Members πŸ‘‘

  • io_remap_addr β€” the start address of the SPI controller registers. like, where the registers live. the address. the beginning of it. plot twist: it's a void __iomem * 😌
  • phy_dma_buf β€” the physical address of the DMA buffer. physical, as in the real one, not the fake virtual one. iykyk πŸ’…
  • dma_virt_addr β€” the virtual address of the DMA buffer. yes, it's the other address for the same buffer. they're twins. siblings, if you will. 🫢
  • version β€” the SPI controller hardware version. it's typed as enum amd_spi_versions, which lowkey is the whole reason there's a cross-reference down there πŸ‘€
  • speed_hz β€” the device frequency. in hertz. unsigned int hertz. she's fast, she's unsigned, she's iconic ⭐

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/spi/spi-amd.h
  • enum amd_spi_versions(9)

go read the enum too, bestie, it's literally right there and it's referenced by one of the members so you kind of have to. not me being a good influence for once 😭


πŸ’€ reminder: the physical address and the virtual address are not the same thing and you cannot just swap them. do not do it. i'm begging. πŸ™ˆ

and that's the page!! mwah πŸ“ this came to you from ./drivers/spi, dated October 2026, and it's struct amd_spi(9) forever and ever, periodt πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from