diff options
author | Alex Elder <elder@linaro.org> | 2020-11-25 14:45:18 -0600 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-28 12:13:54 -0800 |
commit | 5b6cd69e89c4ace7497609c52ca4d9aab5ae8a46 (patch) | |
tree | 975eb8a917fb24d9de23a1c94f6a3ad86f55c311 /drivers/net/ipa/ipa_main.c | |
parent | 9f848198607f23626deddceb9da9307464031258 (diff) | |
download | linux-5b6cd69e89c4ace7497609c52ca4d9aab5ae8a46.tar.bz2 |
net: ipa: update IPA registers for IPA v4.5
Update "ipa_reg.h" so that register definitions support IPA hardware
version 4.5, in addition to versions 3.5.1 through v4.2. Most of
the register definitions are the same, but in some cases fields are
added, changed, or eliminated.
Updates for a few IPA v4.5 registers are more complex, and adding
those definition will be deferred to separate patches. This patch
only updates the register offset and field definitions, and adds
informational comments.
The only code change avoids accessing the backward compatibility
register for IPA version 4.5 in ipa_hardware_config(). Other IPA
v4.5-specific code changes will come later.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/ipa_main.c')
-rw-r--r-- | drivers/net/ipa/ipa_main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index e9bd0d72f2db..7cd7f6cc05b3 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -310,14 +310,17 @@ static void ipa_hardware_dcd_deconfig(struct ipa *ipa) */ static void ipa_hardware_config(struct ipa *ipa) { + enum ipa_version version = ipa->version; u32 granularity; u32 val; - /* Fill in backward-compatibility register, based on version */ - val = ipa_reg_bcr_val(ipa->version); - iowrite32(val, ipa->reg_virt + IPA_REG_BCR_OFFSET); + /* IPA v4.5 has no backward compatibility register */ + if (version < IPA_VERSION_4_5) { + val = ipa_reg_bcr_val(version); + iowrite32(val, ipa->reg_virt + IPA_REG_BCR_OFFSET); + } - if (ipa->version != IPA_VERSION_3_5_1) { + if (version != IPA_VERSION_3_5_1) { /* Enable open global clocks (hardware workaround) */ val = GLOBAL_FMASK; val |= GLOBAL_2X_CLK_FMASK; @@ -340,8 +343,8 @@ static void ipa_hardware_config(struct ipa *ipa) iowrite32(val, ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET); /* IPA v4.2 does not support hashed tables, so disable them */ - if (ipa->version == IPA_VERSION_4_2) { - u32 offset = ipa_reg_filt_rout_hash_en_offset(ipa->version); + if (version == IPA_VERSION_4_2) { + u32 offset = ipa_reg_filt_rout_hash_en_offset(version); iowrite32(0, ipa->reg_virt + offset); } |