Changeset 1317


Ignore:
Timestamp:
05/19/11 04:58:17 (12 months ago)
Author:
stefanct
Message:

whitespace, documentation and other small stuff

this patch combines three previously posted patches in a revised form.
one is even stolen from Stefan Reinauer (remove umlauts from man page).

Signed-off-by: Stefan Tauner <stefan.tauner@…>
Signed-off-by: Stefan Reinauer <reinauer@…>

some parts are
Acked-by: Carl-Daniel Hailfinger<c-d.hailfinger.devel.2006@…>
the rest is
Acked-by: Stefan Tauner <stefan.tauner@…>

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/chipset_enable.c

    r1295 r1317  
    559559 
    560560        buses_supported = CHIP_BUSTYPE_PARALLEL; 
    561         /* Decode 0x000E0000-0x000FFFFF (128 KB), not just 64 KB, and 
    562          * decode 0xFF000000-0xFFFFFFFF (16 MB), not just 256 KB. 
     561        /* Decode 0x000E0000-0x000FFFFF (128 kB), not just 64 kB, and 
     562         * decode 0xFF000000-0xFFFFFFFF (16 MB), not just 256 kB. 
    563563         * FIXME: Should we really touch the low mapping below 1 MB? Flashrom 
    564564         * ignores that region completely. 
  • trunk/drkaiser.c

    r1274 r1317  
    5050                       PCI_MAGIC_DRKAISER_VALUE); 
    5151 
    52         /* Map 128KB flash memory window. */ 
     52        /* Map 128kB flash memory window. */ 
    5353        drkaiser_bar = physmap("Dr. Kaiser PC-Waechter flash memory", 
    5454                               addr, 128 * 1024); 
  • trunk/flash.h

    r1293 r1317  
    108108        uint32_t model_id; 
    109109 
     110        /* Total chip size in kilobytes */ 
    110111        int total_size; 
     112        /* Chip page size in bytes */ 
    111113        int page_size; 
    112114        int feature_bits; 
     
    126128         * Erase blocks and associated erase function. Any chip erase function 
    127129         * is stored as chip-sized virtual block together with said function. 
     130         * The first one that fits will be chosen. There is currently no way to 
     131         * influence that behaviour. For testing just comment out the other 
     132         * elements or set the function pointer to NULL. 
    128133         */ 
    129134        struct block_eraser { 
  • trunk/flashchips.h

    r1270 r1317  
    146146#define ATMEL_AT26DF041         0x4400 
    147147#define ATMEL_AT26DF081         0x4500  /* guessed, no datasheet available */ 
    148 #define ATMEL_AT26DF081A                0x4501 
     148#define ATMEL_AT26DF081A        0x4501 
    149149#define ATMEL_AT26DF161         0x4600 
    150 #define ATMEL_AT26DF161A                0x4601 
     150#define ATMEL_AT26DF161A        0x4601 
    151151#define ATMEL_AT26DF321         0x4700  /* Same as 25DF321 */ 
    152152#define ATMEL_AT26F004          0x0400 
  • trunk/flashrom.8

    r1241 r1317  
    565565Joe Bao 
    566566.br 
    567 Jörg Fischer 
     567Joerg Fischer 
    568568.br 
    569569Joshua Roys 
  • trunk/flashrom.c

    r1302 r1317  
    11411141                if (chip_to_probe && strcmp(flash->name, chip_to_probe) != 0) 
    11421142                        continue; 
    1143                 msg_gdbg("Probing for %s %s, %d KB: ", 
     1143                msg_gdbg("Probing for %s %s, %d kB: ", 
    11441144                             flash->vendor, flash->name, flash->total_size); 
    11451145                if (!flash->probe && !force) { 
     
    12021202                snprintf(location, sizeof(location), "on %s", programmer_table[programmer].name); 
    12031203 
    1204         msg_cinfo("%s chip \"%s %s\" (%d KB, %s) %s.\n", 
     1204        msg_cinfo("%s chip \"%s %s\" (%d kB, %s) %s.\n", 
    12051205               force ? "Assuming" : "Found", 
    12061206               flash->vendor, flash->name, flash->total_size, 
  • trunk/ichspi.c

    r1299 r1317  
    4444 
    4545/* ICH9 controller register definition */ 
    46 #define ICH9_REG_FADDR         0x08     /* 32 Bits */ 
    47 #define ICH9_REG_FDATA0                0x10     /* 64 Bytes */ 
    48  
    49 #define ICH9_REG_SSFS          0x90     /* 08 Bits */ 
     46#define ICH9_REG_FADDR          0x08    /* 32 Bits */ 
     47#define ICH9_REG_FDATA0         0x10    /* 64 Bytes */ 
     48 
     49#define ICH9_REG_SSFS           0x90    /* 08 Bits */ 
    5050#define SSFS_SCIP               0x00000001 
    5151#define SSFS_CDS                0x00000004 
    5252#define SSFS_FCERR              0x00000008 
    5353#define SSFS_AEL                0x00000010 
     54/* The following bits are reserved in SSFS: 1,5-7. */ 
    5455#define SSFS_RESERVED_MASK      0x000000e2 
    5556 
    56 #define ICH9_REG_SSFC          0x91     /* 24 Bits */ 
     57#define ICH9_REG_SSFC           0x91    /* 24 Bits */ 
    5758#define SSFC_SCGO               0x00000200 
    5859#define SSFC_ACS                0x00000400 
     
    6566#define SSFC_SCF_20MHZ 0x00000000 
    6667#define SSFC_SCF_33MHZ 0x01000000 
     68/* We combine SSFS and SSFC to one 32-bit word, 
     69 * therefore SSFC bits are off by 8. 
     70 * The following bits are reserved in SSFC: 23-19,7,0. */ 
    6771#define SSFC_RESERVED_MASK      0xf8008100 
    6872 
    69 #define ICH9_REG_PREOP         0x94     /* 16 Bits */ 
    70 #define ICH9_REG_OPTYPE                0x96     /* 16 Bits */ 
    71 #define ICH9_REG_OPMENU                0x98     /* 64 Bits */ 
     73#define ICH9_REG_PREOP          0x94    /* 16 Bits */ 
     74#define ICH9_REG_OPTYPE         0x96    /* 16 Bits */ 
     75#define ICH9_REG_OPMENU         0x98    /* 64 Bits */ 
    7276 
    7377// ICH9R SPI commands 
    74 #define SPI_OPCODE_TYPE_READ_NO_ADDRESS     0 
    75 #define SPI_OPCODE_TYPE_WRITE_NO_ADDRESS    1 
    76 #define SPI_OPCODE_TYPE_READ_WITH_ADDRESS   2 
    77 #define SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS  3 
     78#define SPI_OPCODE_TYPE_READ_NO_ADDRESS         0 
     79#define SPI_OPCODE_TYPE_WRITE_NO_ADDRESS        1 
     80#define SPI_OPCODE_TYPE_READ_WITH_ADDRESS       2 
     81#define SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS      3 
    7882 
    7983// ICH7 registers 
    80 #define ICH7_REG_SPIS          0x00     /* 16 Bits */ 
     84#define ICH7_REG_SPIS           0x00    /* 16 Bits */ 
    8185#define SPIS_SCIP               0x0001 
    8286#define SPIS_GRANT              0x0002 
     
    9599*/ 
    96100 
    97 #define ICH7_REG_SPIC          0x02     /* 16 Bits */ 
    98 #define SPIC_SCGO              0x0002 
    99 #define SPIC_ACS               0x0004 
    100 #define SPIC_SPOP              0x0008 
    101 #define SPIC_DS                0x4000 
    102  
    103 #define ICH7_REG_SPIA          0x04     /* 32 Bits */ 
    104 #define ICH7_REG_SPID0         0x08     /* 64 Bytes */ 
    105 #define ICH7_REG_PREOP         0x54     /* 16 Bits */ 
    106 #define ICH7_REG_OPTYPE                0x56     /* 16 Bits */ 
    107 #define ICH7_REG_OPMENU                0x58     /* 64 Bits */ 
     101#define ICH7_REG_SPIC           0x02    /* 16 Bits */ 
     102#define SPIC_SCGO               0x0002 
     103#define SPIC_ACS                0x0004 
     104#define SPIC_SPOP               0x0008 
     105#define SPIC_DS                 0x4000 
     106 
     107#define ICH7_REG_SPIA           0x04    /* 32 Bits */ 
     108#define ICH7_REG_SPID0          0x08    /* 64 Bytes */ 
     109#define ICH7_REG_PREOP          0x54    /* 16 Bits */ 
     110#define ICH7_REG_OPTYPE         0x56    /* 16 Bits */ 
     111#define ICH7_REG_OPMENU         0x58    /* 64 Bits */ 
    108112 
    109113/* ICH SPI configuration lock-down. May be set during chipset enabling. */ 
     
    598602           This means the timeout must be sufficient for chip erase 
    599603           of slow high-capacity chips. 
    600         */ 
     604        */ 
    601605        switch (op.atomic) { 
    602606        case 2: 
     
    704708        /* Assemble SSFS + SSFC */ 
    705709        temp32 = REGREAD32(ICH9_REG_SSFS); 
    706         /* keep reserved bits */ 
     710        /* Keep reserved bits only */ 
    707711        temp32 &= SSFS_RESERVED_MASK | SSFC_RESERVED_MASK; 
    708712        /* clear error status registers */ 
     
    713717        temp32 |= SSFC_SCF_20MHZ; 
    714718 
     719        /* Set data byte count (DBC) and data cycle bit (DS) */ 
    715720        if (datalength != 0) { 
    716721                uint32_t datatemp; 
     
    743748           This means the timeout must be sufficient for chip erase 
    744749           of slow high-capacity chips. 
    745         */ 
     750        */ 
    746751        switch (op.atomic) { 
    747752        case 2: 
  • trunk/print.c

    r1314 r1317  
    101101                printf(" "); 
    102102 
    103         printf("Tested   Known    Size/KB:  Type:\n"); 
     103        printf("Tested   Known    Size/kB:  Type:\n"); 
    104104        for (i = 0; i < okcol; i++) 
    105105                printf(" "); 
  • trunk/print_wiki.c

    r1297 r1317  
    6060static const char chip_th[] = "{| border=\"0\" style=\"font-size: smaller\" \ 
    6161valign=\"top\"\n|- bgcolor=\"#6699dd\"\n! align=\"left\" | Vendor\n\ 
    62 ! align=\"left\" | Device\n! align=\"left\" | Size / KB\n\ 
     62! align=\"left\" | Device\n! align=\"left\" | Size / kB\n\ 
    6363! align=\"left\" | Type\n! align=\"left\" colspan=\"4\" | Status\n\n\ 
    6464|- bgcolor=\"#6699ff\"\n| colspan=\"4\" | &nbsp;\n\ 
  • trunk/util/flashrom_partial_write_test.sh

    r1222 r1317  
    1919# 
    2020# This script attempts to test Flashrom partial write capability by writing 
    21 # patterns of 0xff and 0x00 bytes to the lowest 128KB of flash. 128KB is chosen 
    22 # since 64KB is usually the largest possible block size, so we will try to 
     21# patterns of 0xff and 0x00 bytes to the lowest 128kB of flash. 128kB is chosen 
     22# since 64kB is usually the largest possible block size, so we will try to 
    2323# cover at least two blocks with this test. 
    2424 
     
    198198# 3. The new content must be written at specified offsets. 
    199199# 
    200 # Note: The last chunk of 0xff bytes is only 2K as to avoid overrunning a 128KB 
     200# Note: The last chunk of 0xff bytes is only 2k as to avoid overrunning a 128kB 
    201201# test image. 
    202202# 
  • trunk/wbsio_spi.c

    r1299 r1317  
    8585        register_spi_programmer(&spi_programmer_wbsio); 
    8686        msg_pdbg("%s: Winbond saved on 4 register bits so max chip size is " 
    87                  "1024 KB!\n", __func__); 
     87                 "1024 kB!\n", __func__); 
    8888        max_rom_decode.spi = 1024 * 1024; 
    8989 
Note: See TracChangeset for help on using the changeset viewer.