[LinuxBIOS] flashrom on ga 2761gxdk

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Jan 9 12:28:18 CET 2008


On 09.01.2008 07:36, ron minnich wrote:
> It now finds the part, and gets ready to program it, but exits
> instantly without doing anything. I think this is the culprit:
> void generic_spi_page_program(int block, uint8_t *buf, uint8_t *bios)
> {
>         if (it8716f_flashport)
>                 it8716f_spi_page_program(block, buf, bios);
> }
>
> i.e. the flashport is not set. So, before I dig too far into this, is
> there some simple thing I should look at to get flashrom working on
> this board?
>   

Yes, set the flash port to a reasonable value during BIOS init. Since
all versions of the board will have that flash translation chip, you
probably can do that unconditionally in Config.lb instead of the
boardrevision-dependent way I did it for the GA-M57SLI. Code follows:
tmp = pnp_read_config(SERIAL_DEV, IT8716F_CONFIG_REG_SWSUSP);
/* Enable writing to serial flash. */
pnp_write_config(SERIAL_DEV, IT8716F_CONFIG_REG_SWSUSP, tmp | 0x10);
pnp_set_logical_device(GPIO_DEV);
/* Set Serial Flash interface to 0x0820 */
pnp_write_config(GPIO_DEV, 0x64, 0x08);
pnp_write_config(GPIO_DEV, 0x65, 0x20);

Or the Config.lb way:
chip superio/ite/it8716f
  device pnp 2e.7 on #  GPIO, SPI flash
    # Software Suspend and Flash Interface, see IT8716F datasheet,
section 8.3.7
    # FIXME: make sure this enables the right pin and the right segments
    irq 0x24 = 0x1a
    # Serial Flash I/O (SPI only, the thing flashrom calls
it8716f_flashport)
    io 0x64 = 0x820
  end

> Also, seems to me it's a pretty serious error if this can not be
> determined, ... anyone mind if I add an error message? right now it
> exits with no error, having done no work :-)
>   

Later, we will have more of these if style statements. Suggestion (rough
cut-n-paste, whitespace damaged, may need a change of return types):
{

        if (it8716f_flashport)
                return it8716f_spi_page_program(block, buf, bios);
	printf("generic_spi_page_program called, but no machine specific program routine available!\n");
	return;
}



Regards,
Carl-Daniel




More information about the coreboot mailing list