STRUCT EP93XX_SPI(9)
π struct ep93xx_spi(9) π
okay so first things first, bestie: this is a page from the Kernel API Manual, and it's literally all about struct ep93xx_spi, aka the EP93xx SPI controller structure. yes, the actual struct. the whole vibe is "here's the struct, here's every field, don't touch anything you don't understand." iconic behavior honestly π
β¨ NAME β¨
struct ep93xx_spi β the EP93xx SPI controller structure, no cap π¦
πΈ SYNOPSIS πΈ
here's the whole thing, character for character, do NOT come for me about the alignment:
struct ep93xx_spi {
struct clk *clk;
void __iomem *mmio;
unsigned long sspdr_phys;
size_t tx;
size_t rx;
size_t fifo_level;
struct dma_chan *dma_rx;
struct dma_chan *dma_tx;
struct sg_table rx_sgt;
struct sg_table tx_sgt;
void *zeropage;
};
she's got range, she's got pointers, she's got a void * at the end like a little mystery π΅οΈββοΈ
π Members π
okay now the part you actually came for β the member-by-member breakdown. every single one. let's go π₯
clkβ the clock for the controller. the heartbeat. the main character energy of the whole struct β°mmioβ pointer to theioremap'd registers. that's where the actual hardware lives, bestie, so handle with care π«Άsspdr_physβ the physical address of theSSPDRregister. like a home address but for a register πtxβ the current byte in the transfer that needs to transmit. she's sending π€rxβ the current byte in the transfer that needs to receive. she's receiving π₯fifo_levelβ how full is FIFO, and the range is literally0..SPI_FIFO_SIZE - 1. important detail: receiving one frame decreases this level and sending one frame increases it. yes that's the actual direction, don't @ me πdma_rxβ the RX DMA channel. she receives, but make it hardware πdma_txβ the TX DMA channel. she transmits, but make it hardware β¨rx_sgtβ the sg table for RX transfers. the receipts, organized π§Ύtx_sgtβ the sg table for TX transfers. the other receipts, also organized π§Ύzeropageβ a dummy page used as the RX buffer when only the TX buffer is passed in by the client. a little stand-in, a little understudy, a little "we move" π
fr fr though: fifo_level is the one to keep your eyes on. receive one frame, level goes down. send one frame, level goes up. that's the whole mechanic, memorise it π
π¦ SEE ALSO π¦
go read these next, iykyk:
- Kernel file
./drivers/spi/spi-ep93xx.cep93xx_spi_calc_divisors(9),ep93xx_spi_read_write(9),ep93xx_spi_dma_prepare(9),ep93xx_spi_dma_finish(9)
that's the whole page, bestie, you ate it up π this little masterpiece lives in ./drivers/spi, dated October 2026, and it's filed under struct ep93xx_spi(9) β anyway mwah, go read your kernel source, 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