From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 2/3] xen/arm: Add new driver for R-Car Gen2 UART Date: Thu, 22 Jan 2015 17:02:52 +0000 Message-ID: <54C12D3C.9090403@linaro.org> References: <1421849778-1562-1-git-send-email-oiurii.konovalenko@globallogic.com> <1421849778-1562-3-git-send-email-oiurii.konovalenko@globallogic.com> <54C10CBA.5050703@linaro.org> <54C122D3.5090401@linaro.org> <54C12A02.8000003@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Tyshchenko Cc: Iurii Konovalenko , Stefano Stabellini , Tim Deegan , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 22/01/15 16:55, Oleksandr Tyshchenko wrote: > On Thu, Jan 22, 2015 at 6:49 PM, Julien Grall wrote: >> On 22/01/15 16:44, Oleksandr Tyshchenko wrote: >>> I understand, then I will implement local delay func in uart driver >>> based on READ_SYSREG64(CNTPCT_EL0). >> >> Unless I miss something, udelay should work in your case even if the >> xen_init_time is not called. > Unfortunately, no. If I understand correctly the var "cpu_khz" (used > in ticks_to_ns()) is initialized in init_xen_time(). Hrm, right. I looked too quickly to the function. I don't like the idea to use READ_SYSREG64(CNTPCT_EL0) in the UART drivers. Does the udelay necessary here? If yes, maybe we should either split the xen_init_time in 2 parts or create a udelay_tick function to use when timer is not set. I'm not sure what is the best one. Regards, -- Julien Grall