__ssp_update_baud_rate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

__ssp_update_baud_rate β€” bestie, this is the one that sets the UART "baud rate" πŸ’…

So like, quick context: this little icon lives in the Kernel API Manual (manual name: __ssp_update_baud_rate(9), section 9 obviously 😌), and she's here to help you dial in exactly how fast your SiFive UART talks. Let's get into it 🫢


🌸 SYNOPSIS 🌸

void __ssp_update_baud_rate (struct sifive_serial_port *ssp , unsigned
int rate );

That's it. Two args. No drama. She takes a pointer and a number and slays ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ssp β€” pointer to a struct sifive_serial_port πŸ’– like, this is your UART's whole personality, okay? You're handing her the actual port struct so she knows what she's working with.
  • rate β€” new target bit rate πŸŽ€ the speed you want your UART to hit, ngl.

πŸ’œ DESCRIPTION πŸ’œ

Okay so here's the vibe: __ssp_update_baud_rate calculates the UART divisor value for the target bit rate rate β€” specifically for the SiFive UART described by ssp β€” and then programs it into the UART πŸ”₯ like, does the math, writes the value, done. Iconic behavior, fr fr.

Now, real talk πŸ™ˆ β€” there may be some error between the target bit rate and the actual bit rate the UART ends up implementing. Why? clock ratio granularity, bestie. It's giving "we did our best with the numbers we had" 😭. So don't come for her if the actual speed is a tiny bit off from what you asked for β€” that's just how the clock ratios divide, periodt. πŸ’€

No cap: the divisor is computed from granularity-limited clock ratios, so a small mismatch between rate and reality is expected and baked into the deal ✨

🌈 SEE ALSO 🌈

Like, go read these next, they're all part of the same friend group 🫢:


And that's the whole page, bestie πŸ’– one last thing β€” this lil doc comes from ./drivers/tty/serial and it's dated October 2026 πŸ“…πŸ¦‹ so you know it's fresh. Go forth and configure your UARTs, you gorgeous nerd πŸ‘‘βœ¨πŸŽ€

πŸ“¦ where this page comes from