From da3f9aa7acc46499e0c6593ce5959f9d5a4c115a Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 5 Nov 2024 14:55:44 +0100 Subject: [PATCH] [hw,top] Add targets for top-specific DT libraries Signed-off-by: Amaury Pouly --- hw/top/BUILD | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hw/top/BUILD b/hw/top/BUILD index 8642ad12e02d06..17a1d84c20de28 100644 --- a/hw/top/BUILD +++ b/hw/top/BUILD @@ -7,6 +7,8 @@ load( "opentitan_ip_c_header", "opentitan_ip_dt_header", "opentitan_ip_rust_header", + "opentitan_top_devicetables", + "opentitan_top_dt_api", ) package(default_visibility = ["//visibility:public"]) @@ -16,6 +18,11 @@ alias( actual = "//hw/top_earlgrey", ) +alias( + name = "top_lib", + actual = "//hw/top_earlgrey/sw/autogen:top_earlgrey", +) + # List of IPs for which to generate headers. IPS = [ "alert_handler", @@ -73,11 +80,18 @@ IPS = [ for ip in IPS ] +opentitan_top_dt_api( + name = "dt_api", + top = ":top", + deps = [":top_lib"], +) + [ opentitan_ip_dt_header( name = "dt_{}".format(ip), ip = ip, top = ":top", + deps = [":dt_api"], ) for ip in IPS ] @@ -87,3 +101,9 @@ cc_library( srcs = [], deps = ["dt_{}".format(ip) for ip in IPS], ) + +opentitan_top_devicetables( + name = "devicetables", + top = ":top", + deps = [":dt_headers"], +)