ARM: OMAP1: devices: configure omap1_spi100k only on OMAP7xx
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 19 Nov 2018 19:49:43 +0000 (21:49 +0200)
committerTony Lindgren <tony@atomide.com>
Thu, 29 Nov 2018 20:07:14 +0000 (12:07 -0800)
Configure omap1_spi100k only on OMAP7xx. This allows running multiboard
kernels on non-OMAP7xx HW with CONFIG_SPI_OMAP_100K enabled.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/devices.c

index baaf902..e1243b5 100644 (file)
@@ -244,6 +244,9 @@ struct platform_device omap_spi2 = {
 
 static void omap_init_spi100k(void)
 {
+       if (!cpu_is_omap7xx())
+               return;
+
        omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff);
        if (omap_spi1.dev.platform_data)
                platform_device_register(&omap_spi1);