Re: [PATCH v1 12/29] interconnect: Add memory interconnection providers for NVIDIA Tegra SoCs

From: Thierry Reding
Date: Tue Nov 19 2019 - 01:31:47 EST


On Mon, Nov 18, 2019 at 11:02:30PM +0300, Dmitry Osipenko wrote:
[...]
> diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h
> index 1238e35653d1..593954324259 100644
> --- a/include/soc/tegra/mc.h
> +++ b/include/soc/tegra/mc.h
> @@ -141,6 +141,11 @@ struct tegra_mc_reset_ops {
> const struct tegra_mc_reset *rst);
> };
>
> +struct tegra_mc_icc_node {
> + const char *name;
> + unsigned int id;
> +};
> +
> struct tegra_mc_soc {
> const struct tegra_mc_client *clients;
> unsigned int num_clients;
> @@ -160,6 +165,9 @@ struct tegra_mc_soc {
> const struct tegra_mc_reset_ops *reset_ops;
> const struct tegra_mc_reset *resets;
> unsigned int num_resets;
> +
> + const struct tegra_mc_icc_node *icc_nodes;
> + unsigned int num_icc_nodes;
> };
>
> struct tegra_mc {
> @@ -184,4 +192,22 @@ struct tegra_mc {
> int tegra_mc_write_emem_configuration(struct tegra_mc *mc, unsigned long rate);
> unsigned int tegra_mc_get_emem_device_count(struct tegra_mc *mc);
>
> +#ifdef CONFIG_INTERCONNECT_TEGRA
> +int tegra_icc_mc_setup_interconnect(struct tegra_mc *mc);
> +int tegra_icc_emc_setup_interconnect(struct device *emc_dev,
> + unsigned int dram_data_bus_width_bytes);
> +#else
> +static inline int tegra_icc_mc_setup_interconnect(struct tegra_mc *mc);
> +{
> + return 0;
> +}
> +
> +static inline int
> +tegra_icc_emc_setup_interconnect(struct device *emc_dev,
> + unsigned int dram_data_bus_width_bytes)
> +{
> + return 0;
> +}
> +#endif

Is there really any reason why we should make this support optional? It
seems to me like we would always want this enabled once it's tested and
known to work.

Thierry

Attachment: signature.asc
Description: PGP signature