diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 21:40:38 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 21:40:38 +0300 |
commit | b88f55774f20c0c306e0a95d22ca9ab5f08187c7 (patch) | |
tree | 43331d7646c8fbfa27deefebbba43d47bf0c71ea /tools | |
parent | 16a832a21f4e2c8b089935429efa646b626b9e82 (diff) | |
parent | ecb478bf866b8450c724958815e8d46b97c1b113 (diff) | |
download | linux-b88f55774f20c0c306e0a95d22ca9ab5f08187c7.tar.xz |
Merge tag 'spi-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown:
"A fairly quiet release for the SPI subsystem:
- Move to using IDR for allocating bus numbers
- Modernisation of the ep93xx driver, removing a lot of open coding
and using the framework more
- The tools have been moved to use the standard tools build system
and an install target added (there will be a fairly trivial
conflict with tip resulting from the changes in the main tools
Makefile)
- A refactoring of the Qualcomm QUP driver which enables new variants
to be supported
- Explicit support for the Freescale i.MX53 and i.MX6 SPI, Renesas
R-Car H3 and Rockchip RV1108 controllers"
* tag 'spi-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (71 commits)
spi: spi-falcon: drop check of boot select
spi: imx: fix use of native chip-selects with devicetree
spi: pl022: constify amba_id
spi: imx: fix little-endian build
spi: omap: Allocate bus number from spi framework
spi: Kernel coding style fixes
spi: imx: dynamic burst length adjust for PIO mode
spi: Pick spi bus number from Linux idr or spi alias
spi: rockchip: configure CTRLR1 according to size and data frame
spi: altera: Consolidate TX/RX data register access
spi: altera: Switch to SPI core transfer queue management
spi: rockchip: add compatible string for rv1108 spi
spi: qup: fix 64-bit build warning
spi: qup: hide warning for uninitialized variable
spi: spi-ep93xx: use the default master transfer queueing mechanism
spi: spi-ep93xx: remove private data 'current_msg'
spi: spi-ep93xx: pass the spi_master pointer around
spi: spi-ep93xx: absorb the interrupt enable/disable helpers
spi: spi-ep93xx: add spi master prepare_transfer_hardware()
spi: spi-ep93xx: use 32-bit read/write for all registers
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 4 | ||||
-rw-r--r-- | tools/spi/Build | 2 | ||||
-rw-r--r-- | tools/spi/Makefile | 64 |
3 files changed, 66 insertions, 4 deletions
diff --git a/tools/Makefile b/tools/Makefile index 658f8adcf896..9dfede37c8ff 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -90,7 +90,7 @@ kvm_stat: FORCE $(call descend,kvm/$@) all: acpi cgroup cpupower gpio hv firewire liblockdep \ - perf selftests turbostat usb \ + perf selftests spi turbostat usb \ virtio vm net x86_energy_perf_policy \ tmon freefall iio objtool kvm_stat @@ -100,7 +100,7 @@ acpi_install: cpupower_install: $(call descend,power/$(@:_install=),install) -cgroup_install firewire_install gpio_install hv_install iio_install perf_install usb_install virtio_install vm_install net_install objtool_install: +cgroup_install firewire_install gpio_install hv_install iio_install perf_install spi_install usb_install virtio_install vm_install net_install objtool_install: $(call descend,$(@:_install=),install) liblockdep_install: diff --git a/tools/spi/Build b/tools/spi/Build new file mode 100644 index 000000000000..8e8466033d99 --- /dev/null +++ b/tools/spi/Build @@ -0,0 +1,2 @@ +spidev_test-y += spidev_test.o +spidev_fdx-y += spidev_fdx.o diff --git a/tools/spi/Makefile b/tools/spi/Makefile index 3815b18ba070..90615e10c79a 100644 --- a/tools/spi/Makefile +++ b/tools/spi/Makefile @@ -1,6 +1,66 @@ +include ../scripts/Makefile.include + +bindir ?= /usr/bin + +ifeq ($(srctree),) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +endif + +# Do not use make's built-in rules +# (this improves performance and avoids hard-to-debug behaviour); +MAKEFLAGS += -r + CC = $(CROSS_COMPILE)gcc +LD = $(CROSS_COMPILE)ld +CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include + +ALL_TARGETS := spidev_test spidev_fdx +ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) + +all: $(ALL_PROGRAMS) + +export srctree OUTPUT CC LD CFLAGS +include $(srctree)/tools/build/Makefile.include -all: spidev_test spidev_fdx +# +# We need the following to be outside of kernel tree +# +$(OUTPUT)include/linux/spi/spidev.h: ../../include/uapi/linux/spi/spidev.h + mkdir -p $(OUTPUT)include/linux/spi 2>&1 || true + ln -sf $(CURDIR)/../../include/uapi/linux/spi/spidev.h $@ + +prepare: $(OUTPUT)include/linux/spi/spidev.h + +# +# spidev_test +# +SPIDEV_TEST_IN := $(OUTPUT)spidev_test-in.o +$(SPIDEV_TEST_IN): prepare FORCE + $(Q)$(MAKE) $(build)=spidev_test +$(OUTPUT)spidev_test: $(SPIDEV_TEST_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ + +# +# spidev_fdx +# +SPIDEV_FDX_IN := $(OUTPUT)spidev_fdx-in.o +$(SPIDEV_FDX_IN): prepare FORCE + $(Q)$(MAKE) $(build)=spidev_fdx +$(OUTPUT)spidev_fdx: $(SPIDEV_FDX_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ clean: - $(RM) spidev_test spidev_fdx + rm -f $(ALL_PROGRAMS) + rm -f $(OUTPUT)include/linux/spi/spidev.h + find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete + +install: $(ALL_PROGRAMS) + install -d -m 755 $(DESTDIR)$(bindir); \ + for program in $(ALL_PROGRAMS); do \ + install $$program $(DESTDIR)$(bindir); \ + done + +FORCE: + +.PHONY: all install clean FORCE prepare |