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);