arm64: versal: Remove one level of indentation in board_early_init_r()
Simplify code indentation. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
@@ -21,42 +21,43 @@ int board_init(void)
|
|||||||
|
|
||||||
int board_early_init_r(void)
|
int board_early_init_r(void)
|
||||||
{
|
{
|
||||||
if (current_el() == 3) {
|
u32 val;
|
||||||
u32 val;
|
|
||||||
|
|
||||||
writel(IOU_SWITCH_CTRL_CLKACT_BIT |
|
if (current_el() != 3)
|
||||||
(0x20 << IOU_SWITCH_CTRL_DIVISOR0_SHIFT),
|
return 0;
|
||||||
&crlapb_base->iou_switch_ctrl);
|
|
||||||
|
|
||||||
/* Global timer init - Program time stamp reference clk */
|
writel(IOU_SWITCH_CTRL_CLKACT_BIT |
|
||||||
val = readl(&crlapb_base->timestamp_ref_ctrl);
|
(0x20 << IOU_SWITCH_CTRL_DIVISOR0_SHIFT),
|
||||||
val |= CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT;
|
&crlapb_base->iou_switch_ctrl);
|
||||||
writel(val, &crlapb_base->timestamp_ref_ctrl);
|
|
||||||
|
|
||||||
debug("ref ctrl 0x%x\n",
|
/* Global timer init - Program time stamp reference clk */
|
||||||
readl(&crlapb_base->timestamp_ref_ctrl));
|
val = readl(&crlapb_base->timestamp_ref_ctrl);
|
||||||
|
val |= CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT;
|
||||||
|
writel(val, &crlapb_base->timestamp_ref_ctrl);
|
||||||
|
|
||||||
/* Clear reset of timestamp reg */
|
debug("ref ctrl 0x%x\n",
|
||||||
writel(0, &crlapb_base->rst_timestamp);
|
readl(&crlapb_base->timestamp_ref_ctrl));
|
||||||
|
|
||||||
/*
|
/* Clear reset of timestamp reg */
|
||||||
* Program freq register in System counter and
|
writel(0, &crlapb_base->rst_timestamp);
|
||||||
* enable system counter.
|
|
||||||
*/
|
|
||||||
writel(COUNTER_FREQUENCY,
|
|
||||||
&iou_scntr_secure->base_frequency_id_register);
|
|
||||||
|
|
||||||
debug("counter val 0x%x\n",
|
/*
|
||||||
readl(&iou_scntr_secure->base_frequency_id_register));
|
* Program freq register in System counter and
|
||||||
|
* enable system counter.
|
||||||
|
*/
|
||||||
|
writel(COUNTER_FREQUENCY,
|
||||||
|
&iou_scntr_secure->base_frequency_id_register);
|
||||||
|
|
||||||
writel(IOU_SCNTRS_CONTROL_EN,
|
debug("counter val 0x%x\n",
|
||||||
&iou_scntr_secure->counter_control_register);
|
readl(&iou_scntr_secure->base_frequency_id_register));
|
||||||
|
|
||||||
debug("scntrs control 0x%x\n",
|
writel(IOU_SCNTRS_CONTROL_EN,
|
||||||
readl(&iou_scntr_secure->counter_control_register));
|
&iou_scntr_secure->counter_control_register);
|
||||||
debug("timer 0x%llx\n", get_ticks());
|
|
||||||
debug("timer 0x%llx\n", get_ticks());
|
debug("scntrs control 0x%x\n",
|
||||||
}
|
readl(&iou_scntr_secure->counter_control_register));
|
||||||
|
debug("timer 0x%llx\n", get_ticks());
|
||||||
|
debug("timer 0x%llx\n", get_ticks());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user