diff mbox series

[41/46] ARM: pxa: move it8152 PCI support into machine

Message ID 20191018154201.1276638-41-arnd@arndb.de (mailing list archive)
State New, archived
Headers show
Series ARM: pxa: towards multiplatform support | expand

Commit Message

Arnd Bergmann Oct. 18, 2019, 3:41 p.m. UTC
The driver was written as a "common" driver that could
be shared between platforms, but it was never actually shared
and now written in a completely portable way either, so just
move it into the platform to avoid header file dependencies.

Unfortunately, this driver uses the DMABOUNCE feature, which
is likely to cause problems in a multiplatform configuration,
need to investigate further. Apparently the cm-x255 only
has 64MB of RAM and does not need bouncing, but the cm-x270
can have anywhere between 32MB and 128MB, which is where
we exceed the 64 MB of address space in the chip.

Another problem is the ARCH_HAS_DMA_SET_COHERENT_MASK flag,
which messes up other PCI implementations.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                                          | 6 ------
 arch/arm/common/Makefile                                  | 1 -
 arch/arm/mach-pxa/Kconfig                                 | 8 +++++++-
 arch/arm/mach-pxa/Makefile                                | 1 +
 arch/arm/mach-pxa/cm-x2xx-pci.c                           | 2 +-
 arch/arm/mach-pxa/cm-x2xx.c                               | 3 +--
 arch/arm/{common/it8152.c => mach-pxa/pci-it8152.c}       | 3 ++-
 .../asm/hardware/it8152.h => mach-pxa/pci-it8152.h}       | 2 --
 8 files changed, 12 insertions(+), 14 deletions(-)
 rename arch/arm/{common/it8152.c => mach-pxa/pci-it8152.c} (99%)
 rename arch/arm/{include/asm/hardware/it8152.h => mach-pxa/pci-it8152.h} (98%)
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8a50efb559f3..b01f762abbda 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1146,12 +1146,6 @@  config PCI_NANOENGINE
 	help
 	  Enable PCI on the BSE nanoEngine board.
 
-config PCI_HOST_ITE8152
-	bool
-	depends on PCI && MACH_ARMCORE
-	default y
-	select DMABOUNCE
-
 config ARM_ERRATA_814220
 	bool "ARM errata: Cache maintenance by set/way operations can execute out of order"
 	depends on CPU_V7
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index 219a260bbe5f..8cd574be94cf 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -12,7 +12,6 @@  obj-$(CONFIG_SHARP_LOCOMO)	+= locomo.o
 obj-$(CONFIG_SHARP_PARAM)	+= sharpsl_param.o
 obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
 obj-$(CONFIG_CPU_V7)		+= secure_cntvoff.o
-obj-$(CONFIG_PCI_HOST_ITE8152)  += it8152.o
 obj-$(CONFIG_MCPM)		+= mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
 CFLAGS_REMOVE_mcpm_entry.o	= -pg
 AFLAGS_mcpm_head.o		:= -march=armv7-a
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index f60bc29aef68..0553fca46f5a 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -125,13 +125,19 @@  config CSB726_CSB701
 
 config MACH_ARMCORE
 	bool "CompuLab CM-X255/CM-X270 modules"
-	select ARCH_HAS_DMA_SET_COHERENT_MASK if PCI
 	select IWMMXT
 	select HAVE_PCI
 	select NEED_MACH_IO_H if PCI
 	select PXA25x
 	select PXA27x
 
+config PCI_HOST_ITE8152
+	bool
+	depends on PCI && MACH_ARMCORE
+	default y
+	select ARCH_HAS_DMA_SET_COHERENT_MASK
+	select DMABOUNCE
+
 config MACH_EM_X270
 	bool "CompuLab EM-x270 platform"
 	select PXA27x
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index e0df39b0238d..01cad198bdb0 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -44,6 +44,7 @@  obj-$(CONFIG_CSB726_CSB701)	+= csb701.o
 obj-$(CONFIG_MACH_ARMCORE)      += cm-x2xx.o cm-x255.o cm-x270.o
 ifeq ($(CONFIG_PCI),y)
 obj-$(CONFIG_MACH_ARMCORE)	+= cm-x2xx-pci.o
+obj-$(CONFIG_PCI_HOST_ITE8152)  += pci-it8152.o
 endif
 obj-$(CONFIG_MACH_ARMCORE)	+= cm_x2xx-pcmcia.o cm_x255-pcmcia.o cm_x270-pcmcia.o
 obj-$(CONFIG_MACH_EM_X270)	+= em-x270.o
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c
index f1c61c6b5610..a5689946d8c1 100644
--- a/arch/arm/mach-pxa/cm-x2xx-pci.c
+++ b/arch/arm/mach-pxa/cm-x2xx-pci.c
@@ -21,7 +21,7 @@ 
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
-#include <asm/hardware/it8152.h>
+#include "pci-it8152.h"
 
 void __iomem *it8152_base_address;
 static int cmx2xx_it8152_irq_gpio;
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
index 9b030eccd548..5ce23842239e 100644
--- a/arch/arm/mach-pxa/cm-x2xx.c
+++ b/arch/arm/mach-pxa/cm-x2xx.c
@@ -37,10 +37,9 @@ 
 #include <linux/platform_data/video-pxafb.h>
 #include <mach/smemc.h>
 
-#include <asm/hardware/it8152.h>
-
 #include "generic.h"
 #include "cm-x2xx-pci.h"
+#include "pci-it8152.h"
 
 extern void cmx255_init(void);
 extern void cmx270_init(void);
diff --git a/arch/arm/common/it8152.c b/arch/arm/mach-pxa/pci-it8152.c
similarity index 99%
rename from arch/arm/common/it8152.c
rename to arch/arm/mach-pxa/pci-it8152.c
index 9ec740cac469..af99c990f0c1 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/mach-pxa/pci-it8152.c
@@ -25,7 +25,8 @@ 
 #include <linux/export.h>
 
 #include <asm/mach/pci.h>
-#include <asm/hardware/it8152.h>
+
+#include "pci-it8152.h"
 
 #define MAX_SLOTS		21
 
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/mach-pxa/pci-it8152.h
similarity index 98%
rename from arch/arm/include/asm/hardware/it8152.h
rename to arch/arm/mach-pxa/pci-it8152.h
index e175c2384f28..85844c5fe462 100644
--- a/arch/arm/include/asm/hardware/it8152.h
+++ b/arch/arm/mach-pxa/pci-it8152.h
@@ -1,7 +1,5 @@ 
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * linux/include/arm/hardware/it8152.h
- *
  * Copyright Compulab Ltd., 2006,2007
  * Mike Rapoport <mike@compulab.co.il>
  *