From patchwork Thu Jul 12 06:44:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 942818 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="MVaUQvq/"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41R5y62dSHz9s2L for ; Thu, 12 Jul 2018 16:44:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C08BAC21F4E; Thu, 12 Jul 2018 06:44:10 +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_MSPIKE_H2, 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 1E9DAC21E77; Thu, 12 Jul 2018 06:44:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 50A10C21E77; Thu, 12 Jul 2018 06:44:06 +0000 (UTC) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by lists.denx.de (Postfix) with ESMTPS id D07E0C21E0B for ; Thu, 12 Jul 2018 06:44:02 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id h10-v6so20437044wre.6 for ; Wed, 11 Jul 2018 23:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=HzfZfZI+CsoFR/7vKDiO1nu1JSyPGYDZ50ozqPQ0Cc8=; b=MVaUQvq/WwjCZtd5cJyNaAxnDNzVl/ufbOC905gVjt20juXF5m+dJAqDS0W9u5CSAZ RNhfwUK9atnzCklV+5LdZegb16v9IlpfzHq8EdI+xWRp/MbI5qhjI8iVL3t4nHPrK9rX PPJYGUmPW5qAHZBttoW8rwCCFz7lH3Y9YyhkEr+qSjmCHuKvmn6Mp33B91noVM7eELfw glYQme4UuMDYkpfZsJbH1o2p9i4gn31Y38V0VJUscAKUY7fkmX3aftHkup0rL3ZWTrLo /yuY/HrC83tFMkhdO+kyjrQiSOUxp1wBOulk9ggyVevyuDNNXkk7QV8X41uDQhU7mrPz 7Quw== 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:cc:subject:date:message-id; bh=HzfZfZI+CsoFR/7vKDiO1nu1JSyPGYDZ50ozqPQ0Cc8=; b=ZpOjqIER/IdJyB4PCTHje4yiP1Fai+4yYcfx3xyTaIpAe0koxAOeoAHIScC+QCz+jN MXrL1LIEPpQun3Bf3gW5WNXK0ILHsjlKLywYT0TxUBzduzGRm2re5khNJeYBgmn0Q5a1 H4YLujQFgHNpnUSL11hZ7R+dkQg8Kf5iDGsoUWcbsafmglYdLt6ck/4SmC0ZsaL0uOa4 MICkl8r03jYH3gRhRVarM0+srIJOh1foWr8q/wyMUsqDlX54OpS5OkoGwpueRNywb0rU KieD94yphmL9Pa8KQKMcQ7w7Akpq4vNjfV75Hvgk7mfci6iAWu3aUkfzE6ZMxqF93k4V KSuA== X-Gm-Message-State: AOUpUlED3oYBJrfT4GwSurL2yuxI+j/AVKYOi8KTvxxUD8Vp8Y2+CT4C rdiZqG5oZllS4dVhGC/O/7pSsmLq X-Google-Smtp-Source: AAOMgpcPgXEFV6Hf8unwqq3Y5vuXZOZmGnTt00Ga5nzhMZk2Z5kajSMhize1Tm5y3d/iVcCOHOgHvA== X-Received: by 2002:adf:b2a7:: with SMTP id g36-v6mr654518wrd.218.1531377842331; Wed, 11 Jul 2018 23:44:02 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id 127-v6sm4587745wmd.18.2018.07.11.23.44.01 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 11 Jul 2018 23:44:01 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, Simon Glass Date: Thu, 12 Jul 2018 08:44:00 +0200 Message-Id: <7d0a14d713a81ffe893285a30d195fc0b5c39d7d.1531377838.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH v2] microblaze: Do not call timer init that early 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" Timer needs to be converted to DM but as of now it can't be called so early because intc controller is not ready. Call it later in board_r.c. Before this patch timer_init is called twice which is wrong. The patch is blocking initialization before relocation. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v2: - Do not add new ifdef to board_f and use GD_FLG_RELOC instead - reported-by sjg - Change commit message arch/microblaze/cpu/timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index ef229023bf08..58e5c3075085 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -51,6 +51,10 @@ int timer_init (void) debug("TIMER: Initialization\n"); + /* Do not init before relocation */ + if (!(gd->flags & GD_FLG_RELOC)) + return 0; + node = fdt_node_offset_by_compatible(blob, node, "xlnx,xps-timer-1.00.a"); if (node != -1) {