From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4003:c06::243; helo=mail-oi0-x243.google.com; envelope-from=masahisa.kojima@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A98B8210EB4DF for ; Mon, 18 Jun 2018 16:57:04 -0700 (PDT) Received: by mail-oi0-x243.google.com with SMTP id 14-v6so16509189oie.3 for ; Mon, 18 Jun 2018 16:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HPI6ia3RsVv7WUbrd+octreTUJbsSdlACXfSgloJAhs=; b=LRFGJZ+Aap2n6PhxPbfa0dAoNSCCe/rTaG3y1zOeVVR9AROvEqG8rvOczybL2woLZq eBaZkrRPUfRh3sTCRSqx5Zhic3LesUHgTJT+TUvrwcWCBfZ2EbpwdiVdHD83fKKuXZmn 9gThuhQ8NsrPOxQ0CY2juYt+IujwWZJqmXMeU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HPI6ia3RsVv7WUbrd+octreTUJbsSdlACXfSgloJAhs=; b=ltBg7HLI/Zu1pBebx2oqW9TXiabYCnvRB3WMlz117qgGr9gU4InIJr5MQA6ps7lowG IgI13hKINc78l1w6HPfk2Wi5x8rTYEmuRWV6Uw7C3badCzPwNTGCJjssr3Q/9GtRwY+k fHmR01rh0bfsYrtsrhf3VhNUqebO6OCtyvERNq2FlQZa2cmVtHvYcZIjD6faziTn9f0P 2wIN0xRIym8VWR9Dqe42jI637ZBrZmUqceTZEXBQQ9MmEHJkXi7iXBIlLWrmE16QKjP1 1+XSUvI1TnpUGi8iqlZgTRVE3tmQyOTNWay6s0V5k4jDZFkRygBZCSxgeXnm0Ep2Txkp 3/ug== X-Gm-Message-State: APt69E3uupS0LcK0lf5aPBkfBYm0GM0qm41Svk/PM8Hg2w0rAOSaIDkh HaSAHe2pU1jsnqlA9jlQ74mLiBgOBLMWflaj31n/6Q== X-Google-Smtp-Source: ADUXVKJ4i5s48Cvd5xAU3EK6UCPx8EWo2W4GKtUCLhC8BFr5De8cHr1F1AhM8Nr9VyS6YGdExulqwvMJ+RU9Byfpc1w= X-Received: by 2002:aca:aa54:: with SMTP id t81-v6mr8457095oie.30.1529366223658; Mon, 18 Jun 2018 16:57:03 -0700 (PDT) MIME-Version: 1.0 References: <20180618123155.2141-1-masahisa.kojima@linaro.org> In-Reply-To: From: Masahisa Kojima Date: Tue, 19 Jun 2018 08:56:52 +0900 Message-ID: To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, Leif Lindholm , Yoshitoyo Osaki Subject: Re: [PATCH] Silicon/NXP/Pcf8563RealTimeClockLib: add rtc device initialization X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 23:57:04 -0000 Content-Type: text/plain; charset="UTF-8" On Tue, 19 Jun 2018 at 00:51, Ard Biesheuvel wrote: > > On 18 June 2018 at 16:29, Masahisa Kojima wrote: > > Hi Ard, > > > > Thank you for comment. > > > >> Wouldn't it be better to return EFI_DEVICE_ERROR in this case? > > > > It is first option I come up with to fix this issue. > > But edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c::CheckAndSetTime() > > performs GetTime()->update with user specified time->SetTime(), > > If GetTime() failes, SetTime() never called and user can not set time. > > # It really depends on the RTC device, we failed to set time in 70% devices. > > > > Another place to perform this dummy time/date setting is inside of > > LibRtcInitialize(). > > Current error occurs in setting time, and I prefer to add this process > > in GetTime(). > > > > I think we should fix the shell command instead. Setting the time > should be possible even if getting the time file, precisely for > situations like this one. OK, I agree with you.