rpms/flashrom/EL-5 flashrom-r710-r995.diff, NONE, 1.1 flashrom.spec, 1.20, 1.21 import.log, 1.10, 1.11 flashrom-r710-r931.diff, 1.1, NONE
Peter Lemenkov
peter at fedoraproject.org
Wed Apr 28 15:24:33 UTC 2010
- Previous message: rpms/synergy-plus/F-12 synergy-plus.spec,1.2,1.3
- Next message: rpms/flashrom/EL-4 flashrom-r710-r995.diff, NONE, 1.1 flashrom.spec, 1.20, 1.21 import.log, 1.10, 1.11 flashrom-r710-r931.diff, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: peter
Update of /cvs/pkgs/rpms/flashrom/EL-5
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2095/EL-5
Modified Files:
flashrom.spec import.log
Added Files:
flashrom-r710-r995.diff
Removed Files:
flashrom-r710-r931.diff
Log Message:
new svn ver. 995
flashrom-r710-r995.diff:
am29f040b.c | 140 -
b/82802ab.c | 214 +-
b/Makefile | 255 ++-
b/README | 67
b/atahpt.c | 85 +
b/bitbang_spi.c | 165 +
b/board_enable.c | 1328 +++++++++------
b/buspirate_spi.c | 354 ++++
b/cbtable.c | 38
b/chipdrivers.h | 125 +
b/chipset_enable.c | 634 +++++--
b/cli_classic.c | 386 ++++
b/cli_output.c | 51
b/coreboot_tables.h | 10
b/dediprog.c | 395 ++++
b/dmi.c | 172 ++
b/drkaiser.c | 79
b/dummyflasher.c | 61
b/flash.h | 502 +++--
b/flashchips.c | 4134 +++++++++++++++++++++++++++++++++++++++++++------
b/flashchips.h | 44
b/flashrom.8 | 204 +-
b/flashrom.c | 1129 +++++++++----
b/ft2232_spi.c | 170 +-
b/gfxnvidia.c | 104 +
b/hwaccess.c | 85 +
b/hwaccess.h | 165 +
b/ichspi.c | 254 ++-
b/internal.c | 203 --
b/it87spi.c | 128 +
b/jedec.c | 382 +++-
b/layout.c | 4
b/m29f400bt.c | 85 -
b/nic3com.c | 23
b/pcidev.c | 44
b/physmap.c | 135 +
b/pm49fl00x.c | 76
b/print.c | 701 ++------
b/print_wiki.c | 600 +++++++
b/programmer.c | 99 +
b/satasii.c | 17
b/sb600spi.c | 52
b/serial.c | 232 ++
b/serprog-protocol.txt | 4
b/serprog.c | 236 --
b/sharplhf00l04.c | 153 -
b/spi.c | 889 ----------
b/spi.h | 6
b/spi25.c | 981 +++++++++++
b/sst28sf040.c | 86 -
b/sst49lfxxxc.c | 141 -
b/sst_fwhub.c | 106 -
b/stm50flw0x0x.c | 241 --
b/udelay.c | 115 +
b/w29ee011.c | 5
b/w39v040c.c | 58
b/w39v080fa.c | 126 -
b/wbsio_spi.c | 50
en29f002a.c | 125 -
m29f002.c | 126 -
mx29f002.c | 100 -
pm29f002.c | 56
sst49lf040.c | 72
w49f002u.c | 47
64 files changed, 12280 insertions(+), 5574 deletions(-)
--- NEW FILE flashrom-r710-r995.diff ---
diff --git a/82802ab.c b/82802ab.c
index 28fa177..c9d1a75 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -29,51 +29,63 @@
#include <string.h>
#include <stdlib.h>
#include "flash.h"
+#include "chipdrivers.h"
// I need that Berkeley bit-map printer
-void print_82802ab_status(uint8_t status)
+void print_status_82802ab(uint8_t status)
{
- printf("%s", status & 0x80 ? "Ready:" : "Busy:");
- printf("%s", status & 0x40 ? "BE SUSPEND:" : "BE RUN/FINISH:");
- printf("%s", status & 0x20 ? "BE ERROR:" : "BE OK:");
- printf("%s", status & 0x10 ? "PROG ERR:" : "PROG OK:");
- printf("%s", status & 0x8 ? "VP ERR:" : "VPP OK:");
- printf("%s", status & 0x4 ? "PROG SUSPEND:" : "PROG RUN/FINISH:");
- printf("%s", status & 0x2 ? "WP|TBL#|WP#,ABORT:" : "UNLOCK:");
+ msg_cdbg("%s", status & 0x80 ? "Ready:" : "Busy:");
+ msg_cdbg("%s", status & 0x40 ? "BE SUSPEND:" : "BE RUN/FINISH:");
+ msg_cdbg("%s", status & 0x20 ? "BE ERROR:" : "BE OK:");
+ msg_cdbg("%s", status & 0x10 ? "PROG ERR:" : "PROG OK:");
+ msg_cdbg("%s", status & 0x8 ? "VP ERR:" : "VPP OK:");
+ msg_cdbg("%s", status & 0x4 ? "PROG SUSPEND:" : "PROG RUN/FINISH:");
+ msg_cdbg("%s", status & 0x2 ? "WP|TBL#|WP#,ABORT:" : "UNLOCK:");
}
int probe_82802ab(struct flashchip *flash)
{
chipaddr bios = flash->virtual_memory;
uint8_t id1, id2;
+ uint8_t flashcontent1, flashcontent2;
+ int shifted = (flash->feature_bits & FEATURE_ADDR_SHIFTED) != 0;
-#if 0
- chip_writeb(0xAA, bios + 0x5555);
- chip_writeb(0x55, bios + 0x2AAA);
- chip_writeb(0x90, bios + 0x5555);
-#endif
-
- chip_writeb(0xff, bios);
+ /* Reset to get a clean state */
+ chip_writeb(0xFF, bios);
programmer_delay(10);
+
+ /* Enter ID mode */
chip_writeb(0x90, bios);
programmer_delay(10);
- id1 = chip_readb(bios);
- id2 = chip_readb(bios + 0x01);
+ id1 = chip_readb(bios + (0x00 << shifted));
+ id2 = chip_readb(bios + (0x01 << shifted));
/* Leave ID mode */
- chip_writeb(0xAA, bios + 0x5555);
- chip_writeb(0x55, bios + 0x2AAA);
- chip_writeb(0xF0, bios + 0x5555);
+ chip_writeb(0xFF, bios);
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ msg_cdbg("%s: id1 0x%02x, id2 0x%02x", __func__, id1, id2);
+
+ if (!oddparity(id1))
+ msg_cdbg(", id1 parity violation");
+ /* Read the product ID location again. We should now see normal flash contents. */
+ flashcontent1 = chip_readb(bios + (0x00 << shifted));
+ flashcontent2 = chip_readb(bios + (0x01 << shifted));
+
+ if (id1 == flashcontent1)
+ msg_cdbg(", id1 is normal flash content");
+ if (id2 == flashcontent2)
+ msg_cdbg(", id2 is normal flash content");
+
+ msg_cdbg("\n");
if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0;
- map_flash_registers(flash);
+ if (flash->feature_bits & FEATURE_REGISTERMAP)
+ map_flash_registers(flash);
return 1;
}
@@ -81,7 +93,6 @@ int probe_82802ab(struct flashchip *flash)
uint8_t wait_82802ab(chipaddr bios)
{
uint8_t status;
- uint8_t id1, id2;
chip_writeb(0x70, bios);
if ((chip_readb(bios) & 0x80) == 0) { // it's busy
@@ -90,49 +101,47 @@ uint8_t wait_82802ab(chipaddr bios)
status = chip_readb(bios);
- // put another command to get out of status register mode
+ /* Reset to get a clean state */
+ chip_writeb(0xFF, bios);
- chip_writeb(0x90, bios);
- programmer_delay(10);
+ return status;
+}
- id1 = chip_readb(bios);
- id2 = chip_readb(bios + 0x01);
+int unlock_82802ab(struct flashchip *flash)
+{
+ int i;
+ //chipaddr wrprotect = flash->virtual_registers + page + 2;
- // this is needed to jam it out of "read id" mode
- chip_writeb(0xAA, bios + 0x5555);
- chip_writeb(0x55, bios + 0x2AAA);
- chip_writeb(0xF0, bios + 0x5555);
+ for (i = 0; i < flash->total_size * 1024; i+= flash->page_size)
+ {
+ chip_writeb(0, flash->virtual_registers + i + 2);
+ }
- return status;
+ return 0;
}
-int erase_82802ab_block(struct flashchip *flash, int offset)
+int erase_block_82802ab(struct flashchip *flash, unsigned int page, unsigned int pagesize)
{
- chipaddr bios = flash->virtual_memory + offset;
- chipaddr wrprotect = flash->virtual_registers + offset + 2;
+ chipaddr bios = flash->virtual_memory;
uint8_t status;
// clear status register
- chip_writeb(0x50, bios);
- //printf("Erase at %p\n", bios);
- // clear write protect
- //printf("write protect is at %p\n", (wrprotect));
- //printf("write protect is 0x%x\n", *(wrprotect));
- chip_writeb(0, wrprotect);
- //printf("write protect is 0x%x\n", *(wrprotect));
+ chip_writeb(0x50, bios + page);
// now start it
- chip_writeb(0x20, bios);
- chip_writeb(0xd0, bios);
+ chip_writeb(0x20, bios + page);
+ chip_writeb(0xd0, bios + page);
programmer_delay(10);
+
// now let's see what the register is
- status = wait_82802ab(flash->virtual_memory);
- //print_82802ab_status(status);
- if (check_erased_range(flash, offset, flash->page_size)) {
- fprintf(stderr, "ERASE FAILED!\n");
+ status = wait_82802ab(bios);
+ print_status_82802ab(status);
+
+ if (check_erased_range(flash, page, pagesize)) {
+ msg_cerr("ERASE FAILED!\n");
return -1;
}
- printf("DONE BLOCK 0x%x\n", offset);
+ msg_cinfo("DONE BLOCK 0x%x\n", page);
return 0;
}
@@ -142,14 +151,14 @@ int erase_82802ab(struct flashchip *flash)
int i;
unsigned int total_size = flash->total_size * 1024;
- printf("total_size is %d; flash->page_size is %d\n",
+ msg_cspew("total_size is %d; flash->page_size is %d\n",
total_size, flash->page_size);
for (i = 0; i < total_size; i += flash->page_size)
- if (erase_82802ab_block(flash, i)) {
- fprintf(stderr, "ERASE FAILED!\n");
+ if (erase_block_82802ab(flash, i, flash->page_size)) {
+ msg_cerr("ERASE FAILED!\n");
return -1;
}
- printf("DONE ERASE\n");
+ msg_cinfo("DONE ERASE\n");
return 0;
}
@@ -170,45 +179,76 @@ void write_page_82802ab(chipaddr bios, uint8_t *src,
int write_82802ab(struct flashchip *flash, uint8_t *buf)
{
int i;
- int total_size = flash->total_size * 1024;
- int page_size = flash->page_size;
chipaddr bios = flash->virtual_memory;
[...23078 lines suppressed...]
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "flash.h"
-
-int write_49f002(struct flashchip *flash, uint8_t *buf)
-{
- int i;
- int total_size = flash->total_size * 1024;
- int page_size = flash->page_size;
- chipaddr bios = flash->virtual_memory;
-
- if (erase_chip_jedec(flash)) {
- fprintf(stderr, "ERASE FAILED!\n");
- return -1;
- }
-
- printf("Programming page: ");
- for (i = 0; i < total_size / page_size; i++) {
- printf("%04d at address: 0x%08x ", i, i * page_size);
- /* Byte-wise writing of 'page_size' bytes. */
- write_sector_jedec(bios, buf + i * page_size,
- bios + i * page_size, page_size);
- printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
- fflush(stdout);
- }
- printf("\n");
-
- return 0;
-}
diff --git a/wbsio_spi.c b/wbsio_spi.c
index 6b9425f..ca39322 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -2,6 +2,7 @@
* This file is part of the flashrom project.
*
* Copyright (C) 2008 Peter Stuge <peter at stuge.se>
+ * Copyright (C) 2009,2010 Carl-Daniel Hailfinger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,6 +20,7 @@
#include <string.h>
#include "flash.h"
+#include "chipdrivers.h"
#include "spi.h"
#define WBSIO_PORT1 0x2e
@@ -34,18 +36,18 @@ static uint16_t wbsio_get_spibase(uint16_t port)
w836xx_ext_enter(port);
id = sio_read(port, 0x20);
if (id != 0xa0) {
- fprintf(stderr, "\nW83627 not found at 0x%x, id=0x%02x want=0xa0.\n", port, id);
+ msg_perr("\nW83627 not found at 0x%x, id=0x%02x want=0xa0.\n", port, id);
goto done;
}
if (0 == (sio_read(port, 0x24) & 2)) {
- fprintf(stderr, "\nW83627 found at 0x%x, but SPI pins are not enabled. (CR[0x24] bit 1=0)\n", port);
+ msg_perr("\nW83627 found at 0x%x, but SPI pins are not enabled. (CR[0x24] bit 1=0)\n", port);
goto done;
}
sio_write(port, 0x07, 0x06);
if (0 == (sio_read(port, 0x30) & 1)) {
- fprintf(stderr, "\nW83627 found at 0x%x, but SPI is not enabled. (LDN6[0x30] bit 0=0)\n", port);
+ msg_perr("\nW83627 found at 0x%x, but SPI is not enabled. (LDN6[0x30] bit 0=0)\n", port);
goto done;
}
@@ -62,7 +64,7 @@ int wbsio_check_for_spi(const char *name)
if (0 == (wbsio_spibase = wbsio_get_spibase(WBSIO_PORT2)))
return 1;
- printf_debug("\nwbsio_spibase = 0x%x\n", wbsio_spibase);
+ msg_pspew("\nwbsio_spibase = 0x%x\n", wbsio_spibase);
buses_supported |= CHIP_BUSTYPE_SPI;
spi_controller = SPI_CONTROLLER_WBSIO;
@@ -96,42 +98,42 @@ int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
int i;
uint8_t mode = 0;
- printf_debug("%s:", __func__);
+ msg_pspew("%s:", __func__);
if (1 == writecnt && 0 == readcnt) {
mode = 0x10;
} else if (2 == writecnt && 0 == readcnt) {
OUTB(writearr[1], wbsio_spibase + 4);
- printf_debug(" data=0x%02x", writearr[1]);
+ msg_pspew(" data=0x%02x", writearr[1]);
mode = 0x20;
} else if (1 == writecnt && 2 == readcnt) {
mode = 0x30;
} else if (4 == writecnt && 0 == readcnt) {
- printf_debug(" addr=0x%02x", (writearr[1] & 0x0f));
+ msg_pspew(" addr=0x%02x", (writearr[1] & 0x0f));
for (i = 2; i < writecnt; i++) {
OUTB(writearr[i], wbsio_spibase + i);
- printf_debug("%02x", writearr[i]);
+ msg_pspew("%02x", writearr[i]);
}
mode = 0x40 | (writearr[1] & 0x0f);
} else if (5 == writecnt && 0 == readcnt) {
- printf_debug(" addr=0x%02x", (writearr[1] & 0x0f));
+ msg_pspew(" addr=0x%02x", (writearr[1] & 0x0f));
for (i = 2; i < 4; i++) {
OUTB(writearr[i], wbsio_spibase + i);
- printf_debug("%02x", writearr[i]);
+ msg_pspew("%02x", writearr[i]);
}
OUTB(writearr[i], wbsio_spibase + i);
- printf_debug(" data=0x%02x", writearr[i]);
+ msg_pspew(" data=0x%02x", writearr[i]);
mode = 0x50 | (writearr[1] & 0x0f);
} else if (8 == writecnt && 0 == readcnt) {
- printf_debug(" addr=0x%02x", (writearr[1] & 0x0f));
+ msg_pspew(" addr=0x%02x", (writearr[1] & 0x0f));
for (i = 2; i < 4; i++) {
OUTB(writearr[i], wbsio_spibase + i);
- printf_debug("%02x", writearr[i]);
+ msg_pspew("%02x", writearr[i]);
}
- printf_debug(" data=0x");
+ msg_pspew(" data=0x");
for (; i < writecnt; i++) {
OUTB(writearr[i], wbsio_spibase + i);
- printf_debug("%02x", writearr[i]);
+ msg_pspew("%02x", writearr[i]);
}
mode = 0x60 | (writearr[1] & 0x0f);
} else if (5 == writecnt && 4 == readcnt) {
@@ -142,17 +144,17 @@ int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
*/
;
} else if (4 == writecnt && readcnt >= 1 && readcnt <= 4) {
- printf_debug(" addr=0x%02x", (writearr[1] & 0x0f));
+ msg_pspew(" addr=0x%02x", (writearr[1] & 0x0f));
for (i = 2; i < writecnt; i++) {
OUTB(writearr[i], wbsio_spibase + i);
- printf_debug("%02x", writearr[i]);
+ msg_pspew("%02x", writearr[i]);
}
mode = ((7 + readcnt) << 4) | (writearr[1] & 0x0f);
}
- printf_debug(" cmd=%02x mode=%02x\n", writearr[0], mode);
+ msg_pspew(" cmd=%02x mode=%02x\n", writearr[0], mode);
if (!mode) {
- fprintf(stderr, "%s: unsupported command type wr=%d rd=%d\n",
+ msg_perr("%s: unsupported command type wr=%d rd=%d\n",
__func__, writecnt, readcnt);
/* Command type refers to the number of bytes read/written. */
return SPI_INVALID_LENGTH;
@@ -165,12 +167,12 @@ int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
if (!readcnt)
return 0;
- printf_debug("%s: returning data =", __func__);
+ msg_pspew("%s: returning data =", __func__);
for (i = 0; i < readcnt; i++) {
readarr[i] = INB(wbsio_spibase + 4 + i);
- printf_debug(" 0x%02x", readarr[i]);
+ msg_pspew(" 0x%02x", readarr[i]);
}
- printf_debug("\n");
+ msg_pspew("\n");
return 0;
}
@@ -179,7 +181,7 @@ int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
int size = flash->total_size * 1024;
if (size > 1024 * 1024) {
- fprintf(stderr, "%s: Winbond saved on 4 register bits so max chip size is 1024 KB!\n", __func__);
+ msg_perr("%s: Winbond saved on 4 register bits so max chip size is 1024 KB!\n", __func__);
return 1;
}
@@ -191,7 +193,7 @@ int wbsio_spi_write_1(struct flashchip *flash, uint8_t *buf)
int size = flash->total_size * 1024;
if (size > 1024 * 1024) {
- fprintf(stderr, "%s: Winbond saved on 4 register bits so max chip size is 1024 KB!\n", __func__);
+ msg_perr("%s: Winbond saved on 4 register bits so max chip size is 1024 KB!\n", __func__);
return 1;
}
Index: flashrom.spec
===================================================================
RCS file: /cvs/pkgs/rpms/flashrom/EL-5/flashrom.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- flashrom.spec 12 Mar 2010 12:21:55 -0000 1.20
+++ flashrom.spec 28 Apr 2010 15:24:33 -0000 1.21
@@ -1,15 +1,15 @@
-%global svnrev 931
+%global svnrev 995
Summary: Simple program for reading/writing BIOS chips content
Name: flashrom
Version: 0.9.1
-Release: 3.svn%{svnrev}%{?dist}
+Release: 4.svn%{svnrev}%{?dist}
License: GPLv2
Group: Applications/System
URL: http://flashrom.org
Source0: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2
Source1: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2.asc
-Patch0: flashrom-r710-r931.diff
+Patch0: flashrom-r710-r%{svnrev}.diff
BuildRequires: pciutils-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -42,6 +42,10 @@ CFLAGS="%{optflags}" %{__make} %{?_smp_m
%{_mandir}/man8/%{name}.*
%changelog
+* Wed Apr 28 2010 Peter Lemenkov <lemenkov at gmail.com> 0.9.1-4.svn995
+- Updated to latest svn ver. 995
+- Lots of new chips and m/b
+
* Fri Mar 12 2010 Peter Lemenkov <lemenkov at gmail.com> 0.9.1-3.svn931
- Updated to latest svn ver. 931
- ASUS A7V8X-X board
Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/flashrom/EL-5/import.log,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- import.log 12 Mar 2010 12:21:55 -0000 1.10
+++ import.log 28 Apr 2010 15:24:33 -0000 1.11
@@ -8,3 +8,4 @@ flashrom-0_9_0-1_fc10:EL-5:flashrom-0.9.
flashrom-0_9_1-1_fc11:EL-5:flashrom-0.9.1-1.fc11.src.rpm:1252055885
flashrom-0_9_1-2_svn893_fc12:EL-5:flashrom-0.9.1-2.svn893.fc12.src.rpm:1265623584
flashrom-0_9_1-3_svn931_fc12:EL-5:flashrom-0.9.1-3.svn931.fc12.src.rpm:1268396425
+flashrom-0_9_1-4_svn995_fc12:EL-5:flashrom-0.9.1-4.svn995.fc12.src.rpm:1272468213
--- flashrom-r710-r931.diff DELETED ---
- Previous message: rpms/synergy-plus/F-12 synergy-plus.spec,1.2,1.3
- Next message: rpms/flashrom/EL-4 flashrom-r710-r995.diff, NONE, 1.1 flashrom.spec, 1.20, 1.21 import.log, 1.10, 1.11 flashrom-r710-r931.diff, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list