Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tb: Allow to differentiate clocks after POR at init state from chip level #173

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sw/include/car_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ void car_disable_domain(enum car_rst rst)
car_set_isolate(rst, CAR_ISOLATE_ENABLE);
}

// Init clock after PoR. Define if required (for PLL configuration, clk mux selection signals, clk
// dividers division values, etc)
void car_clk_init(void) __attribute__((weak));

// De-isolate and ungate domains at startup. In non-secure boot mode, only the host domain is
// de-isolated and ungated after POR. In secure boot mode, both the host domain and the security
// domain are de-isolated and ungated after POR. Note that L2 and peripheral domain are always-on
Expand All @@ -225,6 +229,7 @@ void car_enable_all_domains()

void car_init_start()
{
car_clk_init();
car_enable_all_domains();
}

Expand Down
2 changes: 1 addition & 1 deletion sw/sw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CAR_SW_LIB_SRCS_S = $(wildcard $(CAR_SW_DIR)/lib/*.S $(CAR_SW_DIR)/lib/**/*.S)
CAR_SW_LIB_SRCS_C = $(wildcard $(CAR_SW_DIR)/lib/*.c $(CAR_SW_DIR)/lib/**/*.c)
CAR_SW_LIB_SRCS_O = $(CAR_SW_DEPS_SRCS:.c=.o) $(CAR_SW_LIB_SRCS_S:.S=.o) $(CAR_SW_LIB_SRCS_C:.c=.o)

CAR_SW_LIBS = $(CAR_SW_DIR)/lib/libcarfield.a
CAR_SW_LIBS += $(CAR_SW_DIR)/lib/libcarfield.a

$(CAR_SW_DIR)/lib/libcarfield.a: $(CAR_SW_LIB_SRCS_O)
$(CHS_SW_AR) $(CHS_SW_ARFLAGS) -rcsv $@ $^
Expand Down
Loading