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: 9004851 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5E865BF29F for ; Tue, 3 May 2016 15:20:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E043220270 for ; Tue, 3 May 2016 15:19:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03F4F2028D for ; Tue, 3 May 2016 15:19:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933578AbcECPSX (ORCPT ); Tue, 3 May 2016 11:18:23 -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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);