Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3576482ybl; Sun, 15 Dec 2019 13:03:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwp63Yv/liPTDT0qwLS4e/oWswvxLk+zRbfAKK87ddHhtCbQh7z7MvB/C3oy6icWxRwyu6/ X-Received: by 2002:a05:6830:20cf:: with SMTP id z15mr28067039otq.277.1576443803004; Sun, 15 Dec 2019 13:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576443802; cv=none; d=google.com; s=arc-20160816; b=jz4lL34x6k5/jkZEHfrykWauJkwSVwA0UxDXs1zLqDliy6+RbguLiF29hiOH0VatwO A9+GjIPr9CV7ymdmkR4NxbebVktqtgXT3lpFk0zWQXI3dLadhjwmqmXL6dp99v1ey6b/ 2IGguPDZdyJbgMh7FH8Pbu2XsMzIACbmA1Bo5j+0RPLTtx1j66yPglkjly/fdbuo/1xb a7ZAEesQSV+3akxc5GDWiHPnefsw/g1E25k50dbGk8dKndQRn7G9y3Lwb1Rczmm6aoiI y9LWISvCQpgH4tLgucecjsGOCBaXoPhIm5DBckfAG3rDefFEF+U+3ffMVKWN39ScYX4s 0T0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ev5ncFOZ6pn1RKGaLQHfd+wzEPLZWc48NhzIDiNBMKc=; b=auz2tFZ+vnMfmImTeaaivceg94FYvqCRBFvH9JXn2tv6mRbA8cLPYIV5aOKsSE7VJq DZ1UQwbGM6r+ixeb0pA48CUn2Kak/76GFxX5leiti7LqNsNcqynqTEbDE17O3kGpaarx 6Vnt9f7LUbcnSutagLn1vN0asA7XyzJk6nYN6JBpf6daOecr3M42bab+uJm+q90BlrK1 jfm9FItGQKeZmfnILyHZ8Je2Io8i6V7a7VXZZBNEoOz/na2eRFLne1y6j8zvsX78HNmC qYFypaA3OvUK1Z1lK5wI4mMzWF6e1iDn4soMMiyX2A0dyMaxHfVUesGdbdr2xZgRXxIM ERyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=mbTNiwGc; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si9654440oih.172.2019.12.15.13.03.11; Sun, 15 Dec 2019 13:03:22 -0800 (PST) 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; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=mbTNiwGc; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfLOVCP (ORCPT + 99 others); Sun, 15 Dec 2019 16:02:15 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34498 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbfLOVCP (ORCPT ); Sun, 15 Dec 2019 16:02:15 -0500 Received: by mail-wm1-f65.google.com with SMTP id f4so3567567wmj.1; Sun, 15 Dec 2019 13:02:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ev5ncFOZ6pn1RKGaLQHfd+wzEPLZWc48NhzIDiNBMKc=; b=mbTNiwGcGxLE8/AdKDrOeX57Uprrn9eqyB81r57F+OM3HGhuGvrgA36mxHrmlPRJba /X14+icOF2sMXk5Mqv6TthEzJrFbUyTbSvMh8DuRy7YeVKuBYTM67UNLMaODykgVD+CU 92nj1crd5sSqmkJ48fbBs0Yt+R0zSa6cV4SSEbM/07aqpwAkn4hi11KoFOuV2knaFyOK A2QEgkmo6As7ho30gQBmWD3kTyRqXf9B3O9y+KyG3RffpFc1T0DMLCJ4bSQqNAMGyQhv g0egWnkhevjUEaPsbvLV84h5+D5HZboktSorhwu1x0BVMV1/LliPL0ozW4jX96DuOCF0 oljg== 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:mime-version :content-transfer-encoding; bh=Ev5ncFOZ6pn1RKGaLQHfd+wzEPLZWc48NhzIDiNBMKc=; b=ZcdVHVJXxVqRBV5rHCcF6I84S9ikzSE6+T1Y0bv5uiJzCuvRg7i/wMM1iMUUd09ATr f4cnQqTvyrxGSlwC/L/9dSG/Q5n8nAphdGcfzaLaYu876a1XTbdzfY9aE2doKbCriqBm 4Ty8xOuD2gmlSyrUOy+nmtMSqY0lbB33Jd+owDHaa7eQLgKiLZqwewVXtO5PCxwYNBzK /H2DdIqTpvgyB0TDBus6XDV5nSrOlmB1E3nnMYzoU0vw7CzJ0ib2YbJ3QciZaRFza+/j SPbNJg3BRG8p9ZHmDQLZJTuX00Pljg2Wqt/+OhA43QuO+Lk1pCawJK65jz1u2oOuIeE1 YjPA== X-Gm-Message-State: APjAAAWXRliCH/L3nfTbe+v3abquV1BPW5exhP0RAs7togWPctC04+E4 L6kv4WASa8vNi++gZeCCpJ10J3kc X-Received: by 2002:a7b:c5d8:: with SMTP id n24mr25825846wmk.50.1576443732500; Sun, 15 Dec 2019 13:02:12 -0800 (PST) Received: from localhost.localdomain (p200300F1370FCC00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:370f:cc00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id f1sm19565645wrp.93.2019.12.15.13.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Dec 2019 13:02:11 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, jbrunet@baylibre.com, narmstrong@baylibre.com Cc: mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl Subject: [PATCH 0/1] clk: Meson8/8b/8m2: fix the mali clock flags Date: Sun, 15 Dec 2019 22:01:52 +0100 Message-Id: <20191215210153.1449067-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While playing with devfreq support for the lima driver I experienced sporadic (random) system lockups. It turned out that this was in certain cases when changing the mali clock. The Amlogic vendor GPU platform driver (which is responsible for changing the clock frequency) uses the following pattern when updating the mali clock rate: - at initialization: initialize the two mali_0 and mali_1 clock trees with a default setting and enable both clocks - when changing the clock frequency: -- set HHI_MALI_CLK_CNTL[31] to temporarily use the mali_1 clock output -- update the mali_0 clock tree (set the mux, divider, etc.) -- clear HHI_MALI_CLK_CNTL[31] to temporarily use the mali_0 clock output again With the common clock framework we can even do better: by setting CLK_SET_RATE_PARENT for the mali_0 and mali_1 output gates we can force the common clock framework to update the "inactive" clock and then switch to it's output. I only tested this patch for a limited time only (approx. 2 hours). So far I couldn't reproduce the sporadic system lockups with it. However, broader testing would be great so I would like this to be applied for -next. Martin Blumenstingl (1): clk: meson: meson8b: make the CCF use the glitch-free "mali" mux drivers/clk/meson/meson8b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.24.1