STRUCT AMD_SPI(9)
π 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 avoid __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 asenum amd_spi_versions, which lowkey is the whole reason there's a cross-reference down there πspeed_hzβ the device frequency. in hertz.unsigned inthertz. 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
- 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