Hi,
we have several functions initializing an uart8250 port:
- void uart8250_init(unsigned base_port, unsigned divisor) - void init_uart8250(unsigned base_port, struct uart8250 *uart) - void uart_init(void)
Looking at init_uart8250() it is only used by (all) SuperIO drivers. It initializes all serial ports on a given SuperIO with the speed of 115200n8 or whatever is specified in register "com1" in devicetree.cb
I keep wondering if this is something we want to do at all? In my opinion the speed of the serial port should be set up by the OS or the application using the port. If the port is not used by coreboot, it should leave it alone (other than configuring the SuperIO to make the port usable)
Looking at the code base, most usage of the method is bogus anyways. (See below)
So I suggest to wipe the init_uart8250 from the SuperIO drivers completely, leaving us with simpler and cleaner console handling code and one less "WTF" when reading the code.
Any reasons not to wipe serial port init of unused ports?
Stefan
valid configurations:
src/mainboard/eaglelion/5bcm/devicetree.cb: register "com1" = "{115200}" src/mainboard/iei/juki-511p/devicetree.cb: register "com1" = "{115200}" src/mainboard/iei/nova4899r/devicetree.cb: register "com1" = "{115200}" src/mainboard/via/epia/devicetree.cb: register "com1" = "{CONFIG_TTYS0_BAUD}" src/mainboard/eaglelion/5bcm/devicetree.cb: register "com2" = "{38400}" src/mainboard/iei/juki-511p/devicetree.cb: register "com2" = "{115200}" src/mainboard/iei/nova4899r/devicetree.cb: register "com2" = "{115200}"
bogus configurations: src/mainboard/digitallogic/adl855pc/devicetree.cb: register "com1" = "{1}" src/mainboard/iwill/dk8s2/devicetree.cb: register "com1" = "{1}" src/mainboard/lanner/em8510/devicetree.cb: register "com1" = "{1}"
commented out configurations: src/mainboard/digitallogic/adl855pc/devicetree.cb: # register "com1" = "{1, 0, 0x3f8, 4}" src/mainboard/digitallogic/msm586seg/devicetree.cb:# register "com1" = "{1}" src/mainboard/digitallogic/msm586seg/devicetree.cb:# register "com1" = "{1, 0, 0x3f8, 4}" src/mainboard/emulation/qemu-x86/devicetree.cb:# register "com1" = "{1}" src/mainboard/emulation/qemu-x86/devicetree.cb:# register "com1" = "{1, 0, 0x3f8, 4}" src/mainboard/iwill/dk8s2/devicetree.cb: # register "com1" = "{1, 0, 0x3f8, 4}" src/mainboard/technologic/ts5300/devicetree.cb:# register "com1" = "{1}" src/mainboard/technologic/ts5300/devicetree.cb:# register "com1" = "{1, 0, 0x3f8, 4}" src/mainboard/lanner/em8510/devicetree.cb: # register "com1" = "{1, 0, 0x3f8, 4}"