[PATCH v22 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch factors all the DT-specific

[PATCH v22 05/11] clocksource: arm_arch_timer: introduce some new structs to prepare for GTDT

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch introduce two new structs: arch_timer_mem, arch_timer_mem_frame. And also introduce a new define: ARCH_TIMER_MEM_MAX_FRAMES These will be used for refactoring the memory-mapped timer init code to prepare for GTDT Signed-off-by: Fu W

[PATCH v22 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-03-21 Thread fu . wei
From: Fu Wei Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch factors all the DT-specific logic out

[PATCH v22 05/11] clocksource: arm_arch_timer: introduce some new structs to prepare for GTDT

2017-03-21 Thread fu . wei
From: Fu Wei The patch introduce two new structs: arch_timer_mem, arch_timer_mem_frame. And also introduce a new define: ARCH_TIMER_MEM_MAX_FRAMES These will be used for refactoring the memory-mapped timer init code to prepare for GTDT Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo

[PATCH v22 03/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> When system init with device-tree, we don't know which node will be initialized first. And the code in arch_timer_common_init should wait until per-cpu timer and MMIO timer are both initialized. So we need arch_timer_needs_probing to detect the init

[PATCH v22 03/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-03-21 Thread fu . wei
From: Fu Wei When system init with device-tree, we don't know which node will be initialized first. And the code in arch_timer_common_init should wait until per-cpu timer and MMIO timer are both initialized. So we need arch_timer_needs_probing to detect the init status of system. But currently

[PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, the counter frequency detection call(arch_timer_detect_rate) includes getting the frequency from the device-tree property, the per-cpu arch-timer and the memory-mapped (MMIO) timer interfaces. But reading device-tree property will be needed onl

[PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-21 Thread fu . wei
From: Fu Wei Currently, the counter frequency detection call(arch_timer_detect_rate) includes getting the frequency from the device-tree property, the per-cpu arch-timer and the memory-mapped (MMIO) timer interfaces. But reading device-tree property will be needed only when system boot

[PATCH v22 04/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> Because arch_timer_needs_of_probing is only for booting with device-tree, but arch_timer_common_init is a generic init call which shouldn't include the FW-specific code. It's better to put arch_timer_needs_of_probing into DT init function. But for per-cpu

[PATCH v22 04/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-03-21 Thread fu . wei
From: Fu Wei Because arch_timer_needs_of_probing is only for booting with device-tree, but arch_timer_common_init is a generic init call which shouldn't include the FW-specific code. It's better to put arch_timer_needs_of_probing into DT init function. But for per-cpu timer

[PATCH v22 01/11] clocksource: arm_arch_timer: introduce a wrapper function to get the frequency from mmio.

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch introduce a new functions: arch_timer_mem_get_cntfrq, and applies it in arch_timer_detect_rate. This function will be used for getting the frequency from mmio to prepare for reworking counter frequency detection. Signed-off-by: Fu Wei <fu@l

[PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce a wrapper function to get the frequency from mmio. 2. separate out device-tree code from arch_timer_detect_rate 3. remove arch_timer_detect_ra

[PATCH v22 01/11] clocksource: arm_arch_timer: introduce a wrapper function to get the frequency from mmio.

2017-03-21 Thread fu . wei
From: Fu Wei The patch introduce a new functions: arch_timer_mem_get_cntfrq, and applies it in arch_timer_detect_rate. This function will be used for getting the frequency from mmio to prepare for reworking counter frequency detection. Signed-off-by: Fu Wei --- drivers/clocksource

[PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-21 Thread fu . wei
From: Fu Wei This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce a wrapper function to get the frequency from mmio. 2. separate out device-tree code from arch_timer_detect_rate 3. remove arch_timer_detect_rate use arch_timer_

Re: [PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-20 Thread Fu Wei
Hi Mark, On 21 March 2017 at 02:09, Mark Rutland <mark.rutl...@arm.com> wrote: > On Tue, Mar 21, 2017 at 01:57:58AM +0800, Fu Wei wrote: >> On 18 March 2017 at 04:01, Mark Rutland <mark.rutl...@arm.com> wrote: >> > On Tue, Feb 07, 2017 at 02:50:15AM +0800, fu

Re: [PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-20 Thread Fu Wei
Hi Mark, On 21 March 2017 at 02:09, Mark Rutland wrote: > On Tue, Mar 21, 2017 at 01:57:58AM +0800, Fu Wei wrote: >> On 18 March 2017 at 04:01, Mark Rutland wrote: >> > On Tue, Feb 07, 2017 at 02:50:15AM +0800, fu@linaro.org wrote: > >> > I've not been able to

Re: [Linaro-acpi] [PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-20 Thread Fu Wei
Hi Mark, Lurndal, On 21 March 2017 at 02:50, Lurndal, Scott <scott.lurn...@cavium.com> wrote: > On Mon, Mar 20, 2017 at 06:09:50PM +, Mark Rutland wrote: >> On Tue, Mar 21, 2017 at 01:57:58AM +0800, Fu Wei wrote: >> > On 18 March 2017 at 04:01, Mark Rutland <

Re: [Linaro-acpi] [PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-20 Thread Fu Wei
Hi Mark, Lurndal, On 21 March 2017 at 02:50, Lurndal, Scott wrote: > On Mon, Mar 20, 2017 at 06:09:50PM +, Mark Rutland wrote: >> On Tue, Mar 21, 2017 at 01:57:58AM +0800, Fu Wei wrote: >> > On 18 March 2017 at 04:01, Mark Rutland wrote: >> > > On Tue, Feb 07

Re: [PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-20 Thread Fu Wei
--- I am not sure about that if this is saying "we only have one SBSA watchdog in a system" would you let me know where mention it? Do I miss something? Thanks :-) > > [...] > >> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >> index acb00b5..c899

Re: [PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-20 Thread Fu Wei
t if this is saying "we only have one SBSA watchdog in a system" would you let me know where mention it? Do I miss something? Thanks :-) > > [...] > >> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >> index acb00b5..c899df1 100644 >> --- a/drivers/watchdog/Kconfig >> +++ b/drivers/watchdog/Kconfig >> @@ -219,6 +219,7 @@ config ARM_SBSA_WATCHDOG >> tristate "ARM SBSA Generic Watchdog" >> depends on ARM64 >> depends on ARM_ARCH_TIMER >> + depends on ACPI_GTDT || !ACPI > > I don't think this is necessary. > > This series hasn't touched this driver code at all. yes, since we are using "select ACPI_GTDT if ACPI" in ARM64, we don't this. Thanks for pointing it out. :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v21 11/13] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-20 Thread Fu Wei
can do: > > struct arch_timer_mem_frame *frame = _mem->frame[j]; > >> + if (frame->common_flags & ACPI_GTDT_GT_IS_SECURE_TIMER) >> + continue; >> + >> + if (!frame->base_address || !frame->timer_interrupt) >> + return -EINVAL; >> + >> + data->frame[j].phys_irq = map_gt_gsi(frame->timer_interrupt, >> + frame->timer_flags); > > ... allowing us to simplify lines like this. Thanks, will follow all the suggestion above. :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v21 11/13] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-20 Thread Fu Wei
struct arch_timer_mem_frame *frame = _mem->frame[j]; > >> + if (frame->common_flags & ACPI_GTDT_GT_IS_SECURE_TIMER) >> + continue; >> + >> + if (!frame->base_address || !frame->timer_interrupt) >> + return -EINVAL; >> + >> + data->frame[j].phys_irq = map_gt_gsi(frame->timer_interrupt, >> + frame->timer_flags); > > ... allowing us to simplify lines like this. Thanks, will follow all the suggestion above. :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v21 04/13] clocksource: arm_arch_timer: split arch_timer_rate for different types of timer

2017-03-20 Thread Fu Wei
Hi Mark, On 18 March 2017 at 03:05, Mark Rutland <mark.rutl...@arm.com> wrote: > On Tue, Feb 07, 2017 at 02:50:06AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> Currently, arch_timer_rate is used to store the frequency got from pe

Re: [PATCH v21 04/13] clocksource: arm_arch_timer: split arch_timer_rate for different types of timer

2017-03-20 Thread Fu Wei
Hi Mark, On 18 March 2017 at 03:05, Mark Rutland wrote: > On Tue, Feb 07, 2017 at 02:50:06AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> Currently, arch_timer_rate is used to store the frequency got from per-cpu >> arch-timer or the memory-mapped (MMIO) ti

Re: [PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-03-20 Thread Fu Wei
Hi Mark, On 20 March 2017 at 18:41, Mark Rutland <mark.rutl...@arm.com> wrote: > On Mon, Mar 20, 2017 at 05:43:29PM +0800, Fu Wei wrote: >> On 20 March 2017 at 15:36, Fu Wei <fu@linaro.org> wrote: >> > On 18 March 2017 at 02:05, Mark Rutland <mark.rutl...@arm

Re: [PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-03-20 Thread Fu Wei
Hi Mark, On 20 March 2017 at 18:41, Mark Rutland wrote: > On Mon, Mar 20, 2017 at 05:43:29PM +0800, Fu Wei wrote: >> On 20 March 2017 at 15:36, Fu Wei wrote: >> > On 18 March 2017 at 02:05, Mark Rutland wrote: >> >> On Tue, Feb 07, 2017 at 02:50:03AM

Re: [PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-03-20 Thread Fu Wei
Hi Mark, On 20 March 2017 at 15:36, Fu Wei <fu@linaro.org> wrote: > Hi Mark, > > On 18 March 2017 at 02:05, Mark Rutland <mark.rutl...@arm.com> wrote: >> On Tue, Feb 07, 2017 at 02:50:03AM +0800, fu@linaro.org wrote: >>> +static

Re: [PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-03-20 Thread Fu Wei
Hi Mark, On 20 March 2017 at 15:36, Fu Wei wrote: > Hi Mark, > > On 18 March 2017 at 02:05, Mark Rutland wrote: >> On Tue, Feb 07, 2017 at 02:50:03AM +0800, fu@linaro.org wrote: >>> +static u32 arch_timer_get_sysreg_freq(void) >>> +{ >>> + /*

Re: [PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-03-20 Thread Fu Wei
ore > than one place, so I'm happy with this wrapper. > > If you can s/arch_timer_get_mmio_freq/arch_timer_get_cntfrq/, and drop sorry, May I guess that is "s/arch_timer_get_mmio_freq/arch_timer_get_mmio_cntfrq/" or "s/arch_timer_get_mmio_freq/arch_timer_mem_get_cntfrq/"

Re: [PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-03-20 Thread Fu Wei
happy with this wrapper. > > If you can s/arch_timer_get_mmio_freq/arch_timer_get_cntfrq/, and drop sorry, May I guess that is "s/arch_timer_get_mmio_freq/arch_timer_get_mmio_cntfrq/" or "s/arch_timer_get_mmio_freq/arch_timer_mem_get_cntfrq/" which one do you prefer? :-) > the comments, then this looks fine to me. > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v21 03/13] clocksource: arm_arch_timer: remove arch_timer_detect_rate

2017-03-20 Thread Fu Wei
Hi Mark, On 18 March 2017 at 02:07, Mark Rutland <mark.rutl...@arm.com> wrote: > On Tue, Feb 07, 2017 at 02:50:05AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> The original counter frequency detection call(arch_timer_detect_rate) >

Re: [PATCH v21 03/13] clocksource: arm_arch_timer: remove arch_timer_detect_rate

2017-03-20 Thread Fu Wei
Hi Mark, On 18 March 2017 at 02:07, Mark Rutland wrote: > On Tue, Feb 07, 2017 at 02:50:05AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> The original counter frequency detection call(arch_timer_detect_rate) >> include getting the frequency from the per-cpu a

Re: [PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-19 Thread Fu Wei
Hi Mark, On 18 March 2017 at 04:03, Mark Rutland <mark.rutl...@arm.com> wrote: > On Thu, Mar 09, 2017 at 11:47:16PM +0100, Fu Wei wrote: >> Hi Mark, Marc, > > Hi, > >> I have tried to rebase all the 19(6+13) patches on 4.11-rc1, >> all the patchse can directly

Re: [PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-19 Thread Fu Wei
Hi Mark, On 18 March 2017 at 04:03, Mark Rutland wrote: > On Thu, Mar 09, 2017 at 11:47:16PM +0100, Fu Wei wrote: >> Hi Mark, Marc, > > Hi, > >> I have tried to rebase all the 19(6+13) patches on 4.11-rc1, >> all the patchse can directly apply on 4.11-rc1,

Re: [PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-09 Thread Fu Wei
Hi Mark, Marc, I have tried to rebase all the 19(6+13) patches on 4.11-rc1, all the patchse can directly apply on 4.11-rc1, Could you help to review the patches, and see if there is anywhere I can improve ? Great thanks ! :-) On 20 February 2017 at 17:20, Fu Wei <fu@linaro.org>

Re: [PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-09 Thread Fu Wei
Hi Mark, Marc, I have tried to rebase all the 19(6+13) patches on 4.11-rc1, all the patchse can directly apply on 4.11-rc1, Could you help to review the patches, and see if there is anywhere I can improve ? Great thanks ! :-) On 20 February 2017 at 17:20, Fu Wei wrote: > Hi Mark, M

Re: [PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-02-20 Thread Fu Wei
Hi Mark, Marc On 7 February 2017 at 02:50, <fu@linaro.org> wrote: > From: Fu Wei <fu@linaro.org> > > This patchset: > (1)Preparation for adding GTDT support in arm_arch_timer: > 1. Introduce two functions to get the frequency from mmio and sysreg

Re: [PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-02-20 Thread Fu Wei
Hi Mark, Marc On 7 February 2017 at 02:50, wrote: > From: Fu Wei > > This patchset: > (1)Preparation for adding GTDT support in arm_arch_timer: > 1. Introduce two functions to get the frequency from mmio and sysreg. > 2. separate out dev

[PATCH v21 06/13] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> Because arch_timer_needs_of_probing is only for booting with device-tree, but arch_timer_common_init is a generic init call which shouldn't include the FW-specific code. It's better to put arch_timer_needs_of_probing into DT init function. But for per-cpu

[PATCH v21 06/13] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-02-06 Thread fu . wei
From: Fu Wei Because arch_timer_needs_of_probing is only for booting with device-tree, but arch_timer_common_init is a generic init call which shouldn't include the FW-specific code. It's better to put arch_timer_needs_of_probing into DT init function. But for per-cpu timer

[PATCH v21 12/13] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei <fu@linaro.org> Reviewed-by: Hanjun Guo <hanjun@linaro.org> --- drivers/clocksource/arm

[PATCH v21 12/13] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-02-06 Thread fu . wei
From: Fu Wei The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file changed, 32 insertions

[PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the re

[PATCH v21 13/13] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-02-06 Thread fu . wei
From: Fu Wei This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device

[PATCH v21 10/13] clocksource: arm_arch_timer: simplify ACPI support code.

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei <fu@linaro.or

[PATCH v21 10/13] clocksource: arm_arch_timer: simplify ACPI support code.

2017-02-06 Thread fu . wei
From: Fu Wei The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Tested

[PATCH v21 11/13] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configu

[PATCH v21 11/13] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-02-06 Thread fu . wei
From: Fu Wei On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configuration and configure its driver

[PATCH v21 09/13] acpi/arm64: Add GTDT table parse driver

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it.

[PATCH v21 09/13] acpi/arm64: Add GTDT table parse driver

2017-02-06 Thread fu . wei
From: Fu Wei This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it. Signed-off-by: Fu Wei

[PATCH v21 07/13] clocksource: arm_arch_timer: introduce some new structs to prepare for GTDT

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch introduce two new structs: arch_timer_mem, arch_timer_mem_frame. And also introduce a new define: ARCH_TIMER_MEM_MAX_FRAMES These will be used for refactoring the memory-mapped timer init code to prepare for GTDT Signed-off-by: Fu W

[PATCH v21 08/13] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch factors all the DT-specific

[PATCH v21 07/13] clocksource: arm_arch_timer: introduce some new structs to prepare for GTDT

2017-02-06 Thread fu . wei
From: Fu Wei The patch introduce two new structs: arch_timer_mem, arch_timer_mem_frame. And also introduce a new define: ARCH_TIMER_MEM_MAX_FRAMES These will be used for refactoring the memory-mapped timer init code to prepare for GTDT Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo

[PATCH v21 08/13] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-02-06 Thread fu . wei
From: Fu Wei Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch factors all the DT-specific logic out

[PATCH v21 05/13] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> When system init with device-tree, we don't know which node will be initialized first. And the code in arch_timer_common_init should wait until per-cpu timer and MMIO timer are both initialized. So we need arch_timer_needs_probing to detect the init

[PATCH v21 05/13] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-02-06 Thread fu . wei
From: Fu Wei When system init with device-tree, we don't know which node will be initialized first. And the code in arch_timer_common_init should wait until per-cpu timer and MMIO timer are both initialized. So we need arch_timer_needs_probing to detect the init status of system. But currently

[PATCH v21 02/13] clocksource: arm_arch_timer: separate out device-tree code from arch_timer_detect_rate

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, the counter frequency detection call(arch_timer_detect_rate) include getting the frequency from the device-tree property. But reading device-tree property will be needed only when system boot with device-tree. This patch separate out device-tre

[PATCH v21 03/13] clocksource: arm_arch_timer: remove arch_timer_detect_rate

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> The original counter frequency detection call(arch_timer_detect_rate) include getting the frequency from the per-cpu arch-timer and the memory-mapped (MMIO) timer interfaces. But they will be needed only when the system initializes the relevant timer. This

[PATCH v21 04/13] clocksource: arm_arch_timer: split arch_timer_rate for different types of timer

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, arch_timer_rate is used to store the frequency got from per-cpu arch-timer or the memory-mapped (MMIO) timers. But those values come from different registers which should all be initialized by firmware. This patch remove arch_timer_rate, a

[PATCH v21 02/13] clocksource: arm_arch_timer: separate out device-tree code from arch_timer_detect_rate

2017-02-06 Thread fu . wei
From: Fu Wei Currently, the counter frequency detection call(arch_timer_detect_rate) include getting the frequency from the device-tree property. But reading device-tree property will be needed only when system boot with device-tree. This patch separate out device-tree code, keep them in device

[PATCH v21 03/13] clocksource: arm_arch_timer: remove arch_timer_detect_rate

2017-02-06 Thread fu . wei
From: Fu Wei The original counter frequency detection call(arch_timer_detect_rate) include getting the frequency from the per-cpu arch-timer and the memory-mapped (MMIO) timer interfaces. But they will be needed only when the system initializes the relevant timer. This patch remove

[PATCH v21 04/13] clocksource: arm_arch_timer: split arch_timer_rate for different types of timer

2017-02-06 Thread fu . wei
From: Fu Wei Currently, arch_timer_rate is used to store the frequency got from per-cpu arch-timer or the memory-mapped (MMIO) timers. But those values come from different registers which should all be initialized by firmware. This patch remove arch_timer_rate, and use arch_timer_sysreg_freq

[PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch introduce two new functions: arch_timer_get_sysreg_freq and arch_timer_get_mmio_freq, and applys them in arch_timer_detect_rate. These will be used for getting the frequency from mmio and sysreg to prepare for reworking counter frequency det

[PATCH v21 01/13] clocksource: arm_arch_timer: introduce two functions to get the frequency from mmio and sysreg.

2017-02-06 Thread fu . wei
From: Fu Wei The patch introduce two new functions: arch_timer_get_sysreg_freq and arch_timer_get_mmio_freq, and applys them in arch_timer_detect_rate. These will be used for getting the frequency from mmio and sysreg to prepare for reworking counter frequency detection. Signed-off-by: Fu Wei

[PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-02-06 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce two functions to get the frequency from mmio and sysreg. 2. separate out device-tree code from arch_timer_detect_rate 3. remove arch_timer_detec

[PATCH v21 00/13] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-02-06 Thread fu . wei
From: Fu Wei This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce two functions to get the frequency from mmio and sysreg. 2. separate out device-tree code from arch_timer_detect_rate 3. remove arch_timer_detect_rate use

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-31 Thread Fu Wei
Hi Mark, On 1 February 2017 at 02:49, Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Feb 01, 2017 at 02:43:02AM +0800, Fu Wei wrote: >> On 31 January 2017 at 01:49, Mark Rutland <mark.rutl...@arm.com> wrote: >> > On Thu, Jan 26, 2017 at 01:49:03PM +0800, Fu

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-31 Thread Fu Wei
Hi Mark, On 1 February 2017 at 02:49, Mark Rutland wrote: > On Wed, Feb 01, 2017 at 02:43:02AM +0800, Fu Wei wrote: >> On 31 January 2017 at 01:49, Mark Rutland wrote: >> > On Thu, Jan 26, 2017 at 01:49:03PM +0800, Fu Wei wrote: >> >> On 26 January 2017

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-31 Thread Fu Wei
Hi Mark, On 31 January 2017 at 01:49, Mark Rutland <mark.rutl...@arm.com> wrote: > On Thu, Jan 26, 2017 at 01:49:03PM +0800, Fu Wei wrote: >> On 26 January 2017 at 01:25, Mark Rutland <mark.rutl...@arm.com> wrote: >> > On Wed, Jan 25, 2017 at 02:46:12PM +0800, Fu

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-31 Thread Fu Wei
Hi Mark, On 31 January 2017 at 01:49, Mark Rutland wrote: > On Thu, Jan 26, 2017 at 01:49:03PM +0800, Fu Wei wrote: >> On 26 January 2017 at 01:25, Mark Rutland wrote: >> > On Wed, Jan 25, 2017 at 02:46:12PM +0800, Fu Wei wrote: >> >> On 25 January 2017

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-25 Thread Fu Wei
Hi Mark, Christopher, On 26 January 2017 at 01:36, Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Jan 25, 2017 at 10:38:01AM -0500, Christopher Covington wrote: >> On 01/25/2017 01:46 AM, Fu Wei wrote: >> > On 25 January 2017 at 01:24, Mark Rutland <mark.rutl...@a

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-25 Thread Fu Wei
Hi Mark, Christopher, On 26 January 2017 at 01:36, Mark Rutland wrote: > On Wed, Jan 25, 2017 at 10:38:01AM -0500, Christopher Covington wrote: >> On 01/25/2017 01:46 AM, Fu Wei wrote: >> > On 25 January 2017 at 01:24, Mark Rutland wrote: >> >> On Wed, Jan 18

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-25 Thread Fu Wei
Hi Mark, On 26 January 2017 at 01:25, Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Jan 25, 2017 at 02:46:12PM +0800, Fu Wei wrote: >> Hi Mark, > > Hi, > >> On 25 January 2017 at 01:24, Mark Rutland <mark.rutl...@arm.com> wrote: >> >

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-25 Thread Fu Wei
Hi Mark, On 26 January 2017 at 01:25, Mark Rutland wrote: > On Wed, Jan 25, 2017 at 02:46:12PM +0800, Fu Wei wrote: >> Hi Mark, > > Hi, > >> On 25 January 2017 at 01:24, Mark Rutland wrote: >> > On Wed, Jan 18, 2017 at 09:25:32PM +0800, fu....@lin

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-24 Thread Fu Wei
Hi Mark, On 25 January 2017 at 14:46, Fu Wei <fu@linaro.org> wrote: > Hi Mark, > > On 25 January 2017 at 01:24, Mark Rutland <mark.rutl...@arm.com> wrote: >> On Wed, Jan 18, 2017 at 09:25:32PM +0800, fu@linaro.org wrote: >>> From: Fu Wei <fu@li

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-24 Thread Fu Wei
Hi Mark, On 25 January 2017 at 14:46, Fu Wei wrote: > Hi Mark, > > On 25 January 2017 at 01:24, Mark Rutland wrote: >> On Wed, Jan 18, 2017 at 09:25:32PM +0800, fu@linaro.org wrote: >>> From: Fu Wei >>> >>> The counter frequency detection call(arc

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-24 Thread Fu Wei
Hi Mark, On 25 January 2017 at 01:24, Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Jan 18, 2017 at 09:25:32PM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> The counter frequency detection call(arch_timer_detect_rate) co

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-24 Thread Fu Wei
Hi Mark, On 25 January 2017 at 01:24, Mark Rutland wrote: > On Wed, Jan 18, 2017 at 09:25:32PM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> The counter frequency detection call(arch_timer_detect_rate) combines two >> ways to get counter frequency: system co

Re: [PATCH v20 00/17] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-01-23 Thread Fu Wei
Hi Mark On 24 January 2017 at 02:54, Mark Rutland <mark.rutl...@arm.com> wrote: > Hi, > > On Wed, Jan 18, 2017 at 09:25:24PM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patchset: >> (1)Preparation for adding

Re: [PATCH v20 00/17] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-01-23 Thread Fu Wei
Hi Mark On 24 January 2017 at 02:54, Mark Rutland wrote: > Hi, > > On Wed, Jan 18, 2017 at 09:25:24PM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> This patchset: >> (1)Preparation for adding GTDT support in arm_arch_timer: >> 1. Clean

Re: [PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver

2017-01-19 Thread Fu Wei
Hi Mark, On 19 January 2017 at 19:16, Mark Rutland <mark.rutl...@arm.com> wrote: > On Thu, Jan 19, 2017 at 06:32:55PM +0800, Fu Wei wrote: >> On 19 January 2017 at 17:11, Hanjun Guo <hanjun@linaro.org> wrote: >> > On 2017/1/18 21:25, fu@linaro.org

Re: [PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver

2017-01-19 Thread Fu Wei
Hi Mark, On 19 January 2017 at 19:16, Mark Rutland wrote: > On Thu, Jan 19, 2017 at 06:32:55PM +0800, Fu Wei wrote: >> On 19 January 2017 at 17:11, Hanjun Guo wrote: >> > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei > >> >>

Re: [PATCH v20 00/17] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 17:20, Hanjun Guo <hanjun@linaro.org> wrote: > Hi Fuwei, > > > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei <fu@linaro.org> >> >> This patchset: >> (1)Preparation for adding

Re: [PATCH v20 00/17] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 17:20, Hanjun Guo wrote: > Hi Fuwei, > > > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei >> >> This patchset: >> (1)Preparation for adding GTDT support in arm_arch_timer: >> 1. Clean

Re: [PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 17:11, Hanjun Guo <hanjun@linaro.org> wrote: > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei <fu@linaro.org> >> >> This patch adds support for parsing arch timer info in GTDT, >> pr

Re: [PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 17:11, Hanjun Guo wrote: > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei >> >> This patch adds support for parsing arch timer info in GTDT, >> provides some kernel APIs to parse all the PPIs and >>

Re: [PATCH v20 16/17] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 17:16, Hanjun Guo <hanjun@linaro.org> wrote: > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei <fu@linaro.org> >> >> The patch add memory-mapped timer register support by using the >> inform

Re: [PATCH v20 16/17] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 17:16, Hanjun Guo wrote: > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei >> >> The patch add memory-mapped timer register support by using the >> information provided by the new GTDT driver of

Re: [PATCH v20 11/17] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 16:28, Hanjun Guo <hanjun@linaro.org> wrote: > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei <fu@linaro.org> >> >> The patch introduce two new structs: arch_timer_mem, arch_timer_mem_fr

Re: [PATCH v20 11/17] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 16:28, Hanjun Guo wrote: > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei >> >> The patch introduce two new structs: arch_timer_mem, arch_timer_mem_frame. >> And also introduce a new define: ARCH_TIMER_MEM_MA

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 16:02, Hanjun Guo <hanjun@linaro.org> wrote: > Hi Fuwei, > > One comments below. > > > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei <fu@linaro.org> >> >> The counter frequency detec

Re: [PATCH v20 08/17] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-19 Thread Fu Wei
Hi Hanjun, On 19 January 2017 at 16:02, Hanjun Guo wrote: > Hi Fuwei, > > One comments below. > > > On 2017/1/18 21:25, fu@linaro.org wrote: >> >> From: Fu Wei >> >> The counter frequency detection call(arch_timer_detect_rate) combines tw

[PATCH v20 17/17] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the re

[PATCH v20 17/17] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-01-18 Thread fu . wei
From: Fu Wei This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device

[PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it.

[PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver

2017-01-18 Thread fu . wei
From: Fu Wei This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it. Signed-off-by: Fu Wei

[PATCH v20 05/17] clocksource/drivers/arm_arch_timer: Add a new enum for spi type

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch add a new enum "arch_timer_spi_nr" and use it in the driver. Just for code's readability, no functional change. Signed-off-by: Fu Wei <fu@linaro.org> Acked-by: Mark Rutland <mark.rutl...@arm.com> --- drivers/cloc

[PATCH v20 05/17] clocksource/drivers/arm_arch_timer: Add a new enum for spi type

2017-01-18 Thread fu . wei
From: Fu Wei This patch add a new enum "arch_timer_spi_nr" and use it in the driver. Just for code's readability, no functional change. Signed-off-by: Fu Wei Acked-by: Mark Rutland --- drivers/clocksource/arm_arch_timer.c | 4 ++-- include/clocksource/arm_arch_timer.h | 6 +

[PATCH v20 09/17] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> When system init with device-tree, we don't know which node will be initialized first. And the code in arch_timer_common_init should wait until per-cpu timer and MMIO timer are both initialized. So we need arch_timer_needs_probing to detect the init

[PATCH v20 09/17] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing

2017-01-18 Thread fu . wei
From: Fu Wei When system init with device-tree, we don't know which node will be initialized first. And the code in arch_timer_common_init should wait until per-cpu timer and MMIO timer are both initialized. So we need arch_timer_needs_probing to detect the init status of system. But currently

<    1   2   3   4   5   6   7   8   9   10   >