Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-04 Thread Rick Chen
Bin Meng 於 2018年12月4日 週二 下午5:36寫道: > > Hi Anup, > > On Tue, Dec 4, 2018 at 4:37 PM Anup Patel wrote: > > > > On Tue, Dec 4, 2018 at 1:44 PM Bin Meng wrote: > > > > > > Hi Rick, > > > > > > On Tue, Dec 4, 2018 at 3:12 PM Rick Chen wrote: > > > > > > > > > > From: Anup Patel

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-04 Thread Bin Meng
Hi Anup, On Tue, Dec 4, 2018 at 4:37 PM Anup Patel wrote: > > On Tue, Dec 4, 2018 at 1:44 PM Bin Meng wrote: > > > > Hi Rick, > > > > On Tue, Dec 4, 2018 at 3:12 PM Rick Chen wrote: > > > > > > > > From: Anup Patel [mailto:a...@brainfault.org] > > > > > Sent: Monday, December 03, 2018 6:30 PM

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-04 Thread Anup Patel
On Tue, Dec 4, 2018 at 1:44 PM Bin Meng wrote: > > Hi Rick, > > On Tue, Dec 4, 2018 at 3:12 PM Rick Chen wrote: > > > > > > From: Anup Patel [mailto:a...@brainfault.org] > > > > Sent: Monday, December 03, 2018 6:30 PM > > > > To: Bin Meng > > > > Cc: Rick Jian-Zhi Chen(陳建志); Lukas Auer;

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-04 Thread Bin Meng
Hi Rick, On Tue, Dec 4, 2018 at 3:12 PM Rick Chen wrote: > > > > From: Anup Patel [mailto:a...@brainfault.org] > > > Sent: Monday, December 03, 2018 6:30 PM > > > To: Bin Meng > > > Cc: Rick Jian-Zhi Chen(陳建志); Lukas Auer; Alexander Graf; Palmer Dabbelt; > > > Atish Patra; Christoph Hellwig;

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Rick Chen
> > From: Anup Patel [mailto:a...@brainfault.org] > > Sent: Monday, December 03, 2018 6:30 PM > > To: Bin Meng > > Cc: Rick Jian-Zhi Chen(陳建志); Lukas Auer; Alexander Graf; Palmer Dabbelt; > > Atish Patra; Christoph Hellwig; U-Boot Mailing List > > Subject: Re: [PATCH v7 4/4] RISC-V: Add S-mode

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Auer, Lukas
Hi Bin, On Mon, 2018-12-03 at 16:45 +0800, Bin Meng wrote: > Hi Anup, > > On Mon, Dec 3, 2018 at 4:12 PM Anup Patel > wrote: > > > > On Mon, Dec 3, 2018 at 1:27 PM Bin Meng wrote: > > > > > > Hi Anup, > > > > > > On Mon, Dec 3, 2018 at 3:44 PM Anup Patel > > > wrote: > > > > > > > > On

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Anup Patel
On Mon, Dec 3, 2018 at 2:16 PM Bin Meng wrote: > > Hi Anup, > > On Mon, Dec 3, 2018 at 4:12 PM Anup Patel wrote: > > > > On Mon, Dec 3, 2018 at 1:27 PM Bin Meng wrote: > > > > > > Hi Anup, > > > > > > On Mon, Dec 3, 2018 at 3:44 PM Anup Patel wrote: > > > > > > > > On Mon, Dec 3, 2018 at 1:08

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Bin Meng
Hi Anup, On Mon, Dec 3, 2018 at 4:12 PM Anup Patel wrote: > > On Mon, Dec 3, 2018 at 1:27 PM Bin Meng wrote: > > > > Hi Anup, > > > > On Mon, Dec 3, 2018 at 3:44 PM Anup Patel wrote: > > > > > > On Mon, Dec 3, 2018 at 1:08 PM Bin Meng wrote: > > > > > > > > Hi Anup, > > > > > > > > On Mon,

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Anup Patel
On Mon, Dec 3, 2018 at 1:27 PM Bin Meng wrote: > > Hi Anup, > > On Mon, Dec 3, 2018 at 3:44 PM Anup Patel wrote: > > > > On Mon, Dec 3, 2018 at 1:08 PM Bin Meng wrote: > > > > > > Hi Anup, > > > > > > On Mon, Dec 3, 2018 at 3:31 PM Anup Patel wrote: > > > > > > > > On Mon, Dec 3, 2018 at 12:56

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Bin Meng
Hi Anup, On Mon, Dec 3, 2018 at 3:44 PM Anup Patel wrote: > > On Mon, Dec 3, 2018 at 1:08 PM Bin Meng wrote: > > > > Hi Anup, > > > > On Mon, Dec 3, 2018 at 3:31 PM Anup Patel wrote: > > > > > > On Mon, Dec 3, 2018 at 12:56 PM Bin Meng wrote: > > > > > > > > Hi Anup, > > > > > > > > On Mon,

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Anup Patel
On Mon, Dec 3, 2018 at 1:08 PM Bin Meng wrote: > > Hi Anup, > > On Mon, Dec 3, 2018 at 3:31 PM Anup Patel wrote: > > > > On Mon, Dec 3, 2018 at 12:56 PM Bin Meng wrote: > > > > > > Hi Anup, > > > > > > On Mon, Dec 3, 2018 at 3:19 PM Anup Patel wrote: > > > > > > > > On Mon, Dec 3, 2018 at

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Bin Meng
Hi Anup, On Mon, Dec 3, 2018 at 3:31 PM Anup Patel wrote: > > On Mon, Dec 3, 2018 at 12:56 PM Bin Meng wrote: > > > > Hi Anup, > > > > On Mon, Dec 3, 2018 at 3:19 PM Anup Patel wrote: > > > > > > On Mon, Dec 3, 2018 at 12:32 PM Bin Meng wrote: > > > > > > > > Hi Anup, > > > > > > > > On Mon,

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Anup Patel
On Mon, Dec 3, 2018 at 12:56 PM Bin Meng wrote: > > Hi Anup, > > On Mon, Dec 3, 2018 at 3:19 PM Anup Patel wrote: > > > > On Mon, Dec 3, 2018 at 12:32 PM Bin Meng wrote: > > > > > > Hi Anup, > > > > > > On Mon, Dec 3, 2018 at 2:43 PM Anup Patel wrote: > > > > > > > > On Mon, Dec 3, 2018 at

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Bin Meng
Hi Anup, On Mon, Dec 3, 2018 at 3:19 PM Anup Patel wrote: > > On Mon, Dec 3, 2018 at 12:32 PM Bin Meng wrote: > > > > Hi Anup, > > > > On Mon, Dec 3, 2018 at 2:43 PM Anup Patel wrote: > > > > > > On Mon, Dec 3, 2018 at 12:06 PM Bin Meng wrote: > > > > > > > > Hi Anup, > > > > > > > > On Mon,

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Anup Patel
On Mon, Dec 3, 2018 at 12:32 PM Bin Meng wrote: > > Hi Anup, > > On Mon, Dec 3, 2018 at 2:43 PM Anup Patel wrote: > > > > On Mon, Dec 3, 2018 at 12:06 PM Bin Meng wrote: > > > > > > Hi Anup, > > > > > > On Mon, Dec 3, 2018 at 1:28 PM Anup Patel wrote: > > > > > > > > When running in S-mode, we

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Bin Meng
Hi Anup, On Mon, Dec 3, 2018 at 2:43 PM Anup Patel wrote: > > On Mon, Dec 3, 2018 at 12:06 PM Bin Meng wrote: > > > > Hi Anup, > > > > On Mon, Dec 3, 2018 at 1:28 PM Anup Patel wrote: > > > > > > When running in S-mode, we can use rdtime and rdtimeh instructions > > > for reading timer ticks

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Anup Patel
On Mon, Dec 3, 2018 at 12:06 PM Bin Meng wrote: > > Hi Anup, > > On Mon, Dec 3, 2018 at 1:28 PM Anup Patel wrote: > > > > When running in S-mode, we can use rdtime and rdtimeh instructions > > for reading timer ticks (just like Linux). The frequency of timer > > ticks is passed by prior booting

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Bin Meng
Hi Anup, On Mon, Dec 3, 2018 at 1:28 PM Anup Patel wrote: > > When running in S-mode, we can use rdtime and rdtimeh instructions > for reading timer ticks (just like Linux). The frequency of timer > ticks is passed by prior booting stages in "timebase-frequency" DT > property of the "/cpus" DT

[U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-02 Thread Anup Patel
When running in S-mode, we can use rdtime and rdtimeh instructions for reading timer ticks (just like Linux). The frequency of timer ticks is passed by prior booting stages in "timebase-frequency" DT property of the "/cpus" DT node. This patch provides a generic timer implementation for U-Boot