From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 5E178C48BE5 for ; Sat, 12 Jun 2021 09:18:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2338D61029 for ; Sat, 12 Jun 2021 09:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbhFLJUe (ORCPT ); Sat, 12 Jun 2021 05:20:34 -0400 Received: from mail-ua1-f51.google.com ([209.85.222.51]:40919 "EHLO mail-ua1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbhFLJUd (ORCPT ); Sat, 12 Jun 2021 05:20:33 -0400 Received: by mail-ua1-f51.google.com with SMTP id d18so3505488ual.7 for ; Sat, 12 Jun 2021 02:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yNVmqtlfIFUqowfDuqxU7WaEgRPHbdl7aBs/A7dTrEM=; b=JM8HB6tsXv8gIn8uL8kNe2JZ5cu7d89BvTG6qAWpxLWFZTqiYlz7NSE3myd0cSHHN/ p4q65B8+oAsfpqL6etQOGSmDKAcRdy2H7u6LN+uYjn7tSk151xrJ7CNmGpug/F1JfGNe nTDUwnBQP1/fujV/SW02OQTIOesqnWauoBVNb98I8GwU2PXmS9V/kLNytkpmk2MZP8GE 5ajxnxnNGfro82knlAncphlQGutIYh8udJIo6VC6jMTWlfRlNNqKjUQMyWYIAXpP/R8D J8SyNwx/WKd7iGrRjCpGnPwycPuVblpv2YED3xneiY1NjbhKg9PZ3rCAqSX82HQGpGT0 aCfA== X-Gm-Message-State: AOAM532EBGNw4e79EgAm82YnUpIpWWeWZxF/iDdgaHcmFosK9VgXF0L4 Vykc08ZORoXZw8b6GTPob8cV6INMByeOr6HQl/8= X-Google-Smtp-Source: ABdhPJwAI+RI3SrTRAwJf2AZP+U4pTFRMUo0MFueLRV4ahK9wQLru2LdW5DTHGGxkQKU4qbDdnY+9mRef6FwEAFwJ3E= X-Received: by 2002:ab0:484b:: with SMTP id c11mr6821642uad.100.1623489500812; Sat, 12 Jun 2021 02:18:20 -0700 (PDT) MIME-Version: 1.0 References: <20210525083340.27722-1-nikita.shubin@maquefel.me> <20210525083340.27722-2-nikita.shubin@maquefel.me> <8cdf2b130ae02ba00324d0a70cbbcd3ba53e1d09.camel@gmail.com> In-Reply-To: <8cdf2b130ae02ba00324d0a70cbbcd3ba53e1d09.camel@gmail.com> From: Geert Uytterhoeven Date: Sat, 12 Jun 2021 11:18:09 +0200 Message-ID: Subject: Re: [PATCH 1/1] ep93xx: clock: convert in-place to COMMON_CLK To: Alexander Sverdlin Cc: Nikita Shubin , Russell King , Hartley Sweeten , Arnd Bergmann , Linus Walleij , Ard Biesheuvel , Mike Rapoport , Gregory Fong , Geert Uytterhoeven , YiFei Zhu , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexander, On Sat, Jun 12, 2021 at 12:42 AM Alexander Sverdlin wrote: > On Tue, 2021-05-25 at 11:33 +0300, Nikita Shubin wrote: > > Converted in-place without moving file to drivers/clk. > > > > tested on ts7250 (EP9302). > > > > Only setting rate and change parent tested for, as they > > are missing on ts7250: > > - video > > - I2S > > - ADC/KEYPAD > > - PWM > > > > Only video and I2S clock are interesting, as they are > > GATE + double DIV + MUX, all other are pretty much > > common but require ep93xx_syscon_swlocked_write to set > > registers. > > This doesnt look good in my test: > > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc > Enabling unprepared ep93xx-adc > [] (ep93xx_adc_probe) from [] (platform_probe+0x34/0x80) > WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc > Enabling unprepared ep93xx-spi.0 > [] (ep93xx_spi_prepare_hardware) from [] (__spi_pump_messages+0x124/0x620) > WARNING: CPU: 0 PID: 36 at drivers/clk/clk.c:952 clk_core_disable+0xbc/0xd8 > ep93xx-spi.0 already disabled > [] (ep93xx_spi_unprepare_hardware) from [] (__spi_pump_messages+0x388/0x620) These are issues in individual drivers, not in the CCF implementation. All drivers using the clock API should be converted from clk_{en,dis}able() to clk_{prepare_enable,disable_unprepare}() first. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 C7097C48BCF for ; Sat, 12 Jun 2021 09:19:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7E96761029 for ; Sat, 12 Jun 2021 09:19:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E96761029 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m37HMNzDUYYaiXYZgGDLIUqS4TyhlhRYcxTwWW9QB+8=; b=PeFDzomthXjM7k ylWr+czKtsoBtAixk5jSJK0PGQ88r3aGwUz8IrD+DySZzse4/NobDvJ/pPkQUpdBJGwwyKYrFdRxe fv1c0JEZZcfXZ4HPn+4IaxifBdpzlAXDgg4Ed57giT+K7SodSZBrz+32rNQZFmc5J+9GQciqsW7Y0 Mg4Q3T/VpjagHMaZYBCVScPzQM4iLKHkBM8IKScdmh2sB0fIAbK3jyUyTFqCvOZwc7b7SDiMXf79H /6LRkLz2HLYbTLg/uxQsWQxF6sQfET/efcYyQtiDE277lLkP1N4XHhytrF+RUNilkKu5l9p5SmIFA QqJSSgujBPaRElQhpnAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrzme-008BZN-V4; Sat, 12 Jun 2021 09:18:29 +0000 Received: from mail-ua1-f48.google.com ([209.85.222.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrzmb-008BZ4-GQ for linux-arm-kernel@lists.infradead.org; Sat, 12 Jun 2021 09:18:27 +0000 Received: by mail-ua1-f48.google.com with SMTP id d13so3514254uav.5 for ; Sat, 12 Jun 2021 02:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yNVmqtlfIFUqowfDuqxU7WaEgRPHbdl7aBs/A7dTrEM=; b=CFhVA4McsM0/Fiv29jccQmgkvgTZ+AycbSVDJRX7LDKwSX2N/Numz37O0kSIoo/AeX EDzu6H5pXCV7Ipt66WP2udWiM9StHgAxKNZStrQ8XcHr3yj8XKaVu/e5W36Y5TZiq/QF /FNMj4Fz523VUjJXLJn4oZ+JKks7ZrFuMjpWlpXMts5e7GnWkfcptl6cb6aFQ0qs2CZD 0cPiGwqq5UWyn4gVLOc0/g0hBrPi0n/BqqtKsXOHnvN9sHCl+kWZ7DM7JeM2CmCjqRYF niBkhc3qhmoIlwNgUFGSDvjZdWUdCVeoCj1MZDadPJLQ3aVdzhmR2VydDM9RzMhcH4vy WILQ== X-Gm-Message-State: AOAM531aN9MglmXCvhxRTQey8/UVJlDItmbT05Q4OYoK5ZR++fTrCMPm Mp4qnMKlshmr2J4BQ4iNR2+FRfLOVChH1ooodlg= X-Google-Smtp-Source: ABdhPJwAI+RI3SrTRAwJf2AZP+U4pTFRMUo0MFueLRV4ahK9wQLru2LdW5DTHGGxkQKU4qbDdnY+9mRef6FwEAFwJ3E= X-Received: by 2002:ab0:484b:: with SMTP id c11mr6821642uad.100.1623489500812; Sat, 12 Jun 2021 02:18:20 -0700 (PDT) MIME-Version: 1.0 References: <20210525083340.27722-1-nikita.shubin@maquefel.me> <20210525083340.27722-2-nikita.shubin@maquefel.me> <8cdf2b130ae02ba00324d0a70cbbcd3ba53e1d09.camel@gmail.com> In-Reply-To: <8cdf2b130ae02ba00324d0a70cbbcd3ba53e1d09.camel@gmail.com> From: Geert Uytterhoeven Date: Sat, 12 Jun 2021 11:18:09 +0200 Message-ID: Subject: Re: [PATCH 1/1] ep93xx: clock: convert in-place to COMMON_CLK To: Alexander Sverdlin Cc: Nikita Shubin , Russell King , Hartley Sweeten , Arnd Bergmann , Linus Walleij , Ard Biesheuvel , Mike Rapoport , Gregory Fong , Geert Uytterhoeven , YiFei Zhu , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Linux ARM , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210612_021825_568841_1F526096 X-CRM114-Status: GOOD ( 24.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Alexander, On Sat, Jun 12, 2021 at 12:42 AM Alexander Sverdlin wrote: > On Tue, 2021-05-25 at 11:33 +0300, Nikita Shubin wrote: > > Converted in-place without moving file to drivers/clk. > > > > tested on ts7250 (EP9302). > > > > Only setting rate and change parent tested for, as they > > are missing on ts7250: > > - video > > - I2S > > - ADC/KEYPAD > > - PWM > > > > Only video and I2S clock are interesting, as they are > > GATE + double DIV + MUX, all other are pretty much > > common but require ep93xx_syscon_swlocked_write to set > > registers. > > This doesnt look good in my test: > > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc > Enabling unprepared ep93xx-adc > [] (ep93xx_adc_probe) from [] (platform_probe+0x34/0x80) > WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc > Enabling unprepared ep93xx-spi.0 > [] (ep93xx_spi_prepare_hardware) from [] (__spi_pump_messages+0x124/0x620) > WARNING: CPU: 0 PID: 36 at drivers/clk/clk.c:952 clk_core_disable+0xbc/0xd8 > ep93xx-spi.0 already disabled > [] (ep93xx_spi_unprepare_hardware) from [] (__spi_pump_messages+0x388/0x620) These are issues in individual drivers, not in the CCF implementation. All drivers using the clock API should be converted from clk_{en,dis}able() to clk_{prepare_enable,disable_unprepare}() first. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel