]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ipa: define some new memory regions
authorAlex Elder <elder@linaro.org>
Fri, 19 Mar 2021 15:24:21 +0000 (10:24 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2021 20:35:54 +0000 (13:35 -0700)
There are several memory regions that are defined starting with IPA
v4.0, but which were not used for the SC7180 SoC (IPA v4.2).  Even
though they're not used (yet), define them so they are ready to be
used for SoCs when they become supported.

There are two QUOTA statistics memory regions, one for the modem and
one for the AP.  Define distinct names for these regions, and get
rid of the definition of IPA_MEM_STATS_QUOTA.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_data-sc7180.c
drivers/net/ipa/ipa_mem.h
drivers/net/ipa/ipa_qmi.c

index 0bdb60f6755c45e823d7d51050724e9cca8ae171..f65abc19ae9d70bd3c1a13287ff89d8a998681e8 100644 (file)
@@ -268,7 +268,7 @@ static const struct ipa_mem ipa_mem_local_data[] = {
                .size           = 0x0050,
                .canary_count   = 2,
        },
-       [IPA_MEM_STATS_QUOTA] = {
+       [IPA_MEM_STATS_QUOTA_MODEM] = {
                .offset         = 0x0a50,
                .size           = 0x0060,
                .canary_count   = 2,
index f99180f84f0ddd2083dbf350fe3b34f515df2610..f82e8939622bba22bda17914400adbba1ccdb2f0 100644 (file)
@@ -28,6 +28,7 @@ struct ipa_mem_data;
  * The set of memory regions is defined in configuration data.  They are
  * subject to these constraints:
  * - a zero offset and zero size represents and undefined region
+ * - a region's size does not include space for its "canary" values
  * - a region's offset is defined to be *past* all "canary" values
  * - offset must be large enough to account for all canaries
  * - a region's size may be zero, but may still have canaries
@@ -56,9 +57,16 @@ enum ipa_mem_id {
        IPA_MEM_AP_HEADER,              /* 0 canaries */
        IPA_MEM_MODEM_PROC_CTX,         /* 2 canaries */
        IPA_MEM_AP_PROC_CTX,            /* 0 canaries */
+       IPA_MEM_NAT_TABLE,              /* 4 canaries (IPA v4.5 and above) */
        IPA_MEM_PDN_CONFIG,             /* 2 canaries (IPA v4.0 and above) */
-       IPA_MEM_STATS_QUOTA,            /* 2 canaries (IPA v4.0 and above) */
+       IPA_MEM_STATS_QUOTA_MODEM,      /* 2 canaries (IPA v4.0 and above) */
+       IPA_MEM_STATS_QUOTA_AP,         /* 0 canaries (IPA v4.0 and above) */
        IPA_MEM_STATS_TETHERING,        /* 0 canaries (IPA v4.0 and above) */
+       IPA_MEM_STATS_V4_FILTER,        /* 0 canaries (IPA v4.0-v4.2) */
+       IPA_MEM_STATS_V6_FILTER,        /* 0 canaries (IPA v4.0-v4.2) */
+       IPA_MEM_STATS_V4_ROUTE,         /* 0 canaries (IPA v4.0-v4.2) */
+       IPA_MEM_STATS_V6_ROUTE,         /* 0 canaries (IPA v4.0-v4.2) */
+       IPA_MEM_STATS_FILTER_ROUTE,     /* 0 canaries (IPA v4.5 and above) */
        IPA_MEM_STATS_DROP,             /* 0 canaries (IPA v4.0 and above) */
        IPA_MEM_MODEM,                  /* 0 canaries */
        IPA_MEM_UC_EVENT_RING,          /* 1 canary */
index 2fc64483f27538ba7b24dc50188739e00f555f37..af8666b89b3759490a7d04039d9fdd22992cdb45 100644 (file)
@@ -378,7 +378,7 @@ init_modem_driver_req(struct ipa_qmi *ipa_qmi)
        /* None of the stats fields are valid (IPA v4.0 and above) */
 
        if (ipa->version != IPA_VERSION_3_5_1) {
-               mem = &ipa->mem[IPA_MEM_STATS_QUOTA];
+               mem = &ipa->mem[IPA_MEM_STATS_QUOTA_MODEM];
                if (mem->size) {
                        req.hw_stats_quota_base_addr_valid = 1;
                        req.hw_stats_quota_base_addr =