gma tgl: Factor TC ownership/connection handling out
The ownership and connection handling differs for Alder Lake. It uses
kind of the same procedures with different registers and layouts. Move
things into a sub-package `TC.Ownership', to allow alternative imple-
mentations.
We have to share some register definitions with the sub-package, hence
move related things into the private part of `TC'.
Change-Id: Iaa6b39bdb250c1af88ba83bf78a82cbdd298245e
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/505
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/tigerlake/hw-gfx-gma-connectors.adb b/common/tigerlake/hw-gfx-gma-connectors.adb
index 4c1171f..cac0cab 100644
--- a/common/tigerlake/hw-gfx-gma-connectors.adb
+++ b/common/tigerlake/hw-gfx-gma-connectors.adb
@@ -18,6 +18,7 @@
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Config_Helpers;
with HW.GFX.GMA.Connectors.TC;
+with HW.GFX.GMA.Connectors.TC.Ownership;
with HW.GFX.GMA.Connectors.Combo_Phy;
with HW.GFX.GMA.DP_Aux_Request;
with HW.GFX.GMA.DP_Info;
@@ -292,7 +293,7 @@
is
begin
if Port_Cfg.Port in USBC_Port then
- TC.Connect
+ TC.Ownership.Connect
(Port => Port_Cfg.Port,
DP_Alt => Port in Physical_USBC_Ports,
Lanes => Port_Cfg.DP.Lane_Count,