Skip to content

Commit

Permalink
net: ipa: populate clock and interconnect data
Browse files Browse the repository at this point in the history
Populate the core clock rate and interconnect average and peak
bandwidth data for SDM845 and SC7180 in their configuration data
files.  At this point we still don't *use* this data.

Note that SC7180 actually defines a new core clock rate (100 MHz
instead of 75 MHz) and new interconnect bandwidth values.  They
will be activated in the next commit, which uses the configured
values rather than the fixed constants.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Alex Elder authored and Jakub Kicinski committed Nov 21, 2020
1 parent dfccb8b commit f08c992
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions drivers/net/ipa/ipa_data-sc7180.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,32 @@ static struct ipa_mem_data ipa_mem_data = {
.smem_size = 0x00002000,
};

static struct ipa_clock_data ipa_clock_data = {
.core_clock_rate = 100 * 1000 * 1000, /* Hz */
/* Interconnect rates are in 1000 byte/second units */
.interconnect = {
[IPA_INTERCONNECT_MEMORY] = {
.peak_rate = 465000, /* 465 MBps */
.average_rate = 80000, /* 80 MBps */
},
/* Average rate is unused for the next two interconnects */
[IPA_INTERCONNECT_IMEM] = {
.peak_rate = 68570, /* 68.570 MBps */
.average_rate = 0, /* unused */
},
[IPA_INTERCONNECT_CONFIG] = {
.peak_rate = 30000, /* 30 MBps */
.average_rate = 0, /* unused */
},
},
};

/* Configuration data for the SC7180 SoC. */
const struct ipa_data ipa_data_sc7180 = {
.version = IPA_VERSION_4_2,
.endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data),
.endpoint_data = ipa_gsi_endpoint_data,
.resource_data = &ipa_resource_data,
.mem_data = &ipa_mem_data,
.clock_data = &ipa_clock_data,
};
21 changes: 21 additions & 0 deletions drivers/net/ipa/ipa_data-sdm845.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,32 @@ static struct ipa_mem_data ipa_mem_data = {
.smem_size = 0x00002000,
};

static struct ipa_clock_data ipa_clock_data = {
.core_clock_rate = 75 * 1000 * 1000, /* Hz */
/* Interconnect rates are in 1000 byte/second units */
.interconnect = {
[IPA_INTERCONNECT_MEMORY] = {
.peak_rate = 600000, /* 600 MBps */
.average_rate = 80000, /* 80 MBps */
},
/* Average rate is unused for the next two interconnects */
[IPA_INTERCONNECT_IMEM] = {
.peak_rate = 350000, /* 350 MBps */
.average_rate = 0, /* unused */
},
[IPA_INTERCONNECT_CONFIG] = {
.peak_rate = 40000, /* 40 MBps */
.average_rate = 0, /* unused */
},
},
};

/* Configuration data for the SDM845 SoC. */
const struct ipa_data ipa_data_sdm845 = {
.version = IPA_VERSION_3_5_1,
.endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data),
.endpoint_data = ipa_gsi_endpoint_data,
.resource_data = &ipa_resource_data,
.mem_data = &ipa_mem_data,
.clock_data = &ipa_clock_data,
};

0 comments on commit f08c992

Please sign in to comment.