[LinuxBIOS] [PATCH] flashrom patch for iwill dk8_htx

Uwe Hermann uwe at hermann-uwe.de
Fri Apr 27 00:38:37 CEST 2007


On Thu, Apr 26, 2007 at 06:24:06PM +0200, Mondrian Nuessle wrote:
> The attached patch enables flashing on the Iwill DK8-HTX board.
> Basically, it configures the SuperIO to set the right GPIO pins, so
> write protection is disabled.
> 
> Signed-off-by: Mondrian Nuessle <nuessle at uni-mannheim.de>
> ---
> 
> So, this is the second try :-)
> Only pci vendor id/device id is given, no subsystem id. Therefor,
> flashing when booted from factory BIOS will only work, if -m
> iwill:dk8_htx switch is given. I guess this could go in the wiki doc to
> this board...

And in the flashrom README, yes.

 
> Index: util/flashrom/board_enable.c
> ===================================================================
> --- util/flashrom/board_enable.c	(revision 2618)
> +++ util/flashrom/board_enable.c	(working copy)
> @@ -23,6 +23,56 @@
>  #include "flash.h"
>  #include "debug.h"
>  
> +static int board_iwill_dk8htx(char *name)

I think this can be
  const char *name
as you never modify 'name' (or use it at all).


> +{
> +	/* Extended function index register, either 0x2e or 0x4e    */

On what does this depend? Can it be detected at runtime? If so, we
should "probe" the value and handle both cases.


> +#define EFIR 0x2e
> +	/* Extended function data register, one plus the index reg. */
> +#define EFDR EFIR + 1
> +	char b;
> +
> +        /*  Disable the flash write protect.  The flash write protect is
> +         *  connected to the WinBond w83627hf GPIOs
> +         */
> +	outb(0x87, EFIR); /* sequence to unlock extended functions */
> +	outb(0x87, EFIR);
> +	
> +	/* activate logical devie */

device


> +	outb(0x7,EFIR);
> +	outb(8,EFDR);

Space after comma (and other stuff Luc mentioned in his mail). Please
use the Linux kernel coding style and/or run your code through indent,
see http://linuxbios.org/Development_Guidelines#Coding_Style.

(yes, I know, lots of code currently in LinuxBIOS does not yet follow
those guidelines, but we're slowly moving towards that direction)


> +	/*lock extended function sagain */

Typo.


Otherwise the patch looks good, but I cannot test it on real hardware,
of course.


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070427/8d84777a/attachment.sig>


More information about the coreboot mailing list