[coreboot] [PATCH] rework keyboard driver
Stefan Reinauer
stepan at coresystems.de
Sat Oct 24 20:16:51 CEST 2009
Myles Watson wrote:
>
>
> 2009/10/23 Stefan Reinauer <stepan at coresystems.de
> <mailto:stepan at coresystems.de>>
>
> Index: src/pc80/keyboard.c
> ===================================================================
> --- src/pc80/keyboard.c (revision 4832)
> +++ src/pc80/keyboard.c (working copy)
> @@ -26,13 +26,47 @@
> #include <arch/io.h>
> #include <delay.h>
>
> +#define KBD_DATA 0x60
> +#define KBD_COMMAND 0x64
> +#define KBD_STATUS 0x64
>
> if (!timeout) {
> printk_err("Couldn't cleanup the keyboard
> controller buffers\n");
> - printk_err("0x64: 0x%x, 0x60: 0x%x\n", inb(0x64),
> inb(0x60));
> + printk_err("Status (0x64): 0x%x, Buffer (0x60):
> 0x%x\n",
>
> could be printk_err("Status (0x%x)...
> KBD_STATUS, KBD_DATA,
>
> I think we should have it be a number or a #define everywhere.
Fixed.
>
> + inb(KBD_STATUS), inb(KBD_DATA));
>
>
> @@ -194,6 +247,8 @@
> {
> if ((port0 == 0x60) && (port1 == 0x64)) {
>
> Same thing here, right?
I like the idea, but ... Shouldn't we drop that whole function instead?
It's a runtime check for compile time settings, which generally sounds
like a bad idea.
Committed as r4842
More information about the coreboot
mailing list