* [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file
[not found] <20190808212234.2213262-1-arnd@arndb.de>
@ 2019-08-08 21:22 ` Arnd Bergmann
2019-08-08 22:24 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2019-08-08 21:22 UTC (permalink / raw)
To: Tony Lindgren, Aaro Koskinen, Mark Brown
Cc: Arnd Bergmann, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman,
Linus Walleij, Boris Brezillon, linux-kernel, linux-spi,
Tomi Valkeinen, linux-omap, linux-arm-kernel
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-omap1/board-perseus2.c | 6 ++++++
drivers/spi/Kconfig | 2 +-
drivers/spi/spi-omap-uwire.c | 15 +++------------
3 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 1aeeb7337d29..da0155107d85 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -289,6 +289,12 @@ static void __init omap_perseus2_init(void)
omap_cfg_reg(F4_7XX_KBC3);
omap_cfg_reg(E3_7XX_KBC4);
+ if (IS_ENABLED(CONFIG_SPI_OMAP_UWIRE)) {
+ /* configure pins: MPU_UW_nSCS1, MPU_UW_SDO, MPU_UW_SCLK */
+ int val = omap_readl(OMAP7XX_IO_CONF_9) & ~0x00EEE000;
+ omap_writel(val | 0x00AAA000, OMAP7XX_IO_CONF_9);
+ }
+
platform_add_devices(devices, ARRAY_SIZE(devices));
omap_serial_init();
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 949b18ed9d6b..4e67c155229e 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -464,7 +464,7 @@ config SPI_OCTEON
config SPI_OMAP_UWIRE
tristate "OMAP1 MicroWire"
- depends on ARCH_OMAP1
+ depends on ARCH_OMAP1 || (ARM && COMPILE_TEST)
select SPI_BITBANG
help
This hooks up to the MicroWire controller on OMAP1 chips.
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c
index ce8dbdbce312..278d42a2ec49 100644
--- a/drivers/spi/spi-omap-uwire.c
+++ b/drivers/spi/spi-omap-uwire.c
@@ -44,13 +44,10 @@
#include <linux/module.h>
#include <linux/io.h>
-#include <mach/hardware.h>
#include <asm/mach-types.h>
-
-#include <mach/mux.h>
-
-#include <mach/omap7xx.h> /* OMAP7XX_IO_CONF registers */
-
+#include <linux/soc/ti/omap1-io.h>
+#include <linux/soc/ti/omap1-soc.h>
+#include <linux/soc/ti/omap1-mux.h>
/* FIXME address is now a platform device resource,
* and irqs should show there too...
@@ -541,12 +538,6 @@ static int __init omap_uwire_init(void)
omap_cfg_reg(N14_1610_UWIRE_CS0);
omap_cfg_reg(N15_1610_UWIRE_CS1);
}
- if (machine_is_omap_perseus2()) {
- /* configure pins: MPU_UW_nSCS1, MPU_UW_SDO, MPU_UW_SCLK */
- int val = omap_readl(OMAP7XX_IO_CONF_9) & ~0x00EEE000;
- omap_writel(val | 0x00AAA000, OMAP7XX_IO_CONF_9);
- }
-
return platform_driver_register(&uwire_driver);
}
--
2.20.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file
2019-08-08 21:22 ` [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file Arnd Bergmann
@ 2019-08-08 22:24 ` Mark Brown
2019-08-09 11:29 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2019-08-08 22:24 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Tony Lindgren, Aaro Koskinen, linux-omap, linux-arm-kernel,
Greg Kroah-Hartman, Linus Walleij, Bartlomiej Zolnierkiewicz,
Tomi Valkeinen, Boris Brezillon, linux-kernel, linux-spi
[-- Attachment #1: Type: text/plain, Size: 339 bytes --]
On Thu, Aug 08, 2019 at 11:22:16PM +0200, Arnd Bergmann wrote:
> 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.
This appears to be part of a series but I've no cover letter or anything
else from it. What's the story for dependencies and merging?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file
2019-08-08 22:24 ` Mark Brown
@ 2019-08-09 11:29 ` Arnd Bergmann
2019-08-09 12:01 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2019-08-09 11:29 UTC (permalink / raw)
To: Mark Brown
Cc: Tony Lindgren, Aaro Koskinen, linux-omap, Linux ARM,
Greg Kroah-Hartman, Linus Walleij, Bartlomiej Zolnierkiewicz,
Tomi Valkeinen, Boris Brezillon, Linux Kernel Mailing List,
linux-spi
On Fri, Aug 9, 2019 at 12:24 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Aug 08, 2019 at 11:22:16PM +0200, Arnd Bergmann wrote:
> > 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.
>
> This appears to be part of a series but I've no cover letter or anything
> else from it. What's the story for dependencies and merging?
Sorry for missing you on the cover letter. The patch is part of a series
to make omap1 part of ARCH_MULTIPLATFORM. I'd like to merge the entire
series through the arm-soc tree to avoid dependencies:
https://lore.kernel.org/linux-arm-kernel/20190808212234.2213262-1-arnd@arndb.de/T
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file
2019-08-09 11:29 ` Arnd Bergmann
@ 2019-08-09 12:01 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-08-09 12:01 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Aaro Koskinen, Tony Lindgren, Greg Kroah-Hartman, Linus Walleij,
Bartlomiej Zolnierkiewicz, Linux Kernel Mailing List, linux-spi,
Tomi Valkeinen, linux-omap, Linux ARM, Boris Brezillon
[-- Attachment #1.1: Type: text/plain, Size: 749 bytes --]
On Fri, Aug 09, 2019 at 01:29:13PM +0200, Arnd Bergmann wrote:
> On Fri, Aug 9, 2019 at 12:24 AM Mark Brown <broonie@kernel.org> wrote:
> > On Thu, Aug 08, 2019 at 11:22:16PM +0200, Arnd Bergmann wrote:
> > > 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.
> > This appears to be part of a series but I've no cover letter or anything
> > else from it. What's the story for dependencies and merging?
> Sorry for missing you on the cover letter. The patch is part of a series
> to make omap1 part of ARCH_MULTIPLATFORM. I'd like to merge the entire
> series through the arm-soc tree to avoid dependencies:
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-09 12:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190808212234.2213262-1-arnd@arndb.de>
2019-08-08 21:22 ` [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file Arnd Bergmann
2019-08-08 22:24 ` Mark Brown
2019-08-09 11:29 ` Arnd Bergmann
2019-08-09 12:01 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).