OT200: bring LEDs into a defined state

Keep in mind that we can _NOT_ read back the current state
of the LEDS as some crazy FPGA designer wanted it that way.

Change-Id: I5cd1ac598072318b3234d1ec35a79271655b46ac
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-on: http://review.coreboot.org/3271
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Christian Gmeiner 2013-05-23 13:26:37 +02:00
parent 641f00ce64
commit 1990ab9f15
1 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <smbios.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <arch/io.h>
/* overwrite a weak function to fill SMBIOS table with a custom value */
static u8 hw_rev = 0;
@ -52,6 +53,14 @@ static void init(struct device *dev)
return;
}
/* turn off all leds except led_ini */
outb(0x02, 0x5a); /* bit0 - led_run */
/* bit1 - led_ini */
/* bit2 - led_err */
/* bit3-bit7 - write has no effect */
outb(0x00, 0x49); /* bit0-bit6 - led_7-led_1 */
/* bit7 - write has no effect */
/* read the whole block and check if checksum is okay */
for (i = 0; i < 20; i++) {
block[i] = smbus_read_byte(eeprom_dev, i);