@@ -1329,19 +1329,23 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster)
1329
1329
1330
1330
/*
1331
1331
* Number of cores is decided by number of child nodes of
1332
- * r5f subsystem node in dts. If Split mode is used in dts
1333
- * 2 child nodes are expected.
1332
+ * r5f subsystem node in dts.
1333
+ * In split mode maximum two child nodes are expected.
1334
+ * However, only single core can be enabled too.
1335
+ * Driver can handle following configuration in split mode:
1336
+ * 1) core0 enabled, core1 disabled
1337
+ * 2) core0 disabled, core1 enabled
1338
+ * 3) core0 and core1 both are enabled.
1339
+ * For now, no more than two cores are expected per cluster
1340
+ * in split mode.
1334
1341
* In lockstep mode if two child nodes are available,
1335
1342
* only use first child node and consider it as core0
1336
1343
* and ignore core1 dt node.
1337
1344
*/
1338
1345
core_count = of_get_available_child_count (dev_node );
1339
- if (core_count == 0 ) {
1346
+ if (core_count == 0 || core_count > 2 ) {
1340
1347
dev_err (dev , "Invalid number of r5 cores %d" , core_count );
1341
1348
return - EINVAL ;
1342
- } else if (cluster_mode == SPLIT_MODE && core_count != 2 ) {
1343
- dev_err (dev , "Invalid number of r5 cores for split mode\n" );
1344
- return - EINVAL ;
1345
1349
} else if (cluster_mode == LOCKSTEP_MODE && core_count == 2 ) {
1346
1350
dev_warn (dev , "Only r5 core0 will be used\n" );
1347
1351
core_count = 1 ;
0 commit comments