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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 130CFC4332F for ; Sat, 10 Dec 2022 09:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbiLJJbX (ORCPT ); Sat, 10 Dec 2022 04:31:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiLJJbT (ORCPT ); Sat, 10 Dec 2022 04:31:19 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A00C77640 for ; Sat, 10 Dec 2022 01:31:18 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id q7so7346690ljp.9 for ; Sat, 10 Dec 2022 01:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=M+HZ2UMBdem2ooBDTFN6oxFPfKBOmQHSueRlKfK2c/4=; b=mNLaJ39vpYQFEKXM/SGxUbeLc2o4WU9TeoCA9Lw9p428her6/0WdNMWT7A40m92yX0 Ffi33NGqd+a5W7g1QDlgE7OwQBlFwSSay4WUivpyiS3WAkcxEr976NlNoORBaoBsLlAF 4+D0d+2LlMMHcximGWbyoP1VtP0N5ZUQN8QCljVyvvhmboo27IEbH9emw2ZmKdRTQ3zP PwBLJeiGTFJ/5LvhhkUpN+ewknRK7D807n60ivLycbASq+THoJfoeaNjsQ617uDoylHv pNojOFGqIfm8IQMXKLo8tr+ffmMqodMMW0YYGU+j8A2UMeWe6AZH0jF59ZjxZzXGPSqY 5aLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M+HZ2UMBdem2ooBDTFN6oxFPfKBOmQHSueRlKfK2c/4=; b=a1JtEG1cJJi1OdLxOW+ZIVlYFO3mHJ9dgBqJBiaslcOhdx5fQrkYbmOPpo+0Iaf4Ic i4rCuOvOdUu8IJHNUA4gcEe1RIowuFCKT/bgNgzrHbVB4eZGY8D1cuU6h3xH/3zE9fBQ GsrS1wrK7LKvhchLrekZukslSVxW0sxOgDYtjVeegZ+8l8uElt8fUsH5mWDIiCjENzEy vDVzSABY5t6WSnQc7yyqOToz14nVTe876gyKkGIzf5EAVTg81a/tghAE/fCKx4/2d1MD QdLXWR5O/GPqfaLy05n6GaHRYhA7b6bTCDRhddgdoSROJ8UrErWxiP12fNve1QokwtsF sPkA== X-Gm-Message-State: ANoB5pkIykOXoAZwp0ywVlxGrUDEMrWEGSHnwztk165RdDn+PCwOjp1o mdR26+Bg+CeMNYKjJmk+ewchNJn+S/0yVmXu X-Google-Smtp-Source: AA0mqf4BoK/U9B+Rh9EtaxBLhf3STxEGHiaY0hpQOQ8M8qltYekFMwQ1P3PvGG6uaIqRsP/AuFYexA== X-Received: by 2002:a05:651c:12c4:b0:26f:db34:b387 with SMTP id 4-20020a05651c12c400b0026fdb34b387mr2051621lje.3.1670664676955; Sat, 10 Dec 2022 01:31:16 -0800 (PST) Received: from [192.168.1.101] (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id z19-20020a05651c11d300b00279c10ae746sm515008ljo.140.2022.12.10.01.31.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 10 Dec 2022 01:31:16 -0800 (PST) Message-ID: <48bef9dd-b71c-b6aa-e853-1cf821e88b50@linaro.org> Date: Sat, 10 Dec 2022 10:31:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH net-next 2/2] net: ipa: add IPA v4.7 support Content-Language: en-US To: Alex Elder , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: andersson@kernel.org, agross@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, elder@kernel.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss References: <20221208211529.757669-1-elder@linaro.org> <20221208211529.757669-3-elder@linaro.org> <47b2fb29-1c2e-db6e-b14f-6dfe90341825@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9.12.2022 21:22, Alex Elder wrote: > On 12/8/22 3:22 PM, Konrad Dybcio wrote: >> >> >> On 8.12.2022 22:15, Alex Elder wrote: >>> Add the necessary register and data definitions needed for IPA v4.7, >>> which is found on the SM6350 SoC. >>> >>> Co-developed-by: Luca Weiss >>> Signed-off-by: Luca Weiss >>> Signed-off-by: Alex Elder >>> --- >> [...] >>> + >>> +/* Memory configuration data for an SoC having IPA v4.7 */ >>> +static const struct ipa_mem_data ipa_mem_data = { >>> +    .local_count    = ARRAY_SIZE(ipa_mem_local_data), >>> +    .local        = ipa_mem_local_data, >>> +    .imem_addr    = 0x146a9000, >>> +    .imem_size    = 0x00002000, >> Should probably be >> >> 0x146a8000 >> 0x00003000 >> >> with an appropriate change in dt to reserve that region. >> >> Qualcomm does: >> ipa@... { qcom,additional-mapping = <0x146a8000 0x146a8000 0x2000>; }; >> >> which covers 0x146a8000-0x146a9fff >> >> plus >> >> imem@.. { reg = <0x146aa000 0x1000>; }; >> >> which in total gives us 0x146a8000-0x146aafff > > Can you tell me where you found this information? [1], [2] > >> That would also mean all of your writes are kind of skewed, unless >> you already applied some offsets to them. > > This region is used by the modem, but must be set up > by the AP. > >> (IMEM on 6350 starts at 0x14680000 and is 0x2e000 long, as per >> the bootloader memory map) > > On SM7250 (sorry, I don't know about 7225, or 6350 for that matter), > the IMEM starts at 0x14680000 and has length 0x2c000.  However that > memory is used by multiple entities.  The portion set aside for IPA > starts at 0x146a9000 and has size 0x2000. > Not sure how 7250 relates to 6350, but I don't think there's much overlap.. Konrad [1] https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.9.12.r1/arch/arm64/boot/dts/qcom/lagoon.dtsi#L3698-L3707 [2] https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.9.12.r1/arch/arm64/boot/dts/qcom/lagoon.dtsi#L1004-L1045 >                     -Alex > >> Konrad >