Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1409741imm; Sun, 23 Sep 2018 03:33:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV62PTQg7wXBs1SncG0ccy0pbTqwLnUE51Rz+Qxrr8EIt+w2Cuqb31hTGAQPjtx6gA4BRVsXX X-Received: by 2002:a63:cf52:: with SMTP id b18-v6mr5265800pgj.194.1537698837303; Sun, 23 Sep 2018 03:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537698837; cv=none; d=google.com; s=arc-20160816; b=JbssfxdwrSyhSTeYQVPqZ67AV+nR6xjmYp1l+4qH4HI+0rUp9Bfg6T7bmHbscMKoEF U4b8Er77h7l+VHw3NrnHd6bXt2m1R39nBr2xWOQKgXrj4xQrMyv9h5K5c6quwDYneFic 3uHMrPtt4vDZiCmQR+h7OuKWSeW3Gmysd3++qEOU4+DefGjfQOgYLMIzORPMxHBSB9+Y 7AJVLxEVf29WyMDdsiLUJLm5XyhmgyZQV/V4ee2gH93k1vWX49iKm4E9V9kdsxdyCtf7 NHeQm+PPVbvWB59VOa3uM8OTbWUchV33UPce4WCk4qHfCkDP6yhP5dHAVsoiXxyiLBH0 94Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=JejpTrwJPV847bZ/6F1ncUJl45UpbVpZHQxfOdlCaL8=; b=YeZ4is78s6A2Cqs8VCoxhwT8577y+nem34p1BA4cvvN6bB6uz6mfs7ppTSl5QxTspJ HGiuHTXvf2IJr35PCDFKwUJFRCu3/9JjQu9wmfJe3qeObMcqJuJ2wycCS28OjElf0OiE HfreycnRZsAuGyvMfa+pDuaZgfEZNSsIp7zHAXuwd7jAzENy44nK+Aaz4ayy96Z/ov7K oFbevNpvBbSjDRSmgDS/+wXLxmAsUDeMKVlGx151LMPqItG2VXCiNjfrZqxoOFUYO4PI Tnun62Hdl0BNGIB8w0l3mo67JOAy9T607SzTbRAYPnFU8uShYZGHYU3bj2B/6NLS4xLU yuJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SwIqnFF3; dkim=pass header.i=@codeaurora.org header.s=default header.b=fJe8siOQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si897590plt.223.2018.09.23.03.33.41; Sun, 23 Sep 2018 03:33:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SwIqnFF3; dkim=pass header.i=@codeaurora.org header.s=default header.b=fJe8siOQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbeIWQaa (ORCPT + 99 others); Sun, 23 Sep 2018 12:30:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50896 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbeIWQaa (ORCPT ); Sun, 23 Sep 2018 12:30:30 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2637360C85; Sun, 23 Sep 2018 10:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1537698809; bh=FWDu9qjzmp18lWe1JJlaaGv4Eqkv2G6stke06ODgkig=; h=From:To:Cc:Subject:Date:From; b=SwIqnFF3hbQ5xvgGAjzndXhY53UywKGWHp8mv+w2oLdl7Q5zuWOzgNdKw4AHw977Y VKWwovNk00F4Vge6mHzI+RE7VYrCh88LDT+72QnE7h37FZ0oYr9g3DQtT2PR2RiOok dq4GWtFx8DgRj8D0/5+fxf0FtumxG3mYoYhq582I= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from tdas-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tdas@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C05096086B; Sun, 23 Sep 2018 10:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1537698807; bh=FWDu9qjzmp18lWe1JJlaaGv4Eqkv2G6stke06ODgkig=; h=From:To:Cc:Subject:Date:From; b=fJe8siOQ+FYdt/xJVdw7Z2vwgSrq+B2jzQfGk174CNZD/yUz5X7RcsGkLzqPLOtAx 26Eq+pkjVv4fPtW1z7Mr2gRdiY4soG64cclmxjRfdkKUBuqRREOHpsxUPqMJqgE7qv +NCcsF6tN2bJCRQTO4bshRXk4Bwl+NWHj9WoMYIc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C05096086B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tdas@codeaurora.org From: Taniya Das To: "Rafael J. Wysocki" , Viresh Kumar , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Stephen Boyd Cc: Rajendra Nayak , devicetree@vger.kernel.org, robh@kernel.org, skannan@codeaurora.org, linux-arm-msm@vger.kernel.org, amit.kucheria@linaro.org, evgreen@google.com, Taniya Das Subject: [PATCH v8 0/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver Date: Sun, 23 Sep 2018 16:03:11 +0530 Message-Id: <1537698793-15285-1-git-send-email-tdas@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [v8] * Address comments to update code to take cpufreq_hw phandle and index from the CPU nodes. * Updated the Documentation for the above change in DT. * Updated logic for assigning 'qcom_freq_domain_map' for related CPUs. * Clock input to the HW block is taken from DT which has been updated in code and Device tree documentation. [v7] * Updated the logic to check for related CPUs. [v6] * Renamed match table 'qcom_cpufreq_hw_match'. * Renamed 'qcom_read_lut' to 'qcom_cpufreq_hw_read_lut'. * Updated the logic to check for related CPUs at the beginning of the 'qcom_cpu_resources_init'. * Use devm_ioremap_resource instead of devm_ioremap. * Update the use of of_node_put to handle error conditions. * Use policy->cached_resolved_idx in fast switch callback. * Keep precalculated offsets 'reg_bases'. * XO clock is taken from Device tree. * Update documentation binding for clocks/clock-names. * Minor comments in Kconfig.arm. * Comments to move dev_info to dev_dbg. [v5] * Remove mapping different register regions of perf/lut/enable, instead map the entire HW region. * Add reg_offset/cpufreq_qcom_std_offsets to be supplied as device data. * Check of src == 0 during lut read. * Add of_node_put(cpu_np) in qcom_get_related_cpus * Update the qcom_cpu_resources_init for register offset data, and cleanup the related cpus to keep a single copy of CPUfreq. * Replace FW with HW, update Kconfig, rename filename qcom-cpufreq-hw.c * Update the documentation binding to reflect the changes of mapping the * entire HW region. [v4] * Fixed console messages as per comments. * Return error from qcom_resources_init() in the cases where failed to get frequency domain. * Rename cpu_dev to cpu_np in qcom_resources_init, qcom_get_related_cpus(). Also use temp variable freq_np in qcom_get_related_cpus(). * Update qcom_cpufreq_fw_get() to use the policy data to incoporate the hotplug use case. * Update code to use of fast_switching. * Check for !c->max_cores instead of cpumask_empty in qcom_get_related_cpus(). * Update the logic of assigning 'c' to qcom_freq_domain_map[cpu]. [v3] * Remove index check from 'qcom_cpufreq_fw_target_index'. * Update the Documentation binding to add the platform specific properties in the CPU nodes, node name "qcom,freq-domain". * Update return value to '0' from -ENODEV from 'qcom_cpufreq_fw_get'. * Update the logic for boost frequency to use local variables instead of cpufreq driver data in 'qcom_read_lut'. * Update the logic in 'qcom_get_related_cpus' to find the related cpus. * Update the reg-names to remove "_base" and also update the binding with the description of these registers. * Update the logic in 'qcom_resources_init' to address the new device tree notation of handling the frequency domain phandles. [v2] * Fixed the alignment issues in "qcom_cpufreq_fw_target_index" for dev_err and also for "qcom_cpu_resources_init". * Removed ret = 0 from qcom_get_related_cpus and added to check for cpu_mask_empty to return -ENOENT. * Fixes qcom_cpu_resources_init function * Remove initialization of 'index' * Check for valid 'c' * Removed initialization of 'prev_cc' from 'qcom_read_lut'. Taniya Das (2): dt-bindings: cpufreq: Introduce QCOM CPUFREQ Firmware bindings cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver .../bindings/cpufreq/cpufreq-qcom-hw.txt | 169 ++++++++++ drivers/cpufreq/Kconfig.arm | 11 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/qcom-cpufreq-hw.c | 354 +++++++++++++++++++++ 4 files changed, 535 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.txt create mode 100644 drivers/cpufreq/qcom-cpufreq-hw.c -- Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.