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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 B2D5AC43381 for ; Thu, 28 Mar 2019 10:58:04 +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 820B8206C0 for ; Thu, 28 Mar 2019 10:58:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m2UbAAMg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 820B8206C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GW27IYx/YN/sjcrYkJOMpTkxbef0C/jspzqmJgGaYgU=; b=m2UbAAMgFlcU9UViL3oXOly2W w4y3MBk6KyirjUBR0tN1y9O+fjEuHSYWtzXrDXbtIzEr273euo53bsccAwktT9lTqBfsdwjSmjZo6 zGOx79R1D+qgcKBRJDlPHpNRM47d/tG8P2gLbBn9oKTVi/4XWxMoSVSeprplYmjVBBE3fHYIXzLbj uMXrF/cR1Bjx9DLK6RkwXfCnek06LTY34g+LtX2XCuu79L6ygxBfDrTxREN8ZB9uAGkfp/TuXMfir ZH30ImAE438XqDnakB14SCmK6xuxa6dAOC5qchA85qKF8sMRuxm9iooKpHitlsBtQN0942BByqqdk PM11pgxgQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9SjH-0000Ds-Ht; Thu, 28 Mar 2019 10:57:51 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9SjC-0000DO-Fg for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2019 10:57:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6885115AB; Thu, 28 Mar 2019 03:57:44 -0700 (PDT) Received: from [10.37.12.55] (unknown [10.37.12.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 846153F59C; Thu, 28 Mar 2019 03:57:42 -0700 (PDT) Subject: Re: [PATCH 18/25] coresight: Introduce generic platform data helper To: mathieu.poirier@linaro.org References: <1553107783-3340-1-git-send-email-suzuki.poulose@arm.com> <1553107783-3340-19-git-send-email-suzuki.poulose@arm.com> <20190327225721.GC778@xps15> From: Suzuki K Poulose Message-ID: <5268e8bd-2c6d-72bd-7628-e7d5ff90b2da@arm.com> Date: Thu, 28 Mar 2019 10:59:57 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190327225721.GC778@xps15> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_035746_555221_99EA3FD7 X-CRM114-Status: GOOD ( 17.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, robert.walker@arm.com, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/27/2019 10:57 PM, Mathieu Poirier wrote: > On Wed, Mar 20, 2019 at 06:49:35PM +0000, Suzuki K Poulose wrote: >> So far we have hard coded the DT platform parsing code in >> every driver. Introduce generic helper to parse the information >> provided by the firmware in a platform agnostic manner, in preparation >> for the ACPI support. >> >> Cc: Mathieu Poirier >> Signed-off-by: Suzuki K Poulose >> >> +static int coresight_alloc_conns(struct device *dev, >> + struct coresight_platform_data *pdata) >> +{ >> + if (pdata->nr_outport) { >> + pdata->conns = devm_kzalloc(dev, pdata->nr_outport * >> + sizeof(*pdata->conns), >> + GFP_KERNEL); >> + if (!pdata->conns) >> + return -ENOMEM; >> + } >> + >> + return 0; >> +} >> + >> - ret = of_coresight_alloc_memory(dev, pdata); >> + ret = coresight_alloc_conns(dev, pdata); > > I'm pretty sure you're doing this because you want to use > coresight_alloc_conns() for ACPI as well, and I'm fine with that. But it is > quite orthogonal to the rest of the work done in this patch and as such I think > it needs a patch of its own. > Sure, will split this into a separate patch. Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel