From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDD71C433EF for ; Fri, 11 Mar 2022 17:12:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5849683AD4; Fri, 11 Mar 2022 18:12:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="j3QpIrQO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 56917837EF; Fri, 11 Mar 2022 18:12:03 +0100 (CET) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D0E4883AD4 for ; Fri, 11 Mar 2022 18:11:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=krjdev@gmail.com Received: by mail-wm1-x32a.google.com with SMTP id q7-20020a7bce87000000b00382255f4ca9so7902719wmj.2 for ; Fri, 11 Mar 2022 09:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fLzCzy/0h8qIgZ6EkeEC7tgV0zuABdQ7lbf3949NWJU=; b=j3QpIrQOLPv6hI9QM7CIk/F1VfV36LUGK6Lyf0ndArSFO6YeUwUMaLUEODTHDWDny5 cRT1Rl8JTQRlt/93aFVr5pvUK85L+cL+IaqbC7o5POrQWktQrKmFCP9Aau+9S0i+GX8l +NNZMtko+GQ35bWH9+7QxBa5Iye3DGAUNRumvHNIxmyVF1xstr/53I/VKN3uusZqqmGy rubKSahlvL61xAxSyV56goY6ROD5fnpKx/2gGO4xtYrCZSqo0SojNLqUIGIVBouQ2pSw VS9PcFq9qKDZc1ofYb9tz9b7WKu09e1eSIWM4DpbrYzeOQqwBfi9oOA72SXRCyPfRE6b 9l6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fLzCzy/0h8qIgZ6EkeEC7tgV0zuABdQ7lbf3949NWJU=; b=ayFLAaSQklEwGDgJnzTkaquQfls0OOkzzXRGwFWw6ar9toGDxjo/SsFzxEwBBaNVL8 Cnh+Z2xxPfY12eVC45erRVVtfQRkKN9fS5jYaJ0zru1AqXW7JYbl9+ydDRZP7RdhfpPH AwC/ayolYcI/BQhhSlkyZYREwIUBa+BcfSl4ohYjciV6fbfc12DiIt63Dm3XCs94OJC9 30/eDPvSe8cfI75oe2ngvOuA9pfT+gDRTQGGm+kjo1D1PY0LrdDSFUYtJ3dzZHvm/1lb fhnnObURrzansUYLHn9X8lwp1lij44eljJSOyJ/HsxtQKw7BwRtfX6DKhyoPZicHyqw4 KCcw== X-Gm-Message-State: AOAM530rT81rjLBQJ+SFgR72snK59PxVeJCl8QSG58fgHhh9Hj5Aojoo eHl48Mpy/edRKlpucJ95nCkZ/stKpNAXUQ== X-Google-Smtp-Source: ABdhPJySG/kauDggTm0qgXTDJ+lGOyS/U/tN6PpKu5RMOLSw+/3WRKgxjIVdoLCOD94F4rStDLi5pw== X-Received: by 2002:a7b:cd82:0:b0:389:77ef:66d7 with SMTP id y2-20020a7bcd82000000b0038977ef66d7mr8110616wmj.171.1647018716244; Fri, 11 Mar 2022 09:11:56 -0800 (PST) Received: from matrix42.lan (212-197-176-189.adsl.highway.telekom.at. [212.197.176.189]) by smtp.gmail.com with ESMTPSA id bi9-20020a05600c3d8900b00389a623c80esm6837300wmb.1.2022.03.11.09.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 09:11:56 -0800 (PST) From: Johannes Krottmayer To: u-boot@lists.denx.de Cc: Johannes Krottmayer , Wolfgang Denk , Thomas Chou , Rick Chen , Leo , Bin Meng , Sean Anderson , Anup Patel Subject: [PATCH 0/2] Change behaviour of CONFIG_TIMER_EARLY Date: Fri, 11 Mar 2022 18:11:49 +0100 Message-Id: <20220311171151.29004-1-krjdev@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean When CONFIG_TIMER_EARLY is selected and the timer driver implements timer_early_get_count() and timer_early_get_rate() this leads to an EAGAIN error one some configurations in... common/board_f.c:initf_dm() initf_dm() invokes dm_timer_init(), but this function returns with an EAGAIN error in, because the DM virtual root driver isn't initialized yet in... drivers/timer/timer-class.c:dm_timer_init() Moved error handling to... lib/time.c For details you can read the description in the patches. Affected drivers: drivers/timer/andes_plmt_timer.c drivers/timer/sifive_clint_timer.c drivers/timer/riscv_timer.c I don't know who maintains these base libraries and base functions, so I used the copyright holders. For the driver I added the required maintainers to CC. Signed-off-by: Johannes Krottmayer Cc: Wolfgang Denk Cc: Thomas Chou Cc: Rick Chen Cc: Leo Cc: Bin Meng Cc: Sean Anderson Cc: Anup Patel Cc: Thomas Chou --- Johannes Krottmayer (2): lib: time: Change behaviour of CONFIG_TIMER_EARLY common: board_f: Fix CONFIG_TIMER_EARLY issue (EAGAIN) common/board_f.c | 6 ------ lib/time.c | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 15 deletions(-) -- 2.34.1