2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-16 18:10:18 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-16 18:10:18 -05:00
|
|
|
|
2021-08-19 17:19:27 -05:00
|
|
|
|
2023-01-27 20:27:58 +00:00
|
|
|
|
2024-04-16 18:10:18 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-16 18:10:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
2024-02-23 07:39:28 -06:00
|
|
|
|
2024-02-23 07:39:29 -06:00
|
|
|
|
2024-02-23 07:39:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-23 07:39:30 -06:00
|
|
|
|
2024-02-23 07:39:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The
changes required to support more than 32 endpoints in IPA v5.0 made
it best to define a unified mechanism for defining registers and
their fields.
GSI register definitions, meanwhile, have remained fairly stable.
And even as the total number of IPA endpoints goes beyond 32, the
number of GSI channels on a given EE that underly endpoints still
remains 32 or less.
Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
number of channels (and events) it supports to be about 256, and as
a result, many GSI register definitions must change significantly.
To address this, we'll use the same "ipa_reg" mechanism to define
the GSI registers.
As a first step in generalizing the "ipa_reg" to also support GSI
registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
structure types (and some supporting macros) into a new header file,
and remove the "ipa_" and "IPA_" from symbol names.
Separate the IPA register ID validity checking from the generic
check that a register ID is in range. Aside from that, this is
intended to have no functional effect on the code.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-08 14:56:51 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2022-09-26 17:09:21 -05:00
|
|
|
|
2023-02-08 14:56:52 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2023-01-04 11:52:33 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
2023-01-04 11:52:33 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-23 07:39:29 -06:00
|
|
|
|
2023-01-04 11:52:33 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
2021-07-27 14:46:29 -05:00
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2021-07-27 14:46:29 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
2024-03-01 11:02:42 -06:00
|
|
|
|
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The
changes required to support more than 32 endpoints in IPA v5.0 made
it best to define a unified mechanism for defining registers and
their fields.
GSI register definitions, meanwhile, have remained fairly stable.
And even as the total number of IPA endpoints goes beyond 32, the
number of GSI channels on a given EE that underly endpoints still
remains 32 or less.
Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
number of channels (and events) it supports to be about 256, and as
a result, many GSI register definitions must change significantly.
To address this, we'll use the same "ipa_reg" mechanism to define
the GSI registers.
As a first step in generalizing the "ipa_reg" to also support GSI
registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
structure types (and some supporting macros) into a new header file,
and remove the "ipa_" and "IPA_" from symbol names.
Separate the IPA register ID validity checking from the generic
check that a register ID is in range. Aside from that, this is
intended to have no functional effect on the code.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-08 14:56:51 -06:00
|
|
|
|
2021-07-27 14:46:27 -05:00
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
net: ipa: have ipa_clock_get() return a value
We currently assume no errors occur when enabling or disabling the
IPA core clock and interconnects. And although this commit exposes
errors that could occur, we generally assume this won't happen in
practice.
This commit changes ipa_clock_get() and ipa_clock_put() so each
returns a value. The values returned are meant to mimic what the
runtime power management functions return, so we can set up error
handling here before we make the switch. Have ipa_clock_get()
increment the reference count even if it returns an error, to match
the behavior of pm_runtime_get().
More details follow.
When taking a reference in ipa_clock_get(), return 0 for the first
reference, 1 for subsequent references, or a negative error code if
an error occurs. Note that if ipa_clock_get() returns an error, we
must not touch hardware; in some cases such errors now cause entire
blocks of code to be skipped.
When dropping a reference in ipa_clock_put(), we return 0 or an
error code. The error would come from ipa_clock_disable(), which
now returns what ipa_interconnect_disable() returns (either 0 or a
negative error code). For now, callers ignore the return value;
if an error occurs, a message will have already been logged, and
little more can actually be done to improve the situation.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 14:26:58 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2021-08-19 17:19:27 -05:00
|
|
|
|
net: ipa: have ipa_clock_get() return a value
We currently assume no errors occur when enabling or disabling the
IPA core clock and interconnects. And although this commit exposes
errors that could occur, we generally assume this won't happen in
practice.
This commit changes ipa_clock_get() and ipa_clock_put() so each
returns a value. The values returned are meant to mimic what the
runtime power management functions return, so we can set up error
handling here before we make the switch. Have ipa_clock_get()
increment the reference count even if it returns an error, to match
the behavior of pm_runtime_get().
More details follow.
When taking a reference in ipa_clock_get(), return 0 for the first
reference, 1 for subsequent references, or a negative error code if
an error occurs. Note that if ipa_clock_get() returns an error, we
must not touch hardware; in some cases such errors now cause entire
blocks of code to be skipped.
When dropping a reference in ipa_clock_put(), we return 0 or an
error code. The error would come from ipa_clock_disable(), which
now returns what ipa_interconnect_disable() returns (either 0 or a
negative error code). For now, callers ignore the return value;
if an error occurs, a message will have already been logged, and
little more can actually be done to improve the situation.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-10 14:26:58 -05:00
|
|
|
|
2021-08-19 17:19:27 -05:00
|
|
|
|
2021-07-27 14:46:29 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-26 17:09:21 -05:00
|
|
|
|
2023-02-08 14:56:52 -06:00
|
|
|
|
2021-07-27 14:46:27 -05:00
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-27 14:46:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-26 17:09:21 -05:00
|
|
|
|
2023-02-08 14:56:52 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2021-08-19 17:19:27 -05:00
|
|
|
|
2021-08-20 11:01:27 -05:00
|
|
|
|
2021-07-27 14:46:26 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-04 11:52:29 -06:00
|
|
|
|
|
|
|
|
|
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The
changes required to support more than 32 endpoints in IPA v5.0 made
it best to define a unified mechanism for defining registers and
their fields.
GSI register definitions, meanwhile, have remained fairly stable.
And even as the total number of IPA endpoints goes beyond 32, the
number of GSI channels on a given EE that underly endpoints still
remains 32 or less.
Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
number of channels (and events) it supports to be about 256, and as
a result, many GSI register definitions must change significantly.
To address this, we'll use the same "ipa_reg" mechanism to define
the GSI registers.
As a first step in generalizing the "ipa_reg" to also support GSI
registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
structure types (and some supporting macros) into a new header file,
and remove the "ipa_" and "IPA_" from symbol names.
Separate the IPA register ID validity checking from the generic
check that a register ID is in range. Aside from that, this is
intended to have no functional effect on the code.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-08 14:56:51 -06:00
|
|
|
|
2023-01-04 11:52:29 -06:00
|
|
|
|
2023-02-08 14:56:52 -06:00
|
|
|
|
2023-01-04 11:52:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-04 11:52:30 -06:00
|
|
|
|
2023-01-04 11:52:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-04 11:52:30 -06:00
|
|
|
|
2023-01-04 11:52:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-15 17:59:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-30 16:33:04 -06:00
|
|
|
|
2022-11-02 17:11:34 -05:00
|
|
|
|
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The
changes required to support more than 32 endpoints in IPA v5.0 made
it best to define a unified mechanism for defining registers and
their fields.
GSI register definitions, meanwhile, have remained fairly stable.
And even as the total number of IPA endpoints goes beyond 32, the
number of GSI channels on a given EE that underly endpoints still
remains 32 or less.
Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
number of channels (and events) it supports to be about 256, and as
a result, many GSI register definitions must change significantly.
To address this, we'll use the same "ipa_reg" mechanism to define
the GSI registers.
As a first step in generalizing the "ipa_reg" to also support GSI
registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
structure types (and some supporting macros) into a new header file,
and remove the "ipa_" and "IPA_" from symbol names.
Separate the IPA register ID validity checking from the generic
check that a register ID is in range. Aside from that, this is
intended to have no functional effect on the code.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-08 14:56:51 -06:00
|
|
|
|
2024-04-19 10:17:54 -05:00
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
2022-11-02 17:11:36 -05:00
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-26 17:09:21 -05:00
|
|
|
|
2023-02-08 14:56:52 -06:00
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
2022-11-02 17:11:36 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
2022-11-02 17:11:36 -05:00
|
|
|
|
2021-03-25 09:44:34 -05:00
|
|
|
|
2024-04-19 10:17:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 15:11:34 -05:00
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2024-03-01 11:02:37 -06:00
|
|
|
|
|
|
|
|
|
2024-03-01 11:02:42 -06:00
|
|
|
|
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The
changes required to support more than 32 endpoints in IPA v5.0 made
it best to define a unified mechanism for defining registers and
their fields.
GSI register definitions, meanwhile, have remained fairly stable.
And even as the total number of IPA endpoints goes beyond 32, the
number of GSI channels on a given EE that underly endpoints still
remains 32 or less.
Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
number of channels (and events) it supports to be about 256, and as
a result, many GSI register definitions must change significantly.
To address this, we'll use the same "ipa_reg" mechanism to define
the GSI registers.
As a first step in generalizing the "ipa_reg" to also support GSI
registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
structure types (and some supporting macros) into a new header file,
and remove the "ipa_" and "IPA_" from symbol names.
Separate the IPA register ID validity checking from the generic
check that a register ID is in range. Aside from that, this is
intended to have no functional effect on the code.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-08 14:56:51 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-26 17:09:21 -05:00
|
|
|
|
2023-02-08 14:56:52 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2021-07-27 14:46:26 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:55 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-27 20:27:58 +00:00
|
|
|
|
2020-09-17 12:39:25 -05:00
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:55 -05:00
|
|
|
|
2020-09-17 12:39:25 -05:00
|
|
|
|
|
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2024-04-19 10:17:55 -05:00
|
|
|
|
|
|
|
|
|
2020-09-17 12:39:25 -05:00
|
|
|
|
|
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|
2021-07-26 15:11:34 -05:00
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
2024-03-01 11:02:42 -06:00
|
|
|
|
2024-03-01 11:02:36 -06:00
|
|
|
|
|
|
|
|
|
2020-09-17 12:39:25 -05:00
|
|
|
|
2023-01-27 20:27:58 +00:00
|
|
|
|
2024-04-19 10:17:55 -05:00
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
2024-04-19 10:17:53 -05:00
|
|
|
|
2024-03-01 11:02:37 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-15 11:14:56 +08:00
|
|
|
|
2024-03-01 11:02:37 -06:00
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2024-03-01 11:02:37 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:28:19 -06:00
|
|
|
|
|
|
|
|
|