Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2561708imu; Thu, 29 Nov 2018 06:56:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/V60gMK0smLn/tZf28D1GMNI94Uu0wqpDTVP4JtuGgoMBgMHLv3RSq2Do/lrDPPGHh4CyT3 X-Received: by 2002:a63:d70e:: with SMTP id d14mr1502027pgg.159.1543503412967; Thu, 29 Nov 2018 06:56:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543503412; cv=none; d=google.com; s=arc-20160816; b=NW6f9MxqcQqyagCUUgNWKlQ3A/TIOLQVQRAnxbvZc+nwMkUuSsQsPNAlCdjkly1UP2 t31P60Uwc0lq2EF11ncW494FD3omZzQ6DX5QtWQoW5CqmkYn9yXP2fVw5IrxYlfCAzPw pAJq1S0G2k2/XkbqC+vxAvfYW4kfgUX99bABGpayHyvyRvRi537R5eeuIpcAXc/nQ1Wx PSM/l4iPWhoMDZzJg+hdfUy8VV/IWVA/h7M0dwYf24SPnjmQI6srd58T0W4ZwRPPr2Rs Wylg3hnHs2Ab5d7X6/1stSpKROSZELTrZqmrLbVn7nAowIud59ABn7+0Zb2rCX0ZaXQG rAsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dmarc-filter:dkim-signature :dkim-signature; bh=4G+EuXv+iAanIlUirxMsDk4QKbjviC+LDY7rlssSh6I=; b=n8G0GicnpJAFonlhEwbqVMIkdg+Md4j0OxfVt46B+C/pWQZyHJJKttX7ubMAZF9fWD B2AaK6x0thdd3wx09QdQNDEahIVf6bITOM4TrJGmeGGluX7uFPOaFKpQYlvI5N+A08kD D02t7LToz5JUZNcJfTbd/LOkmt3UPkAYxtigeDlLoJc/aOhrQSPbeDyT+YHiJ5qV7e6l o6L51QUUH8D8y/QmP/RReISpYn4yYx/aRi9XDH2RKPZYaUFdhiN64aCqxXBWWMsj4BHp XEmr4BSSULQaj7mRUKnFuSMNzESDZuATrDJabNt+jcVncK9hn5dlWO/w7Gq0Py9XL5el 5XlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=QTsRUWIA; dkim=pass header.i=@codeaurora.org header.s=default header.b=YjXHY3Rn; 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 23si2376197pfz.20.2018.11.29.06.56.38; Thu, 29 Nov 2018 06:56:52 -0800 (PST) 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=QTsRUWIA; dkim=pass header.i=@codeaurora.org header.s=default header.b=YjXHY3Rn; 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 S1731386AbeK3CBP (ORCPT + 99 others); Thu, 29 Nov 2018 21:01:15 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:38174 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729905AbeK3CBO (ORCPT ); Thu, 29 Nov 2018 21:01:14 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2715B60B7F; Thu, 29 Nov 2018 14:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543503336; bh=iUVWaFYMsbu4rPMh/T2kg2TRo1s9xfns0KVJYkocPtc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QTsRUWIANyMYYAVdNWdQYiX7/r9DxKCjNkVBz4+AFBnx9WEZht3O1c1Qw+L5zVYYF 1manra32KmqDpeCC8EVk9m83aap+tlNLK942X3zIo0KdpPGOwjHUmZe3S1lkrvizjK bLj9/ylYEYqEPhESMcvUg6Fttkp18YRW320o7hZA= 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.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 967C360159; Thu, 29 Nov 2018 14:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543503335; bh=iUVWaFYMsbu4rPMh/T2kg2TRo1s9xfns0KVJYkocPtc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YjXHY3Rnl8X/jNjlZwzWt9j0VmhA6wbcWij49/dm5eY0D+tbf+b/dXJLavReL3Hiw AfMABjUvG3n4bPVTH16g6Tt9xNjFbv7SLT/Rzvv6/B7b6FfEZb6YXihHR9RbmuYevM kPWJ2FxCVfwm3G6ReGIAmeFRlV8q6IjWPd/nyaTA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 967C360159 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=vivek.gautam@codeaurora.org Received: by mail-qt1-f180.google.com with SMTP id i7so2204123qtj.10; Thu, 29 Nov 2018 06:55:35 -0800 (PST) X-Gm-Message-State: AA+aEWYh66dNrQUdfweEacGS17I0RUtDpon8+FLOieFc+DaF2LI+SAv3 af0jfzfUgX6tuxEZmU6je/p/t9GTlSS+AYBVvJI= X-Received: by 2002:a0c:f9c3:: with SMTP id j3mr1709969qvo.107.1543503334904; Thu, 29 Nov 2018 06:55:34 -0800 (PST) MIME-Version: 1.0 References: <20181127101145.7682-1-vivek.gautam@codeaurora.org> <20181127101145.7682-2-vivek.gautam@codeaurora.org> <154342225921.88331.14467967828250776155@swboyd.mtv.corp.google.com> <0d76b669-6c4f-7c3b-50a1-084201f2c07a@arm.com> In-Reply-To: <0d76b669-6c4f-7c3b-50a1-084201f2c07a@arm.com> From: Vivek Gautam Date: Thu, 29 Nov 2018 20:25:20 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v18 1/5] iommu/arm-smmu: Add pm_runtime/sleep ops To: Robin Murphy Cc: sboyd@kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Joerg Roedel , "robh+dt" , Will Deacon , Mark Rutland , Linux PM , "Rafael J. Wysocki" , open list , alex.williamson@redhat.com, linux-arm-msm , freedreno Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 28, 2018 at 10:07 PM Robin Murphy wrote: > > On 28/11/2018 16:24, Stephen Boyd wrote: > > Quoting Vivek Gautam (2018-11-27 02:11:41) > >> @@ -1966,6 +1970,23 @@ static const struct of_device_id arm_smmu_of_match[] = { > >> }; > >> MODULE_DEVICE_TABLE(of, arm_smmu_of_match); > >> > >> +static void arm_smmu_fill_clk_data(struct arm_smmu_device *smmu, > >> + const char * const *clks) > >> +{ > >> + int i; > >> + > >> + if (smmu->num_clks < 1) > >> + return; > >> + > >> + smmu->clks = devm_kcalloc(smmu->dev, smmu->num_clks, > >> + sizeof(*smmu->clks), GFP_KERNEL); > >> + if (!smmu->clks) > >> + return; > >> + > >> + for (i = 0; i < smmu->num_clks; i++) > >> + smmu->clks[i].id = clks[i]; > > > > Is this clk_bulk_get_all()? From what I remember, and now I could go back to v7 and check [1], we parked clk_bulk_get out of OF's sole purview as we also have arm_smmu_device_acpi_probe() besides arm_smmu_device_dt_probe(). arm_smmu_device_dt_probe() could get the clocks from dt and fill in the clock bulk data, and similarly, arm_smmu_device_acpi_probe() could fill the clock bulk data by getting it from ACPI. clk_bulk_get_all() seems like going only the OF way. Is there another way here to have something common between ACPI and OF, and then do the clk_bulk_get? [1] https://lore.kernel.org/patchwork/patch/881365/ Thanks & regards Vivek > > Ooh, did that finally get merged while we weren't looking? Great! > > Much as I don't want to drag this series out to a v19, it *would* be > neat if we no longer need to open-code that bit... > > Robin. > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation