From patchwork Wed Sep 20 11:14:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 9961297 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 CC355600C5 for ; Wed, 20 Sep 2017 11:17:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE94A290B6 for ; Wed, 20 Sep 2017 11:17:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3378290B9; Wed, 20 Sep 2017 11:17:45 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED 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 2F05C290B6 for ; Wed, 20 Sep 2017 11:17:45 +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=aMzenCHBkvzhojIiZHdsPlY8rFu1iET2FZ3ktykeAhM=; b=ZLZYUbiTXkjZQB+3cc/6bXocfO ZPKR8MA8dVFmBvO9zHLAmPvggnhMllDONsNUn6suFVNoHWORkxr1r/iBycDIpxYAAgxr1+xz2Dd5C 6oTA1cuR86zjEP9O5lamlCiVaRFUwqOSa7ZcIUsucrKsNk2rDemD4YQ519f9gtS7Mbyjan99Fe2Ol CzMA/QTeDuB/Y8pBnM3fR5rondru7GYFp5s5DRlH10KLUBF4ZjiuLDB43GknrQnjKlpQU1V4RQgWJ AhNtQ4R3YMC6qyJSUqPQWpFHACk9KvrwZqv5CofxZAwwy8gSaQoPOa8DBfoILqxs60Xa1n6EHcSVe ApUAsgkQ==; 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 1dud0d-0002VI-Je; Wed, 20 Sep 2017 11:17:39 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ducza-0001ZA-EL for linux-arm-kernel@lists.infradead.org; Wed, 20 Sep 2017 11:16:41 +0000 Received: by mail-wm0-x242.google.com with SMTP id i131so2126820wma.1 for ; Wed, 20 Sep 2017 04:16:17 -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=uPUolmFy9iORxNngwhGLWGNonJwJajffSM+pA1k3g2M=; b=qsLPR6EQZGW1Jv2IBl1ufm6ly2lg+BzmgAvSqFB6mbP1hMPYyf4Wk61S8nVrZR8aS1 rmAuD0cQ5v32OMAquR9jfNdk3ASl/Yu/hIIQQbOxrwOZmoPrzPEt4AbtW0plmmDrezjG 6+Tu+2JXmoBjeShBf1a68UZxgSVy5M6YXBD+j3c3idcLOI/ifD2somp/stJS9o7KZ03F /wIR57vwEMsbfofULvTZUgUv7AFYiaA6LSSY9lmKmxAvzVNb036eSarfTXFxeL7nrhk5 3sM5PiJFbWMrysnto9FB/l10PBsXkNZQn3JKxaoRuWVEp1J9DqK2itS/+RtgcjAvy9q/ kRsQ== 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=uPUolmFy9iORxNngwhGLWGNonJwJajffSM+pA1k3g2M=; b=FfauMfHXL6ZyyEtDV0CgBhQDwoVeO8kfoYtaDNlgFzx/c5sXF/MXdqbc+O7vURVU+n EqhM87MTmTToKPJxJVIuDfsiygrOQ8Q7S4Jp+rEWDGSKauFMpX2CWY4Lz6IVmVLDAahQ 09PS/RNaUnAopLin4jz+2Ys27+cTyVbwNLQlNero4dQsNCsJuE2tJwsI6fI+DURi7BHz URRhxqnmkiFvnKbboHIbO/87co8mUj5l+KNmvQcSWc+Te84BNZBxvE4RcdiW4umAvHmj 8z5FBjLNb04/bXxrYjUw0iWhgwZYG+t/boLEvVp/gaQivLBzOkrr3jb3PlnlJof1Bl93 Gbig== X-Gm-Message-State: AHPjjUijSAobZ1BPQs+dWVoPRag97zxKZskONXrWUAwGdRQEWLjC7LY3 LhT7Pf5RR+Acj56pH0NNzHU= X-Google-Smtp-Source: AOwi7QA0yDkHI+uVe82yMwGRacA5K/Brjkxyb7R3TCG48XrVedQJ2pv/ljJUXJGIuARpTDOA3HmDIw== X-Received: by 10.80.192.20 with SMTP id r20mr4288837edb.37.1505906175830; Wed, 20 Sep 2017 04:16:15 -0700 (PDT) Received: from localhost.localdomain ([2001:470:9e39::48e]) by smtp.gmail.com with ESMTPSA id s12sm884513edd.25.2017.09.20.04.16.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 04:16:15 -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 Subject: [PATCH V2 6/8] MIPS: BCM63XX: move the HSSPI PLL HZ into its own clock Date: Wed, 20 Sep 2017 13:14:06 +0200 Message-Id: <20170920111408.29711-7-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170920111408.29711-1-jonas.gorski@gmail.com> References: <20170920111408.29711-1-jonas.gorski@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170920_041634_875811_F9910D00 X-CRM114-Status: GOOD ( 12.00 ) 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 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. Reviewed-by: Florian Fainelli 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 d8dac1f9a65a..ba5758551c94 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 @@ -380,6 +384,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), @@ -447,6 +452,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), @@ -481,7 +487,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: @@ -497,7 +503,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: