Updated to latest svn ver. 1280 (post-release snapshot for 0.9.3)

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
Peter Lemenkov 2011-03-09 14:11:12 +03:00
parent e7e02567ca
commit bbd9bbed63
15 changed files with 199 additions and 269 deletions

View File

@ -1,22 +1,22 @@
From cb95544e4b35737ccb4abc5d041a975a79e8f4d1 Mon Sep 17 00:00:00 2001 From aa22deee600a694a1f032a1f76850da0ca59ca43 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 17 Sep 2010 18:58:28 +0400 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@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
Makefile.am | 172 ++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 180 +++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 399 insertions(+), 0 deletions(-) 2 files changed, 411 insertions(+), 0 deletions(-)
create mode 100644 Makefile.am create mode 100644 Makefile.am
create mode 100644 configure.ac create mode 100644 configure.ac
diff --git a/Makefile.am b/Makefile.am diff --git a/Makefile.am b/Makefile.am
new file mode 100644 new file mode 100644
index 0000000..6790ac5 index 0000000..04bd498
--- /dev/null --- /dev/null
+++ b/Makefile.am +++ b/Makefile.am
@@ -0,0 +1,172 @@ @@ -0,0 +1,180 @@
+sbin_PROGRAMS = flashrom +sbin_PROGRAMS = flashrom
+ +
+man_MANS = flashrom.8 +man_MANS = flashrom.8
@ -34,6 +34,7 @@ index 0000000..6790ac5
+if HAVE_X86_ONLY_INTERNAL +if HAVE_X86_ONLY_INTERNAL
+internal_x86_only_SOURCES = \ +internal_x86_only_SOURCES = \
+ ichspi.c \ + ichspi.c \
+ it85spi.c \
+ it87spi.c \ + it87spi.c \
+ mcp6x_spi.c \ + mcp6x_spi.c \
+ sb600spi.c \ + sb600spi.c \
@ -42,11 +43,21 @@ index 0000000..6790ac5
+DEFS += -DCONFIG_INTERNAL=1 +DEFS += -DCONFIG_INTERNAL=1
+endif +endif
+ +
+if HAVE_SERPROG
+serprog_SOURCES = serprog.c
+DEFS += -DCONFIG_SERPROG=1
+endif
+
+if HAVE_RAYER_SPI +if HAVE_RAYER_SPI
+rayer_spi_SOURCES = rayer_spi.c +rayer_spi_SOURCES = rayer_spi.c
+DEFS += -DCONFIG_RAYER_SPI=1 +DEFS += -DCONFIG_RAYER_SPI=1
+endif +endif
+ +
+if HAVE_BITBANG_SPI
+bitbang_spi_SOURCES = bitbang_spi.c
+DEFS += -DCONFIG_BITBANG_SPI=1
+endif
+
+if HAVE_NIC3COM +if HAVE_NIC3COM
+nic3com_SOURCES = nic3com.c +nic3com_SOURCES = nic3com.c
+DEFS += -DCONFIG_NIC3COM=1 +DEFS += -DCONFIG_NIC3COM=1
@ -57,11 +68,6 @@ index 0000000..6790ac5
+DEFS += -DCONFIG_GFXNVIDIA=1 +DEFS += -DCONFIG_GFXNVIDIA=1
+endif +endif
+ +
+if HAVE_GFXOGP
+gfxogp_SOURCES = ogp_spi.c
+DEFS += -DCONFIG_OGP_SPI=1
+endif
+
+if HAVE_SATASII +if HAVE_SATASII
+satasii_SOURCES = satasii.c +satasii_SOURCES = satasii.c
+DEFS += -DCONFIG_SATASII=1 +DEFS += -DCONFIG_SATASII=1
@ -102,9 +108,9 @@ index 0000000..6790ac5
+DEFS += -DCONFIG_NICINTEL_SPI=1 +DEFS += -DCONFIG_NICINTEL_SPI=1
+endif +endif
+ +
+if HAVE_SERPROG +if HAVE_GFXOGP
+serprog_SOURCES = serprog.c +gfxogp_SOURCES = ogp_spi.c
+DEFS += -DCONFIG_SERPROG=1 +DEFS += -DCONFIG_OGP_SPI=1
+endif +endif
+ +
+if HAVE_BUSPIRATE_SPI +if HAVE_BUSPIRATE_SPI
@ -112,15 +118,20 @@ index 0000000..6790ac5
+DEFS += -DCONFIG_BUSPIRATE_SPI=1 +DEFS += -DCONFIG_BUSPIRATE_SPI=1
+endif +endif
+ +
+if HAVE_SERIAL
+serial_SOURCES = serial.c
+endif
+
+if HAVE_DEDIPROG +if HAVE_DEDIPROG
+dediprog_SOURCES = dediprog.c +dediprog_SOURCES = dediprog.c
+DEFS += -DCONFIG_DEDIPROG=1 +DEFS += -DCONFIG_DEDIPROG=1
+endif +endif
+ +
+if HAVE_SATAMV
+satamv_SOURCES = satamv.c
+DEFS += -DCONFIG_SATAMV=1
+endif
+
+if HAVE_SERIAL
+serial_SOURCES = serial.c
+endif
+
+if HAVE_PRINT_WIKI +if HAVE_PRINT_WIKI
+print_wiki_SOURCES = print_wiki.c +print_wiki_SOURCES = print_wiki.c
+DEFS += -DCONFIG_PRINT_WIKI=1 +DEFS += -DCONFIG_PRINT_WIKI=1
@ -155,47 +166,44 @@ index 0000000..6790ac5
+ +
+lib_SOURCES = layout.c +lib_SOURCES = layout.c
+ +
+if HAVE_BITBANG_SPI
+bitbang_spi_SOURCES = bitbang_spi.c
+endif
+
+# Unknown purpose +# Unknown purpose
+# sharplhf00l04.c +# sharplhf00l04.c
+ +
+flashrom_SOURCES = \ +flashrom_SOURCES = \
+ programmer.c \ + programmer.c \
+ udelay.c \ + udelay.c \
+ $(lib_SOURCES) \
+ $(cli_SOURCES) \
+ $(bitbang_spi_SOURCES) \
+ $(chip_SOURCES) \
+ $(pci_SOURCES) \
+ $(serprog_SOURCES) \
+ $(rayer_spi_SOURCES) \
+ $(nic3com_SOURCES) \
+ $(internal_SOURCES) \ + $(internal_SOURCES) \
+ $(internal_x86_only_SOURCES) \ + $(internal_x86_only_SOURCES) \
+ $(serprog_SOURCES) \
+ $(rayer_spi_SOURCES) \
+ $(bitbang_spi_SOURCES) \
+ $(nic3com_SOURCES) \
+ $(gfxnvidia_SOURCES) \
+ $(satasii_SOURCES) \ + $(satasii_SOURCES) \
+ $(atahpt_SOURCES) \ + $(atahpt_SOURCES) \
+ $(dummy_SOURCES) \
+ $(ft_2232_spi_SOURCES) \ + $(ft_2232_spi_SOURCES) \
+ $(gfxnvidia_SOURCES) \ + $(dummy_SOURCES) \
+ $(gfxogp_SOURCES) \
+ $(drkaiser_SOURCES) \ + $(drkaiser_SOURCES) \
+ $(nicrealtek_SOURCES) \ + $(nicrealtek_SOURCES) \
+ $(nicnatsemi_SOURCES) \ + $(nicnatsemi_SOURCES) \
+ $(nicintel_SOURCES) \ + $(nicintel_SOURCES) \
+ $(gfxogp_SOURCES) \
+ $(buspirate_SOURCES) \ + $(buspirate_SOURCES) \
+ $(dediprog_SOURCES) \ + $(dediprog_SOURCES) \
+ $(satamv_SOURCES) \
+ $(serial_SOURCES) \
+ $(print_wiki_SOURCES) \ + $(print_wiki_SOURCES) \
+ $(serial_SOURCES) + $(pci_SOURCES) \
+ $(chip_SOURCES) \
+ $(cli_SOURCES) \
+ $(lib_SOURCES)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
new file mode 100644 new file mode 100644
index 0000000..27fa0f9 index 0000000..9b66251
--- /dev/null --- /dev/null
+++ b/configure.ac +++ b/configure.ac
@@ -0,0 +1,227 @@ @@ -0,0 +1,231 @@
+AC_INIT([flashrom], [0.9.3-r1250], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/]) +AC_INIT([flashrom], [0.9.3-r1280], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/])
+ +
+AC_PREREQ(2.59) +AC_PREREQ(2.59)
+ +
@ -229,7 +237,7 @@ index 0000000..27fa0f9
+ +
+AC_ARG_WITH([satasii], +AC_ARG_WITH([satasii],
+ AC_HELP_STRING([--with-satasii],[SiI SATA controllers support.]), + AC_HELP_STRING([--with-satasii],[SiI SATA controllers support.]),
+ [satasii="$withval"],[satasii="no"]) + [satasii="$withval"],[satasii="yes"])
+ +
+AC_ARG_WITH([atahpt], +AC_ARG_WITH([atahpt],
+ AC_HELP_STRING([--with-atahpt],[Highpoint (HPT) ATA/RAID controller support. IMPORTANT: This code is not yet working!]), + AC_HELP_STRING([--with-atahpt],[Highpoint (HPT) ATA/RAID controller support. IMPORTANT: This code is not yet working!]),
@ -263,7 +271,6 @@ index 0000000..27fa0f9
+ AC_HELP_STRING([--with-gfxogp],[The Open Graphics Project graphics card support.]), + AC_HELP_STRING([--with-gfxogp],[The Open Graphics Project graphics card support.]),
+ [gfxogp="$withval"],[gfxogp="yes"]) + [gfxogp="$withval"],[gfxogp="yes"])
+ +
+
+AC_ARG_WITH([buspirate_spi], +AC_ARG_WITH([buspirate_spi],
+ AC_HELP_STRING([--with-buspirate-spi],[Bus Pirate SPI support.]), + AC_HELP_STRING([--with-buspirate-spi],[Bus Pirate SPI support.]),
+ [buspirate_spi="$withval"],[buspirate_spi="yes"]) + [buspirate_spi="$withval"],[buspirate_spi="yes"])
@ -272,6 +279,10 @@ index 0000000..27fa0f9
+ AC_HELP_STRING([--with-dediprog],[Dediprog SF100 support. Incomplete and untested.]), + AC_HELP_STRING([--with-dediprog],[Dediprog SF100 support. Incomplete and untested.]),
+ [dediprog="$withval"],[dediprog="no"]) + [dediprog="$withval"],[dediprog="no"])
+ +
+AC_ARG_WITH([satamv],
+ AC_HELP_STRING([--with-satamv],[Marvell SATA controllers support.]),
+ [satamv="$withval"],[satamv="yes"])
+
+# Specific for Flashrom Wiki +# Specific for Flashrom Wiki
+AC_ARG_WITH([print_wiki], +AC_ARG_WITH([print_wiki],
+ AC_HELP_STRING([--with-print-wiki],[enable wiki export support. It is only useful if you have Flashrom wiki access.]), + AC_HELP_STRING([--with-print-wiki],[enable wiki export support. It is only useful if you have Flashrom wiki access.]),
@ -323,23 +334,23 @@ index 0000000..27fa0f9
+# Check whether we need PCI support +# Check whether we need PCI support
+if test "$internal" = 'yes' -o \ +if test "$internal" = 'yes' -o \
+ "$rayer_spi" = 'yes' -o \ + "$rayer_spi" = 'yes' -o \
+ "$bitbang_spi" = 'yes' -o \
+ "$nic3com" = 'yes' -o \ + "$nic3com" = 'yes' -o \
+ "$gfxnvidia" = 'yes' -o \ + "$gfxnvidia" = 'yes' -o \
+ "$gfxogp" = 'yes' -o \ + "$satasii" = 'yes' -o \
+ "satasii" = 'yes' -o \
+ "$atahpt" = 'yes' -o \ + "$atahpt" = 'yes' -o \
+ "$drkaiser" = 'yes' -o \ + "$drkaiser" = 'yes' -o \
+ "$nicrealtek" = 'yes' -o \ + "$nicrealtek" = 'yes' -o \
+ "$nicnatsemi" = 'yes' -o \ + "$nicnatsemi" = 'yes' -o \
+ "$nicintel_spi" = 'yes' ; then + "$nicintel_spi" = 'yes' -o \
+ "$gfxogp" = 'yes' -o \
+ "$satamv" = 'yes' ; then
+ pci="yes" + pci="yes"
+fi +fi
+ +
+if test "$internal" = 'yes' -o \ +if test "$rayer_spi" = 'yes' -o \
+ "$rayer_spi" = 'yes' -o \ + "$internal" = 'yes' -o \
+ "$gfxogp" = 'yes' -o \ + "$nicintel_spi" = 'yes' -o \
+ "$nicintel_spi" = 'yes' ; then + "$gfxogp" = 'yes' ; then
+ bitbang_spi="yes" + bitbang_spi="yes"
+fi +fi
+ +
@ -398,30 +409,31 @@ index 0000000..27fa0f9
+fi +fi
+ +
+# For Makefile.am +# For Makefile.am
+AM_CONDITIONAL(HAVE_RAYER_SPI, test "$rayer_spi" = "yes")
+AM_CONDITIONAL(HAVE_NIC3COM, test "$nic3com" = "yes")
+AM_CONDITIONAL(HAVE_DUMMY, test "$dummy" = "yes")
+AM_CONDITIONAL(HAVE_INTERNAL, test "$internal" = "yes") +AM_CONDITIONAL(HAVE_INTERNAL, test "$internal" = "yes")
+AM_CONDITIONAL(HAVE_X86_ONLY_INTERNAL, test "$enable_x86_only_internal" = "yes") +AM_CONDITIONAL(HAVE_X86_ONLY_INTERNAL, test "$enable_x86_only_internal" = "yes")
+AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "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")
+AM_CONDITIONAL(HAVE_GFXNVIDIA, test "$gfxnvidia" = "yes")
+AM_CONDITIONAL(HAVE_SATASII, test "$satasii" = "yes") +AM_CONDITIONAL(HAVE_SATASII, test "$satasii" = "yes")
+AM_CONDITIONAL(HAVE_ATAHPT, test "$atahpt" = "yes") +AM_CONDITIONAL(HAVE_ATAHPT, test "$atahpt" = "yes")
+AM_CONDITIONAL(HAVE_NICINTEL_SPI, test "$nicintel_spi" = "yes") +AM_CONDITIONAL(HAVE_FT2232_SPI, test "$ft2232_spi" = "yes")
+AM_CONDITIONAL(HAVE_NICNATSEMI, test "$nicnatsemi" = "yes") +AM_CONDITIONAL(HAVE_DUMMY, test "$dummy" = "yes")
+AM_CONDITIONAL(HAVE_DRKAISER, test "$drkaiser" = "yes")
+AM_CONDITIONAL(HAVE_NICREALTEK, test "$nicrealtek" = "yes") +AM_CONDITIONAL(HAVE_NICREALTEK, test "$nicrealtek" = "yes")
+AM_CONDITIONAL(HAVE_GFXNVIDIA, test "$gfxnvidia" = "yes") +AM_CONDITIONAL(HAVE_NICNATSEMI, test "$nicnatsemi" = "yes")
+AM_CONDITIONAL(HAVE_NICINTEL_SPI, test "$nicintel_spi" = "yes")
+AM_CONDITIONAL(HAVE_GFXOGP, test "$gfxogp" = "yes") +AM_CONDITIONAL(HAVE_GFXOGP, test "$gfxogp" = "yes")
+AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "yes")
+AM_CONDITIONAL(HAVE_BUSPIRATE_SPI, test "$buspirate_spi" = "yes") +AM_CONDITIONAL(HAVE_BUSPIRATE_SPI, test "$buspirate_spi" = "yes")
+AM_CONDITIONAL(HAVE_DEDIPROG, test "$dediprog" = "yes")
+AM_CONDITIONAL(HAVE_SATAMV, test "$satamv" = "yes")
+AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes") +AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes")
+AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes") +AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
+AM_CONDITIONAL(HAVE_DEDIPROG, test "$dediprog" = "yes")
+AM_CONDITIONAL(HAVE_DRKAISER, test "$drkaiser" = "yes")
+AM_CONDITIONAL(HAVE_FT2232_SPI, test "$ft2232_spi" = "yes")
+AM_CONDITIONAL(HAVE_BITBANG_SPI, test "$bitbang_spi" = "yes")
+AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes") +AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
+ +
+AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile])
+AC_OUTPUT +AC_OUTPUT
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From a9c3a3d0fb1a35f99562e7cf5e13332510ff8c33 Mon Sep 17 00:00:00 2001 From 594b2aa88279837529cb577d570d1df921d41c76 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 12 Jun 2010 22:13:53 +0400 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@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
@ -22,5 +22,5 @@ index cda6656..2853c93 100644
static char *dmistrings[ARRAY_SIZE(dmidecode_names)]; static char *dmistrings[ARRAY_SIZE(dmidecode_names)];
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From 969d01d210afc2fc7a69c85c9f23ae3061201552 Mon Sep 17 00:00:00 2001 From 14a8ad8f34a02865783d52b88c24c972f38fe47c Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 17 Sep 2010 22:32:07 +0400 Date: Fri, 17 Sep 2010 22:32:07 +0400
Subject: [PATCH 03/13] Use flashrom's version from config.h Subject: [PATCH 03/10] Use flashrom's version from config.h
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
@ -11,19 +11,19 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
3 files changed, 6 insertions(+), 4 deletions(-) 3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/flash.h b/flash.h diff --git a/flash.h b/flash.h
index 250482f..630f7c6 100644 index 91c4cf3..630f7c6 100644
--- a/flash.h --- a/flash.h
+++ b/flash.h +++ b/flash.h
@@ -188,7 +188,6 @@ enum write_granularity { @@ -188,7 +188,6 @@ enum write_granularity {
}; };
extern enum chipbustype buses_supported; extern enum chipbustype buses_supported;
extern int verbose; extern int verbose;
-extern const char * const flashrom_version; -extern const char flashrom_version[];
extern char *chip_to_probe; extern char *chip_to_probe;
void map_flash_registers(struct flashchip *flash); void map_flash_registers(struct flashchip *flash);
int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len); int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len);
diff --git a/flashrom.c b/flashrom.c diff --git a/flashrom.c b/flashrom.c
index f3497d0..49e1a52 100644 index 34248ed..fe2ff18 100644
--- a/flashrom.c --- a/flashrom.c
+++ b/flashrom.c +++ b/flashrom.c
@@ -31,6 +31,9 @@ @@ -31,6 +31,9 @@
@ -40,11 +40,11 @@ index f3497d0..49e1a52 100644
#include "flashchips.h" #include "flashchips.h"
#include "programmer.h" #include "programmer.h"
-const char * const flashrom_version = FLASHROM_VERSION; -const char flashrom_version[] = FLASHROM_VERSION;
char *chip_to_probe = NULL; char *chip_to_probe = NULL;
int verbose = 0; int verbose = 0;
@@ -1662,7 +1664,7 @@ void print_sysinfo(void) @@ -1677,7 +1679,7 @@ void print_sysinfo(void)
void print_version(void) void print_version(void)
{ {
@ -54,7 +54,7 @@ index f3497d0..49e1a52 100644
} }
diff --git a/print_wiki.c b/print_wiki.c diff --git a/print_wiki.c b/print_wiki.c
index 48e0122..eb044a4 100644 index 8b13f70..f51652f 100644
--- a/print_wiki.c --- a/print_wiki.c
+++ b/print_wiki.c +++ b/print_wiki.c
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
@ -63,9 +63,9 @@ index 48e0122..eb044a4 100644
#include "programmer.h" #include "programmer.h"
+#include "config.h" +#include "config.h"
static const char * const wiki_header = "= Supported devices =\n\n\ static const char wiki_header[] = "= Supported devices =\n\n\
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \ <div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
@@ -267,7 +268,7 @@ void print_supported_wiki(void) @@ -270,7 +271,7 @@ void print_supported_wiki(void)
{ {
time_t t = time(NULL); time_t t = time(NULL);
@ -75,5 +75,5 @@ index 48e0122..eb044a4 100644
#if CONFIG_INTERNAL == 1 #if CONFIG_INTERNAL == 1
print_supported_chipsets_wiki(3); print_supported_chipsets_wiki(3);
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From 6a58ab71cb5f216b7db64cf9be308e967edf3824 Mon Sep 17 00:00:00 2001 From 96c357b1a2f132d4e295062926f6a14b6b4c41f4 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 17 Sep 2010 22:33:12 +0400 Date: Fri, 17 Sep 2010 22:33:12 +0400
Subject: [PATCH 04/13] Use HAVE_LIBPCI from config.h instead of NEED_PCI Subject: [PATCH 04/10] Use HAVE_LIBPCI from config.h instead of NEED_PCI
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
@ -12,10 +12,10 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
4 files changed, 11 insertions(+), 6 deletions(-) 4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/flashrom.c b/flashrom.c diff --git a/flashrom.c b/flashrom.c
index 49e1a52..f05e36c 100644 index fe2ff18..63e516f 100644
--- a/flashrom.c --- a/flashrom.c
+++ b/flashrom.c +++ b/flashrom.c
@@ -1630,7 +1630,7 @@ void print_sysinfo(void) @@ -1645,7 +1645,7 @@ void print_sysinfo(void)
msg_ginfo(" on unknown machine"); msg_ginfo(" on unknown machine");
#endif #endif
msg_ginfo(", built with"); msg_ginfo(", built with");
@ -70,7 +70,7 @@ index c96db99..8bc49b9 100644
{ {
struct pci_dev *temp; struct pci_dev *temp;
diff --git a/programmer.h b/programmer.h diff --git a/programmer.h b/programmer.h
index 7bd1405..f0fef1c 100644 index b7cebc3..ae795be 100644
--- a/programmer.h --- a/programmer.h
+++ b/programmer.h +++ b/programmer.h
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
@ -82,7 +82,7 @@ index 7bd1405..f0fef1c 100644
enum programmer { enum programmer {
#if CONFIG_INTERNAL == 1 #if CONFIG_INTERNAL == 1
PROGRAMMER_INTERNAL, PROGRAMMER_INTERNAL,
@@ -204,7 +206,7 @@ void myusec_delay(int usecs); @@ -206,7 +208,7 @@ void myusec_delay(int usecs);
void myusec_calibrate_delay(void); void myusec_calibrate_delay(void);
void internal_delay(int usecs); void internal_delay(int usecs);
@ -91,7 +91,7 @@ index 7bd1405..f0fef1c 100644
/* pcidev.c */ /* pcidev.c */
extern uint32_t io_base_addr; extern uint32_t io_base_addr;
extern struct pci_access *pacc; extern struct pci_access *pacc;
@@ -265,7 +267,7 @@ void dmi_init(void); @@ -267,7 +269,7 @@ void dmi_init(void);
int dmi_match(const char *pattern); int dmi_match(const char *pattern);
/* internal.c */ /* internal.c */
@ -101,5 +101,5 @@ index 7bd1405..f0fef1c 100644
uint16_t vendor; uint16_t vendor;
uint16_t port; uint16_t port;
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From c0e8393c2149fb44b45ccb0e58af618c4d2b8301 Mon Sep 17 00:00:00 2001 From 3af0833c8e5ca032a60c09451615daa8706f7acf Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 18 Sep 2010 09:05:43 +0400 Date: Sat, 18 Sep 2010 09:05:43 +0400
Subject: [PATCH 05/13] Use macros from config.h instead of HAVE_UTSNAME Subject: [PATCH 05/10] Use macros from config.h instead of HAVE_UTSNAME
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
@ -9,7 +9,7 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
1 files changed, 2 insertions(+), 2 deletions(-) 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/flashrom.c b/flashrom.c diff --git a/flashrom.c b/flashrom.c
index f05e36c..fdb14fc 100644 index 63e516f..4c9f7cd 100644
--- a/flashrom.c --- a/flashrom.c
+++ b/flashrom.c +++ b/flashrom.c
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
@ -21,7 +21,7 @@ index f05e36c..fdb14fc 100644
#include <sys/utsname.h> #include <sys/utsname.h>
#endif #endif
#include "flash.h" #include "flash.h"
@@ -1620,7 +1620,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren) @@ -1635,7 +1635,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
void print_sysinfo(void) void print_sysinfo(void)
{ {
@ -31,5 +31,5 @@ index f05e36c..fdb14fc 100644
uname(&osinfo); uname(&osinfo);
-- --
1.7.3.4 1.7.4

View File

@ -1,11 +1,12 @@
From f4498e0b2c8f68d4ce4189d41da77c2dd7a14e9d Mon Sep 17 00:00:00 2001 From 3aa8831e8773db023965ebd7149aa0b1db0f673f Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 18 Sep 2010 09:40:01 +0400 Date: Sat, 18 Sep 2010 09:40:01 +0400
Subject: [PATCH 06/13] Kill some x86-related ifdefs in code - this is now controlled via autotools Subject: [PATCH 06/10] Kill some x86-related ifdefs in code - this is now controlled via autotools
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
ichspi.c | 4 ---- ichspi.c | 4 ----
it85spi.c | 4 ----
it87spi.c | 4 ---- it87spi.c | 4 ----
mcp6x_spi.c | 4 ---- mcp6x_spi.c | 4 ----
nic3com.c | 6 ------ nic3com.c | 6 ------
@ -14,10 +15,10 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
rayer_spi.c | 5 ----- rayer_spi.c | 5 -----
sb600spi.c | 4 ---- sb600spi.c | 4 ----
wbsio_spi.c | 4 ---- wbsio_spi.c | 4 ----
9 files changed, 0 insertions(+), 43 deletions(-) 10 files changed, 0 insertions(+), 47 deletions(-)
diff --git a/ichspi.c b/ichspi.c diff --git a/ichspi.c b/ichspi.c
index a087a0b..ea77361 100644 index 66c8d51..565f761 100644
--- a/ichspi.c --- a/ichspi.c
+++ b/ichspi.c +++ b/ichspi.c
@@ -34,8 +34,6 @@ @@ -34,8 +34,6 @@
@ -35,6 +36,25 @@ index a087a0b..ea77361 100644
} }
- -
-#endif -#endif
diff --git a/it85spi.c b/it85spi.c
index d122a18..ac3248c 100644
--- a/it85spi.c
+++ b/it85spi.c
@@ -24,8 +24,6 @@
* Contains the ITE IT85* SPI specific routines
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -416,5 +414,3 @@ int it85_spi_write_256(struct flashchip *flash, uint8_t * buf, int start, int le
{
return spi_write_chunked(flash, buf, start, len, 64);
}
-
-#endif
diff --git a/it87spi.c b/it87spi.c diff --git a/it87spi.c b/it87spi.c
index fb1448a..c0f73e3 100644 index fb1448a..c0f73e3 100644
--- a/it87spi.c --- a/it87spi.c
@ -74,7 +94,7 @@ index 0e0d311..d9bb893 100644
- -
-#endif -#endif
diff --git a/nic3com.c b/nic3com.c diff --git a/nic3com.c b/nic3com.c
index 0eb781a..7084edf 100644 index d39ee71..8c9b2e3 100644
--- a/nic3com.c --- a/nic3com.c
+++ b/nic3com.c +++ b/nic3com.c
@@ -18,8 +18,6 @@ @@ -18,8 +18,6 @@
@ -86,7 +106,7 @@ index 0eb781a..7084edf 100644
#include <stdlib.h> #include <stdlib.h>
#include "flash.h" #include "flash.h"
#include "programmer.h" #include "programmer.h"
@@ -114,7 +112,3 @@ uint8_t nic3com_chip_readb(const chipaddr addr) @@ -113,7 +111,3 @@ uint8_t nic3com_chip_readb(const chipaddr addr)
OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR);
return INB(io_base_addr + BIOS_ROM_DATA); return INB(io_base_addr + BIOS_ROM_DATA);
} }
@ -95,7 +115,7 @@ index 0eb781a..7084edf 100644
-#error PCI port I/O access is not supported on this architecture yet. -#error PCI port I/O access is not supported on this architecture yet.
-#endif -#endif
diff --git a/nicnatsemi.c b/nicnatsemi.c diff --git a/nicnatsemi.c b/nicnatsemi.c
index 1683857..e3a2807 100644 index 3cae253..58f4471 100644
--- a/nicnatsemi.c --- a/nicnatsemi.c
+++ b/nicnatsemi.c +++ b/nicnatsemi.c
@@ -18,8 +18,6 @@ @@ -18,8 +18,6 @@
@ -107,7 +127,7 @@ index 1683857..e3a2807 100644
#include <stdlib.h> #include <stdlib.h>
#include "flash.h" #include "flash.h"
#include "programmer.h" #include "programmer.h"
@@ -89,7 +87,3 @@ uint8_t nicnatsemi_chip_readb(const chipaddr addr) @@ -88,7 +86,3 @@ uint8_t nicnatsemi_chip_readb(const chipaddr addr)
*/ */
return INB(io_base_addr + BOOT_ROM_DATA); return INB(io_base_addr + BOOT_ROM_DATA);
} }
@ -116,7 +136,7 @@ index 1683857..e3a2807 100644
-#error PCI port I/O access is not supported on this architecture yet. -#error PCI port I/O access is not supported on this architecture yet.
-#endif -#endif
diff --git a/nicrealtek.c b/nicrealtek.c diff --git a/nicrealtek.c b/nicrealtek.c
index c32e5d6..b5bcbaf 100644 index d97deb1..2951d0f 100644
--- a/nicrealtek.c --- a/nicrealtek.c
+++ b/nicrealtek.c +++ b/nicrealtek.c
@@ -18,8 +18,6 @@ @@ -18,8 +18,6 @@
@ -128,7 +148,7 @@ index c32e5d6..b5bcbaf 100644
#include <stdlib.h> #include <stdlib.h>
#include "flash.h" #include "flash.h"
#include "programmer.h" #include "programmer.h"
@@ -109,7 +107,3 @@ uint8_t nicrealtek_chip_readb(const chipaddr addr) @@ -92,7 +90,3 @@ uint8_t nicrealtek_chip_readb(const chipaddr addr)
return val; return val;
} }
@ -157,7 +177,7 @@ index a01ee80..e64137b 100644
-#error PCI port I/O access is not supported on this architecture yet. -#error PCI port I/O access is not supported on this architecture yet.
-#endif -#endif
diff --git a/sb600spi.c b/sb600spi.c diff --git a/sb600spi.c b/sb600spi.c
index 4e3e079..c468ca3 100644 index 845cf58..95ab158 100644
--- a/sb600spi.c --- a/sb600spi.c
+++ b/sb600spi.c +++ b/sb600spi.c
@@ -21,8 +21,6 @@ @@ -21,8 +21,6 @@
@ -195,5 +215,5 @@ index acf9cb2..1a583a8 100644
- -
-#endif -#endif
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From 610af38a4cc47c5ba95f7ff324beb7cf1253824f Mon Sep 17 00:00:00 2001 From dd4c51bdc2ce1e681592183adf51886da68b69f2 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Tue, 21 Sep 2010 17:51:08 +0400 Date: Tue, 21 Sep 2010 17:51:08 +0400
Subject: [PATCH 07/13] Simplify hwaccess.c Subject: [PATCH 07/10] Simplify hwaccess.c
This file is saturated with superfluous ifdefs arranged into This file is saturated with superfluous ifdefs arranged into
several nested levels. This in turn adds additional complexity several nested levels. This in turn adds additional complexity
@ -142,5 +142,5 @@ index bbb91a6..e700b67 100644
void mmio_writeb(uint8_t val, void *addr) void mmio_writeb(uint8_t val, void *addr)
{ {
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From 9b762628575706bf7bf6a8858dc1582ec42b92e5 Mon Sep 17 00:00:00 2001 From 28f80e2c168d5f9e4d88a85f6fd81d335c2322d3 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 26 Sep 2010 18:25:31 +0400 Date: Sun, 26 Sep 2010 18:25:31 +0400
Subject: [PATCH 08/13] Use endiannes determined at the configure stage Subject: [PATCH 08/10] Use endiannes determined at the configure stage
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
@ -87,5 +87,5 @@ index 920b82c..4655003 100644
#define be_to_cpu8 cpu_to_be8 #define be_to_cpu8 cpu_to_be8
#define be_to_cpu16 cpu_to_be16 #define be_to_cpu16 cpu_to_be16
-- --
1.7.3.4 1.7.4

View File

@ -1,26 +0,0 @@
From 876786ac15f0635b3f4128cba035e675517267bb Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 26 Sep 2010 20:14:18 +0400
Subject: [PATCH 09/13] Kill unused __FLASHROM_HAVE_OUTB__ define
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
hwaccess.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/hwaccess.h b/hwaccess.h
index 4655003..111f7d9 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -116,8 +116,6 @@ cpu_to_be(64)
#if HAVE_LIBPCI == 1
#if defined (__i386__) || defined (__x86_64__)
-#define __FLASHROM_HAVE_OUTB__ 1
-
/* for iopl and outb under Solaris */
#if defined (__sun) && (defined(__i386) || defined(__amd64))
#include <strings.h>
--
1.7.3.4

View File

@ -1,15 +1,15 @@
From a1968cc96e0aa0b58d3582109749a98e83c63b70 Mon Sep 17 00:00:00 2001 From 451a29cc8f3258f915469edf3c03e308b4103169 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 26 Sep 2010 21:05:50 +0400 Date: Sun, 26 Sep 2010 21:05:50 +0400
Subject: [PATCH 10/13] Use HAVE_*_H macro for detecting includes Subject: [PATCH 09/10] Use HAVE_*_H macro for detecting includes
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
hwaccess.h | 62 ++++++++++++++++++++++++++++++++++++++++++----------------- hwaccess.h | 72 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 44 insertions(+), 18 deletions(-) 1 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/hwaccess.h b/hwaccess.h diff --git a/hwaccess.h b/hwaccess.h
index 111f7d9..3326383 100644 index 4655003..2ed7bc4 100644
--- a/hwaccess.h --- a/hwaccess.h
+++ b/hwaccess.h +++ b/hwaccess.h
@@ -26,13 +26,11 @@ @@ -26,13 +26,11 @@
@ -78,10 +78,17 @@ index 111f7d9..3326383 100644
#define ___constant_swab8(x) ((uint8_t) ( \ #define ___constant_swab8(x) ((uint8_t) ( \
(((uint8_t)(x) & (uint8_t)0xffU)))) (((uint8_t)(x) & (uint8_t)0xffU))))
@@ -116,13 +154,6 @@ cpu_to_be(64) @@ -114,18 +152,13 @@ cpu_to_be(64)
#define le_to_cpu64 cpu_to_le64
#if HAVE_LIBPCI == 1 #if HAVE_LIBPCI == 1
+
+/* PCI port I/O is not yet implemented on PowerPC. */
+/* PCI port I/O is not yet implemented on MIPS. */
#if defined (__i386__) || defined (__x86_64__) #if defined (__i386__) || defined (__x86_64__)
#define __FLASHROM_HAVE_OUTB__ 1
-/* for iopl and outb under Solaris */ -/* for iopl and outb under Solaris */
-#if defined (__sun) && (defined(__i386) || defined(__amd64)) -#if defined (__sun) && (defined(__i386) || defined(__amd64))
-#include <strings.h> -#include <strings.h>
@ -89,10 +96,11 @@ index 111f7d9..3326383 100644
-#include <sys/psw.h> -#include <sys/psw.h>
-#include <asm/sunddi.h> -#include <asm/sunddi.h>
-#endif -#endif
-
#if (defined(__MACH__) && defined(__APPLE__)) #if (defined(__MACH__) && defined(__APPLE__))
#define __DARWIN__ #define __DARWIN__
@@ -133,7 +164,6 @@ cpu_to_be(64) #endif
@@ -135,7 +168,6 @@ cpu_to_be(64)
*/ */
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)
@ -100,7 +108,7 @@ index 111f7d9..3326383 100644
#define off64_t off_t #define off64_t off_t
#define lseek64 lseek #define lseek64 lseek
#define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0) #define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
@@ -161,8 +191,6 @@ cpu_to_be(64) @@ -163,8 +195,6 @@ cpu_to_be(64)
#ifdef __DJGPP__ #ifdef __DJGPP__
@ -109,7 +117,7 @@ index 111f7d9..3326383 100644
#define OUTB(x,y) outportb(y, x) #define OUTB(x,y) outportb(y, x)
#define OUTW(x,y) outportw(y, x) #define OUTW(x,y) outportw(y, x)
#define OUTL(x,y) outportl(y, x) #define OUTL(x,y) outportl(y, x)
@@ -189,8 +217,6 @@ cpu_to_be(64) @@ -191,8 +221,6 @@ cpu_to_be(64)
#define off64_t off_t #define off64_t off_t
#define lseek64 lseek #define lseek64 lseek
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__)
@ -118,6 +126,26 @@ index 111f7d9..3326383 100644
#if defined(__NetBSD__) #if defined(__NetBSD__)
#if defined(__i386__) #if defined(__i386__)
#define iopl i386_iopl #define iopl i386_iopl
@@ -249,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);
-#endif
+#endif /* !defined(__DARWIN__) && !defined(__FreeBSD__) && !defined(__DragonFly__) */
+
#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);
typedef struct { uint32_t hi, lo; } msr_t;
msr_t freebsd_rdmsr(int addr);
int freebsd_wrmsr(int addr, msr_t msr);
-#endif
+#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */
+
#if defined(__LIBPAYLOAD__)
#include <arch/io.h>
#include <arch/msr.h>
-- --
1.7.3.4 1.7.4

View File

@ -1,7 +1,7 @@
From 5dbbcb034eb2c903ac29b5d5e43919c8e75b45be Mon Sep 17 00:00:00 2001 From 5c9b5f98f7bb900213e30cdf68945243e8b340c8 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com> From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 17 Oct 2010 12:53:18 +0400 Date: Sun, 17 Oct 2010 12:53:18 +0400
Subject: [PATCH 12/13] Move arch-checking #ifdef block into header Subject: [PATCH 10/10] Move arch-checking #ifdef block into header
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
--- ---
@ -28,7 +28,7 @@ index e700b67..5fcc83e 100644
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)
int io_fd; int io_fd;
diff --git a/hwaccess.h b/hwaccess.h diff --git a/hwaccess.h b/hwaccess.h
index 9fb078f..b166429 100644 index 2ed7bc4..f192d3f 100644
--- a/hwaccess.h --- a/hwaccess.h
+++ b/hwaccess.h +++ b/hwaccess.h
@@ -26,6 +26,13 @@ @@ -26,6 +26,13 @@
@ -45,7 +45,7 @@ index 9fb078f..b166429 100644
#if defined (HAVE_SYS_IO_H) #if defined (HAVE_SYS_IO_H)
#include <sys/io.h> #include <sys/io.h>
#endif /* defined (HAVE_SYS_IO_H) */ #endif /* defined (HAVE_SYS_IO_H) */
@@ -181,7 +188,7 @@ cpu_to_be(64) @@ -183,7 +190,7 @@ cpu_to_be(64)
#define off64_t off_t #define off64_t off_t
#define lseek64 lseek #define lseek64 lseek
#endif #endif
@ -54,7 +54,7 @@ index 9fb078f..b166429 100644
/* Note different order for outb */ /* Note different order for outb */
#define OUTB(x,y) outb(y, x) #define OUTB(x,y) outb(y, x)
#define OUTW(x,y) outw(y, x) #define OUTW(x,y) outw(y, x)
@@ -299,18 +306,6 @@ int libpayload_wrmsr(int addr, msr_t msr); @@ -301,18 +308,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
#define wrmsr libpayload_wrmsr #define wrmsr libpayload_wrmsr
#endif #endif
@ -74,5 +74,5 @@ index 9fb078f..b166429 100644
#endif #endif
-- --
1.7.3.4 1.7.4

View File

@ -1,49 +0,0 @@
From 56f8ec888c9e3fcd6d08b86b22572ed9277f9ee5 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 17 Oct 2010 12:52:02 +0400
Subject: [PATCH 11/13] Add more comments (cosmetic change)
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
hwaccess.h | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hwaccess.h b/hwaccess.h
index 3326383..9fb078f 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -152,8 +152,10 @@ cpu_to_be(64)
#define le_to_cpu64 cpu_to_le64
#if HAVE_LIBPCI == 1
-#if defined (__i386__) || defined (__x86_64__)
+/* PCI port I/O is not yet implemented on PowerPC. */
+/* PCI port I/O is not yet implemented on MIPS. */
+#if defined (__i386__) || defined (__x86_64__)
#if (defined(__MACH__) && defined(__APPLE__))
#define __DARWIN__
@@ -273,7 +275,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);
-#endif
+#endif /* !defined(__DARWIN__) && !defined(__FreeBSD__) && !defined(__DragonFly__) */
+
#if defined(__FreeBSD__) || defined(__DragonFly__)
/* FreeBSD already has conflicting definitions for wrmsr/rdmsr. */
#undef rdmsr
@@ -283,7 +286,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);
-#endif
+#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */
+
#if defined(__LIBPAYLOAD__)
#include <arch/io.h>
#include <arch/msr.h>
--
1.7.3.4

View File

@ -1,61 +0,0 @@
From ae1f7fc89fe25fa663069f697a436aba85df3c06 Mon Sep 17 00:00:00 2001
From: Sergey Lichack <shadowpilot34@gmail.com>
Date: Tue, 4 Jan 2011 11:20:33 +0300
Subject: [PATCH 13/13] rtl8169 support
Here's a small patch that would add rtl8169 support to flashrom, but I
need someone to test it for me.
Signed-off-by: Sergey Lichack <shadowpilot34@gmail.com>
---
nicrealtek.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/nicrealtek.c b/nicrealtek.c
index b5bcbaf..b43e330 100644
--- a/nicrealtek.c
+++ b/nicrealtek.c
@@ -25,11 +25,12 @@
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_VENDOR_ID_SMC1211 0x1113
-#define BIOS_ROM_ADDR 0xD4
-#define BIOS_ROM_DATA 0xD7
+int BIOS_ROM_ADDR, BIOS_ROM_DATA;
+
const struct pcidev_status nics_realtek[] = {
{0x10ec, 0x8139, OK, "Realtek", "RTL8139/8139C/8139C+"},
+ {0x10ec, 0x8169, OK, "Realtek", "RTL8169"},
{},
};
@@ -38,6 +39,8 @@ const struct pcidev_status nics_realteksmc1211[] = {
{},
};
+static uint16_t id;
+
int nicrealtek_init(void)
{
get_io_perms();
@@ -47,6 +50,16 @@ int nicrealtek_init(void)
buses_supported = CHIP_BUSTYPE_PARALLEL;
+ id = pcidev_dev->device_id;
+ if(id == 0x8139) {
+ BIOS_ROM_ADDR = 0xD4;
+ BIOS_ROM_DATA = 0xD7;
+ }
+ else {
+ BIOS_ROM_ADDR = 0x30;
+ BIOS_ROM_DATA = 0x33;
+ }
+
return 0;
}
--
1.7.3.4

View File

@ -1,13 +1,13 @@
Summary: Simple program for reading/writing BIOS chips content Summary: Simple program for reading/writing BIOS chips content
Name: flashrom Name: flashrom
Version: 0.9.3 Version: 0.9.3
Release: 2.svn1250%{?dist} Release: 3.svn1280%{?dist}
License: GPLv2 License: GPLv2
Group: Applications/System Group: Applications/System
URL: http://flashrom.org URL: http://flashrom.org
#Source0: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2 #Source0: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2
#Source1: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2.asc #Source1: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2.asc
## svn -r 1250 export svn://coreboot.org/flashrom/trunk flashrom-0.9.3 ## svn -r 1280 export svn://coreboot.org/flashrom/trunk flashrom-0.9.3
## tar -cjvf flashrom-0.9.3.tar.bz2 flashrom-0.9.3 ## tar -cjvf flashrom-0.9.3.tar.bz2 flashrom-0.9.3
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
Patch1: flashrom-0001-Initial-commit-of-autotools-related-files.patch Patch1: flashrom-0001-Initial-commit-of-autotools-related-files.patch
@ -18,11 +18,8 @@ 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 Patch6: flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch
Patch7: flashrom-0007-Simplify-hwaccess.c.patch Patch7: flashrom-0007-Simplify-hwaccess.c.patch
Patch8: flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch Patch8: flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch
Patch9: flashrom-0009-Kill-unused-__FLASHROM_HAVE_OUTB__-define.patch Patch9: flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch
Patch10: flashrom-0010-Use-HAVE_-_H-macro-for-detecting-includes.patch Patch10: flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch
Patch11: flashrom-0011-Add-more-comments-cosmetic-change.patch
Patch12: flashrom-0012-Move-arch-checking-ifdef-block-into-header.patch
Patch13: flashrom-0013-rtl8169-support.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: pciutils-devel BuildRequires: pciutils-devel
@ -52,9 +49,6 @@ and write new contents on the chips ("flash the chip").
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%build %build
autoreconf -ivf autoreconf -ivf
@ -76,6 +70,18 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/%{name}.* %{_mandir}/man8/%{name}.*
%changelog %changelog
* Wed Mar 09 2011 Peter Lemenkov <lemenkov@gmail.com> - 0.9.3-3.svn1280
- Updated to latest svn ver. 1280 (post-release snapshot for 0.9.3)
- Board enable for Asus P4P800-VM
- Support for ST M25PX16 chip
- Support for W39L040 chip
- Board enable for Gigabyte GA-K8N51GMF
- Support for ITE IT8500/IT8502 embedded controllers
- Support for AMD Am29LV001BB, Am29LV001BT, Am29LV002BB, Am29LV002BT,
Am29LV004BB, Am29LV004BT, Am29LV008BB, Am29LV008BT chips
- Support for Angelbird Wings PCIe SSD (Marvell 88SX7042 SATA controller)
- Fix for rhbz #680715
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-2.svn1250 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-2.svn1250
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View File

@ -1 +1 @@
1262fb920d2eeb34a64d2f9233488d8d flashrom-0.9.3.tar.bz2 0221ba69e6ef6f49ec968c8236178fae flashrom-0.9.3.tar.bz2