STRUCT D40_BASE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so welcome to the Kernel API Manual page for struct d40_base(9) β€” the big global struct, one for each probe'd instance. she's literally the main-character global struct of this driver, one per probe'd instance, no cap. πŸ’…

✨ SYNOPSIS ✨

struct d40_base {
    spinlock_t interrupt_lock;
    spinlock_t execmd_lock;
    struct device                    *dev;
    void __iomem                     *virtbase;
    u8 rev:4;
    struct clk                       *clk;
    int irq;
    int num_memcpy_chans;
    int num_phy_chans;
    int num_log_chans;
    struct dma_device                 dma_both;
    struct dma_device                 dma_slave;
    struct dma_device                 dma_memcpy;
    struct d40_chan                  *log_chans;
    struct d40_chan                 **lookup_log_chans;
    struct d40_chan                 **lookup_phy_chans;
    struct stedma40_platform_data    *plat_data;
    struct regulator                 *lcpa_regulator;
    struct d40_phy_res               *phy_res;
    struct d40_lcla_pool              lcla_pool;
    void *lcpa_base;
    dma_addr_t phy_lcpa;
    resource_size_t lcpa_size;
    struct kmem_cache                *desc_slab;
    u32 reg_val_backup[BACKUP_REGS_SZ];
    u32 reg_val_backup_v4[BACKUP_REGS_SZ_MAX];
    u32 *reg_val_backup_chan;
    u32 *regs_interrupt;
    u16 gcc_pwr_off_mask;
    struct d40_gen_dmac               gen_dmac;
    struct d40_chan                  phy_chans[];
};

πŸŽ€ Members πŸŽ€

  • interrupt_lock β€” the lock used to make sure one interrupt is handled at a time. one interrupt at a time, bestie, no interrupt pile-up. ✨
  • execmd_lock β€” lock for execute command usage, because several channels share the same physical register. shared register, shared lock, we love to see it. 🫢
  • dev β€” the device structure. iconic little pointer to the device, periodt. πŸ’–
  • virtbase β€” the virtual base address of the DMA's register. the vibes are virtual and the address is base. 🌸
  • rev β€” silicon revision detected. yes, she checked the silicon's revision, no cap. πŸ’…
  • clk β€” pointer to the DMA clock structure. clock structure pointer, slay. πŸ•°οΈ
  • irq β€” the IRQ number. just the IRQ number, bestie, keep it moving. ⚑
  • num_memcpy_chans β€” the number of channels used for memcpy (mem-to-mem transfers). mem-to-mem transfers have their own channel count. πŸ“
  • num_phy_chans β€” the number of physical channels. read from HW. this is the number of available channels for this driver, not counting "Secure mode" allocated physical channels. so real, so hardware, so read-from-HW. πŸ”₯
  • num_log_chans β€” the number of logical channels. calculated from num_phy_chans. math but make it channels. 🧚
  • dma_both β€” dma_device channels that can do both memcpy and slave transfers. both? she ate. πŸ‘‘
  • dma_slave β€” dma_device channels that can only do slave transfers. slave transfers only, no multitasking. πŸ’œ
  • dma_memcpy β€” dma_device channels that can only do memcpy transfers. memcpy transfers only, focused queen. πŸŽ€
  • log_chans β€” room for all possible logical channels in system. room for every possible logical channel, bestie. 🌈
  • lookup_log_chans β€” used to map interrupt number to logical channel. points to log_chans entries. interrupt number to logical channel, iconic mapping behavior. πŸ”Ž
  • lookup_phy_chans β€” used to map interrupt number to physical channel. points to phy_chans entries. interrupt number to physical channel, same energy, physical version. πŸ”Ž
  • plat_data β€” pointer to provided platform_data which is the driver configuration. provided platform data, driver configuration, periodt. 🫢
  • lcpa_regulator β€” pointer to hold the regulator for the esram bank for lcla. regulator for the esram bank for lcla, not me mixing up lcla and lcpa, iykyk. πŸ’€
  • phy_res β€” vector containing all physical channels. all the physical channels, vectorized and ready. πŸ¦‹
  • lcla_pool β€” lcla pool settings and data. pool settings and data, lowkey important. 🌊
  • lcpa_base β€” the virtual mapped address of LCPA. virtual mapped address, LCPA girlie. πŸ’«
  • phy_lcpa β€” the physical address of the LCPA. physical address of the LCPA, literally. πŸ“
  • lcpa_size β€” the size of the LCPA area. the LCPA area has a size and this is it. πŸ“
  • desc_slab β€” cache for descriptors. descriptor cache, slay. 🧺
  • reg_val_backup β€” here the values of some hardware registers are stored before the DMA is powered off. they are restored when the power is back on. power-off backup, power-on restore, we love a comeback. πŸ”
  • reg_val_backup_v4 β€” backup of registers that only exits on dma40 v3 and later. yes, that's what the page says, bestie β€” v3 and later. πŸ’Ύ
  • reg_val_backup_chan β€” backup data for standard channel parameter registers. standard channel parameter registers get their backup data. πŸŽ’
  • regs_interrupt β€” scratch space for registers during interrupt. interrupt-time scratch space, no cap. πŸ—‚οΈ
  • gcc_pwr_off_mask β€” mask to maintain the channels that can be turned off. mask to maintain the channels that can be turned off, periodt. 🎭
  • gen_dmac β€” the struct for generic registers values to represent u8500/8540 DMA controller. generic register values for the u8500/8540 DMA controller, iconic. βš™οΈ
  • phy_chans β€” room for all possible physical channels in system. room for every possible physical channel, bestie. 🌟

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/dma/ste_dma40.c
  • struct stedma40_platform_data(9)
  • enum d40_command(9)
  • struct d40_interrupt_lookup(9)
  • struct d40_reg_val(9)
  • struct d40_lli_pool(9)
  • struct d40_desc(9)
  • struct d40_lcla_pool(9)
  • struct d40_phy_res(9)
  • struct d40_chan(9)
  • struct d40_gen_dmac(9)

mwah πŸ’‹ β€” source ./drivers/dma, date October 2026, page struct d40_base(9). bye bestie! 🫢

πŸ“¦ where this page comes from