From patchwork Wed Jul 11 09:06:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 141694 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp39021ljj; Wed, 11 Jul 2018 02:05:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfhZv97fCbPD4ePKIfCxr2JrwsMtLqvMLu1XWqFJ0SbX1FHnQ2mrJsRl1CAZ4jeyVYP/x69 X-Received: by 2002:a50:afa3:: with SMTP id h32-v6mr30187261edd.129.1531299906006; Wed, 11 Jul 2018 02:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531299906; cv=none; d=google.com; s=arc-20160816; b=h2Qfx50Hode776oxWvRTbZ6VbXowvYLZKSVbmPG9x0QvPKd+pGJ9yQgdfzVtEJ1eUI 8OABZTrB1Ju0qiyQyGEPwBN3CwFDUpsCYQDgxJxK4mRj4UTL0y8Tl9C6mr0wUSApxiOC Laxtu+qVafOiMDu5n4WaJR5rQTQju/V1Z0HyrZzFA20CHEsTxizAfIM/nhjDMl1cNeAT bFVnhHTxJ9o1HHbX6k5RbF0fAj6t1wGAfljtxx9C7J9ZuCqUYB7yofh2CuK56ij7TCLI l3MTMxQpjwWAq8F/J3CTFWoyXNnN4CLURYbNgit2/Zv4bvJbpCl49A7heGafvcwNsgG2 GGLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=9+Up7BAgqKofNWqQ5yUYeXX0hjktBWupQo33kkr+qks=; b=RRo7HcPywTiD/gmsPAfhD89pk18Momjli7oWy5TG7KShxM3okhtLUHHMRd8PgIeNZW o75Y0NlNZZ5GmgazyzANH9apCzYOqK4whgCGosP6wI9oaBZCodcta3++uG1GLR6mAvFR 8OaQAdvHtp1Kw73D5yHT6gVPRnAoJMCRWBmqC2XF7NClzZPPJxCY0Vs/IdmM/KQcRvgD n6fRQ3ggJPiyY6AiA4XZXXtlMieNwPfVYXD8mBXdoXbCz3J8pappAXrDPls70VXe6/DW SNza6MTiC7+89mG17JuEcwydSl7HpoIC2Xv8GvTOXpmKYNO90Rm7iW/BmJG8t/pssXmW ztqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="BBCM/Mxt"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id h50-v6si651726ede.283.2018.07.11.02.05.05; Wed, 11 Jul 2018 02:05:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="BBCM/Mxt"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 4E984C21C2F; Wed, 11 Jul 2018 09:05:02 +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_H3, RCVD_IN_MSPIKE_WL, 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 7102FC21C2F; Wed, 11 Jul 2018 09:05:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2AEC6C21C2F; Wed, 11 Jul 2018 09:04:59 +0000 (UTC) Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by lists.denx.de (Postfix) with ESMTPS id 88A33C21C29 for ; Wed, 11 Jul 2018 09:04:58 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id m16-v6so8896572pls.11 for ; Wed, 11 Jul 2018 02:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=iJcFyXTSLHyQsv05+DsgjQV7ej9JFNzN//DqInB03qA=; b=BBCM/Mxt050oTDAMBiy1EEzzyAb5uzs/R3Hm439z8yEBsub6RuR7AHFkvbQmT/kKlk JJ7XjIhL36GSRYxwYl+Mb3U40p2y7xO9qJQyA9virev49EHvuoiKwC+0PI3cGsd5gr3M U3MUm+W90HmFjxNuQ83RstoYl/xHWIHYebCjA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iJcFyXTSLHyQsv05+DsgjQV7ej9JFNzN//DqInB03qA=; b=P7ARjVfsYK0jDCzcTTCaaa5ZSO12ph7yKRpW3NFxinCRu+K54bLu8zuOAzeevvngFY 1F3LPE+YalQz7oAWWr+OGxTrgVp2Y4NfL8SSrUVh4UjCiIRgtJmO9aa6PG2QawCUfrXN FUUpiIRZPv5uuXl2tTU5S2ru7LR2ZTU7n3XDmy5SvlVVX+IC0IH+y2q/Ib7yuXKqFruq 4rFCa64i8Yk7auWGSZyvQPn7mkY6k1xDoxjL9ma098SPDUq0DFzREvm32sHKKVmGSWve 5FAZQqCjVvuvui19exvCGOYIUoB6dCy1w+fq+WxptrP7nJdsyrB6iljTVUMu9uJ3jtnm IuCA== X-Gm-Message-State: APt69E2VogWKu9QHjDuYiaHX9FxAZEiGdJXA+vICCOuZOiDzxmTGkmiW 2r5bFyuU4Ravqwxxvni7hgk8gg== X-Received: by 2002:a17:902:4203:: with SMTP id g3-v6mr27498428pld.315.1531299896859; Wed, 11 Jul 2018 02:04:56 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id l67-v6sm37056452pfl.89.2018.07.11.02.04.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 02:04:56 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org, tuomas.tynkkynen@iki.fi Date: Wed, 11 Jul 2018 18:06:05 +0900 Message-Id: <20180711090608.11526-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 Cc: xypron.glpk@gmx.de, agraf@suse.de, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 0/3] subject: arm: qemu-arm: enable PL031 (RTC) 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" Virtual Machines provided by qemu for arm are already equipped with RTCdevice (PL031). With this patch set, PL031 driver is converted to driver model and by default enabled on qemu-arm. It allows us not only to use date command but also to enable UEFI's GetTime/SetTime() services. This work is motivated by running UEFI SCT(Self-Certification Test) and measuring time. Heinrich has already posted UEFI's GetTime() implementation. This is a revised version of my proposal[1]. [1] https://lists.denx.de/pipermail/u-boot/2018-July/333534.html Changes in v3 (July 11, 2018) * compile drivers/rtc/date.c if DM_RTC * rename pl031_rtc_xxx to pl031_xxx * make struct pl031_platdata private to the driver * add probe function, removing pl031_initted variable * use readl/writel() instead of private macros * add a debug message to pl031_rtc_set() * remove CONFIG_SYS_RTC_PL031_BASE from config_whitelist.txt * enable RTC_PL031 for QEMU_ARM in arch/arm/Kconfig Changes in v2 (July 4, 2018) * based on Heinrich's comments, * remove legacy mode interface * enable the driver in defconfig AKASHI Takahiro (3): rtc: compile date.c if DM_RTC rtc: pl031: convert the driver to driver model arm: qemu-arm: enable RTC (PL031) by default arch/arm/Kconfig | 2 + drivers/rtc/Kconfig | 6 ++ drivers/rtc/date.c | 3 +- drivers/rtc/pl031.c | 126 ++++++++++++++++++++++------------- scripts/config_whitelist.txt | 1 - 5 files changed, 90 insertions(+), 48 deletions(-)