Memtest86+: Refactor serial port code to reduce global variables
The serial port code in lib.c used global variables all over the
place. Instead, constrict all the serial related variables to one
global structure, and only allow the top-level functions to access
it. Since we're at it, I've also reversed the order of arguments in
the serial register accessors to be consistent with C syntax.
The main motivation behind this is to enable support MMIO UARTS, which
are almost impossible to escape nowadays.
Stay tuned (or read next patch).
Signed-off-by: Alexandru Gagniuc <email@example.com>
Tested-by: build bot (Jenkins) <firstname.lastname@example.org>
Reviewed-by: Stefan Reinauer <email@example.com>
1 file changed