From patchwork Sat Feb 12 15:09:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 542451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42985C433FE for ; Sat, 12 Feb 2022 15:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236339AbiBLPJy (ORCPT ); Sat, 12 Feb 2022 10:09:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbiBLPJy (ORCPT ); Sat, 12 Feb 2022 10:09:54 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4943F214; Sat, 12 Feb 2022 07:09:50 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id x3-20020a05600c21c300b0037c01ad715bso5006442wmj.2; Sat, 12 Feb 2022 07:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w4oJBB1iQ3jXfwvtZfxmVO4BCVeU0b4Dxjp4jQuS4LA=; b=EN0CBr7TkAOT5wI9D+VTki2rVGNhSiFlnU8uZcFivC6dzqXYLwsozAtIn0XyB2fmOn HSoDZp7ouQHaT1QD5WzDQztebXyKfq90n3zzZlclFO4juArW1ILS6HqogYLugwvjr/tc O83E8utMm4nQo0wt9jENI1TFZetaRBBXZrIIjT54l+7ns7DXvF/cEay2mFSnSOC6Wzg+ I4vX7Ym7LjsLFTX+b4/+ZniGFnItdlZ3aIRzEk/UHOuAmLIbgZNWPsgyFeXdXfOaIPlG 9DEXNEAMsQsH1RMlM9kIKaVLtEuK9Wnynphl2MKk7xZ4FpY+8AbfR6bkxmLLe8A1VqIr QYhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w4oJBB1iQ3jXfwvtZfxmVO4BCVeU0b4Dxjp4jQuS4LA=; b=OSB+jKa/jCHeo4W9VKevtnUCgzV/8EJHbtzK7QOG8IgZdUMcpmnrHrxXIbA2XvQa9e jm46JQa+7s537TFHj0pRTzvOgfr0u+xB23tZj8kXrBYNV4vVyX9fiQhzRqXHS6SaM+YH YHEBTqhKZ2SrozdaRq+nkwc19/rUQvY8P5KSgiYw9H579gTnC4I0UcEsPDi2hdzKuFqM f9EHm5839NJG544rT7SiPoaclV28qSJbB9zSUj109tb4zoNNyFj2SBHXulBPQk9h9hMq uq7qH43IgOiAC9AXpXyzrov/WDNmnAuixx9FhC4ZfIqNInxxvMmqyOmfJfl5p+p8qB6K ZLtw== X-Gm-Message-State: AOAM533/IaR3KDG4LonnmugKnT4Xjjygbyag0qtfteJg0EnOXyttKBO/ a7wjX13bMCtAWZ0iJP4X86Q= X-Google-Smtp-Source: ABdhPJxWPICHL46SoAErCtd1MENUNuoP9hQwMONMogsMSXSliP+22OKiWAobCME0X2uu3G2cUAKvHg== X-Received: by 2002:a05:600c:3641:: with SMTP id y1mr4409429wmq.44.1644678588769; Sat, 12 Feb 2022 07:09:48 -0800 (PST) Received: from localhost (92.40.203.136.threembb.co.uk. [92.40.203.136]) by smtp.gmail.com with ESMTPSA id o4sm4582459wms.9.2022.02.12.07.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Feb 2022 07:09:48 -0800 (PST) From: Aidan MacDonald To: paul@crapouillou.net, robh+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dts: x1000: Fix missing TCU clock in tcu device node Date: Sat, 12 Feb 2022 15:09:27 +0000 Message-Id: <20220212150927.39513-1-aidanmacdonald.0x0@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This should've been present all along, but was omitted due to a mistake in the TCU driver. Signed-off-by: Aidan MacDonald --- v1 -> v2: https://lore.kernel.org/linux-mips/20220209230145.18943-1-aidanmacdonald.0x0@gmail.com/ * Split DTS changes to separate patch. arch/mips/boot/dts/ingenic/x1000.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi index 8bd27edef216..c69df8eb158e 100644 --- a/arch/mips/boot/dts/ingenic/x1000.dtsi +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi @@ -111,8 +111,9 @@ tcu: timer@10002000 { clocks = <&cgu X1000_CLK_RTCLK>, <&cgu X1000_CLK_EXCLK>, - <&cgu X1000_CLK_PCLK>; - clock-names = "rtc", "ext", "pclk"; + <&cgu X1000_CLK_PCLK>, + <&cgu X1000_CLK_TCU>; + clock-names = "rtc", "ext", "pclk", "tcu"; interrupt-controller; #interrupt-cells = <1>; From patchwork Sat Feb 12 15:09:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 542227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B6CCC4332F for ; Sat, 12 Feb 2022 15:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236373AbiBLPJ4 (ORCPT ); Sat, 12 Feb 2022 10:09:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236359AbiBLPJz (ORCPT ); Sat, 12 Feb 2022 10:09:55 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75440B0B; Sat, 12 Feb 2022 07:09:51 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id h6so19844163wrb.9; Sat, 12 Feb 2022 07:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y6rK33RVsJ8ict1sPgpfIjdEeAWbWsXMVJ0khfSr/MA=; b=GKradZqxOgToue9ytU42MEBx+sFCTatmIhU/hgAN0i8fRncz8bb8ao0jjbXEdh/wg0 xhklPOL8vYJnud/PIzw63QX9CaxFDb01Pd3PxQFSxJX7Fs2DuV8sgEKlwuW8WA99krIP FQ03hGJYQqIvhqiE3vxurHjWL1YJISlxEMH/1juBXIkkMOBDT18zOXPkG2BUsknd9gw7 SJut4z7b0naFdbUDyKMBpSqIKfYH9nCOIhiUKXSmQJyCAsoDoyaF6NLnhxqKVTtw6gax D1Vo20ntQOxzIJJRnXVegOdhg59vqFnQeHIhtE0H5PJ2Z+zQyA326UESfl9CeVrrsE6R vpcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y6rK33RVsJ8ict1sPgpfIjdEeAWbWsXMVJ0khfSr/MA=; b=Z/yzNDN955ZT9dPgkAZfMm/3xBrjr0Rsz5tTRLknfZYh8rM813tjA+TXvDo1qb6N9/ ggELDjvmOods54ZsJXdz7P7jWLSWb0Ju7meByv1MwKb11xEvyz4b3D50xDfM9h+9UQ/3 P/4FUu5v9Kxsm2TXKsYIdbUg7yRyQsiPf7wnW/lhHoXCuLymMCLKj6D2jw3gSKJLziv7 5PE3hCY5DGgNlXi0fmAOM5jSgX1ouOH1kv0beJBTxlWqpI88iDIMm2UgERfutHh1AXyt Sw7X5DB7Y6NU4l6pquynGXqIewew42t6Ca0SYx1okpQ8tqeghdOQ1OMus15jxCi1NDh0 +9Lg== X-Gm-Message-State: AOAM533ccAxv+KR+7EwQ/6BSjkbumSP3NAVN3sub3MGfNZYJYMoTH5x3 M0XfNg2ywA0ulVsCYqD9jz4= X-Google-Smtp-Source: ABdhPJz/oimDtL1dKb7oi5BhaasQds+dZlobT7RnNlFaApC1121mN3wXqZz0qp7njb1K3LLqge55tg== X-Received: by 2002:a5d:598a:: with SMTP id n10mr2765332wri.364.1644678590051; Sat, 12 Feb 2022 07:09:50 -0800 (PST) Received: from localhost (92.40.203.136.threembb.co.uk. [92.40.203.136]) by smtp.gmail.com with ESMTPSA id o4sm4582459wms.9.2022.02.12.07.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Feb 2022 07:09:49 -0800 (PST) From: Aidan MacDonald To: paul@crapouillou.net, robh+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] clk: ingenic-tcu: Fix missing TCU clock for X1000 SoC Date: Sat, 12 Feb 2022 15:09:28 +0000 Message-Id: <20220212150927.39513-2-aidanmacdonald.0x0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220212150927.39513-1-aidanmacdonald.0x0@gmail.com> References: <20220212150927.39513-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The X1000 does have a TCU clock gate, so pass it to the driver. Without this the TCU can be gated automatically, which prevents timers from running. Fixes: dc6a81c3382f74fe ("clk: Ingenic: Add support for TCU of X1000.") Signed-off-by: Aidan MacDonald --- I've just realized, maybe this is an ABI break. Now that the TCU clock is required, the driver probe will fail if given an old device tree which is missing that clock. Is it necessary to add a hack of some sort to support the old device tree? drivers/clk/ingenic/tcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c index 77acfbeb4830..9c86043f673a 100644 --- a/drivers/clk/ingenic/tcu.c +++ b/drivers/clk/ingenic/tcu.c @@ -320,7 +320,7 @@ static const struct ingenic_soc_info jz4770_soc_info = { static const struct ingenic_soc_info x1000_soc_info = { .num_channels = 8, .has_ost = false, /* X1000 has OST, but it not belong TCU */ - .has_tcu_clk = false, + .has_tcu_clk = true, }; static const struct of_device_id __maybe_unused ingenic_tcu_of_match[] __initconst = {