Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1746779ybg; Sat, 19 Oct 2019 01:37:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFeMk+lA+GEyskN7dpdBLLgIJPtpXYIGxdfKz9voFsoA9iG3pdoJA/2k5Dg/36XJjIuWJo X-Received: by 2002:a50:9eac:: with SMTP id a41mr14074796edf.237.1571474227338; Sat, 19 Oct 2019 01:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474227; cv=none; d=google.com; s=arc-20160816; b=YCr12g7AbKmaSEUlnEL9nBCzMz+uxfHuyDKE5ZBv6gHmW3AM+OGNdZrKDEsWM2Rw6P 3b31zEywRXoDVmbQ3XUIBsFrFngcYHYJzoiYTf5M5dsSoLLAsozLOv8rKWWIlY3dqUwC 5hL0oOC4uSnVo7MZZOnGDEvQ/cZNA/8hGJZcxhVAgJaj9JeYx0DUWqZqwrKKAqQVkdaj yhGCCjP5Xi+d0uwj5XIqadfY9qWsS5GAV0LNyHmhVfrqcKO/1Zjdpxx0bp2ml46OMFcQ djf7V5T5rlTfqP4/kbaC4B4G6OJJMBhM8ZaZgVfDtnZ6wAlhlXq27bHzjpzyROErI6+d 7Oow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bjmbeMqM3Y5R1WTaL2WXIqB7qn5uCkhIw0TnKCab/Eo=; b=xd1mZKJ3aS+Myq6Zem0sAye9rbem29wcYA4Q8zlUeQIcymU+aMtnaDMyi5U+d8RB6G 1Vmah72vJi6Vh0h72arc79h5+trxNEgWsdn1TXLsQCJVnSHz9ahfDWSfuL8dJFHLTH2w uPou6MxEcTA0uPI+8155OrlonEowkcVPzpe4ee43Yo7tsnqna55vbX6nN3HIDCG9hS78 4nwQboYspernF6hQhr9GnQ9IH9Yp0uegfRX8ugvv9x2qpOxIidIDgbVr3KFlQQaMLBpb Z6EsoeYhy7JOzFsp1XdEXvNDLziqjzVgpN3Z0bB6YcJq45xuhPVVNUWNmNJzhpdkKZGK dPFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p36si5722036edc.373.2019.10.19.01.36.44; Sat, 19 Oct 2019 01:37:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409000AbfJRPoq (ORCPT + 99 others); Fri, 18 Oct 2019 11:44:46 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:51183 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505165AbfJRPmk (ORCPT ); Fri, 18 Oct 2019 11:42:40 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M2w8Y-1iKNOx0fMK-003MKP; Fri, 18 Oct 2019 17:42:35 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Russell King Subject: [PATCH 41/46] ARM: pxa: move it8152 PCI support into machine Date: Fri, 18 Oct 2019 17:41:56 +0200 Message-Id: <20191018154201.1276638-41-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:qEl9cjQP4jyS4qxefcQzFCM3uP5InkPkvne7KhgjFGqfdepw0ze BfBs+1RGSS5OnS+jwtbBaruL9sYCZyzLgpJu+h9MhEryoVQStbfDkr1SIkqCYKVFKm5fjaH o6g37RJhoVZz1wpsh5v91LLNGX+9V2dQ+AKKoNXu7RezLWr/xCYZWr6JvyFOCn5eSP+2qlx YBlbR1BTWfB3i9M8wkSRA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:np0pVgM23GE=:+pvh0Wx7At+Uwi2OwfrOm0 SCRf4wYf1CSkawelW6xLjErUh+tdKVU73XOqlWk/nfsjS4w3tKg+pkRnHPx4CE1WnKs5qgfTG Ek9jO0I83Iao//9KJ0fQAttuUSj6CuhpcW+M6X2R8JbyRoUgPhqiajc7A7j/31LeC7SrHTYfB kDknGSiHNbt1E488AzYoLw5FnNxw2hEC9zbsmJSdNIKFWWuSVapoAIX4WzTmlQHxZmf4j4jEh 3RDjqPWzUdpCTKhX7eQ9T48bMYAyAkEJAysDEwTvChktx8phGv43FCmZ37O8SiHKCZ3GKzGLL 7OLhY3cA4jVh6LKPkkhhBvQjN5EngcgMbU8cP4RM7LWCnrfI7dV+OnZt0HEnt5z9BxpT+vWUR BLvABQqmOcwlK26DWSpId+wl4e06up6C8guSPnJXbn8NDeyQ3vmyNv+H1MZnUaCg8/3R0quD3 vP0JmB/wMFzph0V9CHKuIzXX+QltCA7Z+3glncaqVj7VdeY5MHebHgfDZk7yWOUTu51ViLOcf m4oPkn/CtNl9QN00tWoyNSCsg8IAEa7dsrSgE6rbsYT34MM03ljFpxypUIpp4TtLg4EcVYdWL 8pE7JxurRi/g1DsXCaMs3PENx6gjCUSZn3XZb3unXdQl/R8TBjG7ZQcOBcN0BaUM5dStC/xQB ddvHeXeMvT6APL4YFOcq3eyB5vhgAL7jflpNSKXomFWMTnG7wRzsUIqk3FxjAHZvsG2VuPj4I UbaT69roGIBailpqB4OxihTWPriYVhmmvBmc5kIEfeD1SOVjWzjrKI8Vz9wPJWfnQoNFJGhTA VidOBSvtCr9jYXBjJ+B/SqTjh9szSLFPrvFM2NwJVZwbYvLDeAbFy62FDrIrJ4uAq2+Y9PicC 2mjliZ42cErF2s8kHZIg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Arnd Bergmann --- 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 --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 #include -#include +#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 #include -#include - #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 #include -#include + +#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 * -- 2.20.0