[Skiboot] [PATCH 6/6] platforms/astbmc/witherspoon: Implement OpenCAPI support

Reza Arbab arbab at linux.ibm.com
Tue Aug 21 03:05:46 AEST 2018


On Fri, Aug 17, 2018 at 06:44:41PM +1000, Andrew Donnellan wrote:
>@@ -63,6 +98,26 @@ static bool witherspoon_probe(void)
>
> 	vpd_dt_fixup();
>
>+	witherspoon_create_ocapi_i2c_bus();
>+
>+	dt_for_each_compatible(dt_root, np, "ibm,npu-link") {
>+		gpu_group_id = dt_prop_get_u32(np, "ibm,npu-group-id");
>+		if (gpu_group_id > highest_gpu_group_id)
>+			highest_gpu_group_id = gpu_group_id;
>+	};
>+
>+	switch (highest_gpu_group_id) {
>+	case 1:
>+		witherspoon_type = WITHERSPOON_TYPE_REDBUD;
>+		break;
>+	case 2:
>+		witherspoon_type = WITHERSPOON_TYPE_SEQUOIA;
>+		break;
>+	default:
>+		witherspoon_type = WITHERSPOON_TYPE_UNKNOWN;
>+		prlog(PR_NOTICE, "PLAT: Unknown Witherspoon variant detected\n");
>+	}
>+
> 	return true;
> }
>

Nice! Figuring this out was also the motivation for creating 
npu2_links_per_gpu(); 3 links for Redbud, 2 for Sequoia.

Alexey will also need to know which we are [1]. Do you think it's worth 
finding a way to represent this that we can all leverage? Just a 
thought. Regardless,

Acked-by: Reza Arbab <arbab at linux.ibm.com>

[1] http://patchwork.ozlabs.org/patch/957813/

-- 
Reza Arbab



More information about the Skiboot mailing list