[PATCH v20 10/17] clocksource/drivers/arm_arch_timer: Move arch_timer_needs_of_probing into DT init call

2017-01-18 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 v20 10/17] clocksource/drivers/arm_arch_timer: Move arch_timer_needs_of_probing into DT init call

2017-01-18 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 v20 15/17] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-01-18 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 v20 16/17] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2017-01-18 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> --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file

[PATCH v20 15/17] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-01-18 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 v20 16/17] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2017-01-18 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 --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff

[PATCH v20 07/17] clocksource/drivers/arm_arch_timer: Separate out device-tree code from arch_timer_detect_rate

2017-01-18 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 v20 07/17] clocksource/drivers/arm_arch_timer: Separate out device-tree code from arch_timer_detect_rate

2017-01-18 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 v20 12/17] clocksource/drivers/arm_arch_timer: Refactor MMIO timer probing.

2017-01-18 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 v20 12/17] clocksource/drivers/arm_arch_timer: Refactor MMIO timer probing.

2017-01-18 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 v20 14/17] clocksource/drivers/arm_arch_timer: Simplify ACPI support code.

2017-01-18 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 v20 14/17] clocksource/drivers/arm_arch_timer: Simplify ACPI support code.

2017-01-18 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 v20 11/17] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2017-01-18 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 v20 11/17] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2017-01-18 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 --- include/clocksource

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

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> The counter frequency detection call(arch_timer_detect_rate) combines two ways to get counter frequency: system coprocessor register and MMIO timer. But in a specific timer init code, we only need one way to try: getting frequency from MMIO timer re

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

2017-01-18 Thread fu . wei
From: Fu Wei The counter frequency detection call(arch_timer_detect_rate) combines two ways to get counter frequency: system coprocessor register and MMIO timer. But in a specific timer init code, we only need one way to try: getting frequency from MMIO timer register will be needed only when we

[PATCH v20 03/17] clocksource/drivers/arm_arch_timer: Rename the PPI enum and its values.

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> Rename the PPI enum and its values to unify the format of enum in arm_arch_timer.c, also update all the users of this enum. No functional change. Signed-off-by: Fu Wei <fu@linaro.org> Tested-by: Xiongfeng Wang <wangxiongfe...@huawei.co

[PATCH v20 03/17] clocksource/drivers/arm_arch_timer: Rename the PPI enum and its values.

2017-01-18 Thread fu . wei
From: Fu Wei Rename the PPI enum and its values to unify the format of enum in arm_arch_timer.c, also update all the users of this enum. No functional change. Signed-off-by: Fu Wei Tested-by: Xiongfeng Wang --- drivers/clocksource/arm_arch_timer.c | 84

[PATCH v20 04/17] clocksource/drivers/arm_arch_timer: Move enums and defines to header file.

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> To support the arm_arch_timer via ACPI we need to share defines and enums between the driver and the ACPI parser code. So we split out the relevant defines and enums into arm_arch_timer.h. No functional change. Signed-off-by: Fu Wei <fu@linaro.o

[PATCH v20 04/17] clocksource/drivers/arm_arch_timer: Move enums and defines to header file.

2017-01-18 Thread fu . wei
From: Fu Wei To support the arm_arch_timer via ACPI we need to share defines and enums between the driver and the ACPI parser code. So we split out the relevant defines and enums into arm_arch_timer.h. No functional change. Signed-off-by: Fu Wei Acked-by: Mark Rutland Tested-by: Xiongfeng

[PATCH v20 06/17] clocksource/drivers/arm_arch_timer: rework PPI determination

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, the arch timer driver uses ARCH_TIMER_PHYS_SECURE_PPI to mean the driver will use the secure PPI *and* potentialy also use the non-secure PPI. This is somewhat confusing. For arm64, where it never makes sense to use the secure PPI, this means w

[PATCH v20 06/17] clocksource/drivers/arm_arch_timer: rework PPI determination

2017-01-18 Thread fu . wei
From: Fu Wei Currently, the arch timer driver uses ARCH_TIMER_PHYS_SECURE_PPI to mean the driver will use the secure PPI *and* potentialy also use the non-secure PPI. This is somewhat confusing. For arm64, where it never makes sense to use the secure PPI, this means we must always request

[PATCH v20 02/17] clocksource/drivers/arm_arch_timer: Rename the timer type macros.

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> Rename the timer type macros to unify the format of macros in arm_arch_timer.c, also update all the users of these macros. No functional change. Signed-off-by: Fu Wei <fu@linaro.org> Tested-by: Xiongfeng Wang <wangxiongfe...@huawei.co

[PATCH v20 02/17] clocksource/drivers/arm_arch_timer: Rename the timer type macros.

2017-01-18 Thread fu . wei
From: Fu Wei Rename the timer type macros to unify the format of macros in arm_arch_timer.c, also update all the users of these macros. No functional change. Signed-off-by: Fu Wei Tested-by: Xiongfeng Wang --- drivers/clocksource/arm_arch_timer.c | 43 +++- 1

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

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Clean up printk() usage 2. Rename the type macros 3. Rename the PPI enum & enum values 4. Move the type macro and PPI enum into the h

[PATCH v20 01/17] clocksource/drivers/arm_arch_timer: Improve printk relevant code

2017-01-18 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch defines pr_fmt(fmt) for all pr_* functions, then the pr_* doesn't need to add "arch_timer:" everytime. According to the suggestion from checkpatch.pl: (1) delete some Blank Spaces in arch_timer_banner; (2) delete a redundant Tab

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

2017-01-18 Thread fu . wei
From: Fu Wei This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Clean up printk() usage 2. Rename the type macros 3. Rename the PPI enum & enum values 4. Move the type macro and PPI enum into the header file 5. Add new

[PATCH v20 01/17] clocksource/drivers/arm_arch_timer: Improve printk relevant code

2017-01-18 Thread fu . wei
From: Fu Wei This patch defines pr_fmt(fmt) for all pr_* functions, then the pr_* doesn't need to add "arch_timer:" everytime. According to the suggestion from checkpatch.pl: (1) delete some Blank Spaces in arch_timer_banner; (2) delete a redundant Tab in a bland line of arch_timer

Re: [PATCH v19 06/15] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 01:50, Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Dec 21, 2016 at 02:45:54PM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> Currently, the counter frequency detection call(arch_timer_detect_rate

Re: [PATCH v19 06/15] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 01:50, Mark Rutland wrote: > On Wed, Dec 21, 2016 at 02:45:54PM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> Currently, the counter frequency detection call(arch_timer_detect_rate) >> combines all the ways to get counter freq

Re: [PATCH v19 05/15] clocksource/drivers/arm_arch_timer: rework PPI determination

2017-01-17 Thread Fu Wei
int __init arch_timer_acpi_init(struct >> acpi_table_header *table) >> /* Get the frequency from CNTFRQ */ >> arch_timer_detect_rate(NULL, NULL); >> >> + arch_timer_uses_ppi = arch_timer_select_ppi(); >> + if (!arch_timer_ppi[arch_timer_uses_ppi]) { >> + pr_err("No interrupt available, giving up\n"); >> + return -EINVAL; >> + } > > I see that we have to duplicate this so we can special-case the > DT-specific behaviour, so that's fine by me. Yes, that is the reason of the duplication :-) > > If you can fix the arch_timer_select_ppi() logic as above, this should > be fine. Done, thanks :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v19 05/15] clocksource/drivers/arm_arch_timer: rework PPI determination

2017-01-17 Thread Fu Wei
i_init(struct >> acpi_table_header *table) >> /* Get the frequency from CNTFRQ */ >> arch_timer_detect_rate(NULL, NULL); >> >> + arch_timer_uses_ppi = arch_timer_select_ppi(); >> + if (!arch_timer_ppi[arch_timer_uses_ppi]) { >> + pr_err("No interrupt available, giving up\n"); >> + return -EINVAL; >> + } > > I see that we have to duplicate this so we can special-case the > DT-specific behaviour, so that's fine by me. Yes, that is the reason of the duplication :-) > > If you can fix the arch_timer_select_ppi() logic as above, this should > be fine. Done, thanks :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 20:29, Mark Rutland <mark.rutl...@arm.com> wrote: > On Tue, Jan 17, 2017 at 06:18:12AM -0600, Timur Tabi wrote: >> Fu Wei wrote: >> >if (i >= ARCH_TIMER_MEM_MAX_FRAMES) { >> >pr_err(FW_BUG "too many frames, ARMv8 spe

Re: [PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 20:29, Mark Rutland wrote: > On Tue, Jan 17, 2017 at 06:18:12AM -0600, Timur Tabi wrote: >> Fu Wei wrote: >> >if (i >= ARCH_TIMER_MEM_MAX_FRAMES) { >> >pr_err(FW_BUG "too many frames, ARMv8 spec only allows 8.\n"

Re: [PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 18:30, Fu Wei <fu@linaro.org> wrote: > Hi Mark, > > On 17 January 2017 at 02:30, Mark Rutland <mark.rutl...@arm.com> wrote: >> On Wed, Dec 21, 2016 at 02:45:58PM +0800, fu@linaro.org wrote: >>> From: Fu Wei <fu

Re: [PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 18:30, Fu Wei wrote: > Hi Mark, > > On 17 January 2017 at 02:30, Mark Rutland wrote: >> On Wed, Dec 21, 2016 at 02:45:58PM +0800, fu@linaro.org wrote: >>> From: Fu Wei >>> >>> The patch refactor original memory-ma

Re: [PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 02:30, Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Dec 21, 2016 at 02:45:58PM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> The patch refactor original memory-mapped timer init code: >>

Re: [PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 02:30, Mark Rutland wrote: > On Wed, Dec 21, 2016 at 02:45:58PM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> The patch refactor original memory-mapped timer init code: >> (1) Refactor "arch_timer_mem_ini

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

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 01:00, Mark Rutland <mark.rutl...@arm.com> wrote: > Hi, > > On Wed, Dec 21, 2016 at 02:45:48PM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patchset: >> (1)Preparation for adding

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

2017-01-17 Thread Fu Wei
Hi Mark, On 17 January 2017 at 01:00, Mark Rutland wrote: > Hi, > > On Wed, Dec 21, 2016 at 02:45:48PM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> This patchset: >> (1)Preparation for adding GTDT support in arm_arch_timer: >> 1. Mo

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

2017-01-16 Thread Fu Wei
Hi Mark, On 16 January 2017 at 20:01, Mark Rutland <mark.rutl...@arm.com> wrote: > On Mon, Jan 16, 2017 at 02:26:54PM +0800, Fu Wei wrote: >> Hi Mark, >> >> This v19 (I have mentioned it in my previous email) is the latest >> patchset which can be applied on

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

2017-01-16 Thread Fu Wei
Hi Mark, On 16 January 2017 at 20:01, Mark Rutland wrote: > On Mon, Jan 16, 2017 at 02:26:54PM +0800, Fu Wei wrote: >> Hi Mark, >> >> This v19 (I have mentioned it in my previous email) is the latest >> patchset which can be applied on v4.10-rc4 directly. >&g

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

2017-01-15 Thread Fu Wei
Hi Mark, This v19 (I have mentioned it in my previous email) is the latest patchset which can be applied on v4.10-rc4 directly. please review this patchset, thanks! :-) On 21 December 2016 at 14:45, <fu@linaro.org> wrote: > From: Fu Wei <fu@linaro.org> > > Th

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

2017-01-15 Thread Fu Wei
Hi Mark, This v19 (I have mentioned it in my previous email) is the latest patchset which can be applied on v4.10-rc4 directly. please review this patchset, thanks! :-) On 21 December 2016 at 14:45, wrote: > From: Fu Wei > > This patchset: > (1)Preparation for adding

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

2017-01-15 Thread Fu Wei
Hi Mark, On 14 January 2017 at 19:34, Fu Wei <fu@linaro.org> wrote: > Hi Mark, > > On 14 January 2017 at 03:29, Mark Rutland <mark.rutl...@arm.com> wrote: >> Hi, >> >> On Fri, Dec 09, 2016 at 01:33:04AM +0800, fu@linaro.org wrote: >>> From:

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

2017-01-15 Thread Fu Wei
Hi Mark, On 14 January 2017 at 19:34, Fu Wei wrote: > Hi Mark, > > On 14 January 2017 at 03:29, Mark Rutland wrote: >> Hi, >> >> On Fri, Dec 09, 2016 at 01:33:04AM +0800, fu@linaro.org wrote: >>> From: Fu Wei >>> >>> This pa

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

2017-01-14 Thread Fu Wei
Hi Mark, On 14 January 2017 at 03:29, Mark Rutland <mark.rutl...@arm.com> wrote: > Hi, > > On Fri, Dec 09, 2016 at 01:33:04AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patchset: >> (1)Preparation for adding

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

2017-01-14 Thread Fu Wei
Hi Mark, On 14 January 2017 at 03:29, Mark Rutland wrote: > Hi, > > On Fri, Dec 09, 2016 at 01:33:04AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> This patchset: >> (1)Preparation for adding GTDT support in arm_arch_timer: >> 1. Mo

[PATCH v19 14/15] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2016-12-20 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> --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file

[PATCH v19 15/15] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2016-12-20 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 v19 14/15] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2016-12-20 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 --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff

[PATCH v19 15/15] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2016-12-20 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 v19 11/15] acpi/arm64: Add GTDT table parse driver

2016-12-20 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 v19 13/15] acpi/arm64: Add memory-mapped timer support in GTDT driver

2016-12-20 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 v19 12/15] clocksource/drivers/arm_arch_timer: Simplify ACPI support code.

2016-12-20 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 v19 09/15] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2016-12-20 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 v19 07/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing

2016-12-20 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 v19 09/15] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2016-12-20 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 --- include/clocksource

[PATCH v19 07/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing

2016-12-20 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 v19 12/15] clocksource/drivers/arm_arch_timer: Simplify ACPI support code.

2016-12-20 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 v19 11/15] acpi/arm64: Add GTDT table parse driver

2016-12-20 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 v19 13/15] acpi/arm64: Add memory-mapped timer support in GTDT driver

2016-12-20 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 v19 08/15] clocksource/drivers/arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2016-12-20 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 v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch refactor original memory-mapped timer init code: (1) Refactor "arch_timer_mem_init", make it become a common code for memory-mapped timer init. (2) Add a new function "arch_timer_mem_of_init" for DT init.

[PATCH v19 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2016-12-20 Thread fu . wei
From: Fu Wei The patch refactor original memory-mapped timer init code: (1) Refactor "arch_timer_mem_init", make it become a common code for memory-mapped timer init. (2) Add a new function "arch_timer_mem_of_init" for DT init. Signed-off-by: Fu Wei ---

[PATCH v19 08/15] clocksource/drivers/arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2016-12-20 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 v19 04/15] clocksource/drivers/arm_arch_timer: rename some enums and defines.

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> Rename some enums and defines, to unify the format of enums and defines in arm_arch_timer.h, also update all the users of these enums and defines: drivers/clocksource/arm_arch_timer.c virt/kvm/arm/hyp/timer-sr.c No functional change. Signed-off-

[PATCH v19 04/15] clocksource/drivers/arm_arch_timer: rename some enums and defines.

2016-12-20 Thread fu . wei
From: Fu Wei Rename some enums and defines, to unify the format of enums and defines in arm_arch_timer.h, also update all the users of these enums and defines: drivers/clocksource/arm_arch_timer.c virt/kvm/arm/hyp/timer-sr.c No functional change. Signed-off-by: Fu Wei Tested

[PATCH v19 03/15] clocksource/drivers/arm_arch_timer: Improve printk relevant code

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch defines pr_fmt(fmt) for all pr_* functions, then the pr_* doesn't need to add "arch_timer:" everytime. According to the suggestion from checkpatch.pl: (1) delete some Blank Spaces in arch_timer_banner; (2) delete a redundant Tab

[PATCH v19 05/15] clocksource/drivers/arm_arch_timer: rework PPI determination

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, the arch timer driver uses ARCH_TIMER_PHYS_SECURE_PPI to mean the driver will use the secure PPI *and* potentialy also use the non-secure PPI. This is somewhat confusing. For arm64, where it never makes sense to use the secure PPI, this means w

[PATCH v19 06/15] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, the counter frequency detection call(arch_timer_detect_rate) combines all the ways to get counter frequency: device-tree property, system coprocessor register, MMIO timer. But in the most of use cases, we don't need all the ways to try: For e

[PATCH v19 01/15] clocksource/drivers/arm_arch_timer: Move enums and defines to header file

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> To support the arm_arch_timer via ACPI we need to share defines and enums between the driver and the ACPI parser code. Split out the relevant defines and enums into arm_arch_timer.h, and change "enum ppi_nr" to "enum arch_timer_ppi_nr" t

[PATCH v19 02/15] clocksource/drivers/arm_arch_timer: Add a new enum for spi type

2016-12-20 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 v19 06/15] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2016-12-20 Thread fu . wei
From: Fu Wei Currently, the counter frequency detection call(arch_timer_detect_rate) combines all the ways to get counter frequency: device-tree property, system coprocessor register, MMIO timer. But in the most of use cases, we don't need all the ways to try: For example, reading device-tree

[PATCH v19 01/15] clocksource/drivers/arm_arch_timer: Move enums and defines to header file

2016-12-20 Thread fu . wei
From: Fu Wei To support the arm_arch_timer via ACPI we need to share defines and enums between the driver and the ACPI parser code. Split out the relevant defines and enums into arm_arch_timer.h, and change "enum ppi_nr" to "enum arch_timer_ppi_nr" to avoid the potentia

[PATCH v19 02/15] clocksource/drivers/arm_arch_timer: Add a new enum for spi type

2016-12-20 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 v19 03/15] clocksource/drivers/arm_arch_timer: Improve printk relevant code

2016-12-20 Thread fu . wei
From: Fu Wei This patch defines pr_fmt(fmt) for all pr_* functions, then the pr_* doesn't need to add "arch_timer:" everytime. According to the suggestion from checkpatch.pl: (1) delete some Blank Spaces in arch_timer_banner; (2) delete a redundant Tab in a bland line of arch_timer

[PATCH v19 05/15] clocksource/drivers/arm_arch_timer: rework PPI determination

2016-12-20 Thread fu . wei
From: Fu Wei Currently, the arch timer driver uses ARCH_TIMER_PHYS_SECURE_PPI to mean the driver will use the secure PPI *and* potentialy also use the non-secure PPI. This is somewhat confusing. For arm64, where it never makes sense to use the secure PPI, this means we must always request

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

2016-12-20 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Move some enums and marcos to header file; 2. Add a new enum for spi type; 3. Improve printk relevant code; 4. Rename some enums and defines;

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

2016-12-20 Thread fu . wei
From: Fu Wei This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Move some enums and marcos to header file; 2. Add a new enum for spi type; 3. Improve printk relevant code; 4. Rename some enums and defines; 5. Rework PPI

Re: [PATCH v18 03/15] clocksource/drivers/arm_arch_timer: Improve printk relevant code

2016-12-09 Thread Fu Wei
Hi Joe, On 9 December 2016 at 05:10, Joe Perches <j...@perches.com> wrote: > On Fri, 2016-12-09 at 01:33 +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patch defines pr_fmt(fmt) for all pr_* functions, >> then the pr_* does

Re: [PATCH v18 03/15] clocksource/drivers/arm_arch_timer: Improve printk relevant code

2016-12-09 Thread Fu Wei
Hi Joe, On 9 December 2016 at 05:10, Joe Perches wrote: > On Fri, 2016-12-09 at 01:33 +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> This patch defines pr_fmt(fmt) for all pr_* functions, >> then the pr_* doesn't need to add "arch_timer:" everytime.

[PATCH v18 11/15] acpi/arm64: Add GTDT table parse driver

2016-12-08 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 v18 15/15] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2016-12-08 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 v18 11/15] acpi/arm64: Add GTDT table parse driver

2016-12-08 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 v18 15/15] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2016-12-08 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 v18 13/15] acpi/arm64: Add memory-mapped timer support in GTDT driver

2016-12-08 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 v18 14/15] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2016-12-08 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> --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file

[PATCH v18 12/15] clocksource/drivers/arm_arch_timer: Simplify ACPI support code.

2016-12-08 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 v18 12/15] clocksource/drivers/arm_arch_timer: Simplify ACPI support code.

2016-12-08 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 v18 13/15] acpi/arm64: Add memory-mapped timer support in GTDT driver

2016-12-08 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 v18 14/15] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer

2016-12-08 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 --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff

[PATCH v18 04/15] clocksource/drivers/arm_arch_timer: rename some enums and defines.

2016-12-08 Thread fu . wei
From: Fu Wei <fu@linaro.org> Rename some enums and defines, to unify the format of enums and defines in arm_arch_timer.h, also update all the users of these enums and defines: drivers/clocksource/arm_arch_timer.c virt/kvm/arm/hyp/timer-sr.c No functional change. Signed-off-

[PATCH v18 04/15] clocksource/drivers/arm_arch_timer: rename some enums and defines.

2016-12-08 Thread fu . wei
From: Fu Wei Rename some enums and defines, to unify the format of enums and defines in arm_arch_timer.h, also update all the users of these enums and defines: drivers/clocksource/arm_arch_timer.c virt/kvm/arm/hyp/timer-sr.c No functional change. Signed-off-by: Fu Wei Tested

[PATCH v18 09/15] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2016-12-08 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 v18 09/15] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT

2016-12-08 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 --- include/clocksource

[PATCH v18 06/15] clocksource/drivers/arm_arch_timer: Rework counter frequency detection.

2016-12-08 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently, the counter frequency detection call(arch_timer_detect_rate) combines all the ways to get counter frequency: device-tree property, system coprocessor register, MMIO timer. But in the most of use cases, we don't need all the ways to try: For e

[PATCH v18 08/15] clocksource/drivers/arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2016-12-08 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 v18 07/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing

2016-12-08 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 v18 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT

2016-12-08 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch refactor original memory-mapped timer init code: (1) Refactor "arch_timer_mem_init", make it become a common code for memory-mapped timer init. (2) Add a new function "arch_timer_mem_of_init" for DT init.

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