[flashrom] Updated to latest svn ver. 1455 (post-release snapshot for 0.9.4)

Peter Lemenkov peter at fedoraproject.org
Fri Oct 21 13:52:20 UTC 2011


commit eab84056431739da5aa199f303ca9e510ad3bac3
Author: Peter Lemenkov <lemenkov at gmail.com>
Date:   Fri Oct 21 17:38:55 2011 +0400

    Updated to latest svn ver. 1455 (post-release snapshot for 0.9.4)
    
    Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>

 ...Initial-commit-of-autotools-related-files.patch |   82 ++++++++++---
 ...dmidecode-path-defined-at-configure-stage.patch |   10 +-
 ...0003-Use-flashrom-s-version-from-config.h.patch |   79 ------------
 ...ros-from-config.h-instead-of-HAVE_UTSNAME.patch |   70 +++++++++++
 ...86-related-ifdefs-in-code-this-is-now-con.patch |   93 ++++++++++-----
 ..._LIBPCI-from-config.h-instead-of-NEED_PCI.patch |  105 ----------------
 ...atch => flashrom-0005-Simplify-hwaccess.c.patch |    6 +-
 ...ros-from-config.h-instead-of-HAVE_UTSNAME.patch |   35 ------
 ...diannes-determined-at-the-configure-stage.patch |   14 +-
 ...Use-HAVE_-_H-macro-for-detecting-includes.patch |   41 +++---
 ...ove-arch-checking-ifdef-block-into-header.patch |   30 ++----
 ...-ppc-hack.patch => flashrom-0009-ppc-hack.patch |   10 +-
 ...tch => flashrom-0010-Simplify-processor.h.patch |   37 ++++---
 flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch  |  128 --------------------
 flashrom.spec                                      |   32 +++---
 sources                                            |    2 +-
 16 files changed, 284 insertions(+), 490 deletions(-)
---
diff --git a/flashrom-0001-Initial-commit-of-autotools-related-files.patch b/flashrom-0001-Initial-commit-of-autotools-related-files.patch
index 9d9dd00..b7836e5 100644
--- a/flashrom-0001-Initial-commit-of-autotools-related-files.patch
+++ b/flashrom-0001-Initial-commit-of-autotools-related-files.patch
@@ -1,26 +1,37 @@
-From 29c6d0872db6f9189a2cdc076f38eff1bb646ade Mon Sep 17 00:00:00 2001
+From 660b803c1f6ba64ffe4e09fd5244d5c1fc3bdde6 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Fri, 17 Sep 2010 18:58:28 +0400
-Subject: [PATCH 01/13] Initial commit of autotools-related files
+Subject: [PATCH 01/10] Initial commit of autotools-related files
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- Makefile.am  |  193 +++++++++++++++++++++++++++++++++++++++++++++
- configure.ac |  246 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 439 insertions(+), 0 deletions(-)
+ Makefile.am  |  210 +++++++++++++++++++++++++++++++++++++++++++++++
+ bootstrap.sh |    5 +
+ configure.ac |  258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 473 insertions(+), 0 deletions(-)
  create mode 100644 Makefile.am
+ create mode 100755 bootstrap.sh
  create mode 100644 configure.ac
 
 diff --git a/Makefile.am b/Makefile.am
 new file mode 100644
-index 0000000..9ae35e5
+index 0000000..06e76da
 --- /dev/null
 +++ b/Makefile.am
-@@ -0,0 +1,193 @@
+@@ -0,0 +1,210 @@
 +sbin_PROGRAMS = flashrom
 +
 +man_MANS = flashrom.8
 +
++# FIXME use "config.h" in the future
++DEFS += -DFLASHROM_VERSION=\"@VERSION@\"
++
++if HAVE_SYS_UTSNAME
++if HAVE_UNAME
++DEFS += -DHAVE_UTSNAME=1
++endif
++endif
++
 +if HAVE_DMIDECODE
 +DEFS += -DDMIDECODE_PATH=\"@DMIDECODE@\"
 +else
@@ -38,6 +49,7 @@ index 0000000..9ae35e5
 +	processor_enable.c
 +if HAVE_X86_ONLY_INTERNAL
 +internal_x86_only_SOURCES = \
++	ich_descriptors.c \
 +	ichspi.c \
 +	it85spi.c \
 +	it87spi.c \
@@ -53,6 +65,11 @@ index 0000000..9ae35e5
 +DEFS += -DCONFIG_SERPROG=1
 +endif
 +
++if HAVE_LINUX_SPI
++linux_spi_SOURCES = linux_spi.c
++DEFS += -DCONFIG_LINUX_SPI=1
++endif
++
 +if HAVE_RAYER_SPI
 +rayer_spi_SOURCES = rayer_spi.c
 +DEFS += -DCONFIG_RAYER_SPI=1
@@ -151,6 +168,7 @@ index 0000000..9ae35e5
 +pci_SOURCES = pcidev.c \
 +	      physmap.c \
 +	      hwaccess.c
++DEFS += -DNEED_PCI=1
 +endif
 +
 +chip_SOURCES = 82802ab.c \
@@ -187,6 +205,7 @@ index 0000000..9ae35e5
 +	$(internal_SOURCES) \
 +	$(internal_x86_only_SOURCES) \
 +	$(serprog_SOURCES) \
++	$(linux_spi_SOURCES) \
 +	$(rayer_spi_SOURCES) \
 +	$(bitbang_spi_SOURCES) \
 +	$(nic3com_SOURCES) \
@@ -210,13 +229,24 @@ index 0000000..9ae35e5
 +	$(chip_SOURCES) \
 +	$(cli_SOURCES) \
 +	$(lib_SOURCES)
+diff --git a/bootstrap.sh b/bootstrap.sh
+new file mode 100755
+index 0000000..050fe4f
+--- /dev/null
++++ b/bootstrap.sh
+@@ -0,0 +1,5 @@
++#!/bin/sh
++aclocal --force
++/usr/bin/autoconf --force
++/usr/bin/autoheader --force
++automake --add-missing --copy --force-missing
 diff --git a/configure.ac b/configure.ac
 new file mode 100644
-index 0000000..87b7520
+index 0000000..c5e89fe
 --- /dev/null
 +++ b/configure.ac
-@@ -0,0 +1,246 @@
-+AC_INIT([flashrom], [0.9.4-r1412], [flashrom at flashrom.org], [flashrom], [http://www.flashrom.org/])
+@@ -0,0 +1,258 @@
++AC_INIT([flashrom], [0.9.4-r1455], [flashrom at flashrom.org], [flashrom], [http://www.flashrom.org/])
 +
 +AC_PREREQ(2.59)
 +
@@ -236,6 +266,10 @@ index 0000000..87b7520
 +	    AC_HELP_STRING([--with-serprog],[serprog support.]),
 +	    [serprog="$withval"],[serprog="yes"])
 +
++AC_ARG_WITH([linux_spi],
++	    AC_HELP_STRING([--with-linux-spi],[Linux SPI subsystem support.]),
++	    [linux_spi="$withval"],[linux_spi="no"])
++
 +AC_ARG_WITH([rayer_spi],
 +	    AC_HELP_STRING([--with-rayer-spi],[RayeR SPIPGM hardware support.]),
 +	    [rayer_spi="$withval"],[rayer_spi="yes"])
@@ -314,37 +348,40 @@ index 0000000..87b7520
 +
 +# Check for CPU-specific features
 +case $target_cpu in
-+	i386|i486|i586|i686|x86_64)
++	i386|i486|i586|i686|i786|x86_64)
 +		if test "$internal" = 'yes'; then
 +			enable_x86_only_internal="yes"
 +		fi
 +		;;
-+	*)
++	mips*|power*)
 +		if test "$nic3com" = 'yes'; then
-+			echo "NIC 3Com is not supported for this target (" $target_cpu "). No PCI port I/O access on this architecture yet"
++			AC_MSG_WARN([NIC 3Com is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
 +			nic3com="no"
 +		fi
 +		if test "$nicnatsemi" = 'yes'; then
-+			echo "NIC NatSemi is not supported for this target (" $target_cpu "). No PCI port I/O access on this architecture yet"
++			AC_MSG_WARN([NIC NatSemi is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
 +			nicnatsemi="no"
 +		fi
 +		if test "$nicrealtek" = 'yes'; then
-+			echo "NIC Realtek is not supported for this target (" $target_cpu "). No PCI port I/O access on this architecture yet"
++			AC_MSG_WARN([NIC Realtek is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
 +			nicrealtek="no"
 +		fi
 +		if test "$rayer_spi" = 'yes'; then
-+			echo "RayeR SPIPGM is not supported for this target (" $target_cpu "). No PCI port I/O access on this architecture yet"
++			AC_MSG_WARN([RayeR SPIPGM is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
 +			rayer_spi="no"
 +		fi
 +		if test "$satamv" = 'yes'; then
-+			echo "Marvell SATA is not supported for this target (" $target_cpu "). No PCI port I/O access on this architecture yet"
++			AC_MSG_WARN([Marvell SATA is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet])
 +			satamv="no"
 +		fi
 +		if test "$atahpt" = 'yes'; then
-+			echo "Highpoint (HPT) ATA/RAID controller support is not supported for this target (" $target_cpu "). No PCI port I/O access on this architecture yet"
++			AC_MSG_WARN([Highpoint (HPT) ATA/RAID controller support is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
 +			atahpt="no"
 +		fi
 +		;;
++	*)
++		AC_MSG_ERROR([No support for this target ($target_cpu) yet])
++		;;
 +esac
 +
 +# Enable OS-specific compilation flags
@@ -395,7 +432,7 @@ index 0000000..87b7520
 +AC_TYPE_OFF_T
 +AC_TYPE_SIZE_T
 +AC_CHECK_SIZEOF(int)
-+dnl mingw (for instance) lacks ssize_t 
++dnl mingw (for instance) lacks ssize_t
 +AC_CHECK_TYPE(ssize_t, int)
 +AC_CHECK_TYPE(uint8_t, unsigned char)
 +AC_CHECK_TYPE(uint16_t, unsigned short)
@@ -439,6 +476,7 @@ index 0000000..87b7520
 +AM_CONDITIONAL(HAVE_DMIDECODE, test "$DMIDECODE" != "")
 +AM_CONDITIONAL(HAVE_X86_ONLY_INTERNAL, test "$enable_x86_only_internal" = "yes")
 +AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "yes")
++AM_CONDITIONAL(HAVE_LINUX_SPI, test "$linux_spi" = "yes")
 +AM_CONDITIONAL(HAVE_RAYER_SPI, test "$rayer_spi" = "yes")
 +AM_CONDITIONAL(HAVE_BITBANG_SPI, test "$bitbang_spi" = "yes")
 +AM_CONDITIONAL(HAVE_NIC3COM, test "$nic3com" = "yes")
@@ -460,8 +498,12 @@ index 0000000..87b7520
 +AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
 +AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
 +
++# FIXME remove in the future
++AM_CONDITIONAL(HAVE_SYS_UTSNAME, test "$ac_cv_header_sys_utsname_h" = "yes")
++AM_CONDITIONAL(HAVE_UNAME, test "$ac_cv_func_uname" = "yes")
++
 +AC_CONFIG_FILES([Makefile])
 +AC_OUTPUT
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch b/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch
index ef4d491..c8334ac 100644
--- a/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch
+++ b/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch
@@ -1,7 +1,7 @@
-From e389cb3a26fac0ff6f343fcad17a592c0b81c6aa Mon Sep 17 00:00:00 2001
+From d2e30fbae81b893a011d930bda82dbb08b1a369f Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Sat, 12 Jun 2010 22:13:53 +0400
-Subject: [PATCH 02/13] Use dmidecode path defined at configure stage
+Subject: [PATCH 02/10] Use dmidecode path defined at configure stage
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
@@ -9,10 +9,10 @@ Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/dmi.c b/dmi.c
-index 4f36245..d03e2b8 100644
+index 5f64b94..537c2d5 100644
 --- a/dmi.c
 +++ b/dmi.c
-@@ -84,7 +84,7 @@ static const struct {
+@@ -85,7 +85,7 @@ static const struct {
  };
  
  #define DMI_COMMAND_LEN_MAX 260
@@ -22,5 +22,5 @@ index 4f36245..d03e2b8 100644
  static char *dmistrings[ARRAY_SIZE(dmidecode_names)];
  
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0003-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch b/flashrom-0003-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch
new file mode 100644
index 0000000..7ef31a5
--- /dev/null
+++ b/flashrom-0003-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch
@@ -0,0 +1,70 @@
+From b3f7e7254eefb073dd61119c513cb028291a122a Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Sat, 18 Sep 2010 09:05:43 +0400
+Subject: [PATCH 03/10] Use macros from config.h instead of HAVE_UTSNAME
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ Makefile.am  |    6 ------
+ configure.ac |    4 ----
+ flashrom.c   |    6 ++++--
+ 3 files changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 06e76da..9eb6522 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,12 +5,6 @@ man_MANS = flashrom.8
+ # FIXME use "config.h" in the future
+ DEFS += -DFLASHROM_VERSION=\"@VERSION@\"
+ 
+-if HAVE_SYS_UTSNAME
+-if HAVE_UNAME
+-DEFS += -DHAVE_UTSNAME=1
+-endif
+-endif
+-
+ if HAVE_DMIDECODE
+ DEFS += -DDMIDECODE_PATH=\"@DMIDECODE@\"
+ else
+diff --git a/configure.ac b/configure.ac
+index c5e89fe..c73e276 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -250,9 +250,5 @@ AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes")
+ AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
+ AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
+ 
+-# FIXME remove in the future
+-AM_CONDITIONAL(HAVE_SYS_UTSNAME, test "$ac_cv_header_sys_utsname_h" = "yes")
+-AM_CONDITIONAL(HAVE_UNAME, test "$ac_cv_func_uname" = "yes")
+-
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+diff --git a/flashrom.c b/flashrom.c
+index c565a43..6360d97 100644
+--- a/flashrom.c
++++ b/flashrom.c
+@@ -31,7 +31,9 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <getopt.h>
+-#if HAVE_UTSNAME == 1
++#include "config.h"
++
++#if HAVE_SYS_UTSNAME_H == 1
+ #include <sys/utsname.h>
+ #endif
+ #include "flash.h"
+@@ -1607,7 +1609,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
+ 
+ void print_sysinfo(void)
+ {
+-#if HAVE_UTSNAME == 1
++#if HAVE_UNAME == 1
+ 	struct utsname osinfo;
+ 	uname(&osinfo);
+ 
+-- 
+1.7.6.4
+
diff --git a/flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch b/flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
similarity index 70%
rename from flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
rename to flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
index dab393d..a2d1544 100644
--- a/flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
+++ b/flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
@@ -1,24 +1,26 @@
-From d143299bcd2d0dcb4c9753f3ff0b795dc04ed465 Mon Sep 17 00:00:00 2001
+From abec9376de399fd6e41d1b26343fc2b4eec85c05 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Sat, 18 Sep 2010 09:40:01 +0400
-Subject: [PATCH 06/13] Kill some x86-related ifdefs in code - this is now
+Subject: [PATCH 04/10] Kill some x86-related ifdefs in code - this is now
  controlled via autotools
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- atahpt.c     |    6 ------
- ichspi.c     |    4 ----
- it85spi.c    |    4 ----
- it87spi.c    |    4 ----
- mcp6x_spi.c  |    4 ----
- nic3com.c    |    6 ------
- nicnatsemi.c |    6 ------
- nicrealtek.c |    6 ------
- rayer_spi.c  |    5 -----
- satamv.c     |    5 -----
- sb600spi.c   |    4 ----
- wbsio_spi.c  |    4 ----
- 12 files changed, 0 insertions(+), 58 deletions(-)
+ atahpt.c          |    6 ------
+ ich_descriptors.c |    3 ---
+ ich_descriptors.h |    2 --
+ ichspi.c          |    4 ----
+ it85spi.c         |    4 ----
+ it87spi.c         |    4 ----
+ mcp6x_spi.c       |    4 ----
+ nic3com.c         |    6 ------
+ nicnatsemi.c      |    6 ------
+ nicrealtek.c      |    6 ------
+ rayer_spi.c       |    5 -----
+ satamv.c          |    5 -----
+ sb600spi.c        |    4 ----
+ wbsio_spi.c       |    4 ----
+ 14 files changed, 0 insertions(+), 63 deletions(-)
 
 diff --git a/atahpt.c b/atahpt.c
 index 3451342..eadb158 100644
@@ -41,8 +43,43 @@ index 3451342..eadb158 100644
 -#else
 -#error PCI port I/O access is not supported on this architecture yet.
 -#endif
+diff --git a/ich_descriptors.c b/ich_descriptors.c
+index 125077c..8ca643d 100644
+--- a/ich_descriptors.c
++++ b/ich_descriptors.c
+@@ -19,8 +19,6 @@
+  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+  */
+ 
+-#if defined(__i386__) || defined(__x86_64__)
+-
+ #include "ich_descriptors.h"
+ #include "flash.h" /* for msg_* */
+ #include "programmer.h"
+@@ -313,4 +311,3 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc)
+ 	msg_pdbg2(" done.\n");
+ 	return ICH_RET_OK;
+ }
+-#endif /* defined(__i386__) || defined(__x86_64__) */
+diff --git a/ich_descriptors.h b/ich_descriptors.h
+index 4e2ad0a..a3cfea8 100644
+--- a/ich_descriptors.h
++++ b/ich_descriptors.h
+@@ -19,7 +19,6 @@
+  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+  */
+ 
+-#if defined(__i386__) || defined(__x86_64__)
+ #ifndef __ICH_DESCRIPTORS_H__
+ #define __ICH_DESCRIPTORS_H__ 1
+ 
+@@ -258,4 +257,3 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc);
+ int getFCBA_component_density(const struct ich_descriptors *desc, uint8_t idx);
+ 
+ #endif /* __ICH_DESCRIPTORS_H__ */
+-#endif /* defined(__i386__) || defined(__x86_64__) */
 diff --git a/ichspi.c b/ichspi.c
-index 34f0891..27170c6 100644
+index afa420b..cc4ce0d 100644
 --- a/ichspi.c
 +++ b/ichspi.c
 @@ -23,8 +23,6 @@
@@ -52,16 +89,16 @@ index 34f0891..27170c6 100644
 -#if defined(__i386__) || defined(__x86_64__)
 -
  #include <string.h>
+ #include <stdlib.h>
  #include "flash.h"
- #include "chipdrivers.h"
-@@ -1397,5 +1395,3 @@ int via_init_spi(struct pci_dev *dev)
+@@ -1561,5 +1559,3 @@ int via_init_spi(struct pci_dev *dev)
  
  	return 0;
  }
 -
 -#endif
 diff --git a/it85spi.c b/it85spi.c
-index 76e4861..c9cbb72 100644
+index 75a565c..f9815b2 100644
 --- a/it85spi.c
 +++ b/it85spi.c
 @@ -24,8 +24,6 @@
@@ -80,7 +117,7 @@ index 76e4861..c9cbb72 100644
 -
 -#endif
 diff --git a/it87spi.c b/it87spi.c
-index c24ba9b..24dd746 100644
+index 5fe74ce..fcd881e 100644
 --- a/it87spi.c
 +++ b/it87spi.c
 @@ -23,8 +23,6 @@
@@ -92,7 +129,7 @@ index c24ba9b..24dd746 100644
  #include <string.h>
  #include <stdlib.h>
  #include "flash.h"
-@@ -400,5 +398,3 @@ static int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf,
+@@ -399,5 +397,3 @@ static int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf,
  
  	return 0;
  }
@@ -181,7 +218,7 @@ index bed0710..39bbc8a 100644
 -#error PCI port I/O access is not supported on this architecture yet.
 -#endif
 diff --git a/rayer_spi.c b/rayer_spi.c
-index 0807487..f722f95 100644
+index 417fde9..46babb4 100644
 --- a/rayer_spi.c
 +++ b/rayer_spi.c
 @@ -28,7 +28,6 @@
@@ -191,8 +228,8 @@ index 0807487..f722f95 100644
 -#if defined(__i386__) || defined(__x86_64__)
  
  #include <stdlib.h>
- #include "flash.h"
-@@ -136,7 +135,3 @@ int rayer_spi_init(void)
+ #include <string.h>
+@@ -177,7 +176,3 @@ int rayer_spi_init(void)
  
  	return 0;
  }
@@ -221,7 +258,7 @@ index 5c15fc8..618f946 100644
 -#error PCI port I/O access is not supported on this architecture yet.
 -#endif
 diff --git a/sb600spi.c b/sb600spi.c
-index 37aac3b..e176f00 100644
+index 9d82b47..4a5e954 100644
 --- a/sb600spi.c
 +++ b/sb600spi.c
 @@ -21,8 +21,6 @@
@@ -231,9 +268,9 @@ index 37aac3b..e176f00 100644
 -#if defined(__i386__) || defined(__x86_64__)
 -
  #include "flash.h"
- #include "chipdrivers.h"
  #include "programmer.h"
-@@ -317,5 +315,3 @@ int sb600_probe_spi(struct pci_dev *dev)
+ #include "spi.h"
+@@ -319,5 +317,3 @@ int sb600_probe_spi(struct pci_dev *dev)
  	register_spi_programmer(&spi_programmer_sb600);
  	return 0;
  }
@@ -259,5 +296,5 @@ index 851c87f..e166d8e 100644
 -
 -#endif
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0007-Simplify-hwaccess.c.patch b/flashrom-0005-Simplify-hwaccess.c.patch
similarity index 97%
rename from flashrom-0007-Simplify-hwaccess.c.patch
rename to flashrom-0005-Simplify-hwaccess.c.patch
index d44182d..77f565b 100644
--- a/flashrom-0007-Simplify-hwaccess.c.patch
+++ b/flashrom-0005-Simplify-hwaccess.c.patch
@@ -1,7 +1,7 @@
-From 63f49c09bafe87945d71d72e6b1c9aabea65c5d7 Mon Sep 17 00:00:00 2001
+From e2730aed4ce04a0e06e7a7113a9c3e5334b3130a Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Tue, 21 Sep 2010 17:51:08 +0400
-Subject: [PATCH 07/13] Simplify hwaccess.c
+Subject: [PATCH 05/10] Simplify hwaccess.c
 
 This file is saturated with superfluous ifdefs arranged into
 several nested levels. This in turn adds additional complexity
@@ -142,5 +142,5 @@ index 8c89925..f10d957 100644
  void mmio_writeb(uint8_t val, void *addr)
  {
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch b/flashrom-0006-Use-endiannes-determined-at-the-configure-stage.patch
similarity index 90%
rename from flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch
rename to flashrom-0006-Use-endiannes-determined-at-the-configure-stage.patch
index 4c1393b..2b25b50 100644
--- a/flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch
+++ b/flashrom-0006-Use-endiannes-determined-at-the-configure-stage.patch
@@ -1,7 +1,7 @@
-From 99b4c8249dffba7072f770436615d633b6920c52 Mon Sep 17 00:00:00 2001
+From c56eb72b4bd5656b081afa1ab5bc82fb85157526 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Sun, 26 Sep 2010 18:25:31 +0400
-Subject: [PATCH 08/13] Use endiannes determined at the configure stage
+Subject: [PATCH 06/10] Use endiannes determined at the configure stage
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
@@ -9,10 +9,10 @@ Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
  1 files changed, 2 insertions(+), 51 deletions(-)
 
 diff --git a/hwaccess.h b/hwaccess.h
-index 5ca8975..61f1251 100644
+index eea3652..5188a98 100644
 --- a/hwaccess.h
 +++ b/hwaccess.h
-@@ -43,51 +43,6 @@
+@@ -41,51 +41,6 @@
  #undef index
  #endif
  
@@ -64,7 +64,7 @@ index 5ca8975..61f1251 100644
  #define ___constant_swab8(x) ((uint8_t) (				\
  	(((uint8_t)(x) & (uint8_t)0xffU))))
  
-@@ -129,7 +84,7 @@ cpu_to_le(64)
+@@ -127,7 +82,7 @@ cpu_to_le(64)
  #define cpu_to_be32
  #define cpu_to_be64
  
@@ -73,7 +73,7 @@ index 5ca8975..61f1251 100644
  
  #define cpu_to_be(bits)							\
  static inline uint##bits##_t cpu_to_be##bits(uint##bits##_t val)	\
-@@ -147,11 +102,7 @@ cpu_to_be(64)
+@@ -145,11 +100,7 @@ cpu_to_be(64)
  #define cpu_to_le32
  #define cpu_to_le64
  
@@ -87,5 +87,5 @@ index 5ca8975..61f1251 100644
  #define be_to_cpu8 cpu_to_be8
  #define be_to_cpu16 cpu_to_be16
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch b/flashrom-0007-Use-HAVE_-_H-macro-for-detecting-includes.patch
similarity index 80%
rename from flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch
rename to flashrom-0007-Use-HAVE_-_H-macro-for-detecting-includes.patch
index 2388df7..db6c179 100644
--- a/flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch
+++ b/flashrom-0007-Use-HAVE_-_H-macro-for-detecting-includes.patch
@@ -1,35 +1,34 @@
-From fb8494eb62635a5520aa1da7bad4555882026af9 Mon Sep 17 00:00:00 2001
+From 88ea1d878356897c04ea06008e82a8e10daf6a03 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Sun, 26 Sep 2010 21:05:50 +0400
-Subject: [PATCH 09/13] Use HAVE_*_H macro for detecting includes
+Subject: [PATCH 07/10] Use HAVE_*_H macro for detecting includes
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- hwaccess.h |   72 ++++++++++++++++++++++++++++++++++++++++++-----------------
- 1 files changed, 51 insertions(+), 21 deletions(-)
+ hwaccess.h |   72 +++++++++++++++++++++++++++++++++++++++++++----------------
+ 1 files changed, 52 insertions(+), 20 deletions(-)
 
 diff --git a/hwaccess.h b/hwaccess.h
-index 61f1251..b3024b3 100644
+index 5188a98..85c556d 100644
 --- a/hwaccess.h
 +++ b/hwaccess.h
-@@ -26,13 +26,11 @@
- 
- #include "config.h"
+@@ -24,11 +24,11 @@
+ #ifndef __HWACCESS_H__
+ #define __HWACCESS_H__ 1
  
 -#if defined (__i386__) || defined (__x86_64__)
 -#if defined(__GLIBC__)
++#include "config.h"
++
 +#if defined (HAVE_SYS_IO_H)
  #include <sys/io.h>
 -#endif
 -#endif
 +#endif /* defined (HAVE_SYS_IO_H) */
  
--#if HAVE_LIBPCI == 1
-+#if defined (HAVE_LIBPCI)
+ #if NEED_PCI == 1
  /*
-  * libpci headers use the variable name "index" which triggers shadowing
-  * warnings on systems which have the index() function in a default #include
-@@ -41,7 +39,47 @@
+@@ -39,7 +39,47 @@
  #define index shadow_workaround_index
  #include <pci/pci.h>
  #undef index
@@ -78,10 +77,10 @@ index 61f1251..b3024b3 100644
  
  #define ___constant_swab8(x) ((uint8_t) (				\
  	(((uint8_t)(x) & (uint8_t)0xffU))))
-@@ -114,18 +152,13 @@ cpu_to_be(64)
+@@ -112,18 +152,13 @@ cpu_to_be(64)
  #define le_to_cpu64 cpu_to_le64
  
- #if HAVE_LIBPCI == 1
+ #if NEED_PCI == 1
 +
 +/* PCI port I/O is not yet implemented on PowerPC. */
 +/* PCI port I/O is not yet implemented on MIPS. */
@@ -100,7 +99,7 @@ index 61f1251..b3024b3 100644
  #if (defined(__MACH__) && defined(__APPLE__))
  #define __DARWIN__
  #endif
-@@ -135,7 +168,6 @@ cpu_to_be(64)
+@@ -133,7 +168,6 @@ cpu_to_be(64)
   */
  
  #if defined(__FreeBSD__) || defined(__DragonFly__)
@@ -108,7 +107,7 @@ index 61f1251..b3024b3 100644
    #define off64_t off_t
    #define lseek64 lseek
    #define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
-@@ -163,8 +195,6 @@ cpu_to_be(64)
+@@ -161,8 +195,6 @@ cpu_to_be(64)
  
  #ifdef __DJGPP__
  
@@ -117,7 +116,7 @@ index 61f1251..b3024b3 100644
    #define OUTB(x,y) outportb(y, x)
    #define OUTW(x,y) outportw(y, x)
    #define OUTL(x,y) outportl(y, x)
-@@ -191,8 +221,6 @@ cpu_to_be(64)
+@@ -189,8 +221,6 @@ cpu_to_be(64)
    #define off64_t off_t
    #define lseek64 lseek
    #if defined(__i386__) || defined(__x86_64__)
@@ -126,7 +125,7 @@ index 61f1251..b3024b3 100644
  #if defined(__NetBSD__)
      #if defined(__i386__)
        #define iopl i386_iopl
-@@ -249,7 +277,8 @@ static inline uint32_t inl(uint16_t port)
+@@ -247,7 +277,8 @@ static inline uint32_t inl(uint16_t port)
  typedef struct { uint32_t hi, lo; } msr_t;
  msr_t rdmsr(int addr);
  int wrmsr(int addr, msr_t msr);
@@ -136,7 +135,7 @@ index 61f1251..b3024b3 100644
  #if defined(__FreeBSD__) || defined(__DragonFly__)
  /* FreeBSD already has conflicting definitions for wrmsr/rdmsr. */
  #undef rdmsr
-@@ -259,7 +288,8 @@ int wrmsr(int addr, msr_t msr);
+@@ -257,7 +288,8 @@ int wrmsr(int addr, msr_t msr);
  typedef struct { uint32_t hi, lo; } msr_t;
  msr_t freebsd_rdmsr(int addr);
  int freebsd_wrmsr(int addr, msr_t msr);
@@ -147,5 +146,5 @@ index 61f1251..b3024b3 100644
  #include <arch/io.h>
  #include <arch/msr.h>
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch b/flashrom-0008-Move-arch-checking-ifdef-block-into-header.patch
similarity index 65%
rename from flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch
rename to flashrom-0008-Move-arch-checking-ifdef-block-into-header.patch
index 3387a68..c200c61 100644
--- a/flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch
+++ b/flashrom-0008-Move-arch-checking-ifdef-block-into-header.patch
@@ -1,13 +1,13 @@
-From 7364a346bc8e0026df4d470809035cd4d3dc916a Mon Sep 17 00:00:00 2001
+From 706a7a08d331f6dde0cbc539aa8dd449a21104ba Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Sun, 17 Oct 2010 12:53:18 +0400
-Subject: [PATCH 10/13] Move arch-checking #ifdef block into header
+Subject: [PATCH 08/10] Move arch-checking #ifdef block into header
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
  hwaccess.c |    7 -------
- hwaccess.h |   21 ++++++++-------------
- 2 files changed, 8 insertions(+), 20 deletions(-)
+ hwaccess.h |   14 +-------------
+ 2 files changed, 1 insertions(+), 20 deletions(-)
 
 diff --git a/hwaccess.c b/hwaccess.c
 index f10d957..98dbfaa 100644
@@ -28,24 +28,10 @@ index f10d957..98dbfaa 100644
  #if defined(__FreeBSD__) || defined(__DragonFly__)
  int io_fd;
 diff --git a/hwaccess.h b/hwaccess.h
-index b3024b3..214c38b 100644
+index 85c556d..c1678e1 100644
 --- a/hwaccess.h
 +++ b/hwaccess.h
-@@ -26,6 +26,13 @@
- 
- #include "config.h"
- 
-+#if !(	defined(__i386__) || \
-+	defined(__x86_64__) || defined(__amd64) || \
-+	defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips) || \
-+	defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__))
-+#error Unknown architecture
-+#endif
-+
- #if defined (HAVE_SYS_IO_H)
- #include <sys/io.h>
- #endif /* defined (HAVE_SYS_IO_H) */
-@@ -183,7 +190,7 @@ cpu_to_be(64)
+@@ -183,7 +183,7 @@ cpu_to_be(64)
      #define off64_t off_t
      #define lseek64 lseek
  #endif
@@ -54,7 +40,7 @@ index b3024b3..214c38b 100644
    /* Note different order for outb */
    #define OUTB(x,y) outb(y, x)
    #define OUTW(x,y) outw(y, x)
-@@ -301,18 +308,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
+@@ -301,18 +301,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
  #define wrmsr libpayload_wrmsr
  #endif
  
@@ -74,5 +60,5 @@ index b3024b3..214c38b 100644
  #endif
  
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0011-ppc-hack.patch b/flashrom-0009-ppc-hack.patch
similarity index 83%
rename from flashrom-0011-ppc-hack.patch
rename to flashrom-0009-ppc-hack.patch
index 24c8b71..0c3103e 100644
--- a/flashrom-0011-ppc-hack.patch
+++ b/flashrom-0009-ppc-hack.patch
@@ -1,7 +1,7 @@
-From 64d86555c0c1061572d8cb66a8ec5e73423ad7e6 Mon Sep 17 00:00:00 2001
+From 1a514e6abd046c2e9310c07488090d03bfd9d86c Mon Sep 17 00:00:00 2001
 From: Mattias Mattsson <vitplister at gmail.com>
 Date: Wed, 27 Jul 2011 21:02:50 +0400
-Subject: [PATCH 11/13] ppc hack
+Subject: [PATCH 09/10] ppc hack
 
 ---
  internal.c         |    2 ++
@@ -9,10 +9,10 @@ Subject: [PATCH 11/13] ppc hack
  2 files changed, 3 insertions(+), 1 deletions(-)
 
 diff --git a/internal.c b/internal.c
-index 6cd791c..c7e527f 100644
+index fc9d9e4..393bdcd 100644
 --- a/internal.c
 +++ b/internal.c
-@@ -293,6 +293,8 @@ int internal_init(void)
+@@ -295,6 +295,8 @@ int internal_init(void)
  		 "Aborting.\n");
  	return 1;
  #endif
@@ -35,5 +35,5 @@ index d680f97..014e019 100644
  int processor_flash_enable(void)
  {
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom-0013-Simplify-processor.h.patch b/flashrom-0010-Simplify-processor.h.patch
similarity index 67%
rename from flashrom-0013-Simplify-processor.h.patch
rename to flashrom-0010-Simplify-processor.h.patch
index 235867f..38749fa 100644
--- a/flashrom-0013-Simplify-processor.h.patch
+++ b/flashrom-0010-Simplify-processor.h.patch
@@ -1,15 +1,15 @@
-From 4dd2659b1379d008709e63ae9f28bb09382221d2 Mon Sep 17 00:00:00 2001
+From 8366b13dfc43d432e9735bef59aa276aa7e8dd98 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Thu, 28 Jul 2011 12:56:17 +0400
-Subject: [PATCH 13/13] Simplify processor.h
+Subject: [PATCH 10/10] Simplify processor.h
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- processor_enable.c |   24 ++++++++----------------
- 1 files changed, 8 insertions(+), 16 deletions(-)
+ processor_enable.c |   26 +++++++++-----------------
+ 1 files changed, 9 insertions(+), 17 deletions(-)
 
 diff --git a/processor_enable.c b/processor_enable.c
-index 014e019..d2e98b0 100644
+index 014e019..bf69330 100644
 --- a/processor_enable.c
 +++ b/processor_enable.c
 @@ -24,19 +24,6 @@
@@ -32,24 +32,31 @@ index 014e019..d2e98b0 100644
  #if defined (__MIPSEL__) && defined (__linux)
  #include <stdio.h>
  #include <string.h>
-@@ -89,9 +76,14 @@ int processor_flash_enable(void)
+@@ -83,15 +70,20 @@ static int is_loongson(void)
+ 
+ int processor_flash_enable(void)
+ {
++	int ret = 1;
+ 	/* FIXME: detect loongson on FreeBSD and OpenBSD as well.  */
+ #if defined (__MIPSEL__) && defined (__linux)
+ 	if (is_loongson()) {
  		flashbase = 0x1fc00000;
- 		return 0;
+-		return 0;
++		ret = 0;
  	}
--#endif
 +#elif defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
 +	/* On x86, flash access is not processor specific except on
 +	 * AMD Elan SC520, AMD Geode and maybe other SoC-style CPUs.
 +	 * FIXME: Move enable_flash_cs5536 and get_flashbase_sc520 here.
 +	 */
-+	return 0;
-+#else
++	ret = 0;
+ #endif
  	/* Not implemented yet. Oh well. */
- 	return 1;
--}
+-	return 1;
++	return ret;
+ }
 -
- #endif
-+}
+-#endif
 -- 
-1.7.6
+1.7.6.4
 
diff --git a/flashrom.spec b/flashrom.spec
index 95d940a..69fba53 100644
--- a/flashrom.spec
+++ b/flashrom.spec
@@ -1,28 +1,25 @@
 Summary:	Simple program for reading/writing BIOS chips content
 Name:		flashrom
 Version:	0.9.4
-Release:	1.svn1412%{?dist}
+Release:	2.svn1455%{?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
-## svn -r 1412 export svn://coreboot.org/flashrom/trunk flashrom-0.9.4
+## svn -r 1455 export svn://coreboot.org/flashrom/trunk flashrom-0.9.4
 ## tar -cjvf flashrom-0.9.4.tar.bz2 flashrom-0.9.4
 Source0:	%{name}-%{version}.tar.bz2
 Patch1:		flashrom-0001-Initial-commit-of-autotools-related-files.patch
 Patch2:		flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch
-Patch3:		flashrom-0003-Use-flashrom-s-version-from-config.h.patch
-Patch4:		flashrom-0004-Use-HAVE_LIBPCI-from-config.h-instead-of-NEED_PCI.patch
-Patch5:		flashrom-0005-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch
-Patch6:		flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
-Patch7:		flashrom-0007-Simplify-hwaccess.c.patch
-Patch8:		flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch
-Patch9:		flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch
-Patch10:	flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch
-Patch11:	flashrom-0011-ppc-hack.patch
-Patch12:	flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch
-Patch13:	flashrom-0013-Simplify-processor.h.patch
+Patch3:		flashrom-0003-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch
+Patch4:		flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
+Patch5:		flashrom-0005-Simplify-hwaccess.c.patch
+Patch6:		flashrom-0006-Use-endiannes-determined-at-the-configure-stage.patch
+Patch7:		flashrom-0007-Use-HAVE_-_H-macro-for-detecting-includes.patch
+Patch8:		flashrom-0008-Move-arch-checking-ifdef-block-into-header.patch
+Patch9:		flashrom-0009-ppc-hack.patch
+Patch10:	flashrom-0010-Simplify-processor.h.patch
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	pciutils-devel
@@ -52,9 +49,7 @@ and write new contents on the chips ("flash the chip").
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
+
 
 %build
 autoreconf -ivf
@@ -76,6 +71,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/%{name}.*
 
 %changelog
+* Fri Oct 21 2011 Peter Lemenkov <lemenkov at gmail.com> - 0.9.4-2.svn1455
+- Updated to latest svn ver. 1455 (post-release snapshot for 0.9.4)
+- Added lots of new boards and several chipsets and flashchips
+- Lots of other cleanups and enhancements
+
 * Fri Aug 12 2011 Peter Lemenkov <lemenkov at gmail.com> - 0.9.4-1.svn1412
 - Updated to latest svn ver. 1412 (post-release snapshot for 0.9.4)
 - Experimental support for Apple PowerPC Macs reflashing
diff --git a/sources b/sources
index b9c9bbf..66942ea 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fb58fca9ff8b93de876bc4c3cfd77007  flashrom-0.9.4.tar.bz2
+ca3a057426ce8c0850997021e32d289e  flashrom-0.9.4.tar.bz2


More information about the scm-commits mailing list