| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a programmer has untested or non-working write/erase code, but
probing/reading works, it makes sense to protect the user against
write/erase accidents. This feature will be used by the Nvidia MCP SPI
code, and it also might make sense for the gfxnvidia driver which has
non-working write/erase.
Corresponding to flashrom svn r1069.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Constify variables where possible.
Initialize programmer-related variables explicitly in programmer_init to
allow running programmer_init from a clean state after
programmer_shutdown.
Prohibit registering programmer shutdown functions before init or after
shutdown.
Kill some dead code.
Rename global variables with namespace-polluting names.
Use a previously unused locking helper function in sst49lfxxxc.c.
This is needed for libflashrom.
Effects on the binary size of flashrom are minimal (300 bytes
shrinkage), but the data section shrinks by 4384 bytes, and that's a
good thing if flashrom is operating in constrained envionments.
Corresponding to flashrom svn r1068.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
|
|
|
|
|
|
|
|
|
| |
This allows using the dummy flasher for SPI read debugging.
Corresponding to flashrom svn r1053.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Some instability remains, but that may be due to hardware problems in
the specific card (Netgear FA311) used for testing.
Corresponding to flashrom svn r1039.
Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every board-enable function is passed a 'const char *name' (board name)
which is totally useless as the board name was already printed by flashrom
at that point. Also, 95% or so of the board-enables don't use the
parameter anyway. So, drop it.
Corresponding to flashrom svn r1037.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
| |
The logic was incorrect in one place which had && instead of ||. Move
the board info #define B to the file where it is used.
Corresponding to flashrom svn r1035.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we don't support any other compilers right now, enable that
extension unconditionally.
Fix the bugs found by format string checking.
Corresponding to flashrom svn r1032.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unknown
The internal programmer needs correct information about flash_base and
chip window top/bottom alignment on non-x86 before it can be used. Abort
any internal programmer action for now until the code is fixed.
Add the concept of a processor enable for systems where flashing is
impacted by processor settings or processor model.
Corresponding to flashrom svn r1031.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
|
|
|
|
|
|
|
|
|
| |
programmer was selected
Corresponding to flashrom svn r1026.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
| |
Also, merge the tables in the output, i.e. there's only one table which
contains both known-good and known-bad/untested boards.
Corresponding to flashrom svn r1024.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
capitalization)
CONFIG_FT2232SPI (makefile config option)
FT2232_SPI_SUPPORT (#define)
ft2232spi (programmer name)
ft2232_spi.c (programmer file)
Use CONFIG_* with underscores for makefile config options and #defines
and kill the useless _SUPPORT idiom.
Use lowercase names with underscores for programmer names and programmer
files.
With this, you can run "grep -i ft2232_spi" and find everything related
to the ft2232_spi driver. Same applies to all other programmers.
Corresponding to flashrom svn r1023.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unistd.h was only used to get a definition of NULL in all files. Add our
own NULL #define and remove unistd.h from flash.h
stdio.h has no place in flash.h, it should be included only in files
which really need it.
Add #include statements in individual .c files where needed.
Replace a few printf with msg_* to eliminate the need for stdio.h.
Corresponding to flashrom svn r1021.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ICH SPI can enforce address restrictions for all accesses which take an
address (well, it could if the chipset implementation was not broken).
Since exploiting the broken implementation is harder than conforming
to the address restrictions wherever possible, conform to the address
restrictions instead. This patch eliminates a lot of transaction errors
people were seeing on chip probe.
Corresponding to flashrom svn r1016.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- x86/x86_64 (little endian)
- PowerPC (big endian)
- MIPS (big+little endian)
No changes to programmer specific code. This means any drivers with MMIO
access will _not_ suddenly start working on big endian systems, but with
this patch everything is in place to fix them.
Compilation should work on all architectures listed above for all
drivers except nic3com and nicrealtek which require PCI Port IO which is
x86-only for now.
To compile without nic3com and nicrealtek, run
make distclean
make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no
Thanks to Misha Manulis for testing early versions of this patch on
PowerPC (big endian) with the satasii programmer.
Thanks to Segher Boessenkool for design review and for helping out with
compiler tricks and pointing out that we need eieio on PowerPC.
Thanks to Vladimir Serbinenko for compile testing on MIPS (little
endian) and PowerPC (big endian) and for runtime testing on MIPS (little
endian).
Thanks to David Daney for compile testing on MIPS (big endian).
Thanks to Uwe Hermann for compile and runtime testing on x86_64.
DO NOT RUN flashrom ON NON-X86 AFTER APPLYING THIS PATCH!
This patch only provides the infrastructure, but does not convert any
drivers, so flashrom will compile, but it won't do the right thing on
non-x86 platforms.
Corresponding to flashrom svn r1013.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Misha Manulis <misha@manulis.com>
Acked-by: Vladimir 'phcoder/φ-coder' Serbinenko <phcoder@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
|
|
|
|
|
|
|
| |
Corresponding to flashrom svn r1002.
Signed-off-by: Joerg Fischer <turboj@gmx.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
| |
Change the command line interface to make file names positional.
Add more sanity checks to the command line parser.
Corresponding to flashrom svn r998.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Force chip read by faking probe success.
- Force chip access even if the chip is bigger than max decode size for
the flash bus.
- Force erase even if erase is known bad.
- Force write even if write is known bad.
- Force writing even if cbtable tells us that this is the wrong image
for this board.
This patch cleans up --force usage:
- Remove any suggestions to use --force for probe/read from flashrom
output.
- Don't talk about "success" or "Found chip" if the chip is forced.
- Add a new internal programmer parameter boardmismatch=force. This
overrides any mismatch detection from cbtable/image comparisons.
- Add a new internal programmer parameter laptop=force_I_want_a_brick.
- Adjust the documentation for --force.
- Clean up the man page a bit whereever it talks about --force or
laptops.
Additional changes in this patch:
- Add warnings about laptops to the documentation.
- Abort if a laptop is detected. Can be overridden with the programmer
parameter mentioned above.
- Add "Portable" to the list of DMI strings indicating laptops.
- Check if a chip specified with -c is known to flashrom.
- Programmer parameter reliability and consistency fixes.
- More paranoid self-checks.
- Improve documentation.
Corresponding to flashrom svn r996.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove blockwise write for i82802ab chips. It will be reintroduced
in post-0.9.2 in a generic way. This is needed to fix
FWH-like chips with non-uniform sectors.
These are:
Intel 28F001
Sharp LHF00L04
ST M50FW002
ST M50LPW116
Corresponding to flashrom svn r991.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
| |
Corresponding to flashrom svn r964.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following write granularities exist according to my datasheet
survey: - 1 bit. Each bit can be cleared individually. - 1 byte. A byte
can be written once. Further writes to an already written byte cause
the contents to be either undefined or to stay unchanged. - 128 bytes.
If less than 128 bytes are written, the rest will be erased. Each write
to a 128-byte region will trigger an automatic erase before anything is
written. Very uncommon behaviour. - 256 bytes. If less than 256 bytes
are written, the contents of the unwritten bytes are undefined.
Note that chips with default 256-byte writes, which keep the original
contents for unwritten bytes, have a granularity of 1 byte.
Handle 1-bit, 1-byte and 256-byte write granularity.
Corresponding to flashrom svn r927.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: David Hendricks <dhendrix@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The message printing code greatly exceed the 80 character limit. I can
reformat it on request to obey the limit.
Intended behaviour:
on untested boards an explanation of that status is printed and the board
enable code is not run, unless the option "boardenable=force" has been
passed to the internal programmer.
Corresponding to flashrom svn r919.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
| |
Corresponding to flashrom svn r916.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flash.h
Some of the spi programmer drivers required chipdrivers.h, needs fixing later:
it87spi.c
ichspi.c
sb600spi.c
wbsio_spi.c
buspirate_spi.c
ft2232spi.c
bitbang_spi.c
dediprog.c
Corresponding to flashrom svn r914.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
| |
We don't need to duplicate OK and NT as PCI_OK and PCI_NT if the symbols
are already there (defined for the chipset enable table).
Corresponding to flashrom svn r911.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
|
|
|
|
|
|
|
|
|
|
| |
It's disabled by default. The current status is detailed at:
http://www.flashrom.org/pipermail/flashrom/2010-January/001828.html
Corresponding to flashrom svn r908.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes missing unlock for certain chips:
* unlock_49lf00x
* Pm49fl002
* Pm49fl004
* unlock_49flxxxc
* SST49LF160C
* unlock_winbond_fwhub
* W39V080FA
* W39V080FA (dual mode)
Fixes missing printlock for certain chip:
* printlock_w39v040c
* W39V040C
Corresponding to flashrom svn r907.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some programmers want to run certain functions during programmer
shutdown, but the function choice depends on the code path taken
during programmer init. Rather than rebuilding the whole init logic in
the shutdown function, it is now possible to register functions for
execution on programmer shutdown. The behaviour is similar to atexit(),
but the registered functions will be run on programmer shutdown instead
of on exit and the functions will be called with a void * argument
that is specified on registration. Registered functions must have
the prototype void function(void *); and will be executed in reverse
registration order directly before calling the programmer-specific
shutdown() function. It is recommended to have shutdown() only disable
programmer/hardware access and leave all code path sensitive shutdown to
functions registered with register_shutdown().
The most prominent use case is resetting the EC after flashing on
laptops.
Note: There are quite a few code paths in flashrom which proceed to
terminate flashrom without any programmer shutdown. Those code paths
will not get the benefit of register_shutdown() and they should be
changed wherever possible.
Corresponding to flashrom svn r904.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back in November 2008(!) I proposed the first version of the flexible
sector-based erase structure, and now we can finally rip out the old
full-chip erase code without ill effects. Rejoice and party!
Thanks to everyone who made this possible, especially to Sean Nelson who
converted the majority of flash chips to sector erase.
Corresponding to flashrom svn r895.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should take care of picky Linux kernels which do not allow uncached
mappings to cached areas. Handle mapping failure gracefully (no forced
exit()) if the caller specifies it.
Such cached areas which can handle mapping failure are DMI tables and
coreboot tables. On failure we just ignore those tables. That is not
perfect, but a lot better than aborting flashrom due to an error in
nonessential functionality.
This should fix flashrom on a sizable number of machines where it
currently aborts early.
Yes, I could have exploited a Linux kernel bug to "solve" this, but
relying on such bugs is not exactly the best idea.
Corresponding to flashrom svn r889.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Vincent Pelletier <plr.vincent@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add FEATURE_SHORT_RESET, FEATURE_LONG_RESET, and FEATURE_EITHER_RESET
rewrite jedec functions to use getaddrmask
convert write_49f002 to write_jedec_1
convert write_w39v040c to write_jedec_1
convert probe_w39v040c to probe_jedec
convert write_49lf040 to write_jedec_1
convert write_pm29f002 to write_jedec
convert write_29f040b to write_jedec_1
convert probe_29f040b to probe_jedec
convert erase_chip_29f040b to erase_chip_block_jedec
convert erase_sector_29f040b to erase_sector_jedec
convert write_m29f002b to write_jedec
convert write_m29f002t to write_jedec
convert *_29f002 to *_jedec
decouple unused files from Makefile:
am29f040b.c
en29f002a.c
m29f002.c
mx29f002.c
pm29f002.c
sst49lf040.c
w39v040c.c
w49f002u.c
Corresponding to flashrom svn r886.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Anders Juel Jensen <andersjjensen@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This is a quick fix for board specific parallel addressing limits.
Corresponding to flashrom svn r875.
Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a board is not uniquely identifiable by PCI device/subsystem IDs, a
string can be specified to be looked for (case-sensitive, substring or
anchored) for now in one of the following DMI items in addition to matching
the PCI IDs:
- System Manufacturer
- System Product Name
- System Version
- Baseboard Manufacturer
- Baseboard Product Name
- Baseboard Version
Strings are anchored re-like (^ at the beginning, $ at the end), but
there are no plans to support full regular expressions and matched to any
of the mentioned fields.
The match is only made if DMI info is available and the string matches.
If no DMI info is available and the PCI IDs match, a warning is printed
as the board can not be autodetected.
It's still open to discussion whether we add an DMI override switch to
specify a string that will definitely match, and whether this switch is
only used if no DMI is available or whether it overrides or augments DMI
data.
DMI data is currently read using dmidecode. This tool is available for
all major platforms except MacOS X. I heard that there also is a MacOS X
version of dmidecode, but didn't investigate that.
Corresponding to flashrom svn r874.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reverse engineered from USB logs. I never touched that programmer nor
did I ever see the associated software.
Disabled by default until it is complete. The driver needs to be hooked
up to the SPI core before it will do anything besides init and
diagnostics.
I successfully reverse engineered all commands, but some are still
somewhat magic.
Logs from "flashrom -p dediprog -V" are appreciated.
Probe and read should work, erase/write is expected to explode.
The programmer will set voltage to 0 on exit.
Thanks a lot to Stefan Reinauer and Patrick Georgi for providing USB
logs and for testing the result.
Corresponding to flashrom svn r870.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not just for fun. We hit a real bug on BSD with the outl macros.
The macro variable tmp collided with the tmp from outer scope.
second revision, now also taking care of inb/inw/inl. While that shadowing
did not introduce bugs (yet), of course it breaks the build on BSD when
-Wshadow is enabled.
Corresponding to flashrom svn r860.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The msg_* macros won't compile as is if you use more than one parameter
(i.e.
have a format string and a variable). There are two alternative styles:
GNU or C99 variadic macros. While C99 has limitations compared to the
GNU extensions, these limitations do not affect our macros, so I decided
to go with the standard way.
I adjusted whitespace a bit to have aligned values (cosmetic change).
Corresponding to flashrom svn r841.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to have one common probe_jedec function instead of half a
dozen wrappers. The trick here is to have FEATURE_ADDR_FULL==0 and thus
default to unmasked addresses. That way, we only have to annotate chips
which need small address masks.
Corresponding to flashrom svn r840.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interface for flashrom
It also changes so -VV will spit out highly verbose messages for
debugging. This is a minimal patch to lessen impact a later patch will
convert current printf messages to the new interface.
Corresponding to flashrom svn r835.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And rename them accordingly. For now, main() just calls cli_classic(),
but alternative frontends can be switched in main().
Annotate remaining help texts with CLI dependency inside flashrom.c with
a FIXME comment.
Now people can go and create different frontends and be happy. Please
note that any other frontend will have to sort of duplicate the probing
code in cli_classic.c. Refactoring that part of the code is possible,
but not easy because we still want to print instructive help messages
for users.
Corresponding to flashrom svn r833.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
| |
Corresponding to flashrom svn r832.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- replace the hand written serial input flush routine with the termios one.
- serialport_discard_read isn't necessary anymore - it just wrapped
sp_flush_incoming with no extra value.
- serialport_read and serialport_write would misbehave if read or write
didn't process everything in one go.
- sp_flush_incoming should be #define'd out for FAKE_COMMUNICATION like
serialport_discard_read was
Corresponding to flashrom svn r831.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
While at it, also rename a few functions to make it obvious
that they are generic and not specific to the Bus Pirate.
Corresponding to flashrom svn r830.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some programmers (most notably FT2232SPI) use fallback_* and noop_*,
but those functions lived inside internal.c and were unavailable if no
PCI-based programmers were compiled in.
Move those functions to the new file programmer.c. Thanks to Patrick
Georgi for finding this.
Corresponding to flashrom svn r829.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch converts jedec functions into mask-based generics which can
be used for many chip provided the only changes are the addresses are
converted from 0x5555/0x2AAA to 0x555/0x2AA or similar.
The patch mostly changes jedec.c, but a few other files are changed
because they use the jedec functions within their own functions.
The patch also adds a copyright line to flashchips.c because of my
recent work in converting AMD and Atmel chips to use struct erase_block.
Corresponding to flashrom svn r828.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
internal_delay()
Move that function to udelay.c and compile internal.c only if really
needed. physmap.c is only needed if the programmer is internal or a PCI
card. Make its compilation conditional.
Corresponding to flashrom svn r822.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a generic programmer list output function to be used by alternative
frontends. The interface between main() and doit is a hack and should
get a clean design, but for now it serves the purpose of shortening
main() by 120 lines. The rest of main() needs to be refactored a bit
more before moving main() away.
Corresponding to flashrom svn r821.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We could run it after chipset enable, but it definitely has to happen
before board enable because the board enable usually accesses the
SuperI/O. With this patch, it is possible to add a struct superio to the
board enable table for more accurate matching in case subsystem IDs are
ambiguous. This patch focuses on the generic infrastructure aspect and
on support for IT8712F/IT8716F.
Thanks go to Adrian Glaubitz and Ward Vandewege for testing.
Corresponding to flashrom svn r813.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
|
|
|
|
|
|
|
|
| |
Reported by Sean Nelson.
Corresponding to flashrom svn r811.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is only the first step, but it hopefully will make working
with the code and especially porting to new platforms easier.
Subsequent patches should move #includes for the newly created files
hwaccess.h and chipdrivers.h from flash.h to the files which need them.
Programmers should live in a separate header file as well.
Tested-by: Idwer Vollering <vidwer@gmail.com>
Corresponding to flashrom svn r799.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make various pieces of code conditional on support for internal
programming. Code shared between PCI device programmers and onboard
programming is now conditional as well.
It is now possible to build only with dummy support:
make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no
CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no
This allows building for a specific use case only, and it also
facilitates porting to a new architecture because it is possible to
focus on highlevel code only.
Note: Either internal or dummy programmer needs to be compiled in due to
the current behaviour of always picking a default programmer if -p is
not specified. Picking an arbitrary external programmer as default
wouldn't make sense.
Build and runtime tested in all 1024 possible build combinations. The
only failures are by design as mentioned above.
Corresponding to flashrom svn r797.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The deleted function in en29f002a.c is reintroduced as
write_by_byte_jedec in jedec.c as it contains no chip-specific
instructions. It is not yet used in other chip drivers, as key addresses
(0x2AAA/0x5555) are often specified with less bits. After crosschecking
datasheets, most of the fixmes can probably be resolved as indicated in
them, causing significant code reduction.
The common JEDEC code for bytewise programming does not program 0xFF
at all. The chips that had a dedicated bytewise flash function which
has been changed to write_jedec_1 thus changed flashing behaviour
and the "write" test flag has been removed. This applies to: AMD
Am29F002BB/Am29F002NBB AMD Am29F002BT/Am29F002NBT (TEST_OK_PREW before)
AMIC A29002B AMIC A29002T (TEST_OK_PREW before) EON EN29F002(A)(N)B EON
EN29F002(A)(N)T (TEST_OK_PREW before) Macronix MX29F001B (TEST_OK_PREW
before) Macronix MX29F001T (TEST_OK_PREW before) Macronix MX29F002B
Macronix MX29F002T (TEST_OK_PREW before) Macronix MX29LV040
Similar analysis should be performed for the read id stuff.
Corresponding to flashrom svn r785.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
|