From patchwork Wed Dec 26 15:33:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10743191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BA6A1800 for ; Wed, 26 Dec 2018 15:34:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B3BB28445 for ; Wed, 26 Dec 2018 15:34:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F324E28505; Wed, 26 Dec 2018 15:34:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7007B28498 for ; Wed, 26 Dec 2018 15:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726785AbeLZPeC (ORCPT ); Wed, 26 Dec 2018 10:34:02 -0500 Received: from mail.bootlin.com ([62.4.15.54]:48432 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbeLZPeC (ORCPT ); Wed, 26 Dec 2018 10:34:02 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 5297320A44; Wed, 26 Dec 2018 16:34:00 +0100 (CET) Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 2B23F2070E; Wed, 26 Dec 2018 16:33:50 +0100 (CET) From: Gregory CLEMENT To: "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Cc: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, Antoine Tenart , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Maxime Chevallier Subject: [PATCH v4 0/2] Add cpufreq support for Armada 8K Date: Wed, 26 Dec 2018 16:33:40 +0100 Message-Id: <20181226153342.17796-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Gregory CLEMENT (2): MAINTAINERS: add new entries for Armada 8K cpufreq driver cpufreq: ap806: add cpufreq driver for Armada 8K Hi, this is the forth version of a the series adding the cpufreq support for the Marvell Armada 8K SoCs. Gregory Changelog: v3 -> v4: - Remove most of the global variable and use the private data of the platfrom device to store the freq_tables struct. - Remove the clk pointer of the freq_table struct which is no more needed with the new way to register the opp - Check the get_cpu_device() return. - Balance the clk_get() calls. - No more use the devm_ function. - Base the registration of the opp on the cpu mask updated after each iteration to find the shared cpus. - Base the free on the NULL or 0 value of the freq_table struct members, it allows to remove the global index. v2 -> v3 - Make the driver really modular (modprobe;modprobe -r;modprobe; is working) - Don't use anymore 100MHz as minimal frequency, but only max frequency/4 - Fix remaining warning reported by checkpatch - Rework the registering of the opp v1 -> v2: - Fix typos in MAINTAINERS (reported by Baruch Siach) and in armada-8k-cpufreq.c (reported by Thomas Petazzoni) - Fix indentation in Kconfig.arm (reported by Thomas Petazzoni) - Use const for opps_div (reported by Thomas Petazzoni) - Fix memory leak of opps_array (reported by Thomas Petazzoni) MAINTAINERS | 1 + drivers/cpufreq/Kconfig.arm | 11 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/armada-8k-cpufreq.c | 203 ++++++++++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 drivers/cpufreq/armada-8k-cpufreq.c