summaryrefslogtreecommitdiff
path: root/arch/arm/mach-bcm2708
diff options
context:
space:
mode:
authornotro <notro@tronnes.org>2014-07-27 20:12:58 +0200
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:11:10 +0100
commit73da1a3c934193a315915a376dee3b76de984d3f (patch)
tree3045525975a2f1a2842262b4e98ec4c40bb46f41 /arch/arm/mach-bcm2708
parenta54d4c766a1ae6d104cf7f3937c7beb2a04c533e (diff)
downloadlinux-73da1a3c934193a315915a376dee3b76de984d3f.tar.gz
spi: bcm2708: add device tree support
Add DT support to driver and add to .dtsi file. Setup pins and spidev in .dts file. SPI is disabled by default. Signed-off-by: Noralf Tronnes <notro@tronnes.org> BCM2708: don't register SPI controller when using DT The device for the SPI controller is in the Device Tree. Only register the device when not using DT. Signed-off-by: Noralf Tronnes <notro@tronnes.org> spi: bcm2835: make driver available on ARCH_BCM2708 Make this driver available on ARCH_BCM2708 Signed-off-by: Noralf Tronnes <notro@tronnes.org> bcm2708: Remove the prohibition on mixing SPIDEV and DT
Diffstat (limited to 'arch/arm/mach-bcm2708')
-rw-r--r--arch/arm/mach-bcm2708/bcm2708.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
index a207ad851d2a..e366bb49eefb 100644
--- a/arch/arm/mach-bcm2708/bcm2708.c
+++ b/arch/arm/mach-bcm2708/bcm2708.c
@@ -836,7 +836,7 @@ void __init bcm2708_init(void)
for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++)
bcm_register_device(&bcm2708_alsa_devices[i]);
- bcm_register_device(&bcm2708_spi_device);
+ bcm_register_device_dt(&bcm2708_spi_device);
bcm_register_device(&bcm2708_bsc0_device);
bcm_register_device(&bcm2708_bsc1_device);
@@ -876,8 +876,9 @@ void __init bcm2708_init(void)
system_serial_low = serial;
#ifdef CONFIG_BCM2708_SPIDEV
- spi_register_board_info(bcm2708_spi_devices,
- ARRAY_SIZE(bcm2708_spi_devices));
+ if (!use_dt)
+ spi_register_board_info(bcm2708_spi_devices,
+ ARRAY_SIZE(bcm2708_spi_devices));
#endif
}