]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: limit local processing context address
authorAlex Elder <elder@linaro.org>
Wed, 24 Mar 2021 13:15:26 +0000 (08:15 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Mar 2021 23:52:47 +0000 (16:52 -0700)
commit18cf53c35945d9d57254ccb596d6b509691731ea
treebb667c353bfa02c0e871b7986974e4e767326661
parent8caa5870cd6877ce571a8007cdea1a8630a7c9b4
net: ipa: limit local processing context address

Not all of the bits of the LOCAL_PKT_PROC_CNTXT register are valid.
Until IPA v4.5, there are 17 valid bits (though the bottom three
must be zero).  Starting with IPA v4.5, 18 bits are valid.

Introduce proc_cntxt_base_addr_encoded() to encode the base address
for use in the register using only the valid bits.

Shorten the name of the register (omit "_BASE") to avoid the need to
wrap the line in the one place it's used.

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