From patchwork Wed Aug 2 09:34:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 9876453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A87360360 for ; Wed, 2 Aug 2017 09:39:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ED9F28794 for ; Wed, 2 Aug 2017 09:39:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3382728798; Wed, 2 Aug 2017 09:39:56 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 C7867287A3 for ; Wed, 2 Aug 2017 09:39:53 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=kU0Umkn+lG9TItouQKtziDSjK9bnQOQA9rTAj9DuxZo=; b=Q0NodAJYvB1bUv/TylwV5811Ei WzTOgOH17AGuNO7Cdm3QT6WQyRIyW1hTq3Md6oQQRyShDAgAPOw9J5j7n0GrTQQISRMTVxsy+E0TD NM+qnZz/pWbZqqaoJ/NzD0oPI2I1cFpubSJE+pENUoada/5YkKgZIaOEa6NO6HsbnWQ42hi42XCJg srWhweLm7lVWgUAp3B4drh8hom8jCVi9gDLEuuyRcAqwfwaTL4rgz839jZxe2MWLgUSwINNIaBFKn FLoO/Gwd0g5gBhamFl9rl4rnBXQdp8qszoWfoSjamNHDR+KxHZhuDUMWU5wPR0BKuR1bpB0OYT5nN FseFv+Cw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dcq7v-0002qM-NF; Wed, 02 Aug 2017 09:39:39 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcq49-0001Ga-BN for linux-arm-kernel@bombadil.infradead.org; Wed, 02 Aug 2017 09:35:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FBXoWTg5O080xd1FmyDUNsYoOeiodf0YZmKv1VSIRmQ=; b=NsuK6wpMLGlcirUrW4GohIEjL RIevM9Zbon1Z93/wU9nRMmtHUaAsldJF4FLQYFVBzq6lqZIROa0O2GYp7wWkbU/09iv9ohZcidhBC oDFu0ofai2gBNBnw37cPXfyliil7MlfDQEt18IVntkBhqMMn0VHgzbdSVk87cGpeImYNZRnyk4a14 uuXq1uRSCwXZZqogR+qkak2ALvdYOw7LhldAhX9cqniCz1f8WhEcgLPF8HXonaevxVXwmQK9pmeqX A6h6EVMtRvOo4u2w03/INkHobChha1iI2InULk3r/StQ4Py/wqScSaID8PVdX8MdXJkbMvh7cfY72 QREmBdJSA==; Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcq46-0001Yo-B6 for linux-arm-kernel@lists.infradead.org; Wed, 02 Aug 2017 09:35:43 +0000 Received: by mail-wr0-x243.google.com with SMTP id g32so3220532wrd.5 for ; Wed, 02 Aug 2017 02:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FBXoWTg5O080xd1FmyDUNsYoOeiodf0YZmKv1VSIRmQ=; b=Sw/jmBnv+3d9DSdkL1NwrY2K+iDrNXTag4eo/gnyck+zVR0qZGIssfHxdBJBF76d7J LVdbX4DptvmCpu0nmDOqWfTgZp1RS2AcwI2B7VUgIRYnbHQt0hFG4ufeDsnknsaXEUHC Nw8k2bxDf7U0wR9nlPAcEWprxyIIZM0viC1HCs7hxVBflu/Srn8u/WWcqllhCUmDj+1E C0snG7JuPGKl4dckM9I5C5X66lkhyIjjJA4BsQMgZIJ9Rsm0S7ATc2rSvVN9fbkK4LrR roLVqQKknqY+mE6pvBEq1AoRGo3giQAHhwCyTXaC6WjR+VnD42sqJxySHv6m2Nj+LtNg igVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FBXoWTg5O080xd1FmyDUNsYoOeiodf0YZmKv1VSIRmQ=; b=ooRQmqz73VhCDqYbfGqKJ53jdJzDDv2RiqSUojDpEqMKxPy8nUJoTVfEoRUD4xCEW2 T/0WlGBbyZo7M15aj8yJb8C5XxP7TYn+YuBZCh1s/PARiq2vJBnfdVlt6+d9fbr+hc8M Ihz8a/Pt7G69JoifU9Y+3VZLTuPydhZ5YExrhm5y1zXmdJEkEni7cmo/WizdMr8WuYGY RJQ///3x8HAQSfTzsZmCZMeOIgMFLFWC0ieZUy5doiFSnAEGxHiwME0ycDgaSM6Dwcjq Ac+gB/Aaj+XzpYVZQ+mD4Qzg61/RKoRi4zrJ6vf4bgOC+Jz+5twHlByu/BDnDRA6e6Iw 4VAA== X-Gm-Message-State: AIVw112AYsfRncWkL1ZWd5KU6BCfCvEwSgMB9Msup8l6a9PPHXP+FfBe m8eytULdbc53Fg== X-Received: by 10.223.172.230 with SMTP id o93mr18959092wrc.273.1501666517281; Wed, 02 Aug 2017 02:35:17 -0700 (PDT) Received: from localhost.localdomain ([2001:470:9e39::48e]) by smtp.gmail.com with ESMTPSA id 91sm32058876wrg.83.2017.08.02.02.35.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 02:35:16 -0700 (PDT) From: Jonas Gorski To: linux-mips@linux-mips.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 7/8] MIPS: BCM63XX: move the HSSPI PLL HZ into its own clock Date: Wed, 2 Aug 2017 11:34:28 +0200 Message-Id: <20170802093429.12572-8-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170802093429.12572-1-jonas.gorski@gmail.com> References: <20170802093429.12572-1-jonas.gorski@gmail.com> 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: Mark Rutland , Florian Fainelli , Greg Kroah-Hartman , Kevin Cernekee , Russell King , Ralf Baechle , Rob Herring , bcm-kernel-feedback-list@broadcom.com, Jiri Slaby , "David S. Miller" MIME-Version: 1.0 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 Split up the HSSPL clock into rate and a gate clock, to more closely match the actual hardware. Signed-off-by: Jonas Gorski --- arch/mips/bcm63xx/clk.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index 8a089a92e029..884099de097f 100644 --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c @@ -248,6 +248,10 @@ static struct clk clk_hsspi = { .set = hsspi_set, }; +/* + * HSSPI PLL + */ +static struct clk clk_hsspi_pll; /* * XTM clock @@ -379,6 +383,7 @@ static struct clk_lookup bcm6328_clks[] = { CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), + CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), @@ -452,6 +457,7 @@ static struct clk_lookup bcm6362_clks[] = { CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), + CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), @@ -486,7 +492,7 @@ static int __init bcm63xx_clk_init(void) clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); break; case BCM6328_CPU_ID: - clk_hsspi.rate = HSSPI_PLL_HZ_6328; + clk_hsspi_pll.rate = HSSPI_PLL_HZ_6328; clkdev_add_table(bcm6328_clks, ARRAY_SIZE(bcm6328_clks)); break; case BCM6338_CPU_ID: @@ -502,7 +508,7 @@ static int __init bcm63xx_clk_init(void) clkdev_add_table(bcm6358_clks, ARRAY_SIZE(bcm6358_clks)); break; case BCM6362_CPU_ID: - clk_hsspi.rate = HSSPI_PLL_HZ_6362; + clk_hsspi_pll.rate = HSSPI_PLL_HZ_6362; clkdev_add_table(bcm6362_clks, ARRAY_SIZE(bcm6362_clks)); break; case BCM6368_CPU_ID: