STRUCT CDNS2_USB_REGS(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… struct cdns2_usb_regs(9) โ€” the USB controller registers, bestie

okay so this is a page from the Kernel API Manual, section 9, and it's literally all about struct cdns2_usb_regs โ€” aka the USB controller registers ๐ŸŽ€. ngl it's a glorified treasure map of memory offsets where every field is either a real register or a big ol' pile of reserved padding (we respect the padding, she's doing her job ๐Ÿ’€).


โœจ SYNOPSIS โœจ

here's the whole struct, character for character, no cap:

struct cdns2_usb_regs {
    __u8 reserved[4];
    __u16 lpmctrl;
    __u8 lpmclock;
    __u8 reserved2[411];
    __u8 endprst;
    __u8 usbcs;
    __le16 frmnr;
    __u8 fnaddr;
    __u8 clkgate;
    __u8 fifoctrl;
    __u8 speedctrl;
    __u8 sleep_clkgate;
    __u8 reserved3[533];
    __u8 cpuctrl;
 };

likeโ€ฆ look at her. the gaps are structural, she's not messy, she's intentional ๐Ÿซถ.


๐ŸŒธ Members ๐ŸŒธ (the field-by-field vibe check)

  • reserved โ€” reserved. that's it, that's the whole personality. hands off ๐Ÿ™ˆ
  • lpmctrl โ€” LPM control register ๐Ÿ”ฅ
  • lpmclock โ€” LPM clock register โฐ
  • reserved2 โ€” reserved. a whole 411 bytes of "please don't touch" energy ๐Ÿ’€
  • endprst โ€” endpoint reset register ๐Ÿงน
  • usbcs โ€” USB control and status register ๐Ÿ‘‘
  • frmnr โ€” USB frame counter register (she's __le16, so little-endian, mwah) ๐Ÿ’–
  • fnaddr โ€” function Address register ๐Ÿ“ฎ
  • clkgate โ€” clock gate register ๐Ÿšช
  • fifoctrl โ€” FIFO control register ๐Ÿ“
  • speedctrl โ€” speed Control register ๐ŸŽ๏ธ
  • sleep_clkgate โ€” sleep Clock Gate register ๐Ÿ˜ด
  • reserved3 โ€” reserved. and this one is 533 bytes, she's long, we stan a padding queen ๐Ÿ’…
  • cpuctrl โ€” microprocessor control register ๐Ÿง 

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

the whole friend group lives in the kernel file ./drivers/usb/gadget/udc/cdns2/cdns2-gadget.h, so go say hi to:

  • struct cdns2_ep0_regs(9)
  • struct cdns2_epx_base(9)
  • struct cdns2_epx_regs(9)
  • struct cdns2_interrupt_regs(9)
  • struct cdns2_adma_regs(9)
  • struct cdns2_trb(9)
  • struct cdns2_ring(9)
  • struct cdns2_endpoint(9)
  • struct cdns2_request(9)
  • struct cdns2_device(9)
bestie warning: these are all cross-references to other structs, not extra fields โ€” don't go looking for them inside this one ๐Ÿ™ˆ

๐ŸŽ€ the cute sign-off ๐ŸŽ€

this masterpiece ships from ./drivers/usb/gadget/udc/cdns2 and it's dated October 2026 โ€” yeah, time traveler behavior โœจ๐Ÿฆ‹ she's iconic, she's struct cdns2_usb_regs(9), and she ate. periodt. ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from