From patchwork Thu Oct 10 20:30:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 175862 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2808439ill; Thu, 10 Oct 2019 13:42:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAreb02wQ2gMZl/YGVnS1IKcPXntPfNkHVFzlXloU09wmcvY9DzdnhuxRpHcj74YWzKm1A X-Received: by 2002:a50:ce16:: with SMTP id y22mr9992007edi.293.1570740170930; Thu, 10 Oct 2019 13:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570740170; cv=none; d=google.com; s=arc-20160816; b=BBHcQoDX0QGF3nwiMI1MyFBsg67nsW5dytL4EBUtI7CHNiFJ0moNqKcFvBaH4p+odR d0eZi4Wgc5ogwjKABwAg9luQqhzNmINafQmmz9NQdegru1HnxvS3QmVWzC5dJPll1a6i bgwLjs5EZ/fT0D8lu6KTUmfoWaIC9X7ESP3y2p6w+4KstYaccuw8w0Ut5LcvRGykZXFl PtB0dIy86okCqfPH39nrI7sFINTz0k58L/txe2BnymhQhpZoIBKuz4+TioNDDTgm2ciV bWi30K9Oz5BPKou7kBSnX0CVX0MnKSZAAEmC0ZMiuT+Hct45Q0/BVTilaZn0vq9uRb3E kuQA== 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=bmCEdk4jayL8N6B/zW4QC2LdtDFTisI3XmP+xeHLM3k=; b=Tkl1yNRgoHJbmyMUFqy97vgOFUN7DU4fRuBiIu5+HTbpD8lVFbRu6SFTzM/jRS3MB3 7XCDb3+HncbypSYHtBmdqnfF5Yqi8U4o4EBDrPaYsy1n9FOGiBfrZFTcDEzJ08nsv6Tr U2a+lNRzJaXmh36bNUi63a06g1v1w8Gmo+Qk924xHuU/m+CjbSmUBPYu3xJ06/5Jzq6n eDonV3ZusQIeJUQOZMiOsG4VGJgUv3F8fctK935OjJ+gS1sY1pDSo/LkZXAxuKx/Oh0v /AQA9jPpRuz3UiclOnjOhdofa6e77CdDi/HhgsdXzovPZeNybNU9gcTK1pvumFYhQuOx FrFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-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 ck2si3650683ejb.346.2019.10.10.13.42.50; Thu, 10 Oct 2019 13:42:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-spi-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-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbfJJUmu (ORCPT + 1 other); Thu, 10 Oct 2019 16:42:50 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:33937 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfJJUmu (ORCPT ); Thu, 10 Oct 2019 16:42:50 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MODeL-1iTRpR0sAL-00OXyt; Thu, 10 Oct 2019 22:42:40 +0200 From: Arnd Bergmann To: Kukjin Kim , Krzysztof Kozlowski , Mark Brown , Andi Shyti Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linus.walleij@linaro.org, Arnd Bergmann , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH 16/36] ARM: s3c: move spi fiq handler into platform Date: Thu, 10 Oct 2019 22:30:00 +0200 Message-Id: <20191010203043.1241612-16-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191010203043.1241612-1-arnd@arndb.de> References: <20191010202802.1132272-1-arnd@arndb.de> <20191010203043.1241612-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:pxNso9pqaCSa7Erxdl+xcM2PSbR6QNBafZTkg7d8WZ6ZRjnAavq bIdBaNH5u5C/jlBjKRugdunCELCvWTNlyvuxHzHOLMHArPk2SuoQlSIqD/7R1neOpzmWMWI 0DV7s4wfoUqZSuf6Dp6JgN+UCwj36OGLtI9kkZ3a+54hEyhCfQOSwICRyYNzOVxS0OIhW7A SzzuJAAtT0Ron3uPw6JqA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:SpuTVFWAlTg=:0lOQSUoQNKsa4xu/euVKIe tZ+7Lxfv70jhBAaNTwCjGIH0MY3yk+Q/buWIDUtbSvDzFO0ISdzyt9vNAWUKHUMoQsDb+TyyU DTSUopqMe6xTBcVKRD+ipnM2POhQ4n039t30HsyuuQqlFiEnCz1vm3Xqpo3Akj2k5aWH6xclM ke/nOD/Kysa38CC4hMStGdW0vJYwTw0Migelq19C8m4+aIARd9Rv2nPpPNAFTztr9Y87wfTVE yc+1pKCK/j91QnbIFz01MbGRgEnN643BNpeBgE1i2WRRjMaBgatSDvEjlrpXZMYA2HSyrGCqM bStqT9LuLV6frmnUK51XFDAjlrDn6l4AdMBYJVuWZ8R+Ae68E/qN2BHwBsjochs/I+J0rbAe9 SH+6eCvv6DSKpj4NA2YHrYGlbJndP7OwNzRtjuKHELva0JsN3BNJQ8AG18HOF3yun2uwqTe5J dUQgfFmn8Ps+8KvlEw3/ij4oiaVmGeusbFmAgLvoyxNvGq3c93wLsg7su7lbXc04r2/X377hG 1SgLYf/frqvkdb6ZdFxZtPCyNJ2ZHxnywuBqOTO3ly5nTX2U9y8M0mw9xxJ3jUDaYxCg9MdSe ydgTPyPSV1vadFC0N34d6oTfGjpd6PUS/yNdu8AlMq7pNRv8Hdc/LUKQR6+n0v0jOzJEXCS+n sdN5Y7Nmi6IalHiUvkWX/CruoNEUmlFiU3nK0JkcaXZ0zp3J3ygxxeuUmWGeJKCXw6pTu4DYL h+cAHE515cBJqLJFCZXMkyvv6fE0ATfkRG5cWao0qaCoy3M+prvh7WqfB8d0Wz9RV7Bqkt0qB NAQa/UZbz3bjRoV428dxPKy3MO1X3hHYqibglP4+AaclKmXrT+8W8gP6mBAhNpvOxCzziLVVs L4R+ilKkeT5O4etuhUqQ== Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The fiq handler needs access to some register definitions that should not be used directly by device drivers. Since this is closely related to the irqchip driver anyway, move it into the same place. Signed-off-by: Arnd Bergmann --- arch/arm/mach-s3c24xx/Makefile | 2 ++ arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c | 9 +++++++++ .../arm/mach-s3c24xx/irq-s3c24xx-fiq.S | 2 +- drivers/spi/Makefile | 1 - drivers/spi/spi-s3c24xx.c | 7 +------ .../spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h | 5 +++++ 6 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c rename drivers/spi/spi-s3c24xx-fiq.S => arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S (98%) rename drivers/spi/spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h (78%) -- 2.20.0 diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile index 8c31f84f8c97..695573df00b1 100644 --- a/arch/arm/mach-s3c24xx/Makefile +++ b/arch/arm/mach-s3c24xx/Makefile @@ -9,6 +9,8 @@ obj-y += common.o obj-y += irq-s3c24xx.o +obj-$(CONFIG_SPI_S3C24XX_FIQ) += irq-s3c24xx-fiq.o +obj-$(CONFIG_SPI_S3C24XX_FIQ) += irq-s3c24xx-fiq-exports.o obj-$(CONFIG_CPU_S3C2410) += s3c2410.o obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c new file mode 100644 index 000000000000..ef2d1f664e67 --- /dev/null +++ b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include + +EXPORT_SYMBOL(s3c24xx_spi_fiq_rx); +EXPORT_SYMBOL(s3c24xx_spi_fiq_txrx); +EXPORT_SYMBOL(s3c24xx_spi_fiq_tx); diff --git a/drivers/spi/spi-s3c24xx-fiq.S b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S similarity index 98% rename from drivers/spi/spi-s3c24xx-fiq.S rename to arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S index 9d5f8f1e5e81..2a84535a14fd 100644 --- a/drivers/spi/spi-s3c24xx-fiq.S +++ b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S @@ -13,7 +13,7 @@ #include #include -#include "spi-s3c24xx-fiq.h" +#include #define S3C2410_SPTDAT (0x10) #define S3C2410_SPRDAT (0x14) diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index bb49c9e6d0a0..4bcbbd35d2e8 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -89,7 +89,6 @@ obj-$(CONFIG_SPI_RB4XX) += spi-rb4xx.o obj-$(CONFIG_SPI_RSPI) += spi-rspi.o obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o spi-s3c24xx-hw-y := spi-s3c24xx.o -spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o obj-$(CONFIG_SPI_S3C64XX) += spi-s3c64xx.o obj-$(CONFIG_SPI_SC18IS602) += spi-sc18is602.o obj-$(CONFIG_SPI_SH) += spi-sh.o diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index 2f395e4861f6..464146fc8420 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c @@ -19,12 +19,12 @@ #include #include #include +#include #include #include #include "spi-s3c24xx-regs.h" -#include "spi-s3c24xx-fiq.h" /** * s3c24xx_spi_devstate - per device data @@ -229,10 +229,6 @@ struct spi_fiq_code { u8 data[0]; }; -extern struct spi_fiq_code s3c24xx_spi_fiq_txrx; -extern struct spi_fiq_code s3c24xx_spi_fiq_tx; -extern struct spi_fiq_code s3c24xx_spi_fiq_rx; - /** * ack_bit - turn IRQ into IRQ acknowledgement bit * @irq: The interrupt number @@ -282,7 +278,6 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw) regs.uregs[fiq_rrx] = (long)hw->rx; regs.uregs[fiq_rtx] = (long)hw->tx + 1; regs.uregs[fiq_rcount] = hw->len - 1; - regs.uregs[fiq_rirq] = (long)S3C24XX_VA_IRQ; set_fiq_regs(®s); diff --git a/drivers/spi/spi-s3c24xx-fiq.h b/include/linux/spi/s3c24xx-fiq.h similarity index 78% rename from drivers/spi/spi-s3c24xx-fiq.h rename to include/linux/spi/s3c24xx-fiq.h index 7786b0ea56ec..954452618dfe 100644 --- a/drivers/spi/spi-s3c24xx-fiq.h +++ b/include/linux/spi/s3c24xx-fiq.h @@ -12,6 +12,11 @@ #ifdef __ASSEMBLY__ #define __REG_NR(x) r##x #else + +extern struct spi_fiq_code s3c24xx_spi_fiq_txrx; +extern struct spi_fiq_code s3c24xx_spi_fiq_tx; +extern struct spi_fiq_code s3c24xx_spi_fiq_rx; + #define __REG_NR(x) (x) #endif