STRUCT FALCON_SPI_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct falcon_spi_device β€” okay bestie, this is literally a Falcon SPI (Serial Peripheral Interface) device πŸŽ€ like, the whole lil' descriptor for one SPI chip hanging off the controller. We're in the Kernel API Manual today, so buckle up πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the glow-up, the actual struct, no cap:

struct falcon_spi_device {
    int device_id;
    unsigned int size;
    unsigned int addr_len;
    unsigned int munge_address:1;
    u8 erase_command;
    unsigned int erase_size;
    unsigned int block_size;
};

Seven fields. Every single one matters. Let's go 🫢


πŸ’– Members πŸ’–

  • device_id β€” the controller's own id for this device, iykyk. That's the controller's id for the device, fr fr.
  • size β€” the size, in bytes πŸ’› plain and simple.
  • addr_len β€” how many address bytes show up in the read/write commands. Count them, bestie.
  • munge_address β€” a 1-bit flag asking: should addresses get munged? πŸ™ˆ Some devices with 9-bit addresses (the example the docs give is the AT25040A EEPROM) use bit 3 of the command byte as address bit A8, instead of doing a whole two-byte address situation. So if this flag is set, then commands should be munged in this way. Iconic little hack, honestly ✨
  • erase_command β€” the erase command itself, or 0 if sector erase isn't needed. Zero means "not today" πŸ’€
  • erase_size β€” erase sector size, in bytes. Erase commands affect sectors with this size and alignment. This must be a power of two. Not optional, bestie, the kernel will not be cute about it 😭
  • block_size β€” write block size, in bytes. Write commands are limited to blocks with this size and alignment. Respect the blocks 🧚

🌈 SEE ALSO 🌈

Peep the kernel file ./drivers/net/ethernet/sfc/falcon/nic.h πŸ‘€ and also go say hi to:

  • struct falcon_board_type(9)
  • struct falcon_board(9)
  • struct falcon_nic_data(9)

And that's the whole page, bestie! πŸŽ€ This one lives in ./drivers/net/ethernet/sfc/falcon, dated October 2026, and it's filed under struct falcon_spi_device(9) β€” so when you need it again you know exactly where to look πŸ’œβ­πŸ’…

πŸ“¦ where this page comes from