Changeset 1430 for trunk


Ignore:
Timestamp:
09/07/11 21:18:25 (9 months ago)
Author:
uwe
Message:

Add Intel Tunnel Creek chipset support, mark it as tested.

Intel's Tunnel Creek chipset supports both an SPI and an LPC bus. Set the
chipset table entry for Tunnel Creek to the new function
enable_flash_tunnelcreek(), which will read the hardware straps and return
support for the bus that has been used for booting. This function uses
ich_init_spi() with ich_generation set to 7 for initializing the SPI bus
if necessary.

SPI functionality tested on actual hardware, Tunnel Creek LPC interface not
tested yet (missing hardware for that).

Log file / success report:
http://www.flashrom.org/pipermail/flashrom/2011-September/007823.html

Signed-off-by: Ingo Feldschmid <ifel@…>
Acked-by: Uwe Hermann <uwe@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/chipset_enable.c

    r1429 r1430  
    436436        buses_supported = BUS_FWH; 
    437437        return 0; 
     438} 
     439 
     440static int enable_flash_tunnelcreek(struct pci_dev *dev, const char *name) 
     441{ 
     442        uint16_t old, new; 
     443        uint32_t tmp, bnt; 
     444        void *rcrb; 
     445        int ret; 
     446 
     447        /* Enable Flash Writes */ 
     448        ret = enable_flash_ich(dev, name, 0xd8); 
     449        if (ret == ERROR_FATAL) 
     450                return ret; 
     451 
     452        /* Make sure BIOS prefetch mechanism is disabled */ 
     453        old = pci_read_byte(dev, 0xd9); 
     454        msg_pdbg("BIOS Prefetch Enable: %sabled, ", (old & 1) ? "en" : "dis"); 
     455        new = old & ~1; 
     456        if (new != old) 
     457                rpci_write_byte(dev, 0xd9, new); 
     458 
     459        /* Get physical address of Root Complex Register Block */ 
     460        tmp = pci_read_long(dev, 0xf0) & 0xffffc000; 
     461        msg_pdbg("\nRoot Complex Register Block address = 0x%x\n", tmp); 
     462 
     463        /* Map RCBA to virtual memory */ 
     464        rcrb = physmap("ICH RCRB", tmp, 0x4000); 
     465 
     466        /* Test Boot BIOS Strap Status */ 
     467        bnt = mmio_readl(rcrb + 0x3410); 
     468        if (bnt & 0x02) { 
     469                /* If strapped to LPC, no SPI initialization is required */ 
     470                buses_supported = BUS_FWH; 
     471                return 0; 
     472        } 
     473 
     474        /* This adds BUS_SPI */ 
     475        buses_supported = BUS_SPI; 
     476        if (ich_init_spi(dev, tmp, rcrb, 7) != 0) { 
     477                if (!ret) 
     478                        ret = ERROR_NONFATAL; 
     479        } 
     480 
     481        return ret; 
    438482} 
    439483 
     
    12691313        {0x8086, 0x7198, OK, "Intel", "440MX",          enable_flash_piix4}, 
    12701314        {0x8086, 0x8119, OK, "Intel", "SCH Poulsbo",    enable_flash_poulsbo}, 
    1271         {0x8086, 0x8186, NT, "Intel", "Atom E6xx(T)/Tunnel Creek", enable_flash_poulsbo}, 
     1315        {0x8086, 0x8186, OK, "Intel", "Atom E6xx(T)/Tunnel Creek", enable_flash_tunnelcreek}, 
    12721316#endif 
    12731317        {}, 
Note: See TracChangeset for help on using the changeset viewer.