In K3 multi-DDR systems, the MSMC is responsible for the interleave
mechanism across all the DDR controllers. Add support for MSMC to obtain
the number of controllers it's responsible for using the DT.
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
enum ecc_enable enable;
enum emif_config config;
enum emif_active active;
+ u32 num_ddr_controllers;
};
struct k3_ddrss_desc {
return -EINVAL;
}
+ ret = device_get_child_count(dev);
+ if (ret <= 0) {
+ dev_err(dev, "no child ddr nodes present");
+ return -EINVAL;
+ }
+ msmc->num_ddr_controllers = ret;
+
return 0;
}