STRUCT RZ_MTU3_CNT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct rz_mtu3_cnt(9)

okay so bestie, welcome to the Kernel API Manual β€” today's main character is struct rz_mtu3_cnt, aka the MTU3 counter private data. she's holding all the counter's little secrets and we're about to go through every single one, no skipping, periodt ✨


πŸŽ€ NAME πŸŽ€

struct rz_mtu3_cnt β€” MTU3 counter private data. that's it, that's the vibe. it's the struct that keeps the counter's private stuff, well… private 😌


🌸 SYNOPSIS 🌸

here's the whole glow-up, exactly as it lives in the kernel, no edits, no cap:

struct rz_mtu3_cnt {
    struct clk *clk;
    struct mutex lock;
    struct rz_mtu3_channel *ch;
    bool count_is_enabled[RZ_MTU3_MAX_LOGICAL_CNTR_CHANNELS];
    union {
      u16 mtu_16bit_max[RZ_MTU3_MAX_HW_CNTR_CHANNELS];
      u32 mtu_32bit_max;
    };
 };

look at her. absolutely iconic. now let's meet the members one by one 🫢


πŸ‘‘ Members πŸ‘‘

  • clk β€” the MTU3 module clock. she keeps time, literally πŸ’…
  • lock β€” a lock that stops concurrent access from messing with the ceiling and the count at the same time. it's giving bodyguard energy fr fr πŸ”₯
  • ch β€” the HW channels for the counters. the whole squad of hardware channels, right here πŸ¦‹
  • count_is_enabled β€” the enabled state of the Counter value channel. basically a little "are we on?" checklist per channel βœ…
  • {unnamed_union} β€” anonymous. yes, she has no name. mysterious, lowkey main character energy πŸ™ˆ
  • mtu_16bit_max β€” cache for 16-bit counters πŸ“
  • mtu_32bit_max β€” cache for 32-bit counters 🧚
quick reminder bestie: mtu_16bit_max and mtu_32bit_max are chilling inside that anonymous union, so they're sharing the same space β€” that's just how the struct is written, iykyk πŸ’œ

⭐ SEE ALSO ⭐

  • Kernel file ./drivers/counter/rz-mtu3-cnt.c β€” go read the source, she's right there πŸ’–

and that's the whole page, bestie!! this lil beauty comes to you from ./drivers/counter, dated October 2026, and she answers to the name struct rz_mtu3_cnt(9). mwah πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from