From 9ff6f390b9584e2b6e08a08096abc386d7832adb Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Fri, 16 Mar 2012 16:08:09 -0700 Subject: [PATCH] Remove code for skipping duplicate port 80 writes The kernel no longer uses port 80 as a delay mechanism, so we don't need to detect the no-longer-present spammy writes. Signed-off-by: Randall Spangler BUG=chrome-os-partner:7972 TEST=port80 scroll, then boot the system. see a few repeated bytes, but not piles of 00 and ff's. Change-Id: Id14dc43ab4e1b15c6bab99a17c062f295a59e7e6 --- board/link/board.h | 5 ----- common/port80.c | 17 ++++------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/board/link/board.h b/board/link/board.h index 4e75dd7e28..72a7e7bd7b 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -55,11 +55,6 @@ /* LPC COMx I/O address (in x86 I/O address space) */ #define LPC_COMX_ADDR 0x3f8 /* COM1 */ -/* Define the following to print repeated duplicate port 80 writes. Normally - * we only print the port 80 value when it changes, because the kernel spams - * port 80 with repeated writes as a delay mechanism. */ -#define CONFIG_PORT80_PRINT_DUPLICATES - /* ADC inputs */ /* TODO: assign real ADC inputs */ #define ADC_IN0 11 /* Charger current */ diff --git a/common/port80.c b/common/port80.c index 34b418d76d..331ea23a48 100644 --- a/common/port80.c +++ b/common/port80.c @@ -20,19 +20,10 @@ static int scroll = 0; void port_80_write(int data) { -#ifndef CONFIG_PORT80_PRINT_DUPLICATES - static int last_data = -1; /* Last data written to port 80 */ - - /* Ignore duplicate writes, since the linux kernel writes to port 80 - * as a delay mechanism during boot. */ - if (data == last_data) - return; - - last_data = data; -#endif - - /* TODO: post to SWI and print from there? This currently - * prints from inside the LPC interrupt itself. */ + /* Note that this currently prints from inside the LPC interrupt + * itself. Probably not worth the system overhead to buffer the data + * and print it from a task, because we're printing a small amount of + * data and uart_printf() doesn't block. */ uart_printf("%c[Port 80: 0x%02x]", scroll ? '\n' : '\r', data); history[head] = data;