]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: support a third pulse register
authorAlex Elder <elder@linaro.org>
Mon, 30 Jan 2023 21:01:57 +0000 (15:01 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 1 Feb 2023 05:45:52 +0000 (21:45 -0800)
commit2cdbcbfd482989eca2c0d3731f361bed70adb157
treea6fee729b680e0e755e5d4ac4d9224e6860ca0c3
parent32079a4ab10668a28535747399a5d8a527e775dd
net: ipa: support a third pulse register

The AP has third pulse generator available starting with IPA v5.0.
Redefine ipa_qtime_val() to support that possibility.  Pass the IPA
pointer as an argument so the version can be determined.  And stop
using the sign of the returned tick count to indicate which of two
pulse generators to use.

Instead, have the caller provide the address of a variable that will
hold the selected pulse generator for the Qtime value.  And for
version 5.0, check whether the third pulse generator best represents
the time period.

Add code in ipa_qtime_config() to configure the fourth pulse
generator for IPA v5.0+; in that case configure both the third and
fourth pulse generators to use 10 msec granularity.

Consistently use "ticks" for local variables that represent a tick
count.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_endpoint.c
drivers/net/ipa/ipa_main.c