Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751766AbdINJi1 (ORCPT ); Thu, 14 Sep 2017 05:38:27 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:34753 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbdINJiY (ORCPT ); Thu, 14 Sep 2017 05:38:24 -0400 X-IronPort-AV: E=Sophos;i="5.42,392,1500966000"; d="scan'208";a="4701090" Subject: Re: [PATCH v1 03/10] clk: at91: pmc: Support backup for programmable clocks To: romain izard , Alexandre Belloni CC: Boris Brezillon , Michael Turquette , Stephen Boyd , Ludovic Desroches , Jonathan Cameron , Wenyou Yang , Josh Wu , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , Thierry Reding , Richard Genoud , Greg Kroah-Hartman , Alan Stern , , LKML , , linux-mtd , , , , linux-arm-kernel References: <20170908153604.28383-1-romain.izard.pro@gmail.com> <20170908153604.28383-4-romain.izard.pro@gmail.com> <20170913170310.grfv7j5xvh7chjdo@piout.net> From: Nicolas Ferre Organization: microchip Message-ID: Date: Thu, 14 Sep 2017 11:38:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1401 Lines: 43 On 14/09/2017 at 09:41, romain izard wrote: > 2017-09-13 19:03 GMT+02:00 Alexandre Belloni > : >> On 13/09/2017 at 14:29:35 +0200, Nicolas Ferre wrote: >>> On 08/09/2017 at 17:35, Romain Izard wrote: >>>> From: Romain Izard >>>> >>>> Save and restore the System Clock and Programmable Clock register for >>>> the backup use case. >>> >>> "System Clock" seems to be handled in another patch. >>> >>>> Signed-off-by: Romain Izard >>>> --- >>>> drivers/clk/at91/pmc.c | 5 +++++ >>>> 1 file changed, 5 insertions(+) >>>> >>>> diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c >>>> index 07dc2861ad3f..5421b03553ec 100644 >>>> --- a/drivers/clk/at91/pmc.c >>>> +++ b/drivers/clk/at91/pmc.c >>>> @@ -66,6 +66,7 @@ static struct >>>> u32 pcr[PMC_MAX_IDS]; >>>> u32 audio_pll0; >>>> u32 audio_pll1; >>>> + u32 pckr[3]; >>> >>> Some products have different numbers of PCK (only 2 on at91sam9x5 for >>> instance)... >>> >> >> My opinion is that it will be time to change that when multiple SoCs will >> need to save their registers. >> > For the next version, I'll add a #define. But as this code requires a > device tree node with the compatible string "atmel,sama5d2-pmc", I believe > that we can ignore other chips for now. Fair enough, let's go for this. Bye, -- Nicolas Ferre