Commit b7da873f authored by Federico Vaga's avatar Federico Vaga

sw:fw:fd: check if WR is present

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent c3ea4ce6
......@@ -43,6 +43,11 @@ enum wrtd_in_wr_link {
static int wr_state;
int wr_present(void)
{
return !!(dp_readl(FD_REG_TCR) & FD_TCR_WR_PRESENT);
}
int wr_link_up()
{
return dp_readl ( FD_REG_TCR ) & FD_TCR_WR_LINK;
......@@ -898,6 +903,11 @@ static int wrtd_o_init(void)
};
int i, j;
if (!wr_present()) {
pr_error("WhiteRabbit not found\n\r");
return -EINVAL;
}
promiscuous_mode = 0;
tlist_count = 0;
wr_state = WR_LINK_OFFLINE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment