Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F3CC433DB for ; Thu, 21 Jan 2021 13:49:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9E73238EC for ; Thu, 21 Jan 2021 13:49:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9E73238EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mansr.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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:In-Reply-To:Date:References: 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=AAdwq8frWhOJcNBXVCe99Jbl9kWyBGlfQj5zrRMdpUA=; b=nIxd1U4J+xkzr5KOwVyWfC5KJ Y6f0v3PcF/1Qtthf/xm0bshwRXw33+0y4ZR4t74e1yo+Sca3iNUtXRyPt1FFZYixyOTRIrQ7IQpUv cF8cTBVcYjeg0Kz8eRUO+OWnAUNiVSl4I2SLLuyKbxplSpZxpTcBYJcNXUZq4VdEIS2nIQnRKHzp4 1VM+jN34NGj/qMtoNeKaWwX8CsvU3qBCvRTKWMO9Eg8RPmCoiojLRx8ssbqR3l1wPBzAqtJ1nrFjd qtS+64wAcLAPCAigEAPn2agF9UKL//CJuGL5PWf8HaIbgN4iz7nR5oyeC+4yp6w0CFjfGFvgNX1ac A18a/oYPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2aJa-0001Dk-AR; Thu, 21 Jan 2021 13:47:58 +0000 Received: from unicorn.mansr.com ([2001:8b0:ca0d:8d8e::2]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2aJW-0001CZ-5K for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 13:47:55 +0000 Received: from raven.mansr.com (raven.mansr.com [IPv6:2001:8b0:ca0d:8d8e::3]) by unicorn.mansr.com (Postfix) with ESMTPS id E17E915361; Thu, 21 Jan 2021 13:47:51 +0000 (GMT) Received: by raven.mansr.com (Postfix, from userid 51770) id DBA5A21A3D9; Thu, 21 Jan 2021 13:47:51 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Arnd Bergmann Subject: Re: [PATCH 1/4] clk: remove tango4 driver References: <20210120131026.1721788-1-arnd@kernel.org> <20210120131026.1721788-2-arnd@kernel.org> Date: Thu, 21 Jan 2021 13:47:51 +0000 In-Reply-To: <20210120131026.1721788-2-arnd@kernel.org> (Arnd Bergmann's message of "Wed, 20 Jan 2021 14:10:23 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_084754_348377_6D2D7F2C X-CRM114-Status: GOOD ( 21.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Marc Gonzalez , Stephen Boyd , Michael Turquette , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Arnd Bergmann writes: > From: Arnd Bergmann > > The tango platform is getting removed, so the driver is no > longer needed. > > Cc: Marc Gonzalez > Cc: Mans Rullgard > Signed-off-by: Arnd Bergmann Acked-by: Mans Rullgard > --- > .../bindings/clock/tango4-clock.txt | 23 ----- > drivers/clk/Makefile | 1 - > drivers/clk/clk-tango4.c | 85 ------------------- > 3 files changed, 109 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/clock/tango4-clock.= txt > delete mode 100644 drivers/clk/clk-tango4.c > > diff --git a/Documentation/devicetree/bindings/clock/tango4-clock.txt b/D= ocumentation/devicetree/bindings/clock/tango4-clock.txt > deleted file mode 100644 > index 19c580a7bda2..000000000000 > --- a/Documentation/devicetree/bindings/clock/tango4-clock.txt > +++ /dev/null > @@ -1,23 +0,0 @@ > -* Sigma Designs Tango4 Clock Generator > - > -The Tango4 clock generator outputs cpu_clk and sys_clk (the latter is us= ed > -for RAM and various peripheral devices). The clock binding described here > -is applicable to all Tango4 SoCs. > - > -Required Properties: > - > -- compatible: should be "sigma,tango4-clkgen". > > -- reg: physical base address of the device and length of memory mapped r= egion. > -- clocks: phandle of the input clock (crystal oscillator). > -- clock-output-names: should be "cpuclk" and "sysclk". > -- #clock-cells: should be set to 1. > - > -Example: > - > - clkgen: clkgen@10000 { > - compatible =3D "sigma,tango4-clkgen"; > - reg =3D <0x10000 0x40>; > - clocks =3D <&xtal>; > - clock-output-names =3D "cpuclk", "sysclk"; > - #clock-cells =3D <1>; > - }; > > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile > index dbdc590e7de3..adf05704336e 100644 > --- a/drivers/clk/Makefile > +++ b/drivers/clk/Makefile > @@ -63,7 +63,6 @@ obj-$(CONFIG_COMMON_CLK_SI570) +=3D clk-si570.o > obj-$(CONFIG_COMMON_CLK_STM32F) +=3D clk-stm32f4.o > obj-$(CONFIG_COMMON_CLK_STM32H7) +=3D clk-stm32h7.o > obj-$(CONFIG_COMMON_CLK_STM32MP157) +=3D clk-stm32mp1.o > -obj-$(CONFIG_ARCH_TANGO) +=3D clk-tango4.o > obj-$(CONFIG_CLK_TWL6040) +=3D clk-twl6040.o > obj-$(CONFIG_ARCH_U300) +=3D clk-u300.o > obj-$(CONFIG_ARCH_VT8500) +=3D clk-vt8500.o > diff --git a/drivers/clk/clk-tango4.c b/drivers/clk/clk-tango4.c > deleted file mode 100644 > index fe12a43f7a40..000000000000 > --- a/drivers/clk/clk-tango4.c > +++ /dev/null > @@ -1,85 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -#include > -#include > -#include > -#include > -#include > - > -#define CLK_COUNT 4 /* cpu_clk, sys_clk, usb_clk, sdio_clk */ > -static struct clk *clks[CLK_COUNT]; > -static struct clk_onecell_data clk_data =3D { clks, CLK_COUNT }; > - > -#define SYSCLK_DIV 0x20 > -#define CPUCLK_DIV 0x24 > -#define DIV_BYPASS BIT(23) > - > -/*** CLKGEN_PLL ***/ > -#define extract_pll_n(val) ((val >> 0) & ((1u << 7) - 1)) > -#define extract_pll_k(val) ((val >> 13) & ((1u << 3) - 1)) > -#define extract_pll_m(val) ((val >> 16) & ((1u << 3) - 1)) > -#define extract_pll_isel(val) ((val >> 24) & ((1u << 3) - 1)) > - > -static void __init make_pll(int idx, const char *parent, void __iomem *b= ase) > -{ > - char name[8]; > - u32 val, mul, div; > - > - sprintf(name, "pll%d", idx); > - val =3D readl(base + idx * 8); > - mul =3D extract_pll_n(val) + 1; > - div =3D (extract_pll_m(val) + 1) << extract_pll_k(val); > - clk_register_fixed_factor(NULL, name, parent, 0, mul, div); > - if (extract_pll_isel(val) !=3D 1) > - panic("%s: input not set to XTAL_IN\n", name); > -} > - > -static void __init make_cd(int idx, void __iomem *base) > -{ > - char name[8]; > - u32 val, mul, div; > - > - sprintf(name, "cd%d", idx); > - val =3D readl(base + idx * 8); > - mul =3D 1 << 27; > - div =3D (2 << 27) + val; > - clk_register_fixed_factor(NULL, name, "pll2", 0, mul, div); > - if (val > 0xf0000000) > - panic("%s: unsupported divider %x\n", name, val); > -} > - > -static void __init tango4_clkgen_setup(struct device_node *np) > -{ > - struct clk **pp =3D clk_data.clks; > - void __iomem *base =3D of_iomap(np, 0); > - const char *parent =3D of_clk_get_parent_name(np, 0); > - > - if (!base) > - panic("%pOFn: invalid address\n", np); > - > - if (readl(base + CPUCLK_DIV) & DIV_BYPASS) > - panic("%pOFn: unsupported cpuclk setup\n", np); > - > - if (readl(base + SYSCLK_DIV) & DIV_BYPASS) > - panic("%pOFn: unsupported sysclk setup\n", np); > - > - writel(0x100, base + CPUCLK_DIV); /* disable frequency ramping */ > - > - make_pll(0, parent, base); > - make_pll(1, parent, base); > - make_pll(2, parent, base); > - make_cd(2, base + 0x80); > - make_cd(6, base + 0x80); > - > - pp[0] =3D clk_register_divider(NULL, "cpu_clk", "pll0", 0, > - base + CPUCLK_DIV, 8, 8, CLK_DIVIDER_ONE_BASED, NULL); > - pp[1] =3D clk_register_fixed_factor(NULL, "sys_clk", "pll1", 0, 1, 4); > - pp[2] =3D clk_register_fixed_factor(NULL, "usb_clk", "cd2", 0, 1, 2); > - pp[3] =3D clk_register_fixed_factor(NULL, "sdio_clk", "cd6", 0, 1, 2); > - > - if (IS_ERR(pp[0]) || IS_ERR(pp[1]) || IS_ERR(pp[2]) || IS_ERR(pp[3])) > - panic("%pOFn: clk registration failed\n", np); > - > - if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) > - panic("%pOFn: clk provider registration failed\n", np); > -} > -CLK_OF_DECLARE(tango4_clkgen, "sigma,tango4-clkgen", tango4_clkgen_setup= ); > -- = > > 2.29.2 > -- = M=E5ns Rullg=E5rd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel