[coreboot] [commit] r6478 - trunk/src/mainboard/lenovo/x60

Stefan Reinauer stefan.reinauer at coreboot.org
Mon Apr 4 21:59:49 CEST 2011


Sven, could you put this in a separate function called by mainboard
enable? e.g. print_ec_version() or some such.

* repository service <svn at coreboot.org> [110404 14:33]:
> Modified: trunk/src/mainboard/lenovo/x60/mainboard.c
> ==============================================================================
> --- trunk/src/mainboard/lenovo/x60/mainboard.c	Mon Apr  4 12:57:17 2011	(r6477)
> +++ trunk/src/mainboard/lenovo/x60/mainboard.c	Mon Apr  4 14:33:54 2011	(r6478)
> @@ -51,7 +51,24 @@
>  
>  static void mainboard_enable(device_t dev)
>  {
> +	unsigned char ecfw[9], c;
> +	u16 fwvh, fwvl;
>  	device_t dev0;
> +	int i;
> +
> +	for(i = 0; i < 8; i++) {
> +		c = ec_read(0xf0 + i);
> +		if (c < 0x20 || c > 0x7f)
> +			break;
> +		ecfw[i] = c;
> +	}
> +	ecfw[i] = '\0';
> +
> +	fwvh = ec_read(0xe9);
> +	fwvl = ec_read(0xe8);
> +
> +	printk(BIOS_INFO, "EC Firmware ID %s, Version %d.%d%d%c\n", ecfw,
> +	       fwvh >> 4, fwvh & 0x0f, fwvl >> 4, 0x41 + (fwvl & 0xf));
>  
>  	backlight_enable();
>  	trackpoint_enable();
> 
> -- 
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
> 




More information about the coreboot mailing list