Changeset 1445


Ignore:
Timestamp:
09/17/11 23:21:42 (8 months ago)
Author:
stefanct
Message:

ichspi: don't touch the nonexistent(?) BBAR register on ICH8

There is no sign of BBAR (BIOS Base Address Configuration Register)
in the public datasheet (or specification update) of the ICH8. Also,
the offset of that register has changed between ICH7 (SPIBAR + 50h)
and ICH9 (SPIBAR + A0h), so we have no clue if or where it is on
ICH8. Better don't try to touch it at all and assume/hope it is 0.

Signed-off-by: Stefan Tauner <stefan.tauner@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ichspi.c

    r1444 r1445  
    571571 * it didn't stick. 
    572572 */ 
    573 static void ich_set_bbar(uint32_t min_addr) 
     573static void ich_set_bbar(int ich_generation, uint32_t min_addr) 
    574574{ 
    575575        int bbar_off; 
    576         switch (spi_programmer->type) { 
    577         case SPI_CONTROLLER_ICH7: 
    578         case SPI_CONTROLLER_VIA: 
     576        switch (ich_generation) { 
     577        case 7: 
    579578                bbar_off = 0x50; 
    580579                break; 
    581         case SPI_CONTROLLER_ICH9: 
     580        case 8: 
     581                msg_perr("BBAR offset is unknown on ICH8!\n"); 
     582                return; 
     583        default:                /* Future version might behave the same */ 
    582584                bbar_off = ICH9_REG_BBAR; 
    583585                break; 
    584         default: 
    585                 msg_perr("Unknown chipset for BBAR setting!\n"); 
    586                 return; 
    587586        } 
    588587         
     
    601600         */ 
    602601        if (ichspi_bbar != min_addr) 
    603                 msg_perr("Setting BBAR failed!\n"); 
     602                msg_perr("Setting BBAR to 0x%08x failed! New value: 0x%08x.\n", 
     603                         min_addr, ichspi_bbar); 
    604604} 
    605605 
     
    670670                curopcodes_done = &O_ST_M25P; 
    671671                rc = program_opcodes(curopcodes_done, 1); 
    672                 /* Technically not part of opcode init, but it allows opcodes 
    673                  * to run without transaction errors by setting the lowest 
    674                  * allowed address to zero. 
    675                  */ 
    676                 ich_set_bbar(0); 
    677672        } 
    678673 
     
    12711266                        ichspi_lock = 1; 
    12721267                } 
     1268                ich_set_bbar(ich_generation, 0); 
    12731269                ich_init_opcodes(); 
    12741270                break; 
     
    13521348                        tmp = mmio_readl(ich_spibar + ICH9_REG_FPB); 
    13531349                        msg_pdbg("0xD0: 0x%08x (FPB)\n", tmp); 
     1350                        ich_set_bbar(ich_generation, 0); 
    13541351                } 
    13551352 
     
    14401437        } 
    14411438 
     1439        ich_set_bbar(7, 0); 
    14421440        ich_init_opcodes(); 
    14431441 
Note: See TracChangeset for help on using the changeset viewer.