From patchwork Tue May 3 15:16:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102395 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp652079qge; Tue, 3 May 2016 08:17:31 -0700 (PDT) X-Received: by 10.98.67.150 with SMTP id l22mr4296312pfi.85.1462288651415; Tue, 03 May 2016 08:17:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ww8si4990166pac.4.2016.05.03.08.17.31; Tue, 03 May 2016 08:17:31 -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 S933471AbcECPRa (ORCPT + 29 others); Tue, 3 May 2016 11:17:30 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:64015 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932756AbcECPR2 (ORCPT ); Tue, 3 May 2016 11:17:28 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0LhziI-1bSsPa3hbe-00n7sH; Tue, 03 May 2016 17:16:57 +0200 From: Arnd Bergmann To: Sebastian Reichel Cc: Pavel Machek , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] HSI: omap-ssi: add COMMON_CLK dependency Date: Tue, 3 May 2016 17:16:20 +0200 Message-Id: <1462288586-584690-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462288586-584690-1-git-send-email-arnd@arndb.de> References: <1462288586-584690-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:UesHT7/8jDOGrd3u/ewWPFap/A1RHVO1cr8uTC06FEb2rhJD1IY msDIig1S+ODrIc6yfKdM41I38FwpgzBy6ZGLxwAZeaUgoWZN2R46go0oySXiIxPybK7f+v9 1rrEW+AKBdiCgMpDRaK8p6RueKC4S6OD2/i1iUpeCUag8v4gl0w1ILLfdD5iUzeoswsw9fr kTFOrHpiRlMTWgCvUayTw== X-UI-Out-Filterresults: notjunk:1; V01:K0:wNRnsf6jD2I=:iw2yxxL/8fjL23WcewH2tp 6YsK5XBXdEve4nGpWFgC3b4AnWDHmkf6jss9jkNoap64RDBi9hzaRtw5WL1f86ACMPBUYMIBZ veYguQ24KwD4t2w7hjWDS83CGm91z/Od/KNNb1OICLYJc6PdQHiiBc2EXiBTROJBAR5HfU427 azfPHAfRXR3OJ/asBB7pV9+rD5j2OxYv6tT8CE4L0n2Q3AKLb9I+LzsCs6cP9FYeZkCP16zXF cMguZtShsMlvEaAiVV6CSm1qmPkmEI5VRRtNPtvyYJ7PywaGsUAjwub5/K47VsTmC+atWN7+q gKpQPSd0BElakajOw0GSZe/aZ9Q3bySbgq6gpkcIqWZRGzbjUvlvUCGvwPv4ZrlB2YFiaFCKU 4XYV8ptgBh5U8cudwzyqD75y3IoURW+4Cv9Djh15wqmgJThaEM/8RzblXpxT9YuR8y8uoiUsW KAZ7n+Mo9qG18PNCs0XNk2qGb2zcID+ZWm8TB0R1cXAeGb4M8VhGLokUqV1d1a1iwY9zCs7/G QvNmGbW6QbqqFmoUtEhKZ79coNOmnawKZkyUtWMOUDK7f1OiQR2OKLV6BgvVeizkqEuVeUXC0 EpN5+wLBI3YB+PRA0CXq8RE2huD8fnNucD9l5TXE1qpa8hTfw1Y7YeFS9EI9OzQ+9GU92axxS TKzFYFF//T1pVmmF1YOqBL39CVrUwlUYcWrntAnIELUoe5VOvuUvhwmxMdGN2k1SOa8k= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enabling the omap ssi driver without COMMON_CLK results in a build failure: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:304:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function) This adds a Kconfig dependency to avoid the invalid configuration. Signed-off-by: Arnd Bergmann Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") --- drivers/hsi/controllers/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/hsi/controllers/Kconfig b/drivers/hsi/controllers/Kconfig index 084ec97eec64..48e4eda186cc 100644 --- a/drivers/hsi/controllers/Kconfig +++ b/drivers/hsi/controllers/Kconfig @@ -5,7 +5,8 @@ comment "HSI controllers" config OMAP_SSI tristate "OMAP SSI hardware driver" - depends on HSI && OF && (ARCH_OMAP3 || (ARM && COMPILE_TEST)) + depends on HSI && OF && ARM && COMMON_CLK + depends on ARCH_OMAP3 || COMPILE_TEST ---help--- SSI is a legacy version of HSI. It is usually used to connect an application engine with a cellular modem. From patchwork Tue May 3 15:16:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102394 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp652405qge; Tue, 3 May 2016 08:18:10 -0700 (PDT) X-Received: by 10.98.26.205 with SMTP id a196mr4334069pfa.46.1462288690814; Tue, 03 May 2016 08:18:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r64si4823268pfb.103.2016.05.03.08.18.10; Tue, 03 May 2016 08:18:10 -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 S933576AbcECPSH (ORCPT + 29 others); Tue, 3 May 2016 11:18:07 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:62987 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755845AbcECPSF (ORCPT ); Tue, 3 May 2016 11:18:05 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0Lsuti-1bdnfv0IqA-012cU5; Tue, 03 May 2016 17:17:29 +0200 From: Arnd Bergmann To: Sebastian Reichel Cc: Pavel Machek , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrzej Hajda , Sanjeev Sharma , Roger Quadros Subject: [PATCH 2/3] HSI: omap-ssi: include pinctrl header files Date: Tue, 3 May 2016 17:16:21 +0200 Message-Id: <1462288586-584690-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462288586-584690-1-git-send-email-arnd@arndb.de> References: <1462288586-584690-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:telurkJA5izk0uSFce8fNKA7o+wXxX6ahjOVpQSHs/jCROow+7Z ZtD7zK6iz7KIQ28OJFmC14UWW8MM1mh0PmEMFqzaiQAqTejmQNlr/xDS8I2t090dkyKJaOD jBdTUiM3XWrpRnqeD1kSsglLMcXiy+NYS8UkJM/attraEKTlV/bnKiWjCZQscIYdZjp5kuK yr2tojQbFeCtMNL7ptjlA== X-UI-Out-Filterresults: notjunk:1; V01:K0:KOtlp27Smtw=:x0oBVbhq7y38j8pt4LlHvs lkhjqJwq7uWA5IDviQCF7dnsQ5h79SDqo3fUbWGrZaqZGTmTpm5OJCCrzoNnpPJwlqejyXw7S Ha6gyWHvr3dydCBBUyp7AP3t5ZHsUNqaqSHhPjhCbiAhdK3lgYJGJmvWJ4o/C3DafcYF7lHsM iavIEspiPuExHI+zwlxqPmDxaVLBlhxEW4O7l4QchhgdebvjK0iVacIDbLa8m3LEer8f+nhDh 7Ce4N78k4MpnvoluA93hNrlVT7uK3CRCid8zQiNu5Txq9I+v7uO/vlLgtJXQY0nlPOEbNVe3C tCFGr1eIvIgmrjT9MnZWvUVVqzd1ZtdJJs0jx6s2U2rIXSdYbfUIwS4j6vvnDZjm6BsWofieT DjgIEHTv3w5WTU/ZvgJvAcL0WCcrl0OKYiyVeRi41lFO+lc1MkN0ixtpxEG0/EsNEIyyh1Csu P+xUATrEPsEaSbM0fJ3s2jM4KKdDu629n7nnhlbacCJihF7fnrAmPAqAy6T7FpOcsIlKUnRMd Ke9yVYZqeYjzbBPXUaRpiEulPkaA5AN/eNvGmbk8bdh2KpzXdDEPw5uL/FEAv9ijlhguikyNX IODKAXqa1d/VWp5NNAw0Jx263w6qydhGDs5d3i48sCDgb4Ace/78CPYDsr7NfAXVlCY03tpgq 0KwVA7lAn5rY01vPa9jx0+hC/VsRef4CiMBV7Uxa+48vnH7waGVLgXuVYdHz9nHhMX5M= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver now uses some pinctrl functions, but fails to build if PINCTRL is disabled because the respective header files are only included indirectly: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:317:4: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration] drivers/hsi/controllers/omap_ssi_core.c:339:4: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration] drivers/hsi/controllers/omap_ssi_port.c: In function 'ssi_flush': drivers/hsi/controllers/omap_ssi_port.c:520:2: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration] This includes the headers from the files that call the functions, which works even if pinctrl is turned off. Signed-off-by: Arnd Bergmann Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") --- drivers/hsi/controllers/omap_ssi_core.c | 1 + drivers/hsi/controllers/omap_ssi_port.c | 1 + 2 files changed, 2 insertions(+) -- 2.7.0 diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index 15b2a600d77b..a3e0febfb64a 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 98b22e88085c..ca7139eaaa1d 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -26,6 +26,7 @@ #include #include +#include #include #include "omap_ssi_regs.h" From patchwork Tue May 3 15:16:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102393 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp652522qge; Tue, 3 May 2016 08:18:26 -0700 (PDT) X-Received: by 10.98.92.66 with SMTP id q63mr4377734pfb.21.1462288706159; Tue, 03 May 2016 08:18:26 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jh2si4939812pac.149.2016.05.03.08.18.25; Tue, 03 May 2016 08:18:26 -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 S933604AbcECPSY (ORCPT + 29 others); Tue, 3 May 2016 11:18:24 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:58194 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933156AbcECPSX (ORCPT ); Tue, 3 May 2016 11:18:23 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MFfhh-1audwU2iIv-00Ebjq; Tue, 03 May 2016 17:17:39 +0200 From: Arnd Bergmann To: Sebastian Reichel Cc: Pavel Machek , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros , Andrzej Hajda Subject: [PATCH 3/3] HSI: omap-ssi: move omap_ssi_port_update_fclk Date: Tue, 3 May 2016 17:16:22 +0200 Message-Id: <1462288586-584690-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462288586-584690-1-git-send-email-arnd@arndb.de> References: <1462288586-584690-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:Lj314k5Or8TskdeQ2eNSH0h9Wp4pmETYlKmGUAZOo0aLDfJ3x7m wh7rw/j+yjRa0PGd7Q6v5l97Lfsefd1DpgKDMAUS3bMOqkbMtVbah4bgOGDdJf8WoxGi9Td K8sW4BoKY1UeIMs+9/WZZqbY0z5pP+opaocKO3BQGDePbylPGYttKSdKTQ1LY7L+UX9mwHQ c6nkJoIZAYidmfaEYwoRQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:8eMiusqwY7Q=:pp3VL2EyN+mmKng+GEaSaW xn+c+MCa/Uu6PMKlHB4qGy833BbmdSYKmfHW/8v+pFxBX7aH1Z8w/WeMxKl0hqNHJmGDOugYK StCT/roN81fUwi+Br2xcBNVyFO05JCN6Nj04JuniqcoZ/2/JJhNfZ7QnEANRK+WvGyuWaugyG CPxxRoRNdj+XBmEzvsfnWqjwxq+dhR6gdvwlTKNmjnlxh6bHe84C9r0LZy47gLAfm2lw2QDNE ipVCxuUSwobbxFIUrw2GA+zS73nnOvVs4SPKhFx0AtUny9eQXCTl4YB51G16ISHr89KthILS9 T7yvKEyYjeryOOSm3x0463p8MOEXRPKd/tjcc2XwdTsxkG87Bsg9DU0zqXADzmIHFpkcyCVaG iRix8Mi2yMUD5Ky2GARydGmfj6ey3UfP5sFXjXFH/v2cCl19YTCPrf3ibaTZPUIiQd5Byo2xX rgoUPz+mofW8nWeO555f1W7KJVWGJL2CK+w8Pn+iQiEkSRxgD1nfctDOwx1kOa+3/AqxgZtYs CVm72+yN2SWVd9vEwHWZRY40RzQT4u6yRIbKmtASv13l7LNDrYVeIR9nze+pSLA7qbnl8yO1W RdA6ku+nzF0S+bDDZaRTBIDLxGOJxqAP1+6z4CT++QEu9LVTuYJq2QC8ztD9BXorHFzojtDHw jUBIcE5cjj177Y61MNmzd5xFX9cPefNG3eGupe/0BMaxlqze3QZa5g4KjrnTIGTvf4jE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the clk change support, the ssi omap ssi core driver now calls into the port driver to change fclk. This function was previously inside of an #ifdef, because it was only used when CONFIG_PM is enabled. Now it also gets used without power management support: drivers/hsi/built-in.o: In function `ssi_clk_event': omap_ssi_port.c:(.text+0x1bf8): undefined reference to `omap_ssi_port_update_fclk' This moves the function outside of the CONFIG_PM guard. Signed-off-by: Arnd Bergmann Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") --- drivers/hsi/controllers/omap_ssi_port.c | 35 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) -- 2.7.0 diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index ca7139eaaa1d..6b8f7739768a 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -1253,6 +1253,23 @@ static int ssi_port_remove(struct platform_device *pd) return 0; } +static int ssi_restore_divisor(struct omap_ssi_port *omap_port) +{ + writel_relaxed(omap_port->sst.divisor, + omap_port->sst_base + SSI_SST_DIVISOR_REG); + + return 0; +} + +void omap_ssi_port_update_fclk(struct hsi_controller *ssi, + struct omap_ssi_port *omap_port) +{ + /* update divisor */ + u32 div = ssi_calculate_div(ssi); + omap_port->sst.divisor = div; + ssi_restore_divisor(omap_port); +} + #ifdef CONFIG_PM static int ssi_save_port_ctx(struct omap_ssi_port *omap_port) { @@ -1305,24 +1322,6 @@ static int ssi_restore_port_mode(struct omap_ssi_port *omap_port) return 0; } -static int ssi_restore_divisor(struct omap_ssi_port *omap_port) -{ - writel_relaxed(omap_port->sst.divisor, - omap_port->sst_base + SSI_SST_DIVISOR_REG); - - return 0; -} - -void omap_ssi_port_update_fclk(struct hsi_controller *ssi, - struct omap_ssi_port *omap_port) -{ - /* update divisor */ - u32 div = ssi_calculate_div(ssi); - omap_port->sst.divisor = div; - ssi_restore_divisor(omap_port); -} -EXPORT_SYMBOL_GPL(omap_ssi_port_update_fclk); - static int omap_ssi_port_runtime_suspend(struct device *dev) { struct hsi_port *port = dev_get_drvdata(dev);