Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3826827pxv; Mon, 26 Jul 2021 13:13:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtnkXwwFNLEW1gqpmrFqZswfOHT4PJ0255bqX5hdzFTdGLa5alg0NP5peOl8c8McJxr2Ct X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr12090694edy.112.1627330413937; Mon, 26 Jul 2021 13:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627330413; cv=none; d=google.com; s=arc-20160816; b=g3hNjlw3c24zVa6/M5Y+aa65xAEXShmAXGqES+UQBj+uL9ARc9ApTKw/hOMSqB1ruo HCvxPJEadXHSNaOpJiOdiMQ8jCQ2PGvRfybMiugeC5Su1ZZOHnenL6yDtAP9Og79gmGD 2m4+jj5I2+6TbiXmpHiBAIr6IS3P4+1IIWnKhzcQ2UTeeNf1zoxH2UC93geehmnh04P/ pDaPm1qHJAF1RLFJzu8NpSSjJ7wShlATYH5dlptTomduRTXOCfrnm2WDz+l3cveicigT AbfYut+DFsP3l2WYYrBBuUCBWCoBrqsSNBdcRrDXjoccctu68wgV0d0kAO4NwicgPMTp EJ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EcVZ6uLqTzi0vdrkZnez1ZLjp+fPM1xVTEzZ6l8/XNI=; b=uAY0a/7+bjYbgQRNDbLuTUXqxCwrPOzXVGMFjKpN4Vx6kNvcyy9Lh8jqLrZeypXbhX BLV/qx3xyBu9kaQCwPSczKSfT/AnHSDMkZtOl66zr4IGb9w6Eq2elegHfRHFMz6r4Wr7 l3bHZGscCWxxkTeCxt5vw+jvFwAYC0gVFILulwc7Z4oJVJpK9GfU2f0XpAbSW4j1PBxE AilpiJVDDL7JPnexrPpXorxulRZvFk485ZUa14a+TtTQYaE21CW6c6Jg+t0VaFGTrwBt bxAFhwSbg1WvGTYAvcA9ojDXi8KTF3xDyFSMWb4/1YWtZQpQkOkHpBgZK9NZzRMAB/DW OJmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AxxmeeSi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id md11si843072ejb.466.2021.07.26.13.13.11; Mon, 26 Jul 2021 13:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AxxmeeSi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232959AbhGZTbR (ORCPT + 99 others); Mon, 26 Jul 2021 15:31:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232649AbhGZTbN (ORCPT ); Mon, 26 Jul 2021 15:31:13 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA0D5C061760 for ; Mon, 26 Jul 2021 13:11:41 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id l18so13397215ioh.11 for ; Mon, 26 Jul 2021 13:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EcVZ6uLqTzi0vdrkZnez1ZLjp+fPM1xVTEzZ6l8/XNI=; b=AxxmeeSipjWwNHuPrxNL0tCah1QB5ybdW2X9RExe2+Z8tejjZ3MrFEClHVWyen21Uw uRU7A98eEfnESa/BS91Ict2LBJ0mJC4F8pX/KIID1KZLY2yX4zIacOSl2T0bLACuCBqv vVob5+VFUGmlLuRohhKoqEYo+eA6Rez68jsNyqlMYoLcSAS87NPsdu3O5tzsP3pX6gB7 TZPoyFPvoYiQFXjRBS56rhq/39bKvjuqL4+WaIUFzqRlD0wx+Q8okc86e2vuS6Agz6cw KwDOX6DZLvioR/iwoBRMjBYmQLjuPfkS1cxC63d31OI5oUSArbZCOL2t5J3jAx4BmYU+ 8taA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EcVZ6uLqTzi0vdrkZnez1ZLjp+fPM1xVTEzZ6l8/XNI=; b=QYatwFm8SAbN8Q7KYPBvVzBTVXRrWQsq7Z+k1OCGt2woheq5JNI6hrC+f2ocl8Iomg dnoG6xUsM2n5tte2eYqaa+zYagcUpPuaDLA/t41SgSOH2zrOvgiQRlG5TFtyp1nl9N6P obX0yLZld0rqLjfle9UFhJ9keejE+rWsUyEywCH/jd+GfS3BfUtsJq+/d3nZeIMVUCzz IgoTj/BJJ8IOWMOB+0fy7hDvsoqEUcTQLYnhg7HhIamoBODVwFeAVNtE+M0eAg5SQJyE QacCA3xEfFfDS7/s+8ByEqRNcBOuuYb6KVfQ3KeVPUHDNDr7aj60uf0uZD2kliDpdsL1 bAkQ== X-Gm-Message-State: AOAM5313XIejSzY+C+B04CkUa/2fZ5/FTc7a6ROo2MQYpgxpja5s9ZTw UNE7Nm52rleIV3KuuLdp3NMhhA== X-Received: by 2002:a05:6638:130d:: with SMTP id r13mr18115683jad.103.1627330301265; Mon, 26 Jul 2021 13:11:41 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id z10sm425964iln.8.2021.07.26.13.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 13:11:40 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/5] net: ipa: configure memory regions early Date: Mon, 26 Jul 2021 15:11:33 -0500 Message-Id: <20210726201136.502800-3-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210726201136.502800-1-elder@linaro.org> References: <20210726201136.502800-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IPA-resident memory is one of the most primitive resources that needs initialization, so call init_mem_config() early in ipa_config(). This is in preparation for initializing the IPA-resident microcontroller earlier. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index 91e2ec3a0c133..8768e52854d08 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -471,31 +471,31 @@ static int ipa_config(struct ipa *ipa, const struct ipa_data *data) ipa_hardware_config(ipa, data); - ret = ipa_endpoint_config(ipa); - if (ret) - goto err_hardware_deconfig; - ret = ipa_mem_config(ipa); if (ret) - goto err_endpoint_deconfig; + goto err_hardware_deconfig; + + ret = ipa_endpoint_config(ipa); + if (ret) + goto err_mem_deconfig; ipa_table_config(ipa); /* No deconfig required */ /* Assign resource limitation to each group; no deconfig required */ ret = ipa_resource_config(ipa, data->resource_data); if (ret) - goto err_mem_deconfig; + goto err_endpoint_deconfig; ret = ipa_modem_config(ipa); if (ret) - goto err_mem_deconfig; + goto err_endpoint_deconfig; return 0; -err_mem_deconfig: - ipa_mem_deconfig(ipa); err_endpoint_deconfig: ipa_endpoint_deconfig(ipa); +err_mem_deconfig: + ipa_mem_deconfig(ipa); err_hardware_deconfig: ipa_hardware_deconfig(ipa); ipa_clock_put(ipa); @@ -510,8 +510,8 @@ static int ipa_config(struct ipa *ipa, const struct ipa_data *data) static void ipa_deconfig(struct ipa *ipa) { ipa_modem_deconfig(ipa); - ipa_mem_deconfig(ipa); ipa_endpoint_deconfig(ipa); + ipa_mem_deconfig(ipa); ipa_hardware_deconfig(ipa); ipa_clock_put(ipa); } -- 2.27.0