From patchwork Tue Feb 5 09:50:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1036574 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="xN9GtUQA"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43v0FX3x1qz9sMM for ; Tue, 5 Feb 2019 20:50:56 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 188EDC21F06; Tue, 5 Feb 2019 09:50:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DF5E7C21EC5; Tue, 5 Feb 2019 09:50:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 89886C21F37; Tue, 5 Feb 2019 09:50:18 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by lists.denx.de (Postfix) with ESMTPS id 2406CC21F16 for ; Tue, 5 Feb 2019 09:50:15 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id x10so2839448wrs.8 for ; Tue, 05 Feb 2019 01:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=v32Q4xlV4esj1j938H2orUWW39pYvGU23VZJWFU1xms=; b=xN9GtUQANKf/TVPg8Xsso/UHns5bXH168qY/4cq75gR78cgwT+nHbfR3g3E+jHnNzx CMNCoRjb3cpWTWoJgjZDrlnetazVAdWBZZGPyw7ump9LkI1o6cNrlksrfco2hV14873L JKNlGevcQsy5TQ7dVleqrjlqWnVkcYggEzmIXVScx50ZeJj5c05BBLVJgGeaY9iJdtOT zjrfeD1V14QFOZL0f1vk4keNHAUAJCHIdRgUm4/l5QVL2NGKAxtbhF289ec5Cy+ptiPb 1mbEP0rGPMFNiJrWOJ030e5oVFc31KVUG57SqiAzDaNQnSvO5l9v/OXFFjTGXd5ftmbV IMaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=v32Q4xlV4esj1j938H2orUWW39pYvGU23VZJWFU1xms=; b=K9M5zkM8ydDl5JrdSKwXXiq5rNA2H3Ys5KV+tkFlYNrnrZE12FjlHnd3V/kRGgN9aG QEBx+eO3jX4TuJH+sPcxX60QsY+g7Z5CWgbnB/Tqm6EglGDOr1x+VpO3W6hOrNXXQybu itmITwKsBcmVH5+75+Lp5iElCYD28U5dLQfNrobm5MLcng5lt1LETFt13K+cS+5rVQv1 XSDY63Qcxg9HHea6ERTwuP7Qo72QCggRuDYH1H2pkP+O8IuDgJMYLwYeTuDfxAteLqxX cwm6RfPtNcYIpfDiHZSUFxMZCeC7VwpTQZ4DMZy+3N14fyXny4khsHpe1VpCgbKrOExF cZZA== X-Gm-Message-State: AHQUAuYejctVPNN52KO5Sqdv7XYkcBHthLH+YRwN2VaKqWYhzdg2teMk OKWYO8U8bXCw3nqKS9ffPvFw2lbSUEdi6w== X-Google-Smtp-Source: AHgI3IZ8wIX0CD5teonp2qvtv+AuPCMGnYAcMGtPxDQSXI3P8FEBrEsSP2DveODlUMIq8u+Ap6DgxA== X-Received: by 2002:adf:f3ce:: with SMTP id g14mr1356606wrp.73.1549360214359; Tue, 05 Feb 2019 01:50:14 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id c65sm17158962wma.24.2019.02.05.01.50.13 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Feb 2019 01:50:13 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Tue, 5 Feb 2019 10:50:04 +0100 Message-Id: <19dd12c2200fb9ca3876c70b58038a8bbfbcf65a.1549360198.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Subject: [U-Boot] [PATCH 4/6] arm64: versal: Remove one level of indentation in board_early_init_r() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Simplify code indentation. Signed-off-by: Michal Simek --- board/xilinx/versal/board.c | 57 +++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index fd6c8d8cb737..b49a4f473a72 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -23,42 +23,43 @@ int board_init(void) int board_early_init_r(void) { - if (current_el() == 3) { - u32 val; + u32 val; - writel(IOU_SWITCH_CTRL_CLKACT_BIT | - (0x20 << IOU_SWITCH_CTRL_DIVISOR0_SHIFT), - &crlapb_base->iou_switch_ctrl); + if (current_el() != 3) + return 0; - /* Global timer init - Program time stamp reference clk */ - val = readl(&crlapb_base->timestamp_ref_ctrl); - val |= CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT; - writel(val, &crlapb_base->timestamp_ref_ctrl); + writel(IOU_SWITCH_CTRL_CLKACT_BIT | + (0x20 << IOU_SWITCH_CTRL_DIVISOR0_SHIFT), + &crlapb_base->iou_switch_ctrl); - debug("ref ctrl 0x%x\n", - readl(&crlapb_base->timestamp_ref_ctrl)); + /* Global timer init - Program time stamp reference clk */ + 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 */ - writel(0, &crlapb_base->rst_timestamp); + debug("ref ctrl 0x%x\n", + readl(&crlapb_base->timestamp_ref_ctrl)); - /* - * Program freq register in System counter and - * enable system counter. - */ - writel(COUNTER_FREQUENCY, - &iou_scntr_secure->base_frequency_id_register); + /* Clear reset of timestamp reg */ + writel(0, &crlapb_base->rst_timestamp); - 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, - &iou_scntr_secure->counter_control_register); + debug("counter val 0x%x\n", + readl(&iou_scntr_secure->base_frequency_id_register)); - 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()); - } + writel(IOU_SCNTRS_CONTROL_EN, + &iou_scntr_secure->counter_control_register); + + 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; }