From patchwork Mon Apr 15 19:25:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10901457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 265F214DB for ; Mon, 15 Apr 2019 19:28:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 090DF286DD for ; Mon, 15 Apr 2019 19:28:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F112128720; Mon, 15 Apr 2019 19:27:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 835EE286DD for ; Mon, 15 Apr 2019 19:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mcriAzaj56tjVFDTfUcyDDjK5r5UEmAdwL8ouxOIfiE=; b=m9QMJzHTbP+lK/ 2wwO5Duz58/TRH5tKezGQPhCdT6PkaNaAOLa0oiEEK36tNGZRF6HodzbqJq7xWf/zJahMbp0LgJ91 IfAWOndVZXRbgFm74HiDGh3F9phu5HkLdh0YlGM/ot6eb/QhgiW9psLXKpgkEaST6oOphhafG3jPD BNDkfyyd50jOwXtxhIZdyqzLj9qnp2L0sp8GyJq6vsZbl6hEvlrupthwEeprtyF4PQJDTj7ei8MIU gSXRWuCsP7/EFFZEaTGli9GFAqoB6TTaM71jBmDyJi9jn57C7VjksiEYvqKeXqzu/9NIEE+41+fVb DAOV82ytI91y5ifxL8MQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7Gk-0003B1-LS; Mon, 15 Apr 2019 19:27:54 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7Gf-0003AG-OY for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 19:27:52 +0000 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1M8ysi-1hB9SM1EKE-00674C; Mon, 15 Apr 2019 21:27:40 +0200 From: Arnd Bergmann To: Hartley Sweeten , Alexander Sverdlin Subject: [PATCH 1/4] ARM: ep93xx: move network platform data to separate header Date: Mon, 15 Apr 2019 21:25:23 +0200 Message-Id: <20190415192734.935387-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:7r+4JlmJvPvM2nMPpt2FgcrqkZ9O2yXFTBYzL79J2n1R3gNsh/I zJMiJz8yleneH9BgK+3DA6euAm9OBrFBVqYEnYfi8KOfp9koIp176i3pXHKoXLt0TLtR9HD 2KtYPTztUNtZy5X0U8Wff5PQIwLt/up9RF3G5UbUGPB4XISltrdFVGVhDSuGGSQFpSHnQPe UsLWgi5C9ubd95k4xDVIA== X-UI-Out-Filterresults: notjunk:1;V03:K0:htVNGk9GjfE=:8kjSBdwfuVj67ArJmu3r2I Mk2fc2oxt/2uttWubzOjlR+4odS9D3Hui8yKU97BhjkeijT9SOxFRHWMkwKtOJGQJzGEeVQO6 fJAezqbiOLxP0p4rez36baBm813X2m2VlhsdAo9aygLqPflPXIC4U7J9fKH6KcOK3Umts2eS6 tdZfZFDxbrfwr3aBRplYuOu+zUW8ZMiUSw1Ox/OGlVc0yj/GoaVpihoXpXZzacc8m/E1SNdNr 58JNdx6D78Y83s90YNo2ixoi0cH5zgNSt4uxvTuHfih95VBvyAeeOnAPL++uNg/W8vGJMh/RJ DMOUBoSVs2CiBuVvt2Zb46u6MRpQ7q71q9iRBInGqZeKh1D/+mnhyUJ/EoMIkEsx+Jd/6yUsN 3z5STqII//8IWzlOdZ5uLhOngUHJZjGZ5E8PeCx2rqrGcAsjAo4t6rcUo/TG5xAqUdObpr/7S kBsMJfT1owAp95s+RhwvuQG89JD/Hb2v+7wxWgJWEzETTTq4qNZZDRri82OyhYLypJRW9XHCV zYDEtOkn65Bfc7KYGHJljNgvwBkLkdmXbsN10zuINzZePJ7Sy4S25zWQ6rHUVPta74539eFjq uDpsAIiWFeKCTjNVn/knGM1aZ0yW8Tvaake3dWigzrRJHBpPCGArwpQonD+Ik+cHUK6WoRqtJ Mn2fkzOI9XiNfERYw14un8oCH1XggQlYYcz4zTL9lZjZupS2vFVvCKjFZwo5z0yS6nIPM1cUS LGuQDd8ZOJ1plRIq1/vZ7RwSUXDkuu4EkpnJrA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_122750_283563_320A1C55 X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Kicinski , Arnd Bergmann , netdev@vger.kernel.org, Linus Walleij , linux-kernel@vger.kernel.org, David Ahern , "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The header file is the only thing preventing us from building the driver in a cross-platform configuration, so move the structure we are interested in to the global platform_data location and enable compile testing. Signed-off-by: Arnd Bergmann Acked-by: Alexander Sverdlin Acked-by: Linus Walleij --- arch/arm/mach-ep93xx/include/mach/platform.h | 7 +------ drivers/net/ethernet/cirrus/Kconfig | 2 +- drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +- include/linux/platform_data/eth-ep93xx.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 include/linux/platform_data/eth-ep93xx.h diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 6c41c794bed5..43446f33c2be 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h @@ -5,6 +5,7 @@ #ifndef __ASSEMBLY__ +#include #include struct device; @@ -15,12 +16,6 @@ struct ep93xxfb_mach_info; struct ep93xx_keypad_platform_data; struct ep93xx_spi_info; -struct ep93xx_eth_data -{ - unsigned char dev_addr[6]; - unsigned char phy_id; -}; - void ep93xx_map_io(void); void ep93xx_init_irq(void); diff --git a/drivers/net/ethernet/cirrus/Kconfig b/drivers/net/ethernet/cirrus/Kconfig index e9a0213b08c4..6238e6951336 100644 --- a/drivers/net/ethernet/cirrus/Kconfig +++ b/drivers/net/ethernet/cirrus/Kconfig @@ -41,7 +41,7 @@ config CS89x0_PLATFORM config EP93XX_ETH tristate "EP93xx Ethernet support" - depends on ARM && ARCH_EP93XX + depends on (ARM && ARCH_EP93XX) || COMPILE_TEST select MII help This is a driver for the ethernet hardware included in EP93xx CPUs. diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c index 13dfdfca49fc..a6da9873570b 100644 --- a/drivers/net/ethernet/cirrus/ep93xx_eth.c +++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c @@ -25,7 +25,7 @@ #include #include -#include +#include #define DRV_MODULE_NAME "ep93xx-eth" #define DRV_MODULE_VERSION "0.1" diff --git a/include/linux/platform_data/eth-ep93xx.h b/include/linux/platform_data/eth-ep93xx.h new file mode 100644 index 000000000000..8eef637a804d --- /dev/null +++ b/include/linux/platform_data/eth-ep93xx.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PLATFORM_DATA_ETH_EP93XX +#define _LINUX_PLATFORM_DATA_ETH_EP93XX + +struct ep93xx_eth_data { + unsigned char dev_addr[6]; + unsigned char phy_id; +}; + +#endif From patchwork Mon Apr 15 19:25:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10901463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC93F14DB for ; Mon, 15 Apr 2019 19:30:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D02A728639 for ; Mon, 15 Apr 2019 19:30:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C465028647; Mon, 15 Apr 2019 19:30:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 19F1928639 for ; Mon, 15 Apr 2019 19:30:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qzpg3CjJ2lHJ5fQQmgcEU25h9dzwrgBGdYAJco0zBdw=; b=Yn8kiFAofXC/B9 XlSw9JNhVNADAMJWP6GiLd0ane/ejcysnEXCZML1WGAahW/LeYPlbrjhsoeXcBkyUXgPRjLn7wFg8 CKxu9gV05UMwP0sITJ8Q2ApSxXXYVzyEFQ7Ev6TUwu1/YKWUQFssuQxjXowWwgQNdNf9oCjbFsI9Y pCfo8U676/2v3bEDM36cP5gSYm7FK487wUZwRVs1IJWHtz2G7yhSybab+fVWedTLsScv4gP7U8Opu cooK5LGXXhWk0MNwYqDZbLcMiUE/YbD4xWVogd4csjxW+EBTnRJ3gxgmuFMCe6QYBnN7ydz/pMU97 n0Lr4iwU06JvV9Ay0afg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7Io-0003fm-BY; Mon, 15 Apr 2019 19:30:02 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7Ik-0003Xp-Bc for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 19:30:00 +0000 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MRCFu-1hS8PU2ZvA-00NEDC; Mon, 15 Apr 2019 21:29:44 +0200 From: Arnd Bergmann To: Hartley Sweeten , Alexander Sverdlin Subject: [PATCH 3/4] ARM: ep93xx: move pinctrl interfaces into include/linux/soc Date: Mon, 15 Apr 2019 21:25:25 +0200 Message-Id: <20190415192734.935387-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415192734.935387-1-arnd@arndb.de> References: <20190415192734.935387-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:dRvk3DqNUanFdB12QVLmdoW3VNVR+CJbLIKq3bNIeNaHjokfuCj P0OnfDT+EC2RLgx1gqyx/4vdGjEF9QjjEWwWeqNMk2DrquyzOKk9p8aYbj9eB6/KD703oYx cZN0IVmsn4HczRs+Mli1CHmCjgdbjygnc+YuVg0AxOTZTwOOh/5W/pJy92KqawV0TvaZz5i BTfYPTKfgG7ZugvwFyc2g== X-UI-Out-Filterresults: notjunk:1;V03:K0:aex9IFYN86E=:4XPEDTHn5/TAWcAS8M7/Y6 bTAbFK67uqiywdTFUlUuBJ+WHDSe0i7jpJH/VdT9WQ0E3+MIjxxVv8dFE44ehx0pV0YjmnxvQ tJeqRdKWHnBnTprSU2aus3R9IOpHWzuCmqPIxTqsSTGLw1decCmCZ0/kCKj6Mk4bKdXygzq5g PXW4yB97Aduwt/3PpZqyHwXAkp25MBp3fvH8uafNSyPb4U1+KxpZObqRp3rlfnmMbDPza/r21 q/EaI7mGBw28PG81tNlUPm6U+Q1XNw+UJpxRSKEN2qAH0IF0iJQfvickHZC2wHMJE/8YYPJ+a skPo27o969GhBejMAEqpaIMeVSQosxB32Mt/EbiwMUUQ2HsfndVxYL86WN9MOKpXpPJPdoOE2 yxjtMhIJkBAY2t5D3EZBKTae7iZqW5A8na+mpFRSZDScpOJwWe4VCzQXwPb3ggmeTAzM8N7pN 2akzkAEuFp2RfshfcGfaQquHOf5N16ojZAn960hFgelujlu5MJDTPfatv14Aj24veFb2snlIX R2Nq0Vn9ga/rYmbypPd4DEJu8GfLgimx71Nr84Wabz3ViGiYnkFGNIW6bufP72qb6cXNB5tWF nWXFptET6YVuZgIH/z/Ww/yZxKM8dHBauseOWakNcEYmJK9IMfo/FW7oXn+HUNFPQQNMylWwX uDxUHZ2+dz+0ffFLW7E6bJzGgoCXPo5dx1du4uz0Qq4gZij8RfAM7gPAin5QTMdB/sBbqt5H2 zbkwFqdVRuwpSrd/d1WJWVqtLVdq2ncOAfc7Ag== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_122958_704193_E33D1342 X-CRM114-Status: GOOD ( 17.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , linux-pwm@vger.kernel.org, alsa-devel@alsa-project.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , Linus Walleij , Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Thierry Reding , Mark Brown , linux-input@vger.kernel.org, Olof Johansson , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP ep93xx does not have a proper pinctrl driver, but does things ad-hoc through mach/platform.h, which is also used for setting up the boards. To avoid using mach/*.h headers completely, let's move the interfaces into include/linux/soc/. This is far from great, but gets the job done here, without the need for a proper pinctrl driver. Signed-off-by: Arnd Bergmann Acked-by: Alexander Sverdlin Acked-by: Linus Walleij --- arch/arm/mach-ep93xx/clock.c | 1 + arch/arm/mach-ep93xx/core.c | 2 ++ arch/arm/mach-ep93xx/include/mach/platform.h | 16 --------- drivers/ata/pata_ep93xx.c | 2 +- drivers/input/keyboard/ep93xx_keypad.c | 3 +- drivers/pwm/pwm-ep93xx.c | 2 +- include/linux/soc/cirrus/ep93xx.h | 37 ++++++++++++++++++++ sound/soc/cirrus/edb93xx.c | 2 +- sound/soc/cirrus/ep93xx-ac97.c | 1 + sound/soc/cirrus/ep93xx-i2s.c | 3 +- sound/soc/cirrus/simone.c | 2 +- sound/soc/cirrus/snappercl15.c | 2 +- 12 files changed, 48 insertions(+), 25 deletions(-) create mode 100644 include/linux/soc/cirrus/ep93xx.h diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index d2eee707d27f..9f43362eb62d 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c @@ -20,6 +20,7 @@ #include #include #include +#include #include diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 706515faee06..3d245668846d 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -43,6 +43,8 @@ #include #include #include +#include + #include #include diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 43446f33c2be..b4045a186239 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h @@ -19,14 +19,6 @@ struct ep93xx_spi_info; void ep93xx_map_io(void); void ep93xx_init_irq(void); -#define EP93XX_CHIP_REV_D0 3 -#define EP93XX_CHIP_REV_D1 4 -#define EP93XX_CHIP_REV_E0 5 -#define EP93XX_CHIP_REV_E1 6 -#define EP93XX_CHIP_REV_E2 7 - -unsigned int ep93xx_chip_revision(void); - void ep93xx_register_flash(unsigned int width, resource_size_t start, resource_size_t size); @@ -36,19 +28,11 @@ void ep93xx_register_spi(struct ep93xx_spi_info *info, struct spi_board_info *devices, int num); void ep93xx_register_fb(struct ep93xxfb_mach_info *data); void ep93xx_register_pwm(int pwm0, int pwm1); -int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); -void ep93xx_pwm_release_gpio(struct platform_device *pdev); void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data); -int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); -void ep93xx_keypad_release_gpio(struct platform_device *pdev); void ep93xx_register_i2s(void); -int ep93xx_i2s_acquire(void); -void ep93xx_i2s_release(void); void ep93xx_register_ac97(void); void ep93xx_register_ide(void); void ep93xx_register_adc(void); -int ep93xx_ide_acquire_gpio(struct platform_device *pdev); -void ep93xx_ide_release_gpio(struct platform_device *pdev); struct device *ep93xx_init_devices(void); extern void ep93xx_timer_init(void); diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index cc6d06c1b2c7..db271b705529 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -44,7 +44,7 @@ #include #include -#include +#include #define DRV_NAME "ep93xx-ide" #define DRV_VERSION "1.0" diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index 71472f6257c0..575dac52f7b4 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -27,8 +27,7 @@ #include #include #include - -#include +#include #include /* diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c index bbf10ae02f0e..fa168581e6b8 100644 --- a/drivers/pwm/pwm-ep93xx.c +++ b/drivers/pwm/pwm-ep93xx.c @@ -35,7 +35,7 @@ #include -#include /* for ep93xx_pwm_{acquire,release}_gpio() */ +#include /* for ep93xx_pwm_{acquire,release}_gpio() */ #define EP93XX_PWMx_TERM_COUNT 0x00 #define EP93XX_PWMx_DUTY_CYCLE 0x04 diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h new file mode 100644 index 000000000000..56fbe2dc59b1 --- /dev/null +++ b/include/linux/soc/cirrus/ep93xx.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _SOC_EP93XX_H +#define _SOC_EP93XX_H + +struct platform_device; + +#define EP93XX_CHIP_REV_D0 3 +#define EP93XX_CHIP_REV_D1 4 +#define EP93XX_CHIP_REV_E0 5 +#define EP93XX_CHIP_REV_E1 6 +#define EP93XX_CHIP_REV_E2 7 + +#ifdef CONFIG_ARCH_EP93XX +int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); +void ep93xx_pwm_release_gpio(struct platform_device *pdev); +int ep93xx_ide_acquire_gpio(struct platform_device *pdev); +void ep93xx_ide_release_gpio(struct platform_device *pdev); +int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); +void ep93xx_keypad_release_gpio(struct platform_device *pdev); +int ep93xx_i2s_acquire(void); +void ep93xx_i2s_release(void); +unsigned int ep93xx_chip_revision(void); + +#else +static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; } +static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {} +static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; } +static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {} +static inline int ep93xx_keypad_acquire_gpio(struct platform_device *pdev) { return 0; } +static inline void ep93xx_keypad_release_gpio(struct platform_device *pdev) {} +static inline int ep93xx_i2s_acquire(void) { return 0; } +static inline void ep93xx_i2s_release(void) {} +static inline unsigned int ep93xx_chip_revision(void) { return 0; } + +#endif + +#endif diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c index 3d011abaa266..f678b4c1514a 100644 --- a/sound/soc/cirrus/edb93xx.c +++ b/sound/soc/cirrus/edb93xx.c @@ -22,11 +22,11 @@ #include #include #include +#include #include #include #include #include -#include static int edb93xx_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index cd5a939ad608..c6bc447429af 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -24,6 +24,7 @@ #include #include +#include #include "ep93xx-pcm.h" diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 0918c5da575a..beab7c516855 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -27,9 +27,8 @@ #include #include -#include -#include #include +#include #include "ep93xx-pcm.h" diff --git a/sound/soc/cirrus/simone.c b/sound/soc/cirrus/simone.c index 1ec661834e5a..cb850530331b 100644 --- a/sound/soc/cirrus/simone.c +++ b/sound/soc/cirrus/simone.c @@ -13,13 +13,13 @@ #include #include #include +#include #include #include #include #include -#include static struct snd_soc_dai_link simone_dai = { .name = "AC97", diff --git a/sound/soc/cirrus/snappercl15.c b/sound/soc/cirrus/snappercl15.c index 11ff7b2672b2..dea4909154c8 100644 --- a/sound/soc/cirrus/snappercl15.c +++ b/sound/soc/cirrus/snappercl15.c @@ -13,12 +13,12 @@ #include #include +#include #include #include #include #include -#include #include "../codecs/tlv320aic23.h" From patchwork Mon Apr 15 19:31:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10901469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9578E14DB for ; Mon, 15 Apr 2019 19:32:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7016828861 for ; Mon, 15 Apr 2019 19:32:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6380128872; Mon, 15 Apr 2019 19:32:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C6E3D28861 for ; Mon, 15 Apr 2019 19:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aJteAE4ylCrK0liKpPqthtUrsuw9WoDE4v5MCCDlm6w=; b=bJijnKk8TAYeSq V4eWacTpcy0OA21gi9zoOUMeayZApdxRw5E7AWJQXlqrIdOLFhc/+AqbzvBcN5aQvPnF2vMjpPP02 1Y8vHe2wfbQSLAHjj+q9n+tpjwVra2gV5juvv1zSV2gchKEHyoXJr8S0+Zaubep6B9WANQA7BR8w+ QTOUhGYpld6+oMqWjFlpvRxs6B+2UBlIAkSKR1b2+PM/YMvSPbA9fbd6spDfN3y9YNXHwzN0CJ3GY 0AT3xZhH2ijb4oNw4JyeJW7khGdSAK2J8dnKTc44z4+aBUOAQvKwEvLbynSh4ahvKB34MO6sJuHIg L8bF0Br5EOV2Jb/T/orw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7LP-0005RN-Vb; Mon, 15 Apr 2019 19:32:43 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7LL-0005R4-RX for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 19:32:41 +0000 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MQNF3-1hTVSL1VFx-00MJa8; Mon, 15 Apr 2019 21:32:32 +0200 From: Arnd Bergmann To: Hartley Sweeten , Alexander Sverdlin Subject: [PATCH 4/4] ARM: ep93xx: move private headers out of mach/* Date: Mon, 15 Apr 2019 21:31:50 +0200 Message-Id: <20190415193231.936070-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415192734.935387-1-arnd@arndb.de> References: <20190415192734.935387-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ivPYvLLQ2j7TZufmWjXvXUfDmxVt/p/ExL/DvN/KwGxtp+3ub4o BOFcaeXUfmSyzCjflApEe+0APEuk1Zm97Xid0XmwZWBqpPxounHwtNu5mUDAXKdJI0ICF8b dP4bluOFs3Lhed5QKU/aR7R7mknzx3ogpm0269yUHA/YUOGU9zm9kpmmi2FhLSlJpsKh0AL 8vsKEcCoQgpJTF174IM2A== X-UI-Out-Filterresults: notjunk:1;V03:K0:R6RaNR2FKfw=:9+PYJzJ4YGVkJXT5oF1gpf l7BAeuv0K2bZFie6Sby34HkL8lDbW2Sve1N615WI5V9VcssMZND/b5t+Tw/eyQylVlFgOJ+FG iBWoiDq8J4YpcRYhWbJRGa+pKNzhRW59+9W9h5sWA1Mivop57grravatgKRK42BqcaTsQyNSt rY1HIcNQ8bOUCuEm1O0gsLH5/QslxU75hnn3VeDsoByyetOCV1PeV93hlcgITVWV2hi24xT31 Z6JR442lnKA5RHIf0ByUa8gxSHXts8gHgxJzCtU8BzU8J92hzMnd+a8hMVDPmTfFNFja0RD2J zk/Hdw/SYkpI6THLv3crWPnHo0986ElYEeJnJ2cfn0Axcd05LJRdl3sc8EW8uxb0mnL4exba/ c2n6XuXUIXENzrcIgpjjuHTybEbDWY/diaKrzse+KozmebEvPdGcRm5yLEYPVzGfBr+OOI4x1 FbohmfA71xR+vQIeV4EbWUjCbTor7b4TM1h0MSwC4x1S3AFpP4stn5ULaK1P+JAk2yo0gOjQE 5k78FPZOOEIKtY0Uq+iQYzJSFNs9+gJFLAux0gioaNAMikYnMH3mCbnwUjlsrck4qsWKRUFyh fpvno05IhoU2qYW+9b+eQLIOAgdkFSU7FVMpfhe/Kx9B2dH0Vmt9xcUBMB+ch5J9G7YxM+eTq mlmSytUftZA2BQiV7O1z0zezNvYj+rMNgWPSsc8yaOD46Zm+zUKergZg1eLgXnvCwfIpzUAgc bj1DrKwks29pTidCWyi9a1cHYENBd+SiWO3Nmw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_123240_195641_03EAF93A X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Laurent Pinchart , Arnd Bergmann , Boris Brezillon , Linus Walleij , Lukasz Majewski , linux-kernel@vger.kernel.org, Mark Brown , Miquel Raynal , Olof Johansson , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP gpio-ep93xx.h, hardware.h, and platform.h are only used in arch/arm/mach-ep93xx, so we can move them one there and no longer expose them to device drivers. Signed-off-by: Arnd Bergmann Acked-by: Alexander Sverdlin Reviewed-by: Lukasz Majewski --- arch/arm/mach-ep93xx/adssphere.c | 2 +- arch/arm/mach-ep93xx/clock.c | 2 +- arch/arm/mach-ep93xx/core.c | 6 +++--- arch/arm/mach-ep93xx/dma.c | 2 +- arch/arm/mach-ep93xx/edb93xx.c | 4 ++-- arch/arm/mach-ep93xx/gesbc9312.c | 2 +- arch/arm/mach-ep93xx/{include/mach => }/gpio-ep93xx.h | 0 arch/arm/mach-ep93xx/{include/mach => }/hardware.h | 2 +- arch/arm/mach-ep93xx/micro9.c | 2 +- arch/arm/mach-ep93xx/{include/mach => }/platform.h | 0 arch/arm/mach-ep93xx/simone.c | 4 ++-- arch/arm/mach-ep93xx/snappercl15.c | 4 ++-- arch/arm/mach-ep93xx/ts72xx.c | 4 ++-- arch/arm/mach-ep93xx/vision_ep9307.c | 4 ++-- 14 files changed, 19 insertions(+), 19 deletions(-) rename arch/arm/mach-ep93xx/{include/mach => }/gpio-ep93xx.h (100%) rename arch/arm/mach-ep93xx/{include/mach => }/hardware.h (96%) rename arch/arm/mach-ep93xx/{include/mach => }/platform.h (100%) diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index bda6c3a5c923..5d3a3e302012 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c @@ -15,7 +15,7 @@ #include #include -#include +#include "hardware.h" #include #include diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index 9f43362eb62d..b9f523d9dc8c 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c @@ -22,7 +22,7 @@ #include #include -#include +#include "hardware.h" #include diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 3d245668846d..cc1382f879af 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -39,13 +39,13 @@ #include #include -#include +#include "hardware.h" #include #include #include #include -#include +#include "gpio-ep93xx.h" #include #include @@ -125,7 +125,7 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) /** * ep93xx_chip_revision() - returns the EP93xx chip revision * - * See for more information. + * See "platform.h" for more information. */ unsigned int ep93xx_chip_revision(void) { diff --git a/arch/arm/mach-ep93xx/dma.c b/arch/arm/mach-ep93xx/dma.c index 88a4c9b089a5..821427107b11 100644 --- a/arch/arm/mach-ep93xx/dma.c +++ b/arch/arm/mach-ep93xx/dma.c @@ -26,7 +26,7 @@ #include #include -#include +#include "hardware.h" #include "soc.h" diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 8e89ec8b6f0f..d96dd014dd23 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c @@ -32,10 +32,10 @@ #include -#include +#include "hardware.h" #include #include -#include +#include "gpio-ep93xx.h" #include #include diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index 0cca5b183309..ac48e3476587 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c @@ -15,7 +15,7 @@ #include #include -#include +#include "hardware.h" #include #include diff --git a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h b/arch/arm/mach-ep93xx/gpio-ep93xx.h similarity index 100% rename from arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h rename to arch/arm/mach-ep93xx/gpio-ep93xx.h diff --git a/arch/arm/mach-ep93xx/include/mach/hardware.h b/arch/arm/mach-ep93xx/hardware.h similarity index 96% rename from arch/arm/mach-ep93xx/include/mach/hardware.h rename to arch/arm/mach-ep93xx/hardware.h index 8938906e780a..e7d850e04782 100644 --- a/arch/arm/mach-ep93xx/include/mach/hardware.h +++ b/arch/arm/mach-ep93xx/hardware.h @@ -6,7 +6,7 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H -#include +#include "platform.h" /* * The EP93xx has two external crystal oscillators. To generate the diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index 373583c29825..c7f64e4ff6c7 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c @@ -16,7 +16,7 @@ #include #include -#include +#include "hardware.h" #include #include diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/platform.h similarity index 100% rename from arch/arm/mach-ep93xx/include/mach/platform.h rename to arch/arm/mach-ep93xx/platform.h diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 80ccb984d521..adc17289cc23 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c @@ -27,8 +27,8 @@ #include #include -#include -#include +#include "hardware.h" +#include "gpio-ep93xx.h" #include #include diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index cf0cb58b3454..f8f89551dbed 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c @@ -25,9 +25,9 @@ #include -#include +#include "hardware.h" #include -#include +#include "gpio-ep93xx.h" #include #include diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 85b74ac943f0..bba6aa5d7106 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -23,8 +23,8 @@ #include #include -#include -#include +#include "gpio-ep93xx.h" +#include "hardware.h" #include #include diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index 767ee64628dc..66e2b34aa779 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -31,10 +31,10 @@ #include -#include +#include "hardware.h" #include #include -#include +#include "gpio-ep93xx.h" #include #include