Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: omap1: move perseus spi pinconf to board file

The driver has always had a FIXME about this, and it seems
like this trivial code move avoids a mach header inclusion,
so just do it.

With that out of the way, and the header file inclusions
changed to global files, the driver can also be compile-tested
on other platforms.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+10 -13
+6
arch/arm/mach-omap1/board-perseus2.c
··· 289 289 omap_cfg_reg(F4_7XX_KBC3); 290 290 omap_cfg_reg(E3_7XX_KBC4); 291 291 292 + if (IS_ENABLED(CONFIG_SPI_OMAP_UWIRE)) { 293 + /* configure pins: MPU_UW_nSCS1, MPU_UW_SDO, MPU_UW_SCLK */ 294 + int val = omap_readl(OMAP7XX_IO_CONF_9) & ~0x00EEE000; 295 + omap_writel(val | 0x00AAA000, OMAP7XX_IO_CONF_9); 296 + } 297 + 292 298 platform_add_devices(devices, ARRAY_SIZE(devices)); 293 299 294 300 omap_serial_init();
+1 -1
drivers/spi/Kconfig
··· 631 631 632 632 config SPI_OMAP_UWIRE 633 633 tristate "OMAP1 MicroWire" 634 - depends on ARCH_OMAP1 634 + depends on ARCH_OMAP1 || (ARM && COMPILE_TEST) 635 635 select SPI_BITBANG 636 636 help 637 637 This hooks up to the MicroWire controller on OMAP1 chips.
+3 -12
drivers/spi/spi-omap-uwire.c
··· 44 44 #include <linux/module.h> 45 45 #include <linux/io.h> 46 46 47 - #include <mach/hardware.h> 48 47 #include <asm/mach-types.h> 49 - 50 - #include <mach/mux.h> 51 - 52 - #include <mach/omap7xx.h> /* OMAP7XX_IO_CONF registers */ 53 - 48 + #include <linux/soc/ti/omap1-io.h> 49 + #include <linux/soc/ti/omap1-soc.h> 50 + #include <linux/soc/ti/omap1-mux.h> 54 51 55 52 /* FIXME address is now a platform device resource, 56 53 * and irqs should show there too... ··· 545 548 omap_cfg_reg(N14_1610_UWIRE_CS0); 546 549 omap_cfg_reg(N15_1610_UWIRE_CS1); 547 550 } 548 - if (machine_is_omap_perseus2()) { 549 - /* configure pins: MPU_UW_nSCS1, MPU_UW_SDO, MPU_UW_SCLK */ 550 - int val = omap_readl(OMAP7XX_IO_CONF_9) & ~0x00EEE000; 551 - omap_writel(val | 0x00AAA000, OMAP7XX_IO_CONF_9); 552 - } 553 - 554 551 return platform_driver_register(&uwire_driver); 555 552 } 556 553