From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Gorinov Date: Fri, 30 Mar 2018 18:03:01 -0700 Subject: [U-Boot] [PATCH v2] timer: add High Precision Event Timers (HPET) support In-Reply-To: References: <20180329222959.GA7323@intel.com> Message-ID: <20180331010301.GB45891@intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Mar 30, 2018 at 10:46:40PM +0300, Andy Shevchenko wrote: > > + writel(0, regs + HPET_MAIN_COUNT_L); > > + writel(0, regs + HPET_MAIN_COUNT_H); > > Can we use writeq() here? I don't see readq/writeq defined for x86, even x86_64. > > + tl = readl(regs + HPET_MAIN_COUNT_L); > > + th = readl(regs + HPET_MAIN_COUNT_H); > > Ditto. If readq() is defined as two read operations in 32-bit code, main counter rollover (low part overflow, high part increment) can happen between them.