summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoruwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2011-09-03 18:37:52 +0000
committeruwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2011-09-03 18:37:52 +0000
commitc4f5350e9946717bf4ae740c8419037b556825b0 (patch)
tree8e0e42a7177fb3a56c5d269c42b9034a92b82793 /Makefile
parentfab75c2978034eb968cabc0be1f9926f67179c85 (diff)
downloadflashrom-c4f5350e9946717bf4ae740c8419037b556825b0.tar.gz
Add support for the Linux SPI subsystem (spidev).
See http://www.kernel.org/doc/Documentation/spi/spidev for an introduction. Usage is as follows: flashrom -p linux_spi:dev=/dev/spidevX.Y where X is the bus number, and Y device. It accepts an optional parameter 'speed' which allows to set the SPI clock speed in kHz. Tested on an Atmel AVR32AP7000 board (NGW100 Network Gateway Kit), see below, which was used to program a ThinkPad X60, but it should work on every other Linux system, too. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4102) Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1427 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9ad9d95..6407e6b 100644
--- a/Makefile
+++ b/Makefile
@@ -313,6 +313,10 @@ CONFIG_OGP_SPI ?= yes
# Always enable Bus Pirate SPI for now.
CONFIG_BUSPIRATE_SPI ?= yes
+# Disable Linux spidev interface support for now, until we check for a Linux
+# device (not host, as DOS binaries for example are built on a Linux host).
+CONFIG_LINUX_SPI ?= no
+
# Disable Dediprog SF100 until support is complete and tested.
CONFIG_DEDIPROG ?= no
@@ -449,6 +453,11 @@ PROGRAMMER_OBJS += buspirate_spi.o
NEED_SERIAL := yes
endif
+ifeq ($(CONFIG_LINUX_SPI), yes)
+FEATURE_CFLAGS += -D'CONFIG_LINUX_SPI=1'
+PROGRAMMER_OBJS += linux_spi.o
+endif
+
ifeq ($(CONFIG_DEDIPROG), yes)
FEATURE_CFLAGS += -D'CONFIG_DEDIPROG=1'
FEATURE_LIBS += -lusb