Changeset 3659 for trunk/util

Show
Ignore:
Timestamp:
10/15/08 19:50:29 (3 months ago)
Author:
mjones
Message:

SB600 has four write once LPC ROM protect areas. It is not possible to write
enable that area once the register is set so print a warning.

Signed-off-by: Marc Jones <marcj.jones@…>
Acked-by: Ronald G. Minnich <rminnich@…>
Acked-by: Peter Stuge <peter@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/util/flashrom/chipset_enable.c

    r3648 r3659  
    567567                printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", 0x40, new, name); 
    568568                return -1; 
     569        } 
     570 
     571        return 0; 
     572} 
     573 
     574static int enable_flash_sb600(struct pci_dev *dev, const char *name) 
     575{ 
     576        uint32_t old, new; 
     577        uint8_t reg; 
     578 
     579        /* Clear ROM Protect 0-3 */ 
     580        for (reg = 0x50; reg < 0x60; reg+=4) { 
     581                old = pci_read_long(dev, reg); 
     582                new = old & 0xFFFFFFFC; 
     583                if (new != old) { 
     584                        pci_write_byte(dev, reg, new); 
     585                        if (pci_read_long(dev, reg) != new) { 
     586                                printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", 0x50, new, name); 
     587                        } 
     588                } 
    569589        } 
    570590 
     
    745765        {0x1022, 0x2080, "AMD CS5536",          enable_flash_cs5536}, 
    746766        {0x1022, 0x7468, "AMD8111",             enable_flash_amd8111}, 
     767        {0x1002, 0x438D, "ATI(AMD) SB600",      enable_flash_sb600}, 
    747768        {0x10B9, 0x1533, "ALi M1533",           enable_flash_ali_m1533}, 
    748769        {0x10de, 0x0050, "NVIDIA CK804",        enable_flash_ck804}, /* LPC */