From patchwork Fri Nov 16 18:08:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 10686745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B8B714BD for ; Fri, 16 Nov 2018 18:09:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B67A2D01B for ; Fri, 16 Nov 2018 18:09:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EB602D042; Fri, 16 Nov 2018 18:09:40 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 D0A392D01B for ; Fri, 16 Nov 2018 18:09:39 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=Ztv6B3qN0G3QAruftydE50x8F0vXUAdSZ+Rd0Ei2Xvc=; b=VxfPzErV59T8yk qG+I5jQ1C01t+nbI9+59e0F8JCbBqOLAXE3EdYM6LJhSZt8p633+36zC4j6pEv2zuwurlN6eiVyzM H8kDwaD5+b+DeNYUf+HJCWriHaAbStadjg25jOZw4/JYGxqjn5wrJOI6yyNTIkc9oDnFy7OLu/3LQ 6++MW+RIBElKzTE/flPIAWSk6iNv8ZKaLtB3O1MlGkmygtmUmIeZN1bSDl9179Cg4jmIM0F9HIXRb 0kC/YRDiiQ8Na/E+6MjD5tRdYAqaNwFTRKET/Ktc8QCarXOBf786sxSZPsSjmsioyfLg/X++YsPv6 meJzzn3OpHX4wZGeeTQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNiYi-0002Gm-Na; Fri, 16 Nov 2018 18:09:36 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNiYg-0002GA-ID; Fri, 16 Nov 2018 18:09:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IXyr//APQCelJ0bMmob7krTe1S/T9BsX+pGrLDxT3S4=; b=vJ9DShQYiD0T2vYC7373JJP8KA 399yk2qLAOtjE5HVUmJJzwjCqOuSWeROG47MyZPpRkWdWWMIlMedRWovY/F4yC34ULtxY9aEd7oPX 5/LSxk8z/RLeaeV063+Y6ziNx+RjaOlxmy8Vk1Wvr+PK4PlO8/6jojGSJEa4Kqpj9/Tm6EWnaO4vQ HzTzoW5qO9plXqN/yrNCgoy5lWSWv1cFaCd5e6kYObuMsgEhe59mW1613YDfEMH2zRs1NPKVnwW95 cBwqWh/cUhzNzmlCYGOgW54kPWJX7UrxD8loxV2F9rCsZJVoMsz6Ut0a1ntZ/G+sVDQom2UuXxLZQ DNzWuXOw==; Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNiYc-0003MS-HE; Fri, 16 Nov 2018 18:09:32 +0000 Received: from ziggy.de (unknown [93.176.147.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 370142086A; Fri, 16 Nov 2018 18:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542391758; bh=tcLau1OHiSJKal0V6BJSGEwCEp2brxMeH34csJoXRZ4=; h=From:To:Cc:Subject:Date:From; b=L/SKUdtDMmIW6b6ZGweMqgYUwIViMpkc3YRREM/jaNiqHS5VkVuJe4vbPBEC+yue9 DdPe5SuvngefJhpQShnuYoV/aXGhKdHTnz1leqAvjmApvf/EhHBmGbEs7HQSKaMJuO DCfZMmbvdGb1G9Zr3s+lvTCCjnByTG0cgKfn9ZjE= From: matthias.bgg@kernel.org To: mturquette@baylibre.com, sboyd@kernel.org, matthias.bgg@gmail.com Subject: [PATCH v2 0/3] Mark clocks as critical for MT6797 Date: Fri, 16 Nov 2018 19:08:58 +0100 Message-Id: <20181116180901.17737-1-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_130930_686874_8724F6EA X-CRM114-Status: GOOD ( 11.40 ) 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: Matthias Brugger , sean.wang@kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, jasu@njomotys.info, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 From: Matthias Brugger Jasper send this series some month ago. As there was no reaction from his side, I'll do a friendly take-over. I tested the patches on my Helios X20 boards and they fix the issue. I didn't add a Tested-by tag as I added my Signed-off-by. Changes since v1: - add a fixes tag. Acked-by: Mars Cheng --- Currently, DRAM-related clocks and the axi_sel MUX are not marked with CLK_IS_CRITICAL for MT6797. This causes memory corruption when the system is booted without clk_ignore_unused. This patchset 1. Makes it possible to mark outputs of MUXes as critical by introducing a new macro, MUX_FLAGS, 2. Makes it possible to mark gates as critical by adding flags to mtk_gate, and 3. Marks axi_sel, ddrphycfg_sel, infra_dramc_f26m and infra_dramc_b_f26m as critical. The addition of flags to mtk_gate also exists in the patch series "Add basic and clock support for Mediatek MT8183 SoC" [1]. The type of flags is unsigned int in that series, but the real type is unsigned long, so my patch differs from that patch. [1] https://patchwork.kernel.org/patch/10549953/ Jasper Mattsson (3): clk: mediatek: Add MUX_FLAGS macro clk: mediatek: Add flags to mtk_gate clk: mediatek: Mark bus and DRAM related clocks as critical drivers/clk/mediatek/clk-gate.c | 4 +- drivers/clk/mediatek/clk-gate.h | 3 +- drivers/clk/mediatek/clk-mt6797.c | 64 ++++++++++++++++++------------- drivers/clk/mediatek/clk-mtk.c | 2 +- drivers/clk/mediatek/clk-mtk.h | 9 ++++- 5 files changed, 50 insertions(+), 32 deletions(-)